Skip to content
New issue

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

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

Already on GitHub? # to your account

Added Grad-CAM Heatmap Visualizer #999

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

ParasSethi737
Copy link
Contributor

@ParasSethi737 ParasSethi737 commented Jan 8, 2025

Pull Request for DL-Simplified 💡

Issue Title : Grad-CAM Heatmap Visualization for CNN Model Interpretability

  • Info about the related issue (Aim of the project) : This project aims to implement Grad-CAM for visualizing class-specific heatmaps in CNN-based image classification models, such as ResNet50, VGG19, and Xception. The goal is to better understand the decision-making process of the model by visualizing which parts of the input image influenced the predictions the most.

  • Name: Paras Sethi

  • GitHub ID: ParasSethi737

  • Email ID: paras.sethi340@gmail.com

  • Identify yourself: SWOC Participant

Closes: #880

Describe the add-ons or changes you've made 📃

  • Implemented Grad-CAM heatmap visualization for popular CNN models (ResNet50, VGG19, and Xception).
  • Added functionality to overlay heatmaps on input images and visualize them.
  • Incorporated the ability to save and display the output heatmap images.
  • Structured the project with a clear folder structure, including necessary Python files and images.

Type of change ☑️

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? ⚙️

  • Tested the heatmap generation for various CNN models (ResNet50, VGG19, Xception) on sample images.
  • Verified that the generated heatmaps align with model predictions, highlighting areas that influence the classification.

Checklist: ☑️

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Copy link

github-actions bot commented Jan 8, 2025

Our team will soon review your PR. Thanks @ParasSethi737 :)

@abhisheks008 abhisheks008 added Status: Requested Changes Changes requested. SWOC Social Winter of Code, 2025 labels Jan 10, 2025
Copy link
Owner

@abhisheks008 abhisheks008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ParasSethi737 looks good to me. Can you please test the models using more images, instead of using one image only? At least 4 images will do it for me.

@ParasSethi737
Copy link
Contributor Author

Hi @abhisheks008, I have updated the code to test the models with 4 images as requested.

Copy link
Owner

@abhisheks008 abhisheks008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR is approved and ready to be merged!!
@ParasSethi737

@abhisheks008 abhisheks008 added Status: Approved Approved PR by the PA. INTERMEDIATE and removed Status: Requested Changes Changes requested. labels Jan 13, 2025
@abhisheks008 abhisheks008 merged commit ef5413b into abhisheks008:main Jan 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
INTERMEDIATE Points Updated Status: Approved Approved PR by the PA. SWOC Social Winter of Code, 2025
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heatmap Visualization of a Image Classification Model like Xception using GRAD-CAM
2 participants