Python program which inputs an image of a face, and creates a mask around the eyes and lips of the face.
The network architecture used here is based on BiSeNet [1] and ResNet. The dataset used is CelebAMask-HQ Dataset [2].
- Python 3
- PyTorch
- Scikit-Image
- OpenCV
- Pillow
- Download the pre-trained model from here. Put the
.pth
file incp
folder. - Run
eyes-and-lips.py
with the path of the image as argument. For example:
python eyes-and-lips.py --img-path images/img1.jpg
Input | Mask | Output |
---|---|---|