Weighted-Boxes-Fusion
Weighted-Boxes-Fusion copied to clipboard
confidence score > 1 issue
elif not allows_overflow:
weighted_boxes[i][1] = weighted_boxes[i][1] * min(len(weights), len(clustered_boxes)) / weights.sum()
Hi there, I noticed this line of code indicating whether the confidence score is allowed to overflow 1 or not. However, I didn't get it. Suppose I have four models with weights: 0.5, 0.5, 0.5, 1. we thus have weights.sum=2.5
Let's say the current cluster have 5 boxes, then len(clustered_boxes)=5. Now we have min(len(weights), len(clustered_boxes)) = min(4,5)=4 > weights.sum()
Do weighted_boxes[i][1] will overflow... Did I misunderstand something here? Thanks!
As I remeber this was resolved here: https://github.com/ZFTurbo/Weighted-Boxes-Fusion/issues/38
In all experiments it was lower than 1.0. Please try to create counter example.