The relationship between IOU, confidence, and non-maximum suppression (NMS)

说明:本博客主要是记录笔记使用,方便后期自己查看。

1. Confidence

1. Confidence: Used to judge whether the object in the prediction frame is a positive sample or a negative sample (for example, in the YOLOv7bottom code, use conf_threshit to indicate the confidence level, set it conf_thresh=0.35to indicate that when the confidence level is greater than 0.35, it means a positive sample, and if it is less than 0.35, it is a negative sample)

2.IOU (Intersection over Union)

2. IOU (intersection-over-union ratio): Indicates the intersection-over-union ratio between the real frame and the predicted frame (real frame: that is, the frame drawn when we use the labeling software to label, and the predicted frame: some are also called candidate frames, which are obtained by using code training)

3. Maximum suppression (NMS)

3. Non-Maximum Suppression (NMS): Here we need to discuss the confidence and IOU together. First of all, as mentioned above, when using it conf_thresh=0.35, there are often more than one prediction frame that may be obtained for the same object, but there is only one of our object; at this time, IOU (intersection-over-union ratio) needs to be used. At this time, multiple prediction frames and real frames are calculated separately, and then NMS is used to suppress the frames with low probability, which is used in the code to express (such as setting, that is, when the IOU is less than 0.45, the prediction frame will be erased YOLOv7and iou_threshremoved iou_thresh=0.45)

Summarize

Summary: First, there will be multiple prediction frames when using the network training, and then the number of prediction frames will be reduced by setting the confidence level; then the IOU between the prediction frame and the real frame will be calculated, but there may still be multiple intersection and ratio frames. At this time, NMS is used to suppress, which will reduce the number of prediction frames to a certain extent.

Reference: Link
Reference: Link

おすすめ

転載: blog.csdn.net/weixin_56847236/article/details/131811119