How shashivardan-jarpati/ai-based-traffic-detection-and-speed-analysis-system works
This is a small traffic-analysis application with two runtime entry points: a video-processing script and a Streamlit dashboard. The principal workflow detects and classifies vehicles, estimates speed, displays a live overlay, and writes per-frame metrics to CSV; the dashboard reads those metrics for charts, summaries, and peak-time insights. The README describes the broader capability set, while the sampled code shows these responsibilities concentrated in two files. The video path in main.py is machine-specific, so the repository video asset is not shown as its confirmed input.
Main entry points: main.py Detection and tracking · dashboard.py Dashboard views · traffic_data.csv Traffic metrics CSV · yolov8n.pt YOLO weights
Components 9
Video processing
- Detection and tracking
main.py - Vehicle counts and speed
main.py - Live video overlay
main.py
Dashboard analytics
- Dashboard views
dashboard.py - Traffic insights
dashboard.py
Data assets
- YOLO weights
yolov8n.pt - Traffic metrics CSV
traffic_data.csv
Other components
- User
- Video input
Connections 9
- User → Detection and tracking: runs
README.md - Video input → Detection and tracking: provides frames
- Detection and tracking → YOLO weights: loads
main.py - Detection and tracking → Vehicle counts and speed: counts and estimates
main.py - Detection and tracking → Live video overlay: renders
main.py - Detection and tracking → Traffic metrics CSV: writes
main.py - User → Dashboard views: opens
README.md - Traffic metrics CSV → Dashboard views: reads
dashboard.py - Dashboard views → Traffic insights: derives
dashboard.py