Git Product home page Git Product logo

face-mask-detection's Introduction

face-mask-detection

Hello welcome to my face mask detection

its a python model which can detect faces with FaceBoxes : https://github.com/zisianw/FaceBoxes.PyTorch and classify if the face has a mask or not

Requirements

Ubuntu " It's only tested on Ubuntu, so it may not work on Windows "

GPU : Any GPU that is works with PyTorch with atleast 4GP vram

numpy : https://numpy.org/

PyTorch : https://pytorch.org/

torchvision : https://pypi.org/project/torchvision/

openCV : https://pypi.org/project/opencv-python/

Accuracy

data set : https://www.kaggle.com/ashishjangra27/face-mask-12k-images-dataset

train set accuracy is : 100%

test set accuracy is : 99.8%

val set accuracy is : 100%

to download my model : https://drive.google.com/file/d/15JenLZWt4qh24PbfaNgGaiCg0pZ16dWt/view?usp=sharing

output

Usage

  • Clone the Repo :

    $ git clone https://github.com/AbdallahOmarAhmed/face-mask-detection
    
  • Compile the nms :

    $ bash ./make.sh
    
  • Download the data set and put it in your project dir :

    https://www.kaggle.com/ashishjangra27/face-mask-12k-images-dataset
    
  • Run the train file to start training :

    $ python3 train_model.py
    
  • OR : download my model and put it in the weights folder

  • Run the test file to Calculate accuracy :

    $ python3 test_model.py
    
  • Add a video to test then run the model :

    $ python3 make_video.py
    
  • Convert the models to onnx :

    $ python3 make_onnx_copy.py
    

Note : the name of the video that you want to test must be ' test.mp4 ' and the output video name will be ' outpy.avi '

face-mask-detection's People

Contributors

abdallahomarahmed avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.