A production-ready Deep Learning web application capable of classifying natural scenery images with high precision, featuring explainable AI via Grad-CAM visualizations.
The Intel Image Classification Project is a sophisticated computer vision application designed to automatically categorize images of natural environments. Built on top of a robust Convolutional Neural Network (CNN), this project demonstrates end-to-end Machine Learning development—from model training to deployment via a Flask web interface.
One of the standout features of this application is its integration of Explainable AI (XAI). Using Grad-CAM (Gradient-weighted Class Activation Mapping), the system not only predicts what an image is but effectively "looks" at the image, generating heatmaps that highlight the specific regions contributing to the decision. This transparency is critical for building trust in AI systems.
- 🔍 High-Accuracy Classification: Classifies images into 6 distinct categories:
- 🏙️ Buildings
- 🌲 Forest
- 🧊 Glacier
- ⛰️ Mountain
- 🌊 Sea
- 🛣️ Street
- 🧠 Explainable AI (Grad-CAM): Visualizes model attention with heatmap overlays, providing insights into why a specific prediction was made.
- 🌐 Interactive Web Interface: a responsive, user-friendly Flask-based frontend for easy image uploading and testing.
- ⚡ Robust Backend: Implements advanced error handling and flexible model loading strategies to ensure stability across different environments.
- 📈 Performance: Achieved ~81.5% validation accuracy during training on the Intel Image Classification dataset.
- Language: Python 3.x
- Deep Learning Framework: TensorFlow / Keras
- Web Framework: Flask
- Image Processing: OpenCV, Pillow (PIL)
- Visualization: Matplotlib, NumPy
- Containerization/Environment: Conda
📦 Intel_Image_Classification_project_flask
┣ 📂 models # Serialized trained model files (.h5)
┣ 📂 static # CSS, uploads, and generated heatmaps
┣ 📂 templates # HTML templates for the web interface
┣ 📜 analyze_model.py # Utility script to inspect model architecture
┣ 📜 app.py # Main Flask application entry point
┣ 📜 gradcam.py # Implementation of Grad-CAM algorithm
┣ 📜 requirements.txt # Project dependencies
┗ 📜 README.md # Project documentationFollow these steps to set up the project locally:
git clone https://github.com/yourusername/intel-image-classification.git
cd intel-image-classification# Using Conda
conda create -n intel_env python=3.8
conda activate intel_env
# OR using venv
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtpython app.pyThe application will start on http://localhost:5000
- Open your browser and navigate to
http://localhost:5000. - Click the "Choose File" button to select an image from your local machine.
- Supported formats:
.jpg,.jpeg,.png. - Click "Upload" to process the image.
- View the Prediction (Class Name + Confidence Score) and the Grad-CAM Visualization.
The Convolutional Neural Network was trained on the Intel Image Classification dataset.
- Training Accuracy: ~88%
- Validation Accuracy: ~81.5%
Note metrics are approximate based on the latest training run logs.
Contributions are welcome! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
[Sachin Paunikar]
This project is designed for educational and portfolio purposes, showcasing skills in standard Computer Vision pipelines and Web Deployment.