This repository is used for developing a face recognition system, even when you are wearing a face mask.
-
Using
python3.7
is recommend, or you can create a virtual env with python version 3.7 -
Run this command to install packages
pip install -r requirements.txt
- Download our pretrained model on GDrive then put them into
models
folder likemodels/top_patch.h5
andmodels/face_mask_detection.pb
- Data preparation
For the first time, if you want to add your own images data, just prepare and add the data following the format
input_image/
- giang/
+ mask/
~ mask_img1
~ mask_img2
~ mask_img3
+ no_mask/
~ no_mask_img1
~ no_mask_img2
~ no_mask_img3
- linh/
+ mask/
~ mask_img1
~ mask_img2
~ mask_img3
+ no_mask/
~ no_mask_img1
~ no_mask_img2
~ no_mask_img3
...
Please create your own folder following the given format.
- Create database
Run the following command to create embeddings saved inside
database
folder
python create_embeddings.py
- Run
camera.py
to activate recognition process using your camera
python camera.py