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

ModuleNotFoundError: No module named 'pytorch_grad_cam.metrics' #316

Closed drashokpuri closed 1 year ago

drashokpuri commented 1 year ago

Pytorch Grad-Cam was working well with my resnet18 models till 23rd of Aug 2022. Suddenly from today, 24th Aug I am constantly getting this error - ModuleNotFoundError: No module named 'pytorch_grad_cam.metrics', when I run the code in both, colab and spyder: from pytorch_grad_cam import GradCAM, HiResCAM, ScoreCAM, GradCAMPlusPlus, AblationCAM, XGradCAM, EigenCAM, FullGrad from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget from pytorch_grad_cam.utils.image import show_cam_on_image from torchvision.models import resnet18

Kindly help

ZhongxuanWang commented 1 year ago

Same happened to me. It worked perfectly fine in the past, but now I just can't get it to work... My version is grad-cam-1.4.4

jacobgil commented 1 year ago

Dear all, It should be fixed now in the latest version. Sorry for the inconvenience.

Can you please upgrade and confirm that now it works ?

drashokpuri commented 1 year ago

Thanks a lot. It is working now with grad-cam 1.4.5. But, it still is not working with pytorch-gradcam 0.2.1 and c-conda-forge grad-cam.Kindly look into these too.Regards,Ashok On Thursday, August 25, 2022 at 12:17:10 PM GMT+5:30, Jacob Gildenblat @.***> wrote:

Dear all, It should be fixed now in the latest version. Sorry for the inconvenience.

Can you please upgrade and confirm that now it works ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>