MCPcopy Index your code
hub / github.com/cvlab-kaist/ControlFace

github.com/cvlab-kaist/ControlFace @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
491 symbols 1,309 edges 47 files 107 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ControlFace: Harnessing Facial Parametric Control for Face Rigging

CVPR 2025

 <a>Wooseok Jang</a>
·
 <a>Youngjun Hong</a>
·
<a>Geonho Cha</a>
·
<a>Seungryong Kim</a>

Paper | Project Page

1. Environment setup

Build the environment as follows:

conda create -n controlface python=3.8
conda activate controlface

conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1  pytorch-cuda=11.8 -c pytorch -c nvidia

conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install pytorch3d -c pytorch3d

conda install mpi4py dlib scikit-learn scikit-image tqdm -c conda-forge

pip install -r requirements.txt

2. Download pretrained weights

First run the following command which will automatically download the weights. Weights will be placed under the ./pretrained_weights directory.

python tools/download_weights.py

Then follow the DECA Setup stage present in here.

3. Inference

We provide a example script for face editing. Change the command below to specify the attribute you want to edit (pose, expression, light, shape) by modifying the --mode flag.

PATH_TO_REFERENCE="./examples/00013.png"
PATH_TO_TARGET="./examples/00690.png"
python sample.py --ref ${PATH_TO_REFERENCE} \
 --tgt ${PATH_TO_TARGET} \
 --mode pose

The output will be saved under the ./output directory.

Acknowledgements

Our project builds upon and incorporates elements from DiffusionRig, Moore-AnimateAnyone, and LightningDrag. We would like to thank the authors and maintainers of these projects for their invaluable work and for making their code available to the community.

Core symbols most depended-on inside this repo

encode
called by 40
decalib/deca.py
torch_dfs
called by 24
src/models/mutual_self_attention_point.py
decode
called by 16
decalib/deca.py
transform
called by 15
decalib/utils/lossfunc.py
to_tensor
called by 7
decalib/models/FLAME.py
to_np
called by 7
decalib/models/FLAME.py
model_dict
called by 4
decalib/deca.py
add_SHlight
called by 4
decalib/utils/renderer.py

Shape

Method 275
Function 133
Class 83

Languages

Python99%
C++1%

Modules by API surface

decalib/utils/lossfunc.py48 symbols
decalib/utils/util.py35 symbols
src/models/unet_2d_blocks.py33 symbols
src/training_utils.py29 symbols
decalib/datasets/train_datasets.py28 symbols
decalib/models/resnet.py27 symbols
src/models/motion_module.py20 symbols
decalib/utils/renderer.py17 symbols
src/models/unet_2d_condition.py15 symbols
src/models/resnet.py15 symbols
decalib/utils/rotation_converter.py15 symbols
src/pipelines/pipeline_point.py14 symbols

For agents

$ claude mcp add ControlFace \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact