Closed bot66 closed 5 years ago
Why add 1... I need help... util.py line37 to line41 b1_area = (b1_x2 - b1_x1 + 1) * (b1_y2 - b1_y1 + 1) b2_area = (b2_x2 - b2_x1 + 1) * (b2_y2 - b2_y1 + 1)
b1_area = (b1_x2 - b1_x1 + 1) * (b1_y2 - b1_y1 + 1)
b2_area = (b2_x2 - b2_x1 + 1) * (b2_y2 - b2_y1 + 1)
I found my anwser in kaggle ! reason for add 1 is about to avoid 0/0 situation,soomth the value. https://www.kaggle.com/iezepov/fast-iou-scoring-metric-in-pytorch-and-numpy
Why add 1... I need help... util.py line37 to line41
b1_area = (b1_x2 - b1_x1 + 1) * (b1_y2 - b1_y1 + 1)
b2_area = (b2_x2 - b2_x1 + 1) * (b2_y2 - b2_y1 + 1)