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

Localization consistency loss in csd.py #3

Closed
lianqing11 opened this issue Jan 13, 2020 · 2 comments
Closed

Localization consistency loss in csd.py #3

lianqing11 opened this issue Jan 13, 2020 · 2 comments

Comments

@lianqing11
Copy link

Hi author,
Thanks for your wonderful work and your released code. I am confused about the code for the Localization consistency loss in https://github.com/soo89/CSD-SSD/blob/30b184c86a87b0fc2d301cd8157b11d8cfe7da1e/train_csd.py#L297.

consistency_loc_loss_x = torch.mean(torch.pow(loc_sampled[:, 0] + loc_sampled_flip[:, 0], exponent=2))
  
consistency_loc_loss_y = torch.mean(torch.pow(loc_sampled[:, 1] - loc_sampled_flip[:, 1], exponent=2))
                
consistency_loc_loss_w = torch.mean(torch.pow(loc_sampled[:, 2] - loc_sampled_flip[:, 2], exponent=2))
                
consistency_loc_loss_h = torch.mean(torch.pow(loc_sampled[:, 3] - loc_sampled_flip[:, 3], exponent=2))

For y, w, and h you use '-' when calculating the mean squared loss. I am confused about why you use '+' for x when calculating the mean squared loss.

@soo89
Copy link
Owner

soo89 commented Jan 13, 2020

@soo89 soo89 closed this as completed Jan 13, 2020
@ChenZiLiangSSS
Copy link

thanks for your great research. I have a question that after flipping x becomes -x, does it mean the coordinate center is the center of picture not top left corner?thank you!

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

3 participants