Skip to content

Commit 8ea4772

Browse files
authored
Update threshold for batched NMS (#8925)
1 parent d330d75 commit 8ea4772

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchvision/ops/boxes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def batched_nms(
7878
_log_api_usage_once(batched_nms)
7979
# Benchmarks that drove the following thresholds are at
8080
# https://github.com/pytorch/vision/issues/1311#issuecomment-781329339
81-
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing():
81+
# and https://github.com/pytorch/vision/pull/8925
82+
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 100_000) and not torchvision._is_tracing():
8283
return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold)
8384
else:
8485
return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold)

0 commit comments

Comments
 (0)