Yaoyi-Li / GCA-Matting

Official repository for Natural Image Matting via Guided Contextual Attention
MIT License
390 stars 62 forks source link

normalize trimap #13

Open ucb-pb opened 4 years ago

ucb-pb commented 4 years ago

Hi, thanks for sharing your work. Just wondering -- why do you normalize the alpha image but not the trimap when training?

Yaoyi-Li commented 4 years ago

I'm not sure about what do you mean by normalizing alpha image and trimap. If you mean this line: https://github.com/Yaoyi-Li/GCA-Matting/blob/5a999be4b00bb482658fa7013a74a2b8acddc78e/dataloader/data_generator.py#L487 Our network takes a 3-channel one-hot trimap as the input, so the trimap need not to be normalized.