Skip to content

l2-labs/wearmask-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

WEARMASK Model

WearMask is deep learning model to automatically check whether face is protected with some PPE like mask or not.
Free for none-commercial organizations
Demo on YouTube
Report Bug · Request Feature · Request Commercial License

Get it on Google Play

Table of Contents

About The Project

New reality requires extended precautions. While others fight about the need of PPE (personal protective equipment) usage to flat the curve we just want to provide automatic solution for those who wants to enforce PPE usage by any reason. Thus we trained Deep Learning Convolution network to classify images to two classes:

  • face with not-protected mouth and nose. It includes the cases when mouth or nose are not visible, for example covered by motorcycle helm as we cannot guarantee that it's covered by PPE under helm.
  • face with properly applied PPE (i.e. mouth and nose are covered with surgiral or hand-made mask or respirator)

Model accuracy

Released model accuracy is 94.7% on our testing data. If you need a model with higher accuracy (>99%) please contact us at [email protected]. The provided model is available free of charge for non-profit organisations and also on commercial bases for others. We could provide you with the model compatible with various architectures MobileNet, ResNet, etc and frameworks like TF, pytorch and others. We also provide integration services.

Use cases

Use WearMask model to detect person who do not wear mask in crowd on the street at night:

WearMask at night

Use WearMask model to detect person who do not wear mask in various scenes:

WearMask various scenes

WearMask recognizes correctness of mask/respirators usage:

WearMask correctly applied

Android application

WearMask model is used in WearMask Android app to enforce mask usage for small business. Currently the application is on the google publish review, please send request to [email protected] if you want to be in first 100 private testers.

Application scans live video stream from device camera and perform analysis is order to detect person who doesn't wear mask: Application screenshot

If it detects somebody wihtout correctly applied mask/respirators it alarms with audio and visual notifications: Application screenshot

It's specially designed to be used on big screen smartphones or tablets which can be installed in public entrance areas in such a way that the one can see visual notificationson on the screen in case of mandatory face mask violation

Getting Started

In order to use the model the one needs to clone repository, install dependencies, download and unpack model weights and it's ready to perform image analysis

Prerequisites

We provide requirements.txt file to automatically setup environment with pip but generally prerequisites are:

  1. Python 3.6+
  2. Tensorflow 2.2.0+
  3. Pillow

Installation

  1. Setup python dependencies:
pip install -r requirements.txt
  1. Download from google storage pre-trained model and unpack it to the pretrained folder:
tar -xzf wearmask-1587835694.tar.gz

Usage

Original image from flickr

Execute the command to process the image:

python test.py images/49737641203_16019ec424_o.jpg

Dataset

Model was trained on data which were available without any legal or ethical restrictions on time of training. Current dataset version is composed of >1M data samples. We are constantly improving coverage of diverse use cases to reduce biases. We couldn't share the dataset in any case as model was trained in online mode without actual dataset collecting and storing. If your business need the similar online training approach feel free to contact [email protected] to discuss feasibility of using our tools to train your models.

License

Source code in the repository is distributed under MIT license Pre-trained Model weights are distributed under CC BY-NC-ND 4.0

Contact

If you need model for commercial usage or model as Service or have some special requests feel free to contact via e-mail [email protected]

About

The repository contains description, usage terms and license, code to run and link to pre-trained WearMask model

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE-MODEL-WEIGHTS

Stars

Watchers

Forks

Packages

No packages published

Languages