Skip to content

Face mask and social distancing detection system using deep learning

License

Notifications You must be signed in to change notification settings

parot-99/Covid-19-Warning-System

Repository files navigation

Covid-19 Warning System

A deep learning based system that can:

  • Detect people not wearing face masks, mark them, and count the number of violations.
  • Detect social distancing violations, mark them, and count the number of violations.

Assets

Weights

Prerequisites

  1. Python 3.5–3.9
  2. pip 19.0 or later

Note

The requirements are updated acording to which version of tensorflow the repository was lately tested on. Feel free to use Tensorflow 2.2-2.6

Installation

  1. Note: For best performance, enable GPU for tensorflow. Check GPU support | Tensorflow for GPU support.

  2. Clone the repository

  3. (Optional) Create a virtual enviroment:

    python -m venv mask-detector-env

    and activate the enviroment using:

    Platform Second Header Command to activate virtual environment
    POSIX bash/zsh $ source /bin/activate
    fish $ source /bin/activate.fish
    csh/tcsh $ source /bin/activate.csh
    PowerShell Core /bin/Activate.ps1
    Windows cmd.exe C:> \Scripts\activate.bat
    PowerShell PS C:> \Scripts\Activate.ps1
  4. Install requirments:

    pip install -r requirements.txt
  5. Download weights to be used from weights section

    • yolov4-mask or yolov4-tiny-mask for mask detection
    • yolov4 or yolov4-tiny for social distancing detection

Usage

TODO

  • Update documentation and readme
  • Implement a functionality that combines both mask and social distance violation detection
  • Train yolov4-mask and add weights
  • Social distancing detection
  • Add yolov4-coco weights
  • Add yolov4-tiny-coco weights
  • Implement bird-eye view for social distancing detection
  • Build a simple GUI

Dataset

We collected images from multiple sources (mentioned in the Acknowledgements section), removed images that may lead to unwanted results, added new images for better results, and labeled all the images.

The new mask-dataset used to train the face mask detector.

Tech Stack

  • Python
  • tensorflow
  • Opencv
  • Numpy
  • Darknet

References

Acknowledgements:

Authors

License

BSD 3-Clause License

About

Face mask and social distancing detection system using deep learning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages