This repository contains two mini-projects demonstrating Class Activation Mapping (CAM) using pre-trained CNNs on:
- 🐱🐶 Cats vs. Dogs Dataset
- 👕👖 Fashion MNIST Dataset
Both notebooks visualize model attention using Grad-CAM to better understand CNN decision-making in image classification tasks.
CatsDogs_CAM.ipynb
: Visual explanation of binary classification using MobileNetV2 and Grad-CAM on Cats vs. Dogs.FashionMNIST_CAM.ipynb
: Grad-CAM on FashionMNIST with a custom CNN to inspect feature relevance.
To demonstrate interpretability in CNNs using Class Activation Maps, helping users:
- Visualize where the model is "looking" when classifying images
- Gain intuition about model trust and errors
- Learn to implement Grad-CAM from scratch using TensorFlow
- Python 3.10+
- TensorFlow 2.x / Keras
- NumPy, Matplotlib, OpenCV
- Grad-CAM (custom logic)
-
🐾 Cats vs. Dogs
From TensorFlow Datasets (TFDS)
Binary classification between cat and dog images. -
🛍 Fashion MNIST
28x28 grayscale images of clothing items
Multi-class classification with 10 labels
git clone https://github.com/yourusername/vision-cam-tensorflow.git
cd vision-cam-tensorflow