PyTorch-YOLOv3
PyTorch-YOLOv3 copied to clipboard
Merge overlapping bboxes by order of confidence
Thank you for your work. Can you give me some information about this understanding?
detections[0, :4] = (weights * detections[invalid, :4]).sum(0) / weights.sum()
I am also confused with this line. Have you solved it? If so, can you give some explanation. Thanks.
For my understanding, this line of code tends to compute the average bounding boxes coordinates for the top confidence bounding box, which is the result that would be saved in keep_boxes
.
The reason for this explanation is because the invalid
indexes include the top confidence bounding box and some large-overlap bounding boxes and some same classes bounding boxes. weights
are the object confidence of the boxes. They could also be seemed as the coordinates confidence of the boxes. Averaging these boxes' coordinates with their confidence as weights leads to one average box coordinates.
I am not sure my understanding is correct or not. Just for a reference for you guys.