An end-to-end image classification pipeline that combines π§± Custom CNN, π Transfer Learning, and π Vision Transformer models β enhanced with π§© Explainable AI (XAI) visualizations and deployed in a π Streamlit app.
This repository contains the complete project for building and explaining a full image classification pipeline. The pipeline moves from a hand-crafted CNN baseline to state-of-the-art deep learning models, enriched with Explainable AI (XAI) methods, and deployed as an interactive Streamlit web app.
- π Data Preparation β Exploratory analysis, class balance checks, preprocessing, and augmentations.
- π§± Custom CNN β Novel convolutional network designed and trained from scratch.
- π Transfer Learning β Fine-tuning four pretrained CNN backbones (ImageNet weights).
- π Vision Transformer (ViT) β Transformer-based classifier for advanced performance.
- π§© XAI (Explainability) β Applying Grad-CAM, Score-CAM, LIME, and SHAP to interpret predictions.
- π Streamlit App β User-friendly interface for image upload, prediction, and interactive XAI visualizations.
- π§± Custom CNN with β₯65% accuracy (baseline target).
- π Transfer learning with four unique CNN architectures (not from demo code).
- π Vision Transformer experiment.
- π Comparative evaluation (accuracy, precision, recall, F1, confusion matrices).
- π§© XAI overlays on β₯10 test images with detailed interpretation.
- π Streamlit app for model selection, predictions, and side-by-side explanations.
- Python (PyTorch, torchvision, scikit-learn, Captum, pytorch-grad-cam, LIME)
- Streamlit for deployment
- Matplotlib / Seaborn for plots
- Google Colab / Kaggle GPU for training
We used the π Citrus Fruit Dataset containing high-quality images of citrus fruits for training, validation, and testing.
- π¦ Public GitHub repo with runnable code.
- πΎ Trained model weights (via Google Drive link after contacting).
- π Scientific project report (IEEE/ACM style).
- π Streamlit demo folder.
git clone https://github.com/your-username/Citrus-Net.git
cd Citrus-Net
pip install -r requirements.txt
streamlit run app.py
(Generated using Grad-CAM & LIME on random test images)
If you need the trained models or datasets for academic purposes, feel free to Contact Anytime.
- Built with PyTorch, torchvision, scikit-learn, pytorch-grad-cam, LIME, and Streamlit.
- Inspired by cutting-edge research in Computer Vision & Explainable AI (XAI).