# Face Mask Detection with Machine Learning

## Github

* [AIZOOTech/FaceMaskDetection](https://github.com/AIZOOTech/FaceMaskDetection) : SSD, self model
* [chandrikadeb7/Face-Mask-Detection](https://github.com/chandrikadeb7/Face-Mask-Detection): MobileNetv2
* [Spidy20/face\_mask\_detection](https://github.com/Spidy20/face_mask_detection) : Faster RCNN
* [mk-gurucharan/Face-Mask-Detection](https://github.com/mk-gurucharan/Face-Mask-Detection), [Medium](https://towardsdatascience.com/covid-19-face-mask-detection-using-tensorflow-and-opencv-702dd833515b) : Haar Cascade (OpenCV) + CNN
* [NVIDIA-AI-IOT/face-mask-detection](https://github.com/NVIDIA-AI-IOT/face-mask-detection), [article](https://developer.nvidia.com/blog/implementing-a-real-time-ai-based-face-mask-detector-application-for-covid-19/) : NVIDIA DetectNet\_v2 (based on ResNet-18), on Jetson Devices
* [PureHing/face-mask-detection-tf2](https://github.com/PureHing/face-mask-detection-tf2) : SSD (based on Mobilenet and RFB)
* [rfribeiro/mask-detector](https://github.com/rfribeiro/mask-detector) : Haar Cascade (OpenCV) + MobileNetv2
* [rohanrao619/Social\_Distancing\_with\_AI](https://github.com/rohanrao619/Social_Distancing_with_AI) : Yolov3 for object detection, Dual Shot Face Detector (DSFD) (better than Haar Cascade) for face detection, ResNet50 for face classification
* [datarootsio/face-mask-detection](https://github.com/datarootsio/face-mask-detection) : RetinaFace (RetinaNetMobileNetV1) for face detection, MobileNetV1 for face classification
* [Qengineering/Face-Mask-Detection-Raspberry-Pi-64-bits](https://github.com/Qengineering/Face-Mask-Detection-Raspberry-Pi-64-bits) : Linzaer for face detection, Paddle Lite for face classification, on Raspberry Pi
* [adityap27/face-mask-detector](https://github.com/adityap27/face-mask-detector): Yolo v2, v3, v4
* [Rahul24-06/COVID-19-Authorized-Entry-using-Face-Mask-Detection](https://github.com/Rahul24-06/COVID-19-Authorized-Entry-using-Face-Mask-Detection): ResNet18 on Jetson Nano
* [matlab-deep-learning/COVID19-Face-Mask-Detection-using-deep-learning](https://github.com/matlab-deep-learning/COVID19-Face-Mask-Detection-using-deep-learning)

## Dataset

* [Masked face recognition dataset and application](https://arxiv.org/abs/2003.09093) [Github](https://github.com/X-zhangyang/Real-World-Masked-Face-Dataset)
* [Prajna](https://github.com/prajnasb/observations/tree/master/experiements/data)
* [Cabani](https://github.com/cabani/MaskedFace-Net)

## Paper

* [A hybrid deep transfer learning model with machine learning methods for face mask detection in the era of the COVID-19 pandemic](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7386450/), Loey et. al. : Resnet(+DeepTree, SVN, Ensemble)
* [Fighting against COVID-19: A novel deep learning model based on YOLO-v2 with ResNet-50 for medical face mask detection](https://pubmed.ncbi.nlm.nih.gov/33200063/), Loey et. al. : Resnet (+Yolo v2)
* [Face Mask Detection using Transfer Learning of InceptionV3](https://arxiv.org/abs/2009.08369) G. Jignesh Chowdary, et al. : InceptionV3
* [A Deep Learning Based Assistive System to Classify COVID-19 Face Mask for Human Safety with YOLOv3](https://ieeexplore.ieee.org/abstract/document/9225384/), Md. Rafiuzzaman Bhuiyan et. al : Yolo v3
* [Comparative Study of Deep Learning Methods in Detection Face Mask Utilization](https://osf.io/preprints/3gph4/) [PDF](https://osf.io/3gph4/download?format=pdf), Ivan Muhammad Siegfried: MobileNetV2 vs ResNet50V2 vs Xception
* [Covid-19 Face Mask Detection Using TensorFlow, Keras and OpenCV](https://www.researchgate.net/profile/Rohini_Basak/publication/344725412_Covid-19_Face_Mask_Detection_Using_TensorFlow_Keras_and_OpenCV/links/5f8bee13a6fdccfd7b68b4ae/Covid-19-Face-Mask-Detection-Using-TensorFlow-Keras-and-OpenCV.pdf), Arjya Das et. al.: self CNN
* [MACHINE LEARNING (CONVOLUTIONAL NEURAL NETWORKS) FOR FACE MASK DETECTION IN IMAGE AND VIDEO](https://core.ac.uk/download/pdf/328808130.pdf), Ramot Lubis : MobileNet
* [RetinaMask: A Face Mask detector](https://arxiv.org/abs/2005.03950), Mingjie Jiang: RetinaFaceMask
* [Real Time Multi-Scale Facial Mask Detection and Classification Using Deep Transfer Learning Techniques](https://www.researchgate.net/profile/Ssvr_Addagarla/publication/344252628_Real_Time_Multi-Scale_Facial_Mask_Detection_and_Classification_Using_Deep_Transfer_Learning_Techniques/links/5f60d961299bf1d43c05be95/Real-Time-Multi-Scale-Facial-Mask-Detection-and-Classification-Using-Deep-Transfer-Learning-Techniques.pdf), Kumar Addagarla : Yolo v3 vs Resnet (+NASNetMobile)
* [Real-Time Facemask Recognition with Alarm System using Deep Learning](https://ieeexplore.ieee.org/abstract/document/9232610/), Sammy V. Militante : VGG-16, Raspberry Pi
* [Mask Detection Using Framework Tensorflow and Pre-Trained CNN Model Based on Raspberry Pi](http://iocscience.org/ejournal/index.php/mantik/article/view/946) [pdf](http://iocscience.org/ejournal/index.php/mantik/article/download/946/657), Acep Ansor: MobileNet, Raspberry Pi
* [An Application of Mask Detector For Prevent Covid-19 in Public Services Area](https://iopscience.iop.org/article/10.1088/1742-6596/1641/1/012063) [pdf](https://iopscience.iop.org/article/10.1088/1742-6596/1641/1/012063/pdf), Henderi: ???, Sipeed Maix
* [Face Mask Detector](https://www.researchgate.net/profile/Akhyar_Ahmed/publication/344173985_Face_Mask_Detector/links/5f58c00ea6fdcc9879d8e6f7/Face-Mask-Detector.pdf), Akhyar Ahmed: MobileNet vs Resnet vs Exception
* [A FACEMASK DETECTOR USING MACHINE LEARNING AND IMAGE PROCESSING TECHNIQUES.](https://www.researchgate.net/profile/Anurag_Sinha3/publication/345972030_A_FACEMASK_DETECTOR_USING_MACHINE_LEARNING_AND_IMAGE_PROCESSING_TECHNIQUES/links/5fb346be92851cf24cd84672/A-FACEMASK-DETECTOR-USING-MACHINE-LEARNING-AND-IMAGE-PROCESSING-TECHNIQUES.pdf), Amrit Kumar Bhadani: MobileNetV2
* [Detecting masked faces in the wild with lle-cnns](http://openaccess.thecvf.com/content_cvpr_2017/html/Ge_Detecting_Masked_Faces_CVPR_2017_paper.html), [pdf](http://openaccess.thecvf.com/content_cvpr_2017/papers/Ge_Detecting_Masked_Faces_CVPR_2017_paper.pdf), S Ge: LLE CNN
* Identifying Facemask-Wearing Condition UsingImage Super-Resolution with Classification Networkto Prevent COVID-19, Bosheng Qin : SRCNet

## Ideas

* Face Mask with Face Presentation Attack Detection (in this case: mask with part of face), with lighting and distance effect analysis on detection, working on handheld devices, video based
* upgrade [mk-gurucharan/Face-Mask-Detection](https://github.com/mk-gurucharan/Face-Mask-Detection)
* upgrade [rfribeiro/mask-detector](https://github.com/rfribeiro/mask-detector) : Haar Cascade (OpenCV) + MobileNetv2
* upgrade [rohanrao619/Social\_Distancing\_with\_AI](https://github.com/rohanrao619/Social_Distancing_with_AI) : Yolov3 for object detection, Dual Shot Face Detector (DSFD) (better than Haar Cascade) for face detection, ResNet50 for face classification
* upgrade [datarootsio/face-mask-detection](https://github.com/datarootsio/face-mask-detection) : RetinaFace (RetinaNetMobileNetV1) for face detection, MobileNetV1 for face classification
* upgrade [Rahul24-06/COVID-19-Authorized-Entry-using-Face-Mask-Detection](https://github.com/Rahul24-06/COVID-19-Authorized-Entry-using-Face-Mask-Detection): ResNet18 on Jetson Nano

## Project in Progress (by Rozi)

* Deep Learning for Face Detection in Real Time
* Face Detection : SSD ResNet10 dan MTCNN
* Mask Classification : CNN with MobileNetV2 dan VGG16Net
* PC and Android Deployment
* Variation :
  * distance
  * lighting
  * mask variation (+face attack)
* Metric for Performance Analysis :
  * Accuracy, Precision, Recall, F1 for image analysis
  * mAP\@0.5 (Mean Average Precision) for image analysis
  * FPS for video analysis
* Reference:
  * [Face detection benchmark](https://github.com/nodefluxio/face-detector-benchmark), [Medium](https://medium.com/nodeflux/performance-showdown-of-publicly-available-face-detection-model-7c725747094a)
  * [Real-Time Multi-Scale Face Detector on Embedded Devices](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6539187/)

## Object Detection

* Object Detection is Object Localization and Object Classification
* Model for Object Detection: Fast R-CNN, Faster R-CNN, Histogram of Oriented Gradients (HOG), Region-based Convolutional Neural Networks (R-CNN), Region-based Fully Convolutional Network (R-FCN), Single Shot Detector (SSD), Spatial Pyramid Pooling (SPP-net), YOLO (You Only Look Once)

## YOLO

* Redmond developed YOLO v1, YOLO v2, YOLO v3, but YOLO v4 and YOLO v5 were developed by [others](https://blog.roboflow.ai/yolov4-versus-yolov5/)
* [Yolo at Darknet](https://pjreddie.com/darknet/yolo/), [Github Repo](https://github.com/pjreddie/darknet/wiki/YOLO:-Real-Time-Object-Detection)
* [How to Perform Object Detection With YOLOv3 in Keras](https://machinelearningmastery.com/how-to-perform-object-detection-with-yolov3-in-keras/)
* [Real-time Object Detection with YOLO, YOLOv2 and now YOLOv3](https://jonathan-hui.medium.com/real-time-object-detection-with-yolo-yolov2-28b1b93e2088)
* [YOLO object detection with OpenCV](https://www.pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/)
* [What is YOLO Object Detection?](https://appsilon.com/object-detection-yolo-algorithm/)
* [Introduction to Yolo](https://appsilon.com/object-detection-yolo-algorithm/)
* [High-performance multiple object tracking based on YOLOv4, Deep SORT, and optical flow](https://github.com/GeekAlexis/FastMOT)

## TinyYolo for Mobile App

* [TinyYolo for Knife Detection](http://publication.petra.ac.id/index.php/teknik-informatika/article/view/10527)
* [TinyYolo for Card](https://www.tooploox.com/blog/card-detection-using-yolo-on-android)
* [natanielruiz/android-yolo](https://github.com/natanielruiz/android-yolo)
* [Tiny Yolo for Blood](https://blog.roboflow.com/how-to-train-a-custom-mobile-object-detection-model/)
* [Yolo for Car](http://repository.umrah.ac.id/3224/1/JUNITA%20SRI%20WISNA%20H-%20150155201053-%20FT-%202019.pdf)
* [hunglc007/tensorflow-yolov4-tflite](https://github.com/hunglc007/tensorflow-yolov4-tflite)
* [cmdbug/YOLOv5\_NCNN](https://github.com/cmdbug/YOLOv5_NCNN)
* [szaza/android-yolo-v2](https://github.com/szaza/android-yolo-v2)

## Yolo for custom object

* [How to Train A Custom Object Detection Model with YOLO v5](https://towardsdatascience.com/how-to-train-a-custom-object-detection-model-with-yolo-v5-917e9ce13208)
* [Everything you need to know to train your custom object detector model using YOLOv3](https://medium.com/analytics-vidhya/everything-you-need-to-know-to-train-your-custom-object-detector-model-using-yolov3-1bf0640b0905)
* [Training YOLOv3 : Deep Learning based Custom Object Detector](https://www.learnopencv.com/training-yolov3-deep-learning-based-custom-object-detector/)
* [Training Yolo for Object Detection in PyTorch with Your Custom Dataset—The Simple Way](https://towardsdatascience.com/training-yolo-for-object-detection-in-pytorch-with-your-custom-dataset-the-simple-way-1aa6f56cf7d9), [Github Repo](https://github.com/cfotache/pytorch_custom_yolo_training)
* [How to build a custom object detector using YOLOv3 in Python](http://emaraic.com/blog/yolov3-custom-object-detector) [Github Repo](https://github.com/tahaemara/yolo-custom-object-detector)
* [Yolo and YoloTiny Colab](https://github.com/theAIGuysCode/YOLOv3-Cloud-Tutorial), [Google Colab](https://colab.research.google.com/drive/1Mh2HP_Mfxoao6qNFbhfV3u28tG8jAVGk)
* [A Guide To Build Your Own Custom Object Detector Using YoloV3](https://medium.com/analytics-vidhya/custom-object-detection-with-yolov3-8f72fe8ced79), [Github Repo](https://github.com/TheCaffeineDev/YoloV3-Custom-Object-Detection)
* <https://github.com/ratulKabir/Custom-Object-Detection-using-Darkflow>

## SSD

* [Convolutional SSD](https://medium.com/@amadeusw6/variations-of-ssd-understanding-deconvolutional-single-shot-detectors-c0afb8686d03)
* [SSD Original Paper](https://arxiv.org/abs/1512.02325)
* [Sefiks](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/)
* [Sefiks: Face Recognition](https://sefiks.com/2020/05/01/a-gentle-introduction-to-face-recognition-in-deep-learning/)

## Widerface

* [WiderFace and Comparison](http://shuoyang1213.me/WIDERFACE/index.html)

## Model Zoo

* [Open CV Deep Learning](https://github.com/opencv/opencv/wiki/Deep-Learning-in-OpenCV)
* [ONNX](https://github.com/onnx/models)
* [Caffe](https://github.com/BVLC/caffe/wiki/Model-Zoo)
* [Caffe2](https://caffe2.ai/docs/zoo.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://irosyadi.gitbook.io/irosyadi/machine-learning/face-mask-detection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
