1 Star 0 Fork 0

mustang2247 / Face-Mask-Detection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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.

                               Python contributions welcome Forks Stargazers Issues LinkedIn

                                    Live Demo

:point_down: Support me here!

Buy Me A Coffee

:innocent: Motivation

In the present scenario due to Covid-19, there is 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. Also, the absence of large datasets of ‘with_mask’ images has made this task more cumbersome and challenging.

:hourglass: Project Demo

:movie_camera: YouTube Demo Link

:computer: Dev Link

Already deployed version

:warning: TechStack/framework used

:star: Features

Our face mask detector didn't use any morphed masked images dataset. The model is accurate, and since we used the MobileNetV2 architecture, it’s also computationally efficient and 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.

:file_folder: 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:

:key: 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 and create a Python virtual environment named 'test'
$ mkvirtualenv test
  1. Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip3 install -r requirements.txt

:bulb: 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 

:key: Results

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

Open In Colab

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

:clap: And it's done!

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

:handshake: Contribution

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!

:trophy: Awards

Awarded Runners Up position in Amdocs Innovation India ICE Project Fair

:raising_hand: 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

:heart: Owner

Made with :heart:  by Chandrika Deb

:+1: Credits

:handshake: Our Contributors

CONTRIBUTORS.md

:eyes: Code of Conduct

You can find our Code of Conduct here.

:raising_hand: 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.

:eyes: License

MIT © Chandrika Deb

MIT License Copyright (c) 2021 chandrikadeb7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/ecoteam/Face-Mask-Detection.git
git@gitee.com:ecoteam/Face-Mask-Detection.git
ecoteam
Face-Mask-Detection
Face-Mask-Detection
master

搜索帮助