opencv nms 学习笔记

x33g5p2x  于2022-03-02 转载在 其他  
字(0.6k)|赞(0)|评价(0)|浏览(299)

opencv nms

nanodet用到了:

nanodet onnx踩坑记录_jacke121的专栏-CSDN博客

indices = cv2.dnn.NMSBoxes(bboxes_wh.tolist(), confidences.tolist(), self.prob_threshold, self.iou_threshold)

倾斜四边形非极大值抑制(NMS)的计算思路

opencv的:

代码所在位置:

https://github.com/root12321/Rotation-Detect-yolov5_poly/blob/6ac68bd4900e3de8d70cc3089f93dd7a1dd56e1e/utils/general.py

4.5.4版本 报错,我改成如下代码,不报错了。

  1. i = cv2.dnn.NMSBoxesRotated(boxes_for_cv2_nms, scores_for_cv2_nms, conf_thres, iou_thres)
  2. # i = np.squeeze(i, axis=-1)
  3. if i.shape[0] > max_det: # limit detections
  4. i = i[:max_det]

api:

  1. def NMSBoxesRotated(bboxes,
  2. scores,
  3. score_threshold,
  4. nms_threshold,
  5. eta=None,
  6. top_k=None):
  7. pass

这篇文章写的不错,挺详细的:

倾斜四边形非极大值抑制(NMS)的计算思路 - 简书

相关文章