aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.38k stars 650 forks source link

Question for compute_iou #565

Closed redleaf-kim closed 2 years ago

redleaf-kim commented 2 years ago

Firstly thanks for the greatest work.

If I got iou equation correctly, I need to get W and H for each predicted bounding boxes and target boxes and overlapping boxes respectively to calculate iou score. And here W, H is boxes[:, 2] - boxes[:, 0] and boxes[:, 3] - boxes[:, 1] respectively.

But compute_iou function below take W, H as boxes[:, 2] + boxes[:, 0] and boxes[:, 3] + boxes[:, 1] respectively. Here is the question. Is there any specific reason for calculating iou scores like below or am I get wrong about iou score equation?

https://github.com/aim-uofa/AdelaiDet/blob/c0b2092ce72442b0f40972f7c6dda8bb52c46d16/adet/utils/comm.py#L81-L94

redleaf-kim commented 2 years ago

I got it... for FCOS l∗, t∗, r*,b∗ are the distances from the location to the four sides of the bound-ing box.