Giter Club home page Giter Club logo

covid-social-distancing-detection's Introduction

covid-social-distancing-detection

This project is a social distancing detector implemented in Python with OpenCV and Tensorflow. The result that can be obtained is the following :

Installation

OpenCV

If you are working under a Linux distribution or a MacOS, use this tutorial from Adrian Rosebrock to install this library.

Other requirements

All the other requirements can be installed via the command :

pip install -r requirements.txt

Download Tensorflow models

In my project I used the faster_rcnn_inception_v2_coco model. I could not upload it to github because it is to heavy. You can download this model and several others from the Tensorflow detection model zoo. Just download all the models you want to try out, put them in the models folder and unzip them. For example :

tar -xvzf faster_rcnn_inception_v2_coco_2018_01_28.tar.gz

Run project

Calibrate

Run

python calibrate_with_mouse.py

You will be asked as input the name of the video and the size of the frame you want to work with. The default values are PETS2009.avi and 800 pixels.

Note : It is important to start with the top right corner, than the bottom right, then bottom left, than end by top left corner !

You can add any video to the video folder and work with that.

Start social distancing detection

Run

python social_distanciation_video_detection.py

You will be asked as inputs :

  • The tensorflow model you want to use (default value faster_rcnn_inception_v2_coco_2018_01_28).
  • The name of the video (default value PETS2009.avi).
  • The distance (in pixels between 2 persons).

Outputs

Both video outputs (normal frame and bird eye view) will be stored in the outputs file.

covid-social-distancing-detection's People

Contributors

basileroth75 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.