Logo Lanfrica

Techdee1/Lagos_Traffic_AI_System

Domain:

mobility

Record type:

softwareproject
Creator:
Tec
Host:
An AI-powered real-time vehicle detection and classification system designed specifically for Lagos, Nigeria roads. Detects and classifies Lagos-specific vehicle types including Okada, Danfo, BRT, Keke Napep, and more. # 🚦 Lagos Traffic Analysis System An AI-powered real-time vehicle detection and classification system designed specifically for Lagos, Nigeria roads. Detects and classifies Lagos-specific vehicle types including Okada, Danfo, BRT, Keke Napep, and more. ## 🎯 Features - **Real-time Vehicle Detection** - Live video stream processing with YOLOv8 - **Lagos-Specific Classification** - Identifies local vehicle types: - 🏍️ Okada (Motorcycles) - 🚐 Danfo (Yellow Minibuses) - 🚌 BRT (Blue Rapid Transit Buses) - πŸ›Ί Keke Napep (Yellow Tricycles) - 🚍 Other Buses - 🚚 Trucks - πŸš— Private Cars - **Unique Vehicle Counting** - IoU-based tracking counts each vehicle once - **Professional Web Dashboard** - Modern UI with Tailwind CSS - **Real-time Analytics** - Live charts and statistics - **Database Logging** - SQLite storage for historical analysis ## πŸ–ΌοΈ Screenshots *Add your screenshots here* ## πŸ› οΈ Tech Stack - **Detection**: YOLOv8 (Ultralytics) - **Backend**: FastAPI + Uvicorn - **Video Processing**: OpenCV - **Database**: SQLite - **Frontend**: HTML5 + Tailwind CSS + Chart.js - **Real-time Updates**: WebSocket ## πŸ“ Project Structure ``` lagos_traffic/ β”œβ”€β”€ config.py # Configuration settings β”œβ”€β”€ main.py # Main orchestration script β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ modules/ β”‚ β”œβ”€β”€ detector.py # Vehicle detection & classification β”‚ β”œβ”€β”€ tracker.py # IoU-based vehicle tracking β”‚ β”œβ”€β”€ camera.py # Video/camera handling β”‚ └── database.py # SQLite database operations β”œβ”€β”€ dashboard/ β”‚ β”œβ”€β”€ app.py # FastAPI backend β”‚ β”œβ”€β”€ templates/ β”‚ β”‚ └── index.html # Web dashboard UI β”‚ └── static/ # Static assets β”œβ”€β”€ test_videos/ # Place test videos here β”œβ”€β”€ database/ # SQLite database storage └── logs/ # Application logs ``` ## πŸš€ Getting Started ### Prerequisites - Python 3.9+ - pip ### Installation 1. **Clone the repository** ```bas …