Browse by type
This is the code repo of facial details synthesis from single input image. Paper here, Supplemental Material: here.
This repository consists 5 individual parts: DFDN, emotionNet, landmarkDetector, proxyEstimator and faceRender. The DFDN is based on junyanz's pix2pix, for the landmark and expression detector, we use a simplify version of openFace, and our proxyEstimator is modified based on patrikhuber's fantastic work eos . We want to thank each of them for their kindly work.
We present a single-image 3D face synthesis technique that can handle challenging facial expressions while recovering fine geometric details. Our technique employs expression analysis for proxy face geometry generation and combines supervised and unsupervised learning for facial detail synthesis. On proxy generation, we conduct emotion prediction to determine a new expression-informed proxy. On detail synthesis, we present a Deep Facial Detail Net (DFDN) based on Conditional Generative Adversarial Net (CGAN) that employs both geometry and appearance loss functions. For geometry, we capture 366 high-quality 3D scans from 122 different subjects under 3 facial expressions. For appearance, we use additional 163K in-the-wild face images and apply image-based rendering to accommodate lighting variations. Comprehensive experiments demonstrate that our framework can produce high-quality 3D faces with realistic details under challenging facial expressions.

We specify python3 and pytorch
Or you can use Ananconda to create new environment in root directory by
bash
conda create -n facial_details --file requirement.txt
Download models and pre-train weights.
DFDN checkpoints, unzip to ./DFDN/checkpoints
landmork models, unzip to ./landmarkDetector
[Optional] emotionNet checkpoints, unzip to ./emotionNet/checkpoints
Install BFM2017
pip install --force-reinstall eos-py==0.16.1Download BFM2017 and copy model2017-1_bfm_nomouth.h5 to ./proxyEstimator/bfm2017/.
Run python convert-bfm2017-to-eos.py to generate bfm2017-1_bfm_nomouth.bin in bfm2017 folder.
Have fun!
python proxyPredictor.py -i path/to/input/image -o path/to/output/folder [--FAC 1][--emotion 1]
For batch processing, you can set -i to a image folder.
For prior features, you can optional choose one of those two priors:
with facial coding features, type --FAC 1,
with emotion features type --emotion 1.
example: python proxyPredictor.py -i ./samples/proxy -o ./results
python facialDetails.py -i path/to/input/image -o path/to/output/folder
example:
python facialDetails.py -i ./samples/details/019615.jpg -o ./results
python facialDetails.py -i ./samples/details -o ./results
we suggest you directly download the released package for convenient, if you are interested in compile the source code, please follow the following guidelines:
on the way .....
If you find this code useful to your research, please consider citing:
@InProceedings{Chen_2019_ICCV,
author = {Chen, Anpei and Chen, Zhang and Zhang, Guli and Mitchell, Kenny and Yu, Jingyi},
title = {Photo-Realistic Facial Details Synthesis From Single Image},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {Oct},
year = {2019}
}
$ claude mcp add Facial_Details_Synthesis \
-- python -m otcore.mcp_server <graph>