- This project used OpenCV HOG people detector to build an accurate and fast enough implementation to detect people in images and videos.
├───input
people1.jpg
people2.jpg
people3.jpg
video1.mp4
video2.mp4
video3.mp4
video4.mp4
├───outputs
│ └───frames
└───src
hog_detector.py
hog_detector_vid.py
- After cloning the repository, you need to create the
input
andoutputs
folder. - You can find all the data in the input folder in the References section.
hog_detector.py
: Execute this file from within thesrc
folder in the terminal. This detects the people in images inside theinput
folder.hog_detector_vid.py
: Execution details:python hog_detector_vid.py --input ../input/video1.mp4 --output ../output/video1_slow.mp4 --speed slow
: Use this execution command to run slow but accurate video detection algorithm.python hog_detector_vid.py --input ../input/video1.mp4 --output ../output/video1_fast.mp4 --speed fast
: Use this command to execute a little bit less accurate but fast video detection algorithm.
- Credits and Citations:
input/people1.jpg
: Image by Free-Photos from Pixabay.input/people2.jpg
: http://www.cbc.ca/natureofthings/content/images/episodes/pompeiipeople_listical.jpg.input/people3.jpg
: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.us0yaLcftx1jwMQ-tcw34gHaEU%26pid%3DApi&f=1.input/video1.mp4
: https://pixabay.com/videos/people-commerce-shop-busy-mall-6387/.input/video2.mp4
: https://pixabay.com/videos/pedestrians-road-city-cars-traffic-1023/.input/video3.mp4
: Video by Mihai Surdu from Pixabay.input/video4.mp4
:input/video5.mp5
: