Add virtual makeup to picture of a face.
Alternatives To Visage
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
2 months ago235otherC++
OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
Opencv4nodejs4,72962422 months ago120May 13, 2020290mitC++
Nodejs bindings to OpenCV 3 and OpenCV 4
Node Opencv4,275307615 months ago31March 10, 2020126mitC++
OpenCV Bindings for node.js
Pigo3,992153 months ago24November 02, 20212mitGo
Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.
Face Mask Detection1,355
7 months ago20mitJupyter Notebook
Face Mask Detection system based on computer vision and deep learning using OpenCV and Tensorflow/Keras
5 years ago4
A Face detector for anime/manga using OpenCV
Head Pose Estimation1,023
a day ago25mitPython
Head pose estimation by TensorFlow and OpenCV
3 years ago8mitC++
Real time deformable face tracking in C++ with OpenCV 3.
Emotion Detection907
2 months ago12mitPython
Real-time Facial Emotion Detection using deep learning
6 years ago14Python
(WARNING: This repository is NO LONGER maintained ) Real time face detection and recognition base on opencv/tensorflow/mtcnn/facenet
Alternatives To Visage
Select To Compare

Alternative Project Comparisons


Add virtual makeup to a picture of a face.

Plain human face. Human face with makeup.
Image without makeup. Image with lipstick and eyeliner.



  1. You need >=Python2.7 and pip to get this working. MacOS comes with Python2.7 installed by default. If you don't have pip, follow these steps to get it -

    • curl -O
    • sudo python
    • pip install --upgrade pip
  2. Install Cmake, Boost, and Boost-Python - brew install cmake boost boost-python

If you don't have Homebrew, copy paste the following in your terminal to get it - /usr/bin/ruby -e "$(curl -fsSL"

  1. See Step 4 - Generic.


  1. You will need >=Python2.7 and pip to get this working. Kindly figure out how to get the same for your distribution.

  2. You need Cmake, and Boost-Python. To get the same, use yum or apt-get as you please.

sudo yum install cmake boost boost-devel 

Note: You will need C++11 compiler for Cmake. CentOS does not come with the same out of the box. Follow this link's instructions to get it.

Note: Kindly raise issues if you face setup problems on your Linux distributions. I will ammend the instructions to resolve the same.

  1. See Step 4 - Generic.


  1. Kindly consider using a virtual environment for development. Check out this link for detailed explanations on how to do that. Follow these steps to get up and running quickly -
pip install virtualenv
virtualenv my_project
cd my_project && source bin/activate

Now you can install your python modules and run your code in an isolated chamber. Once you're done, run deactivate to close the virtual environment.

  1. Install the python module requirements by running - pip install pyvisage

Note: If you are not using virtualenv, you might need sudo to make this work.


The module is named visage, and consists of two classes - Detect Features and ApplyMakeup. You can import, and access their functions to either selectively detect face only, or apply lipstick directly. Kindly read the Wiki for detailed usage.

Example -

Note: You will need a working internet connection the first time you run this, as it will download a predictor file to your project folder the first time.

from visage import ApplyMakeup
AM = ApplyMakeup()
output_file = AM.apply_lipstick('input.jpg',170,10,30) # (R,G,B) - (170,10,30)

This assumes you have a front-facing image of a human face saved in your current directory as input.jpg.

Guidelines for Image

Certain best practices to be followed to ensure optimal detection and application -

  • Positioning: Face the camera directly and position yourself so that your face fills the about 50-70% of the frame. Avoid extreme angles and poses.
  • Expressions: Preferably maintain a neutral expression. Smiles will be detected comfortably, as long as the shape of the mouth and lips aren't too contorted. Remove any dark glasses or tinted lenses, and keep both eyes open for proper application of eyeliner.
  • Lighting: For increased visibility, avoid bright backlighting ( such as the sun, or other bright light sources ), and glare, by taking your photographs under an even light.
  • Orientation: Kindly ensure an upright orientation in portrait mode.
screen shot 2017-08-08 at 12 51 54 pm
  • Focus & Movement: Image focus and blur can have similar effects on performance as low resolution. Thus, make sure your captured image is not blurry. If the camera is having difficulty focusing, you might be too close or too far from the device.


I would like to thank Davis E. King who built dlib, for the documentation and sample codes provided, which were a great help in building this.

Popular Face Projects
Popular Opencv Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Image Processing
Face Detection