This project provides a real-time people counting system using a live video stream or IP camera with OpenCV. The primary objective is to enable real-time footfall analysis for stores, buildings, shopping malls, etc., and to trigger alerts when the number of people exceeds a certain limit. This system can be particularly useful for ensuring compliance with occupancy limits, such as those enforced during the COVID-19 pandemic.
The system uses a Single Shot Detector (SSD) with a MobileNet architecture for efficient and fast object detection. The Centroid Tracker is employed to track detected individuals across frames, ensuring accurate counting.
- Real-time people counting using live video streams or IP cameras.
- Alert system to notify staff when occupancy limits are exceeded.
- Optimized for performance with threading.
- Scalable for business use in various environments.
- Footfall analysis and reporting.
- SSD (Single Shot MultiBox Detector): A fast and efficient object detection model that generates region proposals and detects objects in a single pass.
- MobileNet: A lightweight deep neural network designed for mobile and embedded vision applications, making it suitable for real-time processing on resource-constrained devices.
- Centroid Calculation: Computes the centroid of the bounding boxes detected by the SSD.
- Object Tracking: Assigns a unique ID to each detected individual and tracks them across frames by updating the centroid positions.
- Threading Optimization: Utilizes threading to handle video frame processing and object detection in parallel, improving real-time performance.
The system demonstrates efficient real-time people counting with high accuracy. The combination of SSD with MobileNet provides a good balance between speed and accuracy, while the Centroid Tracker ensures reliable tracking of individuals across frames.
- Implement additional optimizations for performance improvements.
- Explore alternative object detection models for enhanced accuracy.
- Develop a web dashboard for real-time monitoring and reporting.
- Integrate with IoT devices for automated alerting and response systems.
- The project builds upon the work of Adrian Rosebrock and his tutorial on OpenCV People Counter.
- Special thanks to the open-source community for providing pre-trained models and valuable resources.