Coder Social home page Coder Social logo

abhishekkr93 / covid19-social-distancing-detection Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 77.71 MB

Social distancing detection, a deep learning computer vision project with yolo object detection using python, OpenCV and YOLOv3 model.

Home Page: https://youtu.be/nq9P6mAvN_M

License: MIT License

Python 100.00%
python3 opencv machine-learning deep-learning image-processing computer-vision python covid-19 socialdistancinganalyzer socialdistancing

covid19-social-distancing-detection's Introduction

Covid19-Social-Distancing-Detection

This is a Social Distancing Detector project.

Social Distancing Detector and Monitoring Project, COVID-19 Tracker

This project uses Deep Learning based YOLOv3 Pretrained model for object Detection, OpenCV python library for image processing and Centroid Tracking Algorithm For object tracking. In this project, I am attaching the code for building a Social Distancing Detector to detect if a crowd is practicing Social Distancing or not, using a sample video.

Social Distancing is one such terminology that has gained popularity over the past few months, thanks to COVID-19. People are forced to maintain a sufficient amount of distance between each other to prevent the spread of this deadly virus. Amidst this crisis, I and My Project Team decided to build a simple Social Distancing Detector that could monitor the practice of social distancing in a crowd.

Programming languange & Algorithm used:

Technology Used:

Dependencies:

  • imutils==0.5.3
  • numpy==1.18.5
  • opencv-python==4.2.0.34
  • pkg-resources==0.0.0
  • scipy==1.4.1

How to run?

  • PLEASE DOWNLOAD THE YOLOv3 MODEL FROM BELOW LINK AND KEEP ALL THE DOWNLOADED FILES INSIDE THE SAME FOLDER

  • clone the repository to your local machine

  • navigate to this cloned directory

  • from the terminal install dependencies using these commands:

    • python -m pip install opencv-python
    • from scipy.spatial import distance as dist
    • import numpy as np
    • import argparse
    • import imutils
    • import os
  • after installing the dependencies run the social_distancing_config.cpython file from terminal using this command:

    • python social_distancing_config.cpython
  • To analyze the different sample videos & Execute, Follow this:-

    • example:
      python social_distance_detector.py --input VIDEO1.mp4 --output OUTPUT1.mp4 for first Video
      python social_distance_detector.py --input VIDEO2.mp4 --output OUTPUT2.mp4 for second Video
      and so on.

RESULTS OF MODEL VIDEO ON TESTING:

1.

Video1 Input:-

VIDEO3

Video1 Output:-

output one

2.

Video2 Input:-

two output gif

Video2 Output:-

ezgif com-video-to-gif(1)

This is Computer Vision And Image Processing project which can be used for monitoring social distancing in Lockdown & to fight against COVID-19 a.k.a. the Corona Virus.

Fell free to contribute to this project by providing more sample videos, your contribution will be appreciated.


Thank You!

covid19-social-distancing-detection's People

Contributors

abhishekkr93 avatar kavita1403 avatar vishal335 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

covid19-social-distancing-detection's Issues

Hey! It gives this error:

[INFO] loading YOLO from disk...
Traceback (most recent call last):
File "social_distance_detector.py", line 46, in
ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
File "social_distance_detector.py", line 46, in
ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
IndexError: invalid index to scalar variable.

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.