FBA_Matting icon indicating copy to clipboard operation
FBA_Matting copied to clipboard

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

Open kartikwar opened this issue 4 years ago • 1 comments

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 avatar Jan 21 '21 08:01 kartikwar

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

kartikwar avatar Jan 21 '21 08:01 kartikwar