Closed ShahkarHassan closed 4 years ago
This code was written with the help of this link: https://github.com/akshun4/People-Counter#people-counter. It was modified in a such a way for optimum results of the people counting video used. The output of this code is attached with this comment
Overview: The designed people counting program provides an estimation of the number of people entering and leaving a certain designated area. It basically functions as a Bi-directional Counter. A slightly tilted surveillance camera positioned opposite to the doorway will detect people.
Methodology Based on the Histogram of Oriented Gradients (HOG) and Linear SVM Classifier, as well as the Non-maximum Suppression (NMS) Algorithm which are required for Object Detection. It will later generate images of the people using the Scale- Invariant Feature Transform (SIFT) Algorithm. We will need to establish a roi (region-of-interest).
Libraries and Packages:
For the following program, we will need to download Python 3 and OpenCV 3 libraries as well as the 'v_openccontrib' package (as SIFT doesn't come with OpenCV 3 version). We will have to download Non-Max Suppression library.
We also need to use parameters, such as HOG Descriptor parameters, NMS parameters, Feature Matching parameters, and SIFT parameters.
Working Procedure: A video or visual is taken as an Input. Using Algorithms such as HOG and SVM, we will detect and track people. This will only be possible under a certain timeframe, hence, region-of-interest (roi) is the base of our object detection code (You will observe this is the output video and output images). The roi is the green rectangle line drawn in the first frame. the Roi can be created once or multiple times. In order to avoid redrawing it, its best to test it on multiple videos, and once, you have an optimistic result, you can set this manual roi to pre-tested in the mentioned code. There are some parameters used in the program, such as HOG Descriptor parameters, NMS parameters, Feature Matching, and SIFT parameters, which can be altered for the efficiency of your code.
The features mentioned have already been tested out and performed upon. Some Suggestion for Modification of code can be:
Any suggestions and modifications in the code, are encouraged. Kindly, make comments for such
A Bi-directional Counter, that basically performs the following functions simultaneously. Feature Function:- 1) Detects and Tracks Individuals. 2) Counts the number of people entering and exiting a specified area.