This project is an AI-powered traffic monitoring and analysis system that uses real-time CCTV video streams to detect, track, and count vehicles. The system provides a web-based dashboard for monitoring traffic conditions, visualizing vehicle statistics, and managing CCTV streams.
The project combines computer vision, real-time video processing, and modern web technologies to support intelligent traffic management and data-driven decision making.
- Real-time CCTV video streaming
- Vehicle detection using YOLOv8
- Vehicle tracking with DeepSORT
- Automatic vehicle counting and traffic statistics generation
- Interactive dashboard for traffic monitoring
- CCTV location management and selection
- Real-time data synchronization between frontend and backend
- Automatic CPU fallback when CUDA is unavailable
- Modular and scalable backend architecture
- SvelteKit
- TypeScript
- Interactive traffic monitoring dashboard
- Reusable UI components
- CCTV selection and management utilities
- FastAPI
- SQLAlchemy
- PostgreSQL
- RESTful API architecture
- Modular structure with routers, services, schemas, and configuration modules
- YOLOv8 for vehicle detection
- DeepSORT for multi-object tracking
- OpenCV for video processing
- PyTorch for model inference
project-root/
│
├── frontend/ # SvelteKit frontend
│
├── backend/
│ ├── routers/ # API routes
│ ├── services/ # Business logic
│ ├── schemas/ # Pydantic schemas
│ ├── config/ # Configuration files
│ ├── runs/
│ │ └── detect/
│ │ └── train35/
│ │ └── weights/
│ │ └── best.pt
│ └── app_factory.py
│
└── scripts/ # Run scripts
- Receive CCTV video stream.
- Extract video frames in real time.
- Perform vehicle detection using YOLOv8.
- Track detected vehicles using DeepSORT.
- Count unique vehicles and generate statistics.
- Store traffic data through backend APIs.
- Visualize results on the web dashboard.
- SvelteKit
- FastAPI
- PostgreSQL
- SQLAlchemy
- YOLOv8
- DeepSORT
- OpenCV
- PyTorch
- Python
- TypeScript
- Traffic congestion prediction using machine learning
- Real-time alert system for abnormal traffic conditions
- Multi-camera analytics
- Kafka-based streaming architecture
- Historical traffic trend analysis
- Cloud deployment and scalability support
The goal of this project is to build a practical intelligent transportation monitoring platform that can automatically analyze traffic conditions from CCTV streams and provide meaningful insights through an easy-to-use web interface.