Skip to content

Face Reconstructor: Mediapipe Holistic + OpenCV for accurate facial landmark detection and mesh-based skin patching

Notifications You must be signed in to change notification settings

k-byzid/Face-Reconstructor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Reconstructor 👤🔍💻

Description

Welcome to the Face Reconstructor project! 🌟 This advanced application utilizes the cutting-edge capabilities of the Mediapipe library Holistic tool to accurately identify and analyze a comprehensive set of 468 facial landmarks. Leveraging the power of OpenCV (cv2), this system employs sophisticated algorithms to generate a meticulously crafted triangulation mesh, wherein each polygon is expertly filled with a seamless patch of skin derived from the original frame. 📸💡

Features

🔍✨ Facial Landmark Detection: Utilizing Mediapipe Holistic, this system accurately detects key facial landmarks, revealing detailed structural insights. 🎯💡

🔳✨ Triangulated Mesh Generation: With OpenCV (cv2), this application creates a precise triangulation mesh, enabling advanced analysis and visualizations of facial geometry. 📏🔲

🎨✨ Patch-based Skin Reconstruction: This system achieves lifelike face reconstruction by filling triangulation mesh polygons with carefully selected skin patches, maintaining a natural appearance. 🖌️🧑‍🎨

Installation and Usage

  1. 🍴 Fork the repository to your GitHub account.
  2. ⬇️ Clone the forked repository to your local machine.
  3. 💿 Navigate to the local repository using the command line.
  4. 💻 Run the script using the following command:
    python reconstructor.py --input_image assets/example_video.mp4 --output_path results/processed_example_video.mp4,
    where assets/example_video.mp4is the path to the input video you want to extract the face from.
  5. ✉️ The generated mesh will be saved in the "results" folder for further usage.

Usage Preview

Input Video - - Output Video:


Example 1Processed Example 1

Example 2Processed Example 2

Example TestProcessed Example Test

Requirements

The following dependencies are required to run the Face Reconstructor:

  1. Python 3.x
  2. Mediapipe
  3. OpenCV Python
  4. Numpy

You can install these dependencies manually using the package manager of your choice.

About

Face Reconstructor: Mediapipe Holistic + OpenCV for accurate facial landmark detection and mesh-based skin patching

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published