This project is a real-time video analytics dashboard using YOLOv10 and LLM (Large Language Model) integration, built with Flask and Ultralytics YOLO. It provides live object detection, analytics, and AI-powered insights from any video source (webcam, IP camera, or video file).
- Live Video Feed: View real-time video from webcam, IP stream, or video file.
- Object Detection: Uses YOLOv10 for detecting people, vehicles, weapons, and more.
- Analytics Panels: Live stats for queue, crowd, weapons, traffic, and parking.
- Detection History: Per-second detection graphs for all features.
- LLM Insights: AI-generated summaries and Q&A about the current video feed and analytics.
- Alerts: Real-time alerts for crowding, weapons, and traffic events.
- Modern Dashboard UI: Responsive, dark-mode enabled, with sidebar navigation.
- Python 3.8+
- pip
- (Recommended) A CUDA-capable GPU for best YOLO performance
-
Clone the repository
git clone <your-repo-url> cd InovHack
-
Install dependencies
pip install -r requirements.txt
(If
requirements.txtis missing, install manually:)pip install flask opencv-python ultralytics torch requests
-
Download YOLOv10 model weights
- Download
yolov10n.ptfrom the Ultralytics YOLOv10 release page and place it in the project root.
- Download
-
Set your OpenRouter API key
- Get a free API key from OpenRouter.
- Set it as an environment variable:
set OPENROUTER_API_KEY=sk-or-...
python app.py- The dashboard will be available at http://127.0.0.1:5000
- Switch Video Source: Use the dropdown above the video feed to select webcam (Live Camera) or enter a video/IP stream URL.
- View Analytics: Use the sidebar to switch between Queue, Crowd, Weapons, Traffic, and Parking panels.
- Ask the AI: Use the LLM Insights panel to ask questions about the current analytics.
app.py- Main Flask backend, YOLO/LLM logic, API endpointstemplates/dashboard.html- Dashboard UI (Bootstrap 5, Chart.js)yolov8n.ptoryolov10n.pt- YOLO model weightsrequirements.txt- Python dependencies
- For webcam, ensure your device has a camera and OpenCV can access it (index 0).
- For video files or IP streams, enter the full path or URL in the dashboard.
- LLM features require a valid OpenRouter API key and internet access.
MIT License
Made for InovHack 2.0 by DevSidd2006