Face-Mask-Detection

授权协议 MIT License
开发语言 Python
所属分类 神经网络/人工智能、 机器学习/深度学习
软件类型 开源软件
地区 不详
投 递 者 汝臻
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Face Mask Detection

Face Mask Detection System built with OpenCV, Keras/TensorFlow using Deep Learning and Computer Vision concepts in order to detect face masks in static images as well as in real-time video streams.

                              

                                   Live Demo

�� Support me here!

Buy Me A Coffee

�� Motivation

Amid the ongoing COVID-19 pandemic, there are no efficient face mask detection applications which are now in high demand for transportation means, densely populated areas, residential districts, large-scale manufacturers and other enterprises to ensure safety. The absence of large datasets of ‘with_mask’ images has made this task cumbersome and challenging.

PPT and Project Report sharing costs ₹1000 ($15)

If interested, contact me at chandrikadeb7@gmail.com

�� Purchase at a Discounted Rate

Project Demo

�� YouTube Demo Link

�� Dev Link

Already deployed version

⚠️ TechStack/framework used

Features

Our face mask detector doesn't use any morphed masked images dataset and the model is accurate. Owing to the use of MobileNetV2 architecture, it is computationally efficient, thus making it easier to deploy the model to embedded systems (Raspberry Pi, Google Coral, etc.).

This system can therefore be used in real-time applications which require face-mask detection for safety purposes due to the outbreak of Covid-19. This project can be integrated with embedded systems for application in airports, railway stations, offices, schools, and public places to ensure that public safety guidelines are followed.

�� Dataset

The dataset used can be downloaded here - Click to Download

This dataset consists of 4095 images belonging to two classes:

  • with_mask: 2165 images
  • without_mask: 1930 images

The images used were real images of faces wearing masks. The images were collected from the following sources:

�� Prerequisites

All the dependencies and required libraries are included in the file requirements.txt See here

��   Installation

  1. Clone the repo
$ git clone https://github.com/chandrikadeb7/Face-Mask-Detection.git
  1. Change your directory to the cloned repo
$ cd Face-Mask-Detection
  1. Create a Python virtual environment named 'test' and activate it
$ virtualenv test
$ source test/bin/activate
  1. Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip3 install -r requirements.txt

�� Working

  1. Open terminal. Go into the cloned project directory and type the following command:
$ python3 train_mask_detector.py --dataset dataset
  1. To detect face masks in an image type the following command:
$ python3 detect_mask_image.py --image images/pic1.jpeg
  1. To detect face masks in real-time video streams type the following command:
$ python3 detect_mask_video.py 

�� Results

Our model gave 98% accuracy for Face Mask Detection after training via tensorflow-gpu==2.5.0

We got the following accuracy/loss training curve plot

Streamlit app

Face Mask Detector webapp using Tensorflow & Streamlit

command

$ streamlit run app.py 

Images

Upload Images

Results

�� And it's done!

Feel free to mail me for any doubts/query �� chandrikadeb7@gmail.com


Internet of Things Device Setup

Expected Hardware

Getting Started

Raspberry Pi App Installation & Execution

Run these commands after cloning the project

Commands Time to completion
sudo apt install -y libatlas-base-dev liblapacke-dev gfortran 1min
sudo apt install -y libhdf5-dev libhdf5-103 1min
pip3 install -r requirements.txt 1-3 mins
wget "https://raw.githubusercontent.com/PINTO0309/Tensorflow-bin/master/tensorflow-2.4.0-cp37-none-linux_armv7l_download.sh" less than 10 secs
./tensorflow-2.4.0-cp37-none-linux_armv7l_download.sh less than 10 secs
pip3 install tensorflow-2.4.0-cp37-none-linux_armv7l.whl 1-3 mins

�� Awards

Awarded Runners Up position in Amdocs Innovation India ICE Project Fair

