Comments (8)
Resnet model hasn't .features.
How I can use it using your code?
Hi,fahmanali,I change the basic network from vgg19 to renset50 in the author’s basic code, there‘re really some differences between vgg19 and resnet50. You can fork from my repository if my code can help you.
My repository can be seen:https://github.com/Caoliangjie/pytorch-gradcam-resnet50
from pytorch-grad-cam.
@Adarsh-Shrivastava-001
I have changed the original repo a little bit, and both vgg and resnet are supported now: https://github.com/loveunk/pytorch-grad-cam
from pytorch-grad-cam.
Similar to the question above~
If I trained a pytorch model without attribute features. How can I applied this method to my trained model?
from pytorch-grad-cam.
Resnet model hasn't .features.
How I can use it using your code?
Maybe you can add the attribute features to the training code and train the Resnet model from scratch?
from pytorch-grad-cam.
I want to use the same code for resnet
But unable to do so
pls help
from pytorch-grad-cam.
@loveunk @jacobgil How do you guys define the target ? I understand the structure based on 'features'/'claissfier' or 'pre_features', 'features', 'classifier', but I'm still confused with the target: ['35'] for VGG and ['2'] for Resnet.
Thank you.
from pytorch-grad-cam.
@Adarsh-Shrivastava-001 @jacobgil if you're still having troubles, I'm maintaining a repo with many CAM method implementations: https://github.com/frgfm/torch-cam. By default, the target layer is resolved automatically (the last one to produce tensors keeping the spatial dimensions), but you can specify any layer you wish.
I'd be glad to get some extra feedback!
from pytorch-grad-cam.
Hi all,
In the updated repo there is support for all torchvision models, and also Vision Transformers.
Check the Readme :-)
from pytorch-grad-cam.
Related Issues (20)
- Behaving weird when dealing with images of width or height size = 1 HOT 2
- Support grad cam for cross attention on encoder-decoder models
- ScoreCAM device mismatch error
- GNN
- Can we use grad-cam for hypernetwork ?
- Support for CLIP HOT 5
- How many forward passes are calculated with ScoreCAM?
- If the target layer of model is encapsulated, and there are multiple outputs
- Pytorch YoloV5 model with GradCAM
- Does anyone have a working example with yolov8 for segmentation?
- Video CLassification
- How to separately visualize heatmaps for classification tasks and localization tasks in object detection
- Ambiguity in GradCam Visualization with Grayscale Images HOT 2
- Can I use grad-cam for video classification?
- [Feature Request] Support MPS Device HOT 3
- So 'RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn' HOT 7
- GradCAM for Dual Attention ViT HOT 1
- how to apply grad-cam to image fusion model ?
- gradcam for binary segmentaion network
- Installation showing missing requirements.txt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-grad-cam.