Skip to content

nkegke/medical-face-mask-applier

Repository files navigation

Medical Face Mask Application Tool

This is a tool that can be used to create masked versions of existing image datasets and study visual recognition problems, such as face identification/verification or emotion recognition in the presence of medical face masks.

It also has fast ML inference & processing accelerated even on common hardware and can be utilized in real-time applications.

Input Output
def mask

Prerequisites

Install the required packages below:

pip install mediapipe
pip install opencv-python
pip install tqdm

How to run

Image

Apply mask on a single image:

python mask_on_img.py IMAGE_NAME

Videos (preserving audio)

Apply mask on multiple videos, by creating a folder 'videos' in the same directory and running:

./mask.sh

Webcam

Apply mask in real-time on multiple faces with webcam input:

python mask_webcam.py

How it works

Original Face Mesh Jawlines Masked
orig mesh jaw masked