raahatg21 / Eyes-Lips-Segmentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eyes and Lips Segmentation in a Face

Python program which inputs an image of a face, and creates a mask around the eyes and lips of the face.

Overview

The network architecture used here is based on BiSeNet [1] and ResNet. The dataset used is CelebAMask-HQ Dataset [2].

How to run

Prerequisties

  • Python 3
  • PyTorch
  • Scikit-Image
  • OpenCV
  • Pillow

Steps

  • Download the pre-trained model from here. Put the .pth file in cp 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

Results

Input Mask Output

Sources

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%