Tensorflow implementation of crowd counting using CNNs from overhead surveillance cameras.
This repository contains the code of performing the task of implementing a people counter from an overhead video surveillance camera by using Transfer Learning.
Tensorflow’s Object Detection API provides pre-trained models for object detection, which are capable of detecting around 90 classes (objects) with person
being one of the classes.
On giving test images to a pretrained model, the inference results were not as per requirements. On some instances the model detected the entire image as a person and also missing out on some fairly obvious ones.
A custom model had to trained for accurate implementation. The following steps were taken for the same:
./data/utils/faster_rcnn.config
model.pb
file.The model can be found on this drive link: Custom Model
Download and place the model in ./data/utils
before executing main.py.
Upon running main.py
, the results are as shown below. (Refer ./results
)
Note: Since the model was trained on only 30 annotated images, the accuracy can be significantly increased by using a larger dataset to build the model.
All the required dependencies can be install by running the command pip install -r requirements.txt
./data/images/test
main.py
./results