Skip to content
New issue

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

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

Already on GitHub? # to your account

Is alpha loss calculated for all the pixels or just for certain pixels that are unknown in trimap #41

Open
kartikwar opened this issue Jan 21, 2021 · 1 comment

Comments

@kartikwar
Copy link

Hi in the repo https://github.com/huochaitiantang/pytorch-deep-image-matting/

the alpha prediction loss is calculated only for pixels that are unknown in trimap

"""
wi = torch.zeros(trimap.shape)
wi[trimap == 128] = 1.
t_wi = wi.cuda()
unknown_region_size = t_wi.sum()
"""

while training are you doing something similar or is it for all pixels?

Sorry couldn't find this in paper or code

@kartikwar
Copy link
Author

Also do you take average of pixels for computing loss or is it just sum of differences of alpha for each pixel ?

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

No branches or pull requests

1 participant