Logo Lanfrica

Mostafakhaled0/Elephant-Species-Classification

Record type:

modelsoftware
Creator:
Mos
Host:
A deep learning image classifier that identifies whether an elephant in a photo is African or Asian, built with transfer learning (MobileNetV2) and deployed as an interactive Streamlit web app. # 🐘 Elephant Classifier β€” African vs Asian A deep learning image classifier that identifies whether an elephant in a photo is **African** or **Asian**, built with transfer learning (MobileNetV2) and deployed as an interactive **Streamlit** web app. --- ## πŸ“‹ Table of Contents - Overview - Demo - Dataset - Modeling Approach - Results - Project Structure - Installation - Usage - Tech Stack - Key Learnings - Limitations - Future Improvements - License --- ## 🎯 Overview **Problem Statement:** Build an image classification model that distinguishes between African and Asian elephants β€” two species with visually distinct features (ear size and shape, tusks, back profile, and body size) β€” and package it into a usable app for image-based prediction. **Approach:** Rather than training a convolutional neural network from scratch, the project uses **transfer learning** with a MobileNetV2 backbone pretrained on ImageNet, fine-tuned with a custom classification head and optimized via automated hyperparameter search. --- ## πŸŽ₯ Demo Upload any elephant image and the app returns a prediction with a confidence score. | African Elephant | Asian Elephant | |---|---| | **Prediction: African** β€” Confidence: 79.72% | **Prediction: Asian** β€” Confidence: 53.82% | *(See `/screenshots` for full app captures β€” landing page, upload flow, and prediction results.)* --- ## πŸ—‚ Dataset - **Classes:** `African` (label 0), `Asian` (label 1) - **Training set:** 840 images across both classes - **Validation/test set:** 188 images across both classes - **Input size:** 224Γ—224 RGB (299Γ—299 for the Xception experiment) - **Augmentation (training only):** rescaling (1/255), rotation (Β±20Β°), zoom (Β±20%), horizontal flip > Dataset directory structure follows Keras' `flow_from_directory` convention: > ``` > data/ > β”œβ”€β”€ train/ > β”‚ β”œβ”€β”€ African/ > β”‚ └── Asian/ > └── test/ > β”œβ”€β”€ African/ > └── Asian/ > ``` --- ## πŸ›  Modeling Approach Several architectures were evaluated before selecting …