Skip to content

This is a project developed for The People Crowd Counting system in Python to be used for analyzing Raw-feed from an IP camera. This is a part of the project under Project Deep Blue Season-6 Hackathon, Mastek.

Notifications You must be signed in to change notification settings

Zeo-shark/Overhead-door-monitoring-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overhead door monitoring system

People Counting in Real-Time using live video stream/IP camera in OpenCV.

this is an modification/improvement to https://www.pyimagesearch.com/2018/08/13/opencv-people-counter/ by adrian rosebrock

Live demo from an saved ip camera feed

  • This project is build for the Project Deep Blue Season - 6 National level Hackathon with PS: Crowd Counting Challenge.
  • Use case: counting the number of people in the stores/buildings/shopping malls etc., in real-time.
  • Sending an alert to the staff if the people are way over the limit.
  • Automating features and optimising the real-time stream for better performance (with threading).
  • Acts as a measure towards footfall analysis and in a way to tackle COVID-19.

Table of Content

Simple Theory

SSD detector:

  • We are using a SSD (Single Shot Detector) with a MobileNet architecture. In general, it only takes a single shot to detect whatever is in an image. That is, one for generating region proposals, one for detecting the object of each proposal.
  • Compared to other 2 shot detectors like R-CNN, SSD is quite fast.
  • MobileNet, as the name implies, is a DNN designed to run on resource constrained devices. For example, mobiles, ip cameras, scanners etc.
  • Thus, SSD seasoned with a MobileNet should theoretically result in a faster, more efficient object detector.

Centroid tracker:

  • Centroid tracker is one of the most reliable trackers out there.
  • To be straightforward, the centroid tracker computes the centroid of the bounding boxes.
  • That is, the bounding boxes are (x, y) co-ordinates of the objects in an image.
  • Once the co-ordinates are obtained by our SSD, the tracker computes the centroid (center) of the box. In other words, the center of an object.
  • Then an unique ID is assigned to every particular object deteced, for tracking over the sequence of frames.

Running/Inference

pip install -r requirements.txt
python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel --input videos/example_01.mp4

To run inference on an IP camera:

# Enter the ip camera url (e.g., url = 'http://191.138.0.100:8040/video')
url = ''
  • Then run with the command:
python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel

Set url = 0 for webcam.

Modification/Features

The following is an example of the added features. Note: You can easily on/off them in the config. options (mylib/config.py):

  1. Real-Time alert system to Malls owner through emails
  2. Threading multi-tasking supported
  3. Scheduler your system for which the system remains active
  4. Timer set duration for how long the system shall operate
  5. Simple logs system for tracking of previous results
  • Logs all data at end of the day.
  • Useful for footfall analysis.

About

This is a project developed for The People Crowd Counting system in Python to be used for analyzing Raw-feed from an IP camera. This is a part of the project under Project Deep Blue Season-6 Hackathon, Mastek.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages