jacobgil / pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and more.
https://jacobgil.github.io/pytorch-gradcam-book
MIT License
10.55k stars 1.56k forks source link

targets #436

Open 1206927506 opened 1 year ago

1206927506 commented 1 year ago

There are a number of different classes in the model_targets file, But I do not understand ClassifierOutputTarget, ClassifierOutputSoftmaxTarget, SoftmaxOutputTarget, RawScoresOutputTarget difference and application scenarios. Specifying how much to view class_num is crucial for generating the heat map, and I hope you can help me.

1206927506 commented 1 year ago

@jacobgil

jacobgil commented 1 year ago

Hi, Yes this needs better documentation. I'm planning to write a tutorial for this.

The other targets there are for segmentation or for object detection.

Please let me know if this is clear?

willianck commented 1 year ago

Can the ClassifierOutputTarget be used if the output layer is used for regression; in this case predicting a single continuous value ?

Longhuiberkeley commented 2 weeks ago

@willianck I am working on an image regression task. Have you figured that out?