Here's a draft of a README file based on the information you've provided:
This project implements a people counting system using YOLO (You Only Look Once) object detection models. It offers three different approaches:
- Cumulative counting within a Region of Interest (ROI)
- Real-time counting within an ROI
- Full-frame counting with Streamlit deployment
YOLO was chosen for this task due to its:
- Real-time processing capabilities
- High accuracy in object detection
- Flexibility in handling various environments and scenarios
This project uses YOLO9, which offers improvements over YOLO5 including:
- Enhanced accuracy
- Better performance on small objects
- Improved speed-accuracy trade-off
For a detailed comparison, refer to the Ultralytics documentation.
- Clone this repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install requirements:
pip install -r requirements.txt
To run the Streamlit interface:
streamlit run app.py
The models
folder contains three main scripts:
modelv1.py
: Counts people only within the ROI areamodelv2.py
: Counts people using ROI with cumulative trackingmodel_streamlit.py
: Deploys the model using Streamlit with batch processing for faster video processing
- YOLO Models Comparison
- How to Use YOLOv9
- Previous Work on People Counting
- People Counter using YOLOv8
- YOLOv9: Latest Advancement in YOLO Series
- YOLO: Algorithm for Object Detection
- Starting with improving the performance of the tracking algorithm