Downloads · 30 days
0
ameerazam08/VOODOO3D-unofficial
VOODOO3D-unofficial is a machine learning model from ameerazam08. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://arxiv.org/abs/2312.04651) [](https://arxiv.org/abs/2312.04651) [](https://arxiv.org/abs/2312.04651)
Downloads · 30 days
0
Access
Public
Updated Jun 30, 2024
Repo size
1.3 GB
Likes
0
Public
Click a slice to open those files.
.png1.3 GB · 47%
From the Hugging Face model README

This is the official implementation of VOODOO 3D: a high-fidelity 3D-aware one-shot head reenactment technique. Our method transfers the expression of a driver to a source and produces view consistent renderings for holographic displays.
For more details of the method and experimental results of the project, please checkout our paper, youtube video, or the project page.
First, clone the project:
git clone https://github.com/MBZUAI-Metaverse/VOODOO3D-official
The implementation only requires standard libraries. You can install all the dependencies using conda and pip:
conda create -n voodoo3d python=3.10 pytorch=2.3.0 torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install -r requirements.txt
Next, prepare the pretrained weights and put them into ./pretrained_models:
Use the following command to test the model:
python test_voodoo3d.py --source_root <IMAGE_FOLDERS / IMAGE_PATH> \
--driver_root <IMAGE_FOLDERS / IMAGE_PATH> \
--config_path configs/voodoo3d.yml \
--model_path pretrained_models/voodoo3d.pth \
--save_root <SAVE_ROOT> \
Where source_root and driver_root are either image folders or image paths of the sources and drivers respectively. save_root is the folder root that you want to save the results. This script will generate pairwise reenactment results of the sources and drivers in the input folders / paths. For example, to test with our provided images:
python test_voodoo3d.py --source_root resources/images/sources \
--driver_root resources/images/drivers \
--config_path configs/voodoo3d.yml \
--model_path pretrained_models/voodoo3d.pth \
--save_root results/voodoo3d_test \
Lp3D is the state-of-the-art 3D Portrait Reconstruction model. As mentioned in the VOODOO 3D paper, we had a reimplementation of this model but fine-tuned on in-the-wild data. To evaluate this model, use the following script:
python test_lp3d.py --source_root <IMAGE_FOLDERS / IMAGE_PATH> \
--config_path configs/lp3d.yml \
--model_path pretrained_models/voodoo3d.pth \
--save_root <SAVE_ROOT> \
--cam_batch_size <BATCH_SIZE>
where source_root is either an image folder or an image path of the images that will be reconstructed in 3D. SAVE_ROOT is the destination of the results. BATCH_SIZE is the testing batch size (the higher, the faster). For each image in the input folder, the model will generate a rendered video of its corresponding 3D head using a fixed camera trajectory. Here is an example using our provided images:
python test_lp3d.py --source_root resources/images/sources \
--config_path configs/lp3d.yml \
--model_path pretrained_models/voodoo3d.pth \
--save_root results/lp3d_test \
--cam_batch_size 2
Our implementation uses modified versions of other projects that has different licenses. Specifically:
Other code if not stated otherwise is licensed under the MIT License. See the LICENSES file for details.
This work would not be possible without the following projects:
If you see your code used in this implementation but haven't properly acknowledged, please contact me via [email protected].
If our code is useful for your research or application, please cite our paper:
@inproceedings{tran2023voodoo,
title = {VOODOO 3D: Volumetric Portrait Disentanglement for One-Shot 3D Head Reenactment},
author = {Tran, Phong and Zakharov, Egor and Ho, Long-Nhat and Tran, Anh Tuan and Hu, Liwen and Li, Hao},
year = 2024,
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}
}
For any questions or issues, please open an issue or contact [email protected].