From 4d96d915e48f4775b475e5c52f2720f11c119254 Mon Sep 17 00:00:00 2001 From: cnmckee <43614259+cnmckee@users.noreply.github.com> Date: Tue, 27 Aug 2019 14:29:55 -0600 Subject: [PATCH] Fix NMS bug --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 8349e87..c4cce93 100644 --- a/utils.py +++ b/utils.py @@ -160,7 +160,7 @@ def _iou(box1, box2): int_x1 = min(b1_x1, b2_x1) int_y1 = min(b1_y1, b2_y1) - int_area = (int_x1 - int_x0) * (int_y1 - int_y0) + int_area = max(int_x1 - int_x0, 0) * max(int_y1 - int_y0, 0) b1_area = (b1_x1 - b1_x0) * (b1_y1 - b1_y0) b2_area = (b2_x1 - b2_x0) * (b2_y1 - b2_y0)