AI system to detect pedestrians using cell phones.
The aim of the project is to create a vision system capable of detecting whether a pedestrian is actively using a cell phone. The project is intended to increase pedestrian safety and reduce the number of accidents. The system is to detect pedestrians and the phones held in their hands, analyze the posture of each person and then decide whether the person is actively using the phone.
- darknet framework
- yolov4/yolov4-tiny
- google colabolatory
- python
- medipipe
- opencv2
- numpy
- pylint, pytest
To learn pedestrian and cell phones detector I created my own dataset consisting of frames from videos available on youtube, which copyright allowed to use them freely. The dataset consists of images of streets and sidewalks where pedestrians are present.
Yolov4 achieved a mAp of about 75%, but network speed on CUP did not allow for real-time detection.
Phone detection by yolov4-tiny is not the best, but it allows you to work in real time. https://www.youtube.com/watch?v=dDOubt0FSmU
To run this project you must create a virtualenv with python, preferably version 3.9, and install the necessary libraries using: pip install requirements.txt
.
Now you can type python python main.py
and run the program.