opencv nms 学习笔记

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

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版本 报错,我改成如下代码,不报错了。

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

api:

def NMSBoxesRotated(bboxes, 
                    scores, 
                    score_threshold, 
                    nms_threshold, 
                    eta=None, 
                    top_k=None):
    pass

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

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

相关文章