Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the result of obtian_cam_masking.py and the pseudo mask #17

Open
whiterAutumn opened this issue Dec 17, 2021 · 4 comments
Open

the result of obtian_cam_masking.py and the pseudo mask #17

whiterAutumn opened this issue Dec 17, 2021 · 4 comments

Comments

@whiterAutumn
Copy link

Hi,thanks for your sharing!But i still have some questions look forward to your answer!
is the result of the obtian_cam_masking.py a pseudo mask dirtectly used in training segmentation network?if not, can you tell how to generate it?
Thank you!

@jbeomlee93
Copy link
Owner

Hi,

You can run "get_mask_quality.sh" for a whole process.

More specifically, after obtaining CAM with "obtian_cam_masking.py", you should run "python run_sample.py" to generate the final pseudo ground-truth masks.

Thanks

@whiterAutumn
Copy link
Author

whiterAutumn commented Dec 17, 2021

I'm glad to receive your quick reply!
According to my understanding of the code,the ".npy" file used in obtian_cam_masking.py is generated by resnet50_cam.

model = getattr(importlib.import_module(args.cam_network), 'CAM')()
 model.load_state_dict(torch.load(args.cam_weights_name + '.pth'), strict=True)
 model.eval()

However, the make_sem_seg_labels.py and make_sem_seg_labels.py are based on resnet50_irn

model = getattr(importlib.import_module(args.irn_network), 'EdgeDisplacement')()
    print(args.irn_weights_name)
    model.load_state_dict(torch.load(args.irn_weights_name), strict=False)
    model.eval()

In this paper, it said that irn is the baseline。so the model obtian_cam_masking.py used should be changed to resnet50_irn

Is there any deviation in my understanding?look forward for your relpy sincerely!

@jbeomlee93
Copy link
Owner

IRN (resnet50_irn) is the network to refine the initial seed (CAM), which is obtained from the classifier (resnet50_cam).

So, we first obtain the CAM from resnet50_cam, and then refine the CAM using resnet50_irn.

The official implementation of IRN (https://github.com/jiwoon-ahn/irn) also follows this process.

Thanks!

@whiterAutumn
Copy link
Author

I’m very sorry that don't carefully reading !
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants