AI-powered pothole detection system with synthetic data generation for African road conditions
# đźš— Pothole & Road Anomaly Detector
A production-ready computer vision system for real-time pothole and road anomaly detection using deep learning. Specifically enhanced with synthetic data generation to handle challenging African road conditions including dust, rain, mud, and harsh sunlight.
## 🌟 Key Features
### 🎯 Core Capabilities
- **Transfer Learning**: Leverage pre-trained ResNet50, EfficientNet, or MobileNetV2
- **Grad-CAM Visualization**: Interpretable AI showing exactly where potholes are detected
- **Multi-Dataset Support**: Easy integration and merging of multiple pothole datasets
### 🌍 African Road Condition Simulation
- **Dust Effects**: Brownish haze and airborne particles common on unpaved roads
- **Rain Simulation**: Wet surfaces, water reflections, and rain streaks
- **Mud Splatter**: Realistic mud spots and droplets on camera lens
- **Harsh Sunlight**: Overexposure, lens flare, and extreme brightness
- **Dynamic Shadows**: Irregular patterns from trees, buildings, and power lines
- **Worn Surfaces**: Aged road texture with reduced saturation
### 📊 Comprehensive Analytics
- **Accuracy, Precision, Recall, F1-Score**: Complete performance metrics
- **AUC-ROC Curve**: Threshold-independent evaluation
- **Confusion Matrix**: Visual performance breakdown
- **Training Curves**: Real-time monitoring via TensorBoard
- **Classification Reports**: Detailed per-class statistics
## 🚀 Quick Start
### Dataset Setup
**Option 1: Download Kaggle Dataset**
```bash
# Download from Kaggle
kaggle datasets download -d atulyakumar98/pothole-detection-dataset
# Extract
unzip pothole-detection-dataset.zip -d data/
# Verify structure
python dataset_checker.py --data_dir data/pothole-detection-dataset
```
**Option 2: Create Sample Dataset**
```bash
# Generate synthetic test data
python create_sample_data.py --output_dir data/pothole-detection-dataset --num_samples 100
```
### Training
```bash
# Basic training
python main.py --mode train \
--data_dir data/pothole- …