Understand how the CNN is actually making decisions.
This is a local image-recognition + visualization project with:
- FastAPI backend for inference
- React + Vite frontend for interactive visualization
- Trained CNN model at
model/final_model.pth
The model was trained on CIFAR-10 in:
Colab Session/imagerecognisitionmodeltraining.ipynb
CIFAR-10 classes:
- airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
git clone https://github.com/adityaverma9777/cnn-featuremap-visualizer.git
cd cnn-featuremap-visualizerFrom project root:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\start-backend.ps1The launcher script automatically:
- checks Python and npm
- installs backend dependencies if missing
- installs frontend dependencies if missing
- finds a free backend port (starting from 8000)
- starts backend in one PowerShell window
- starts frontend in another PowerShell window
- auto-connects frontend to the selected backend port
- Backend URL is printed by launcher (for example
http://127.0.0.1:8001if 8000 is blocked) - Frontend is usually
http://127.0.0.1:5173
- Open frontend URL shown by Vite.
- Upload an image.
- Run prediction and check output:
- predicted class
- confidence
- class probabilities
- activation/feature visualization
- Open backend docs at
<backend-url>/docs.
- This repo is local-only by design.
- No
.envsetup is required. - Backend CORS is open for local browser development.