From 8b4876e89ed8ceebaea80c31e19a6c67f10dbe8d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 24 May 2022 14:00:52 +0200 Subject: [PATCH 1/2] Increase NMS fixed time limit to 200ms --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index d44898b246bb..44ac65c470ca 100755 --- a/utils/general.py +++ b/utils/general.py @@ -795,7 +795,7 @@ def non_max_suppression(prediction, # min_wh = 2 # (pixels) minimum box width and height max_wh = 7680 # (pixels) maximum box width and height max_nms = 30000 # maximum number of boxes into torchvision.ops.nms() - time_limit = 0.1 + 0.05 * bs # seconds to quit after + time_limit = 0.2 + 0.05 * bs # seconds to quit after redundant = True # require redundant detections multi_label &= nc > 1 # multiple labels per box (adds 0.5ms/img) merge = False # use merge-NMS From 9deb72efc4ccbcd91d98a88da1c3af8baff33bcd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 24 May 2022 14:05:51 +0200 Subject: [PATCH 2/2] Update general.py --- utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/general.py b/utils/general.py index 44ac65c470ca..27c439e3e18c 100755 --- a/utils/general.py +++ b/utils/general.py @@ -795,7 +795,7 @@ def non_max_suppression(prediction, # min_wh = 2 # (pixels) minimum box width and height max_wh = 7680 # (pixels) maximum box width and height max_nms = 30000 # maximum number of boxes into torchvision.ops.nms() - time_limit = 0.2 + 0.05 * bs # seconds to quit after + time_limit = 0.3 + 0.03 * bs # seconds to quit after redundant = True # require redundant detections multi_label &= nc > 1 # multiple labels per box (adds 0.5ms/img) merge = False # use merge-NMS