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

Question about loss on valid image region during training #90

Open
JoyHuYY1412 opened this issue Feb 15, 2024 · 1 comment
Open

Question about loss on valid image region during training #90

JoyHuYY1412 opened this issue Feb 15, 2024 · 1 comment

Comments

@JoyHuYY1412
Copy link

Hi Nupur, thank you for your great work. My question is as you mentioned you only "backpropagate the loss on valid regions", and I found you use mask to mask out the loss as loss = ((loss*mask).sum([1, 2, 3])/mask.sum([1, 2, 3])).mean(). Does here the image mask means valid regions in your paper? And you only want to reconstruct the object so that it won't overfit to the background, am I right?

@nupurkmr9
Copy link
Collaborator

Hi, in our method, we perform some basic data augmentations like resizing the image and copy-pasting it on a larger canvas; in this case, the valid region is the smaller copy-pasted image.
This idea can be extended to only reconstruct the object as well and ignore the background. However, in my observation, having different backgrounds helps the model learn the concept better.
Hope this answers your question.

Thanks.

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