Skip to content

πŸ–ΌοΈ End-to-end image classification β€” 🧱 custom CNN, πŸ” transfer learning, πŸ”­ Vision Transformer, and 🧩 XAI visualizations in a 🌐 Streamlit app.

License

Notifications You must be signed in to change notification settings

Shourav-Deb/Citrus-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍊 Introducing Citrus-Net

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.


Project Banner


πŸ“Œ Repository Description

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.

πŸš€ Project Stages

  • πŸ”Ž 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.

βœ… Key Features

  • 🧱 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.

πŸ› οΈ Tech Stack

  • Python (PyTorch, torchvision, scikit-learn, Captum, pytorch-grad-cam, LIME)
  • Streamlit for deployment
  • Matplotlib / Seaborn for plots
  • Google Colab / Kaggle GPU for training

πŸ“‚ Dataset

We used the 🍊 Citrus Fruit Dataset containing high-quality images of citrus fruits for training, validation, and testing.

πŸ“‘ Deliverables

  • πŸ“¦ Public GitHub repo with runnable code.
  • πŸ’Ύ Trained model weights (via Google Drive link after contacting).
  • πŸ“„ Scientific project report (IEEE/ACM style).
  • 🌐 Streamlit demo folder.

πŸš€ Quick Start

1️⃣ Clone the Repository

git clone https://github.com/your-username/Citrus-Net.git
cd Citrus-Net

2️⃣ Install Requirements

pip install -r requirements.txt

3️⃣ Run the Streamlit App

streamlit run app.py

πŸ“Έ XAI Heatmap

(Generated using Grad-CAM & LIME on random test images)

πŸ“§ Contact

If you need the trained models or datasets for academic purposes, feel free to Contact Anytime.

⭐ Acknowledgements

  • Built with PyTorch, torchvision, scikit-learn, pytorch-grad-cam, LIME, and Streamlit.
  • Inspired by cutting-edge research in Computer Vision & Explainable AI (XAI).

About

πŸ–ΌοΈ End-to-end image classification β€” 🧱 custom CNN, πŸ” transfer learning, πŸ”­ Vision Transformer, and 🧩 XAI visualizations in a 🌐 Streamlit app.

Topics

Resources

License

Stars

Watchers

Forks