A web-based deep learning application that classifies underwater marine species from images and visualizes model attention using Grad-CAM.
🔗 marine-species-classificationapp.streamlit.app
This project applies deep learning and computer vision to automatically classify different types of marine species from underwater images.
It also includes Grad-CAM (Gradient-weighted Class Activation Mapping) to interpret what the model is focusing on while making predictions.
Dataset Source: Fish Species Image Dataset (Kaggle)
- 💾 ~4,000 cropped images of various marine species
- 📁 Images stored in
/Fish_Data/images/cropped/ - ✅ Dataset used to train and evaluate a ResNet-based CNN classifier
| Component | Tool |
|---|---|
| Language | Python 3.12 |
| Deep Learning | PyTorch, torchvision |
| Web App | Streamlit |
| Visualization | Matplotlib, OpenCV |
| Deployment | Streamlit Cloud |
- 📚 Base Model: ResNet18
- 🔄 Fine-tuned on marine species dataset
- 🧠 Last fully connected layer adjusted for custom class count
- 🧾 Saved in
float16precision for faster loading
- 📤 Upload any marine species image
- 🤖 Get instant top predictions with confidence scores
- 🔍 View Grad-CAM heatmaps to understand model focus
- 📊 Simple, interactive UI
marine-species-classification.app/
├── app.py
├── resnet18_half_precision.pth
├── Marine_Species_Classifier_using_Deep_Learning.ipynb
├── requirements.txt
└── README.md
👨💻 Author Ashutosh Kumar 🎓 IIT Patna 📧 ashutosh_2312res778@iitp.ac.in 🔗 LinkedIn | GitHub
# Clone the repo
git clone https://github.com/ashutosh8021/marine-species-classification.git
cd marine-species-classification
# Install dependencies
pip install -r requirements.txt
# Run the Streamlit app
streamlit run app.py