All Projects â†’ hriddhidey â†’ visage

hriddhidey / visage

Licence: MIT license
Add virtual makeup to picture of a face.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to visage

Cat-Face-Detector-with-OpenCV-and-JavaFX
ðŸ“đ A Small OpenCV (Open Source Computer Vision) Example, who has the ability to detect multiple cat faces at the same time ðŸą
Stars: ✭ 24 (-75.26%)
Mutual labels:  picture, face, face-detection
Face Dataset
Face related datasets
Stars: ✭ 204 (+110.31%)
Mutual labels:  face, face-detection
Lookatme
VideoView that plays video only when 👀 are open and ðŸ‘Ķ is detected with various other features
Stars: ✭ 161 (+65.98%)
Mutual labels:  face, face-detection
Ros robotics projects
Example codes of new book ROS Robotics Projects
Stars: ✭ 240 (+147.42%)
Mutual labels:  face, virtual
Facelandmarksdetection
Finds facial features such as face contour, eyes, mouth and nose in an image.
Stars: ✭ 130 (+34.02%)
Mutual labels:  face, face-detection
Face Recognition.js
Simple Node.js package for robust face detection and face recognition. JavaScript and TypeScript API.
Stars: ✭ 1,768 (+1722.68%)
Mutual labels:  face, face-detection
Dockerface
Face detection using deep learning.
Stars: ✭ 173 (+78.35%)
Mutual labels:  face, face-detection
brfv4 android examples
Android Studio project (Java)
Stars: ✭ 43 (-55.67%)
Mutual labels:  face, face-detection
morghulis
No description or website provided.
Stars: ✭ 18 (-81.44%)
Mutual labels:  face, face-detection
Genetic Algorithm Montage
genetic algorithm for self-referential image approximation.
Stars: ✭ 86 (-11.34%)
Mutual labels:  picture, face
Facifier
An emotion and gender detector based on facial features, built with Python and OpenCV
Stars: ✭ 52 (-46.39%)
Mutual labels:  face, face-detection
interfaces
A diverse set of royalty-free user avatars to be used for marketing graphics and application screenshots.
Stars: ✭ 50 (-48.45%)
Mutual labels:  picture, face
Android Hpe
Android native application to perform head pose estimation using images coming from the front camera.
Stars: ✭ 46 (-52.58%)
Mutual labels:  face, face-detection
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (+2005.15%)
Mutual labels:  face, face-detection
Centerface
face detection
Stars: ✭ 1,002 (+932.99%)
Mutual labels:  face, face-detection
Brfv4 mac examples
macOS C++ examples utilizing OpenCV for camera access and drawing the face tracking results.
Stars: ✭ 25 (-74.23%)
Mutual labels:  face, face-detection
Human Detection And Tracking
Human-detection-and-Tracking
Stars: ✭ 753 (+676.29%)
Mutual labels:  face, face-detection
Jeelizweboji
JavaScript/WebGL real-time face tracking and expression detection library. Build your own emoticons animated in real time in the browser! SVG and THREE.js integration demos are provided.
Stars: ✭ 835 (+760.82%)
Mutual labels:  face, face-detection
Creepyface
A JavaScript library that makes your face follow the pointer. ðŸĪŠðŸ–ąïļðŸ‘†
Stars: ✭ 412 (+324.74%)
Mutual labels:  picture, face
FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-82.47%)
Mutual labels:  face, face-detection

Visage

Add virtual makeup to a picture of a face.

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

Installation

MacOS

  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 https://bootstrap.pypa.io/get-pip.py
    • sudo python get-pip.py
    • 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 https://raw.githubusercontent.com/Homebrew/install/master/install)"

  1. See Step 4 - Generic.

Linux

  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.

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.


Usage

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.

Attributions

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.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].