The purpose of this project is to build a Human detection model using OpenCV. For that purpose we are going to first detect humans in the image, then create a function that returns the count of humnas in the picture
Human Detection Dataset from Kaggle
Assumptions: As the model utilises the HOG model of OpenCV the data to be used must only be restricted to full-body clear colour images of humans in the location.
- cv2
- imutills
- Import necessary modules
- Read image needed using the cv2 module
- Load the pre-trained HOG and Linear SVM Model
- Load the People Detector function in the HOG model of OpenCV
- Resize the image according to the requirements- taken 500 as standard
- With the detectMultiScale() function identify the boxes i.e., humans in the picture and their weights -Apply the contours for the humans detected and display the final output
- Developed a function that takes in the image path and returns the number of humans identified in the picture with the image displayed.
Harshini Raju