From cfc562c2c889cc7a4cb7e6c3b020ec6e36ce6bc4 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 8 Oct 2019 12:35:25 +0200 Subject: [PATCH] updates --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index e990976d..658da502 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -260,7 +260,7 @@ def bbox_iou(box1, box2, x1y1x2y2=True, GIoU=False): if GIoU: # Generalized IoU https://arxiv.org/pdf/1902.09630.pdf c_x1, c_x2 = torch.min(b1_x1, b2_x1), torch.max(b1_x2, b2_x2) c_y1, c_y2 = torch.min(b1_y1, b2_y1), torch.max(b1_y2, b2_y2) - c_area = (c_x2 - c_x1) * (c_y2 - c_y1) # convex area + c_area = (c_x2 - c_x1) * (c_y2 - c_y1) + 1e-16 # convex area return iou - (c_area - union_area) / c_area # GIoU return iou