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
9.79k stars 1.52k forks source link

How should I assign a value to the "targets" when I draw the heatmap of yolov8-pose? #492

Open Xavier-W opened 3 months ago

Xavier-W commented 3 months ago

image

I don't think "targets=None" is right. in the "base_cam.py",

if targets is None:
    target_categories = np.argmax(outputs.cpu().data.numpy(), axis=-2)
    targets = [ClassifierOutputTarget(
        category) for category in target_categories]

obviously, "pose" output should not use "ClassifierOutputTarget"