jiwoon-ahn / psa

Learning Pixel-level Semantic Affinity with Image-level Supervision for Weakly Supervised Semantic Segmentation, CVPR 2018
MIT License
380 stars 62 forks source link

why are the outputs of infer_aff.py black image? #29

Open OpencvW opened 3 years ago

OpencvW commented 3 years ago

Hi,I got all black image when I run infer_aff.py file. Does anyone have the same problem as me?please help me,thank you!

hyhyni commented 3 years ago

i meet the same problem, have you solved this problem?

Sung-Hoiank commented 3 years ago

I met the same problem, too . have you two solved this problem?

Sung-Hoiank commented 3 years ago

I have figured out why. It is supposed to be nearly black because the output CAM-mask is labeled with its class number. In the VOC 2012 data set, there are 20 classes, and were labeled by the first letter respectively. For example, person is 15 and train is 19. You can turn up the brightness of you screen to make it easier to notice the mask. If you don't get the right mask, check the weights you use. It should be vgg_cls.pth or res38_cls.pth