Several packages are required to make the whole code work as follow.The deployment is designed to run on regular CPU with real-time speed.
Labelme
was a tool to design the study zones, i.e., where to count. Save the zone definition in a json file and pass its path to the main.py code.- USe https://www.robots.ox.ac.uk/~vgg/software/via/via.html for defining the study zones instead. Labelme is not working with some Windows 10/11 updates.
DETR and SORT
This tool is selected due to the big size of the cars exiting the garage. DETR is suitable for these irregularly large object compared to YOLO seires.P2PNET and SORT
. There is servere occlusion in the pedestrain videos, therefore we use a point based head detector and point based tracker to count the pedestrains.
- Install lableme
pip install labelme
and load one screen shot of the camera and defined the study zones. - git clone detr, p2pnet, and SORT.
git clone https://github.com/facebookresearch/detr.git
git clone https://github.com/TencentYoutuResearch/CrowdCounting-P2PNet.git
git clone https://github.com/adipandas/multi-object-tracker
- Add the directories above to the python sys in
mian.py
. - pass the video path to
main.py
for now. Later the signal will be live feed.
@article{pi2022visual, title={Visual recognition for urban traffic data retrieval and analysis in major events using convolutional neural networks}, author={Pi, Yalong and Duffield, Nick and Behzadan, Amir H and Lomax, Tim}, journal={Computational Urban Science}, volume={2}, number={1}, pages={1--16}, year={2022}, publisher={Springer} }
@article{pi2023lane, title={Lane-specific speed analysis in urban work zones with computer vision}, author={Pi, Yalong and Duffield, Nick and Behzadan, Amir and Lomax, Tim}, journal={Traffic injury prevention}, pages={1--9}, year={2023}, publisher={Taylor & Francis} }
@incollection{pi2021computer, title={Computer vision and multi-object tracking for traffic measurement from campus monitoring cameras}, author={Pi, Yalong and Duffield, Nick and Behzadan, Amir H and Lomax, Tim}, booktitle={Computing in Civil Engineering 2021}, pages={950--958} }