Jacobi93 / Alpha-IoU

[NeurIPS 2021] Alpha-IoU: A Family of Power Intersection over Union Losses for Bounding Box Regression
GNU General Public License v3.0
154 stars 21 forks source link

question about the formula of alpha-DIoU loss in Eq. (4) #6

Closed wangren97 closed 2 years ago

wangren97 commented 2 years ago

Dear author, Thanks for your work. I have a question about the the formula of alpha-DIoU loss in Eq. (4) from the paper. The alpha-version of the penalty term computed based on B and Bgt is ρ^(2alpha) / c^(2alpha), where ρ(·) being the Euclidean distance and c being the diagonal length of the smallest enclosing box. In your code, utils/general.py, line 405: c2 = cw beta + ch beta + eps # convex diagonal and line 408: rho2 = (rho_x beta + rho_y beta) / (2 ** beta) # center distance, it calculates the alpha version of penalty term as (w^(2alpha) + h^(2alpha)) / ( ρx^(2alpha) + ρy^(2alpha)) [type 1]. Why not ((w^2 + h^2) / (ρx^2 + ρy^2))^alpha [type 2]? It seems type 2 is reasonable because it follows the form (term)^alpha, such as IoU^alpha, (BV)^alpha and keeps the representation of Euclidean distance. In type 1, I don't understand the meaning of w^(2alpha) + h^(2alpha), does it still mean distance? Could you please explain more details about your design and why it is better than type 2? I don't find the theoretical analysis about this part in the paper. Thanks

Jacobi93 commented 2 years ago

Thx so much for your interest and you're right to use type 2 as the training loss function. Actually, we try both type 1 and 2 and find little difference in their final performance. They maintain the same dimension consistency, i.e., area^(alpha) is equivalent to length^(2*alpha). In addition, the regularization term is not as important as the IoU term in our experiments, which is also empirically demonstrated in the paper. Thx again for your question and I have changed the form back to type 2 in utils/general.py.

wangren97 commented 2 years ago

Thanks for your reply. I will close this issue.