A method for adding a mask on a non-masked face image. Given a real masked face image (a) and a non-masked face image (d), we synthesize a photo-realistic masked face image with the mask from (a) and the facial area from (d).
- python >= 3.7.1
- pytorch >= 1.1.0
- Extract the landmarks. You can extract the 106 landmarks by our face sdk or any other methods.
- Add a mask on a face image. You can refer to add_mask_one.py as an example.
python add_mask_one.py
Some advice:
- Write the whole process by multi-processing.
- Write the function of render in face_masker.py by c++.
This project is mainly inspired by PRNet.