← all repositories
sicxu/Deep3DFaceRecon_pytorch

This PyTorch port rebuilds faces better than the original

To bring a CVPRW 2019 best-paper face reconstructor into PyTorch—and squeeze 9% better accuracy out of it than the original.

Deep3DFaceRecon_pytorch
Not currently ranked — collecting fresh signals.
star history

What it does

The project turns a flat portrait into a textured 3D head mesh using a CNN trained with weak supervision. It is built around the Basel Face Model 2009, augmented with an expression basis, and produces .obj meshes, 257-dimensional coefficient .mat files, and projected 2D landmarks.

The interesting bit

This is not a lazy translation from TensorFlow. The author swapped the original tf_mesh_renderer for Nvdiffrast, replaced Facenet with Arcface for perceptual loss, and retrained with heavier augmentation plus FFHQ data. The result is a roughly 9% drop in shape reconstruction error over the original, and a 2023 update that specifically handles closed eyes without hurting benchmark scores.

Key highlights

  • On the README’s NoW benchmark table, it ranks second among the listed public methods—behind DECA, but ahead of RingNet, 3DDFA-V2, and the original TensorFlow version.
  • The authors note a recent REALY benchmark still rates the method as SOTA, though the README does not provide those specific numbers.
  • The pipeline requires 5-point facial landmarks up front for image pre-alignment, and can fall back to a pure CUDA context if no OpenGL environment is available.
  • A 2023 model update added roughly 2,000 closed-eye training images to improve reconstruction for that specific case while keeping overall accuracy flat on FaceWarehouse and MICC Florence.

Caveats

  • The code is only tested on Ubuntu with Nvidia GPUs and CUDA; Windows support is described as theoretically possible with proper library configuration.
  • Running it requires assembling several external model files—BFM09, an expression basis, a pre-trained Arcface backbone, and a TensorFlow landmark detector—into rigid directory structures.

Verdict

Worth a look if you need research-grade single-image face reconstruction in PyTorch and can tolerate a bulky model zoo. Skip it if you were hoping for a lightweight, dependency-free drop-in script.

Frequently asked

What is sicxu/Deep3DFaceRecon_pytorch?
To bring a CVPRW 2019 best-paper face reconstructor into PyTorch—and squeeze 9% better accuracy out of it than the original.
Is Deep3DFaceRecon_pytorch open source?
Yes — sicxu/Deep3DFaceRecon_pytorch is open source, released under the MIT license.
What language is Deep3DFaceRecon_pytorch written in?
sicxu/Deep3DFaceRecon_pytorch is primarily written in Python.
How popular is Deep3DFaceRecon_pytorch?
sicxu/Deep3DFaceRecon_pytorch has 1.9k stars on GitHub.
Where can I find Deep3DFaceRecon_pytorch?
sicxu/Deep3DFaceRecon_pytorch is on GitHub at https://github.com/sicxu/Deep3DFaceRecon_pytorch.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.