usr922 / wseg

[CVPR'22] Weakly Supervised Semantic Segmentation by Pixel-to-Prototype Contrast
126 stars 14 forks source link

pseudo mask generation for eps #4

Closed k0u-id closed 2 years ago

k0u-id commented 2 years ago

Hi, nice to see interesting research and results. Thank you.

I want to generate pseudo-masks with your pretrained eps-contrast weight, but I cannot find forward_cam in your model code.

I simply replaced the model.forward_cam to model.forward and get cam_rv from resnet38_contrast to make code run.

However, the pseudo-mask quality of cam_png is weird.. is there something that I missed?

usr922 commented 2 years ago

Hi, model.forward_cam should be the same as the original EPS model, that is https://github.com/usr922/wseg/blob/19973db2719344c338799423a61ec2b5a2bea921/network/resnet38_eps.py#L30. The generated pseudo masks are provided here.

k0u-id commented 2 years ago

Thanks for your help!

It works well, yet I have another question.

capture

As we can see in the capture, I evaluate the cam with CRF using the curve option. I got a pretty higher mIoU result.

Did you use a threshold 0.22 to generate final pseudo-masks?

capture2

I also got 73.162% mIoU with 0.22 THR, which is about 2.5% higher than you mentioned in README.

usr922 commented 2 years ago

Hi, the result without crf is reported in README, and the final pseudo label is generated with the best crf THR. In addition, we also directly use the cams (without crf refinement, THR=0.22) as the pseudo masks to train segmentation models and get similar results to the one using crf.

k0u-id commented 2 years ago

I appreciate your help! thank you