Project Description:
This intelligent surveillance solution leverages YOLO with tracking to detect and count people as they cross a predefined horizontal line, distinguishing between entries and exits. It uses object tracking to maintain consistent IDs across frames, thereby ensuring accurate movement tracking. Each crossing event is recorded in a CSV log file with the corresponding timestamp and person ID, enabling later analysis or audits. The visual interface provides real-time feedback including FPS, entry/exit counters, bounding boxes, head labels, and movement direction.
Core Objectives:
-
🎯 Detect and track individuals in a live or recorded video stream.
-
🎯 Determine whether each tracked person enters or exits a region.
-
🎯 Log every movement event with timestamp and ID.
-
🎯 Display annotated video output in real-time.
-
🎯 Maintain high performance and accuracy in dynamic environments.
Key Features:
✅ Real-Time People Detection: Uses YOLO for efficient and accurate human head detection.
✅ Entry/Exit Counting: Tracks individuals crossing a horizontal line and increments entry/exit counters accordingly.
✅ Logging System: Saves every entry/exit event with a timestamp and tracking ID into a CSV log file.
✅ Tracking by ID: Maintains persistent person tracking across frames for reliable direction classification.
✅ Visual Overlays: Displays bounding boxes, “Head” labels, dot markers, FPS, and entry/exit counters on-screen.
✅ Flexible Input/Output: Can process videos or live camera feeds; outputs annotated video to a file.
Technologies Used:
-
YOLO (Ultralytics) – for real-time object detection and tracking.
-
OpenCV – for video frame handling, drawing, and GUI interactions.
-
Pandas – for structured logging and CSV data management.
-
Python – core language for logic, orchestration, and automation.
Use Cases:
🏢 Factory or Workplace Monitoring – Count worker entry and exit at industrial gates.
🎓 Campus or Classroom Logging – Track student movement in educational institutions.
🏬 Retail Analytics – Estimate customer inflow and outflow in shops.
🔒 Secure Facility Access – Log personnel movement in sensitive areas.
🚦 Event Management – Analyze crowd movement for better planning and control.
Possible Enhancements:
🚀 Multi-Zone Tracking: Add multiple entry/exit lines for multiple access points.
📊 Dashboard Integration: Connect with web-based dashboards to visualize logs and trends.
🔔 Real-Time Alerts: Trigger alerts or notifications on unusual activity (e.g., tailgating).
📈 Heatmap Visualization: Analyze common movement patterns using heatmaps.
🎥 Camera Switching Logic: Integrate with multiple camera feeds for broader coverage.
📁 Database Sync: Store logs in a database instead of CSV for scalability and querying.
Conclusion:
This project presents an effective and scalable method to track and log human movement using computer vision. It is ideal for industries that require access control, footfall analytics, or automated surveillance. With real-time performance, clear visualization, and reliable logging, it serves as a lightweight yet powerful solution for smart infrastructure applications.

Reviews
There are no reviews yet.