Skip to content

Check if people follow social distancing rules by analyzing videos from surveillance cameras

Notifications You must be signed in to change notification settings

Jancso/social-distancing-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Distancing Tracker

Tool that detects when people do not follow the social distancing rules by analyzing videos from surveillance cameras.

UI

UI

Setup

Tested on Ubuntu 18.04

Social Distancing Tracker

For detecting and tracking people we used code provided by pyimagesearch opencv-people-counter

$ cd people_detection
  • Set up virtual environment:
$ sudo apt-get install python3-venv
$ python3 -m venv venv
$ source venv/bin/activate
  • Install dependencies (NB: the dlib dependency requires at least >2GB RAM and needs to be created from a clean virtual environment)
$ sudo apt-get install build-essential cmake libopenblas-dev liblapack-dev libx11-dev libgtk-3-dev python3-dev
$ pip install -vr requirements.txt
  • Run tracker
python group_detection.py [path to video/stream] -o [path of output directory]

UI

We provide a web-based UI that allows you to upload videos and get them analyzed.

$ cd app/
$ mongo
> use MyDatabase;
> exit
  • Open index.js and adapt user credentials:
UserDetails.register({username:'anna', active: false}, 'anna');
  • Install ffmpeg to convert videos
$ sudo apt-get install ffmpeg
  • Install node.js and dependencies:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# open new terminal after that
$ nvm install stable
$ npm install
  • Run application
$ node index.js
  • Open browser and type:
localhost:3000

About

Check if people follow social distancing rules by analyzing videos from surveillance cameras

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published