yucornetto / MGMatting

This repository includes the official project of Mask Guided (MG) Matting, presented in our paper: Mask Guided Matting via Progressive Refinement Network
Other
332 stars 48 forks source link

Questions about loss weight? #33

Open mingqizhang opened 2 years ago

mingqizhang commented 2 years ago

Hi, I have some questions about the code? The regression loss and lap loss were only focus on the weight( 1/255<uncertain area <1-1/255) part of the prediction, which means the model not learn how to predict background(<1/255) and foreground(>1-1/255). I delet the "weight_os8[...] = 1" in trainer.py to ensure that weight_os8, weight_os4 and weight_os1 only have uncertain area value. In my opinion, the prediction in foreground and background should have the random value. But the model can also predict foreground and background.