Code Monkey home page Code Monkey logo

social-distance-breach-detector-opencv-dl's Introduction

Social-Distance-Breach-Detector-OpenCV-DL

OpenCV with Python based project using Caffe Deep Learning Framework and Triangle Similarity Theorem to identify Social Distance Breaches.

Single Shot MultiBox Detection

Utilizes SSD Framework to perform Object Detection. SSD works on a base network in this case - MobileNet to extract feature maps and applies Convolution Filters to make predictions.

Model

Caffe Deep Learning Framework (Single Shot MultiBox Detection) to identify people in frame - SSD_MobileNet.caffemodel. For more information on Caffe

Distance and Depth

Triangle Similarity Theorem to measure distance from objects to camera. Further, centroids of each bounding box are taken as reference to find distance between two objects.

Streaming

The Flask App was created as a way to show portability of the project. Given the lightweight MobileNet, we could receive a direct video surveillance on live feed with a lag of approx 0.25 seconds.

Steps to Execute Flask-App Code

  1. Launch terminal

  2. cd to Project Directory

  3. Write the following commands to run :

    • On Windows CMD:

      set FLASK_APP=main.py

      flask run --host=0.0.0.0

    • On Linux Terminal:

      export FLASK_APP=main.py

      flask run --host=0.0.0.0

    • On Windows Powershell:

      $env:FLASK_APP=main.py

      flask run --host=0.0.0.0

  4. Go on to preferred web browser : 'localhost: <port number being shown on terminal window>'

  5. To exit from stream and terminate operations -> ctrl + c

References

  1. https://www.pyimagesearch.com/2015/01/19/find-distance-camera-objectmarker-using-python-opencv/
  2. https://www.pyimagesearch.com/2017/09/11/object-detection-with-deep-learning-and-opencv/

social-distance-breach-detector-opencv-dl's People

Contributors

amolikvivian avatar arpit-dwivedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

social-distance-breach-detector-opencv-dl's Issues

Problem in running.

It is giving this error:

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

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.