The Context
Standard vehicle classification datasets (like COCO or ImageNet) often struggle with localized contexts like the yellow "Danfo" buses, "Keke" (tricycles), and "Okada" (bikes) specific to Lagos, Nigeria. This project aimed to build a model specifically fine-tuned for this environment.
Methodology
Data Collection & Preprocessing
Curated a custom dataset of Lagos transportation modes. Performed augmentation (rotation, zoom, flips) to prevent overfitting given the limited dataset size.
Model Architecture
Utilized Transfer Learning with MobileNetV2 as the base model. This was chosen for its lightweight architecture, making it suitable for potential mobile/edge deployment.
- Added custom fully connected layers on top.
- Used Softmax activation for multi-class classification (4 classes).
- Optimizer: Adam.
Results
The model achieved a Test Accuracy of 93.7%.
I deployed the model using Streamlit, creating a web interface where users can upload an image and get an instant prediction with confidence scores.