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

Implement SegGradCAM based on pytorch-grad-cam #94

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sxsong1207
Copy link

Hi all,

Thank you for the effort of developing this code in PyTorch. I am recently investigating semantic segmentation networks with CAM. And wrote a few adaptors to accommodate segmentation nets.

pytorch_grad_cam/utils/roi.py

The original code is written in keras: https://github.com/kiraving/SegGradCAM/

My code contains several ROI definitions to aggregate values for CAM analysis. Some of them contain interactive tools allowing users to pick a pixel/region for analysis.

The segcam.py shows the usage of my code.

Hope it will make the project more powerful.

Thanks,
Shaun

@jacobgil
Copy link
Owner

Hi, thanks a lot, this is impressive.

I'm looking into this, might take me about a week.

There seem to be some minor bugs:
--roimode 2 returns me an error, and it doesn't work with --use-cuda.
Is --roimode 2 supposed to work?

fixed incompatibility of --use-cuda
@sxsong1207
Copy link
Author

Thanks for your reviewing.

Yes, the roimode 2 is supposed to work and I have already fixed it.

As well as working together with the --use-cuda flag, I fixed it by transfer the tensor to the same device as the model.

Thank you,
Shaun

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

Successfully merging this pull request may close these issues.

None yet

2 participants