fix: 降低 NMS 阈值到 0.01,保留更多低分数检测结果

This commit is contained in:
2025-07-21 21:03:03 +08:00
parent aaf791d2c8
commit ed74c1e5fd
2 changed files with 72 additions and 1 deletions
+2 -1
View File
@@ -197,7 +197,8 @@ def _raw_detect(det, data):
boxes_arr = np.array(boxes, dtype=np.float32)
scores_arr = np.array(scores, dtype=np.float32)
indices = cv2.dnn.NMSBoxes(boxes_arr.tolist(), scores_arr.tolist(), 0.1, 0.45)
# NMS 参数:score_threshold=0.01 保留更多低分数结果,iou_threshold=0.45
indices = cv2.dnn.NMSBoxes(boxes_arr.tolist(), scores_arr.tolist(), 0.01, 0.45)
detections = []
if indices is not None and len(indices) > 0: