Skip to content

ahmertsengol/mediapipe-facemesh-to-obj-blender

Repository files navigation

MediaPipe Face Mesh to OBJ Converter

License: MIT Python 3.10+

A Python tool that converts 2D face images to 3D OBJ models using MediaPipe's 468 facial landmarks. Perfect for creating 3D face models for Blender, Unity, or other 3D software.

Author: Ahmet Mert Şengöl

🎬 Demo

3D Model Animation

Naruto 3D Model Animation

Input & Output Comparison

Generated Texture Map
Naruto Original
Original 2D Image
Naruto Texture

Features

  • 🎯 Converts 2D photos to 3D face models (OBJ format)
  • 🚀 Fast processing on CPU
  • 🎨 Generates texture maps automatically
  • 🖼️ Works with both photos and illustrations

Installation

pip install -r requirements.txt

Usage

Web Interface

python app.py

Open http://localhost:8080 in your browser.

Command Line

python simplified_mp_to_obj.py -i <input_image.jpg> -o <output_name>

Output: Generates *.obj, *.mtl, and *_texture.jpg files.

Scripts

  • app.py - Web interface (recommended)
  • simplified_mp_to_obj.py - Command-line version

License

MIT License - see LICENSE file for details.

Copyright (c) 2025 Ahmet Mert Şengöl

About

MediaPipe Face Mesh to OBJ Converter for Blender - Convert 2D photos to 3D face models

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors