Comments (10)
Hi, I'd like to know this as well! Did you ever figure it out?
from pytorch-grad-cam.
Hi, I'd like to know this as well! Did you ever figure it out?
No, I give up
from pytorch-grad-cam.
@lao-ling-jie can you link source? just trying to better understand what you mean
from pytorch-grad-cam.
@lao-ling-jie can you link source? just trying to better understand what you mean
Thank you very much. For example, the feature map of last resnet block in Resnet50 is 204877 (for input image of 224*224). I want to visualize the first channel of this feature map. How to operate ?
from pytorch-grad-cam.
so by channel are you talking the RGB
from pytorch-grad-cam.
No,it's a specific channel of feature map
from pytorch-grad-cam.
I think I did what you were looking for if I am understanding it correctly - the for loop in line 117 is creating the merged feature map,
therefore the first channel can be accessed here using the following line:
firstcam = weights[1] * target[1, :, :]
for i, w in enumerate(weights):
cam += w * target[i, :, :]
I have zipped my code and you can Ctrl+F firstcam to see what I have done elsewhere in the doc
from pytorch-grad-cam.
Thank you so much. I will verify it later.
from pytorch-grad-cam.
@lao-ling-jie verified?
from pytorch-grad-cam.
@lao-ling-jie verified?
I got the corresponding heat map,and think it works.
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.