Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Grad Cam is giving opposite results. #13

Open
snehitvaddi opened this issue Feb 27, 2024 · 2 comments
Open

My Grad Cam is giving opposite results. #13

snehitvaddi opened this issue Feb 27, 2024 · 2 comments

Comments

@snehitvaddi
Copy link

I'm working on a project where I trained a YOLOv8 model to find E.coli bacteria droplets on leaves. After using Grad-CAM on the YOLO model, which was 100% accurate, I noticed something unexpected. The areas without droplets are marked in red, and the areas with droplets are in blue, which means they're considered less important.

Does this mean the model is actually working well and just the color scheme is flipped, or did I make a mistake somewhere?

Here are the Grad-CAM results and the original image displayed side by side for comparison:

@rigvedrs
Copy link
Owner

Yes, it could mostly be related to a switch in RGB channels. OpenCV has a common issue of considering a different order of channels than other packages, so if you're using two different packages for the same image, considering this might help.

@snehitvaddi
Copy link
Author

Umm...that sounds like a fair reason but I am pretty sure that I haven't used any other image processing module other than OpenCV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants