git clone https://github.com/Jayanths9/Virtual_Makeup_opencv.git
cd Virtual_Makeup_opencv
conda env create -f environment.yml
conda activate virtual_makeup
python camera.py
python image.py --image sample/face.png
In this project Mediapipe [1] facial landmarks and opencv is used to add makeup on facial features.
- Mediapipe facial landmark library detects the face in the image and returns 478 landmarks on human face. (x,y) coordinates of each points is obtained w.r.t the image size.
Media pipe facial landmarks example [2]
- From all the facial landmarks, extract Lips, Eyebrow, Eyeliner & Eyeshadow points and create a colored mask with respect to the input image.
Colored Mask for Lips, Eyebrow, Eyeliner & Eyeshadow
- Blend the Original image and the mask with respect to its weights to add makeup on the original image.
Original image and Transformed Image with Makeup [3]
- Virtual Makeup on video.
- https://ai.google.dev/edge/mediapipe/solutions/vision/face_landmarker
- https://medium.com/@hotakoma/mediapipe-landmark-face-hand-pose-sequence-number-list-view-778364d6c414
- https://i.pinimg.com/originals/a9/93/7d/a9937d95f962f477c486d701a5152752.jpg
- https://www.pexels.com/video/attractive-woman-looking-at-the-camera-7048981/
Author: Jayanth S universitat Bremen, Bremen