Code Monkey home page Code Monkey logo

on-device-face-mask-detect's Introduction

On Device Face Mask Detect

It has been tough time with increasing spread of Covid-19, espcially for frontiline workers. I have seen staff at coffe shops, shipping centers, public spaces asking people to wear masks.I felt it would be safer and reduce risk for frontline workers, if we could automate face mask monitoring. But it is important to respect everyone's privacy, so I decided to use a on device deeplearning solution. I am going to walk you through how I deployed a Face Mask detection model on Coral Device.

DataSet

Right now you can find many open source datasets availabe, I have chosen a highly deversified MAFA dataset which has images 35,806 manually annotated images. You can try Face Mask Detection from kaggle as well.

Model

As final goal of this project is to deploy it on coral device, I have choosen to start with MobileNet SSD v2 (Faces) model.The anchor generator has been configured to detect faces. You can find trained chekcpoints and models compiled for edge tpu above.

Demo

I am using coral dev board to get started and setup a camera

git clone https://github.com/google-coral/examples-camera.git

cd examples-camera/gstreamer (or) cd examples-camera/opencv

python3 detect.py --model Path_To_Be_Configured --labels Path_To_Be_Configured

Transfer Learning

The most important aspect of this project is to choose right dataset that suits your environmet or work conditions. I have trained it on a generic dataset but if you wish to optimize the model for your environment, transfer learning using the pretrained checkpoints is highly recommended. There are many ways to do this I have used object detection api, please find more details in Google Colab here.

on-device-face-mask-detect's People

Contributors

naveen-dodda 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.