Spritan / YOLOv8_Explainer

XAI for yoloV8
https://spritan.github.io/YOLOv8_Explainer/
MIT License
11 stars 4 forks source link

Certain images will report exception when generating greyscale_cam #4

Open tvc5586 opened 4 months ago

tvc5586 commented 4 months ago

Hello.

I encountered a issue with the generation of greyscale_cam (located in core.py). In short, some images will report exception "'int' object has no attribute 'backward'", while others won't. I found out that the problem is caused by the line that generates greyscale_cam.

The line originally looks like grayscale_cam = self.method(tensor, [self.target]) Even after changing the line to grayscale_cam = self.method(tensor.requires_grad_(), [self.target]) the problem still persists.

For records, I am using YOLOv8n.pt downloaded from Ultralytics and ISIC2019 dataset. The exception occurs when I try to use any method but "EigenCAM".

Hopefully a solution can be found as soon as possible.

dev-rajk commented 4 months ago

Thanks for raising the issue. We have been caught up in a few exams for the past week. We will try to replicate the issue and resolve it at the earliest.