/VirtualMakeUp

Automatically detect the iris, the lips and the teeth on a face and allow there modification

Primary LanguagePython

VirtualMakeUp tool

This tool uses a variety of computer vision techniques and libraries to automatically detect the iris, the lips and the teeth on the image. Therefore you can:

  • Whitten the teeth ;
  • Change the color of the iris ;
  • Change the color of the lips ;
  • Ongoing - not available yet: Change the color of the hairs.

This tool is provided with three input images used for the tests and development. Refers to the main() method to add others and change it.

Below are the mask computed to detect pixel-wisely the iris, the lips and the teeth on 3 different images:

Input Mask

Results

Before After

How-to use the tool

Dependencies

import cv2
import copy
import dlib

import numpy as np

from tkinter import Tk, Button, Label
from tkinter import colorchooser
from PIL import Image, ImageTk

Make sure to install everything required.

To launch the tool:

> python virtualMakeup.py

Some exemples:

Mouth

Lips Lips & Teeth

Eyes