Analysis updated 2026-07-03
Estimate head pose angles and 3D face geometry from photos for augmented reality or facial animation work.
Export a 3D face mesh as an OBJ or standard 3D file to open in Blender or other 3D software.
Process batches of face images at ~0.27ms each on GPU for real-time face recognition pipelines.
Deploy face alignment in a non-Python environment using the included C++ port.
| cleardusk/3ddfa | maxcountryman/flask-login | calesthio/openmontage | |
|---|---|---|---|
| Stars | 3,680 | 3,680 | 3,681 |
| Language | Python | Python | Python |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | researcher | developer | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
Requires compiling a Cython module after cloning and installing PyTorch plus OpenCV, GPU needed for the stated near-real-time inference speed.
3DDFA is a research codebase for analyzing human faces in photographs using a technique called 3D face alignment. Given a photo of a person, it estimates the full three-dimensional shape of their face, including the position and orientation of the head even when it is turned sideways or tilted. This goes beyond simpler approaches that only work well when faces are looking straight at the camera. The project is an improved PyTorch implementation of a paper published in a major computer vision journal, with additional features added beyond what the original paper described. The system produces several types of output from a single input image: a set of 68 landmark points that map the face geometry in 3D, a reconstructed 3D face mesh, an estimated head pose (yaw, pitch, and roll angles), a depth map showing distance from the camera, and specialized feature maps used in pose-adaptive processing. These outputs can be saved as standard 3D files that work with common 3D software, or as image overlays. To use it, you clone the repository, install several Python libraries including PyTorch, OpenCV, and optionally Dlib for face detection, then compile a small Cython module for performance-critical parts. Running the main script on any image containing faces produces the various output files automatically. The inference speed is roughly 0.27 milliseconds per image on a GPU when processing a batch of images, which is fast enough for real-time or near-real-time applications. The repository has been updated over several years and includes a C++ port for environments where Python is not suitable. A follow-up version called 3DDFA_V2 was also released for people who need faster and more accurate results, and is linked from this README. This project is primarily aimed at researchers and developers working on computer vision applications such as face recognition, augmented reality, or facial animation. It is licensed under MIT.
A Python and PyTorch library that reconstructs the full 3D shape, head pose, and facial landmarks from a single 2D photo. Outputs meshes, depth maps, and pose angles fast enough for near-real-time applications.
Mainly Python. The stack also includes Python, PyTorch, OpenCV.
MIT, free to use for any purpose including commercial projects, as long as you keep the copyright notice.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.