نظام ذكي لاكتشاف وتصنيف المركبات في الوقت الحقيقي
Gemini Vision Real-Time Vehicle Detection and Classification System
This project is a real-time vehicle detection and classification system that processes YouTube live streams
using YOLO object detection and Google Gemini AI. It detects vehicles, tracks their movement, analyzes
direction, and extracts vehicle type and color, then logs all data with timestamps for further analysis.
Project Overview
This advanced AI-powered system analyzes live vehicle movement directly from YouTube streams. By combining YOLO
for object detection and Google Gemini AI for visual understanding, the system detects vehicles, tracks their
paths, determines movement direction, and classifies vehicle attributes in real time. It is ideal for smart
traffic systems, surveillance, and automated monitoring solutions.
Key Features
YOLO-Based Vehicle Detection & Tracking
- 🚗 Detects vehicles in real-time from live video streams.
- 🆔 Tracks vehicles with unique IDs across frames.
Google Gemini AI Integration
- 🧠 Uses Gemini AI to analyze cropped vehicle images.
- 🎨 Identifies vehicle type and color accurately.
Live YouTube Stream Processing
- 📺 Processes real-time YouTube live streams.
- ⚡ Enables remote monitoring without local cameras.
Vehicle Direction Analysis
- ⬆️⬇️ Determines vehicle movement direction using ROI logic.
- 📍 Tracks up/down movement for traffic analysis.
Automated Data Logging & Multithreading
- 📝 Logs vehicle ID, type, color, direction, and timestamps.
- 🧵 Uses multithreading for high-performance processing.
Technology Stack
- 🐍 Programming Language: Python
- 🎥 Computer Vision: OpenCV
- 🧠 Object Detection: YOLO (Ultralytics)
- 🤖 AI Vision Analysis: Google Gemini AI
- 📺 Video Streaming: vidgear (CamGear)
- 🧵 Performance Optimization: Multithreading
Use Cases
- 🚦 Smart Traffic Monitoring – Analyze real-time traffic flow.
- 🛣️ Automated Toll Systems – Log passing vehicles automatically.
- 👮 Security & Surveillance – Detect suspicious vehicle movement.
- 📦 Logistics & Fleet Management – Monitor vehicle activity remotely.
Conclusion
This Gemini Vision real-time vehicle detection system combines computer vision, deep learning, and AI-powered
analytics to deliver an efficient and scalable monitoring solution. The integration of YOLO and Google Gemini AI
enables accurate vehicle detection, classification, and movement analysis, making it ideal for smart cities,
security, and logistics automation.