Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weight design #36

Open
gnftau opened this issue Apr 15, 2023 · 3 comments
Open

weight design #36

gnftau opened this issue Apr 15, 2023 · 3 comments

Comments

@gnftau
Copy link

gnftau commented Apr 15, 2023

Did I not understand the paper? Why is the Loss function in the code very different from that in the paper?
cls_loss in the code is only obtained by p_pos_weight weight, but this is not the case in the paper.

@strongwolf
Copy link
Owner

strongwolf commented Apr 27, 2023

In the code, the classificaiton loss consists of cls_loss obatained by p_pos_weight and cls_neg_loss obtained by p_neg_weigth as shown here and here.

@gnftau
Copy link
Author

gnftau commented Jun 9, 2023

The paper mentions that the calculation of t is composed of s and IoU, but in the code implementation, the calculation of t is obtained by multiplying s with the predicted location (loc). Specifically, the code implementation multiplies s with the predicted location (loc) to obtain a new vector, which is then passed through the sigmoid function to obtain t.

@strongwolf
Copy link
Owner

In the code, t = p_cls * p_loc. p_loc = torch.exp(-5reg_loss) = torch.exp(-5 (-torch.log(iou))) = iou5 if we use IoU loss. So t = p_cls * iou5 which is the same to the paper. t is not then passed through sigmoid function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants