نظام ذكي لمراقبة وتتبع مناطق الانتظار
Parking Zone Monitoring and Tracking System
This project uses the YOLO object detection model to track objects in video streams
and dynamically determine zone occupancy using user-defined polygon regions.
It provides real-time feedback on occupied and free zones, making it ideal for
parking management, surveillance, and smart space monitoring.
Project Overview
The Parking Zone Monitoring and Tracking System is a real-time computer vision
solution that allows users to define custom polygonal zones inside a video frame
and monitor object presence within those zones. Using a custom-trained YOLO model,
the system tracks objects, determines zone occupancy, and displays live analytics
for total, free, and occupied zones.
Key Features
Interactive Zone Drawing
- ✏️ Draw custom polygon zones using mouse clicks.
- 🔄 Undo, clear, or reset zones easily.
- 💾 Zones are saved persistently in a JSON file.
YOLO-Based Object Tracking
- 🧠 Real-time detection and tracking using Ultralytics YOLO.
- 📍 Tracks object center points (cx, cy).
- 📐 Uses point-in-polygon testing for zone detection.
Zone Occupancy Visualization
- 🔴 Occupied zones highlighted in red.
- 🟢 Free zones clearly identified.
- 🎯 Detected objects marked with colored center points.
Live Zone Analytics
- 📊 Displays total zones count.
- 🚗 Shows number of occupied parking zones.
- 🅿️ Displays available (free) zones in real time.
Custom Enhancements
- 🔢 Support for zones with variable number of points.
- 🏷️ Add zone names or labels.
- ⏱️ Track time spent by each object in a zone.
- 📁 Export statistics to CSV or cloud databases.
- 📡 Support webcam and IP camera streams.
Technology Stack
- 🐍 Programming Language: Python
- 🎥 Computer Vision: OpenCV
- 🧠 Object Detection & Tracking: YOLO (Ultralytics)
- 🖥️ Visualization & UI: cvzone
- 💾 Data Storage: JSON
Use Cases
- 🅿️ Parking Lot Management – Monitor occupied and free parking spots.
- 🏭 Industrial Monitoring – Track activity in safety or work zones.
- 🐓 Livestock Management – Monitor animals inside defined areas.
- 🛍️ Retail Analytics – Analyze customer presence in store zones.
- 🏢 Smart Offices – Detect occupancy in meeting rooms.
- 🚨 Surveillance Systems – Monitor restricted or high-priority zones.
Conclusion
The Parking Zone Monitoring and Tracking System delivers a powerful and flexible
solution for zone-based object tracking. With interactive polygon drawing,
real-time occupancy detection, and live analytics, it is well-suited for smart
parking systems, surveillance, and intelligent space management applications.