�� Cited by:

  1. https://osf.io/preprints/3gph4/
  2. https://link.springer.com/chapter/10.1007/978-981-33-4673-4_49
  3. https://ieeexplore.ieee.org/abstract/document/9312083/
  4. https://link.springer.com/chapter/10.1007/978-981-33-4673-4_48
  5. https://www.researchgate.net/profile/Akhyar_Ahmed/publication/344173985_Face_Mask_Detector/links/5f58c00ea6fdcc9879d8e6f7/Face-Mask-Detector.pdf

�� Appreciation

Selected in Devscript Winter Of Code

Selected in Script Winter Of Code

Seleted in Student Code-in

�� Credits

�� Contribution

Please read the Contribution Guidelines here

Feel free to file a new issue with a respective title and description on the the Face-Mask-Detection repository. If you already found a solution to your problem, I would love to review your pull request!

�� Our Contributors

�� Code of Conduct

You can find our Code of Conduct here.

�� Citation

You are allowed to cite any part of the code or our dataset. You can use it in your Research Work or Project. Remember to provide credit to the Maintainer Chandrika Deb by mentioning a link to this repository and her GitHub Profile.

Follow this format:

  • Author's name - Chandrika Deb
  • Date of publication or update in parentheses.
  • Title or description of document.
  • URL.

❤️ Owner

Made with ❤️   by Chandrika Deb

�� License

MIT © Chandrika Deb

  • 新的Camera feature: Face Detection 1. camera app, in packages/apps/Camera/src/com/android/camera/camera.java startFaceDetection() stopFaceDetection() 在initializeFirstTime()函数中会调用startFaceDetection() ,以开

  • createEigenFaceRecognizer C++:  Ptr<FaceRecognizer>  createEigenFaceRecognizer (int  num_components=0, double  threshold=DBL_MAX ) Parameters: num_components – The number of components (read: Eigenfac

  • 本主题所有内容以软认知服务为技术基础 关于微软人脸识别,请参阅 本节内容请先参阅微软认知服务人脸API接口列表 ##实现Face/ Detect Detect服务接受一个上传的图片,并且识别其中的人脸,如果找不到人脸则返回一个空的数组,否则返回人脸数据的数组,这些人脸数据包含了:FaceID、性别、年龄、微笑值、胡须情况等。 当我们上传了一张有效照片之后,牛津计划会返回给我们对照片中每一个识别成功

 相关资料
  • mask is a CLI task runner which is defined by a simple markdown file. It searches for a maskfile.md in the current directory which it then parses for commands and arguments. A maskfile.md is both a hu

  • Face Detection是一个很强悍的jQuery插件,它所实现的是图像面部识别功能。它可以检测待测图片中的面部信息,匹配到面部信息后将会返回图片中面部的座标位置等信息,你可以用它来实现一些图片分析的功能。

  • Weex 弹层组件,可定制内容 Demo 使用方法 <template> <div> <div @click="openMask"> <text>点击弹出动画面板</text> </div> <div @click="openNoAnimationMask"> <text>点击弹出无动画面板</text> </div> <wxc-

  • SVG MASK 蒙版工作原理 设计师或者会用Sketch、Photoshop一类设计工具的朋友应该都了解蒙版(mask)这个东西。接下来我先以Photoshop为例,简单解释蒙版的工作原理。 上图中创建了两个图层——蓝色的背景和红色的前景,并且在红色前景上应用了一个蒙版(右边红圈)。正常情况下红色前景应该完全遮盖住蓝色背景,但是请注意红圈中的蒙版,在这个蒙版上画了一个黑色的矩形。 蒙版中黑色代表

  • ngx-mask You can also try our NGX LOADER INDICATOR.You can also try our NGX COPYPASTE. You can see the full documentation with examples Installing $ npm install --save ngx-mask Quickstart Import ngx-m

  • ⚠️ This library is not maintained. Pull-requests and issues are not monitored. Alternatives to text-mask include: https://github.com/uNmAnNeR/imaskjs https://github.com/JsDaddy/ngx-mask If you know ot