Skip to content

Official code of Training and Tuning Generative Neural Radiance Fields for Attribute-Conditional 3D-Aware Face Generation

Notifications You must be signed in to change notification settings

zhangqianhui/TT-GNeRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TT-GNeRF

Training and Tuning Generative Neural Radiance Fields for Attribute-Conditional 3D-Aware Face Generation
Jichao Zhang, Aliaksandr Siarohin, Yahui Liu, Hao Tang, Nicu Sebe, Wei Wang
Demo-Video
Ocean University of China, Snap Research, Huawei, Peking University, University of Trento, Beijing Jiaotong University

Environments

conda create -n ttgnerf python=3.6
pip install -r req.txt

Results

Editing (EG3D)

Please edit the file training/loss.py to change the path of BiSeNet model. You can download BiSeBet from the given pretrained model path.

python test_kmeans.py --outdir=[output_path] \
            --network=[pretrained eg3d model] \
            --dataset_path [our dataset path] \
            --csvpath [label path] \
            --batch=1 \
            --gen_pose_cond=True \
            --resolution 512 \
            --label_dim 6 \
            --truncation_psi 0.7 \
            --file_id 66 \
            --lambda_normal 1.0
python test_editing_triot.py --outdir=[output_path] \
            --network=[pretrained eg3d model] \
            --dataset_path [our dataset path] \
            --csvpath [label path] \
            --cnf_path=[cnf pretrained model path] \
            --mask_path=[output_path_mask] \
            --batch=1 \
            --gen_pose_cond=True \
            --resolution 512 \
            --label_dim 6 \
            --truncation_psi 0.7 \
            --scale 1.2 \
            --finetune_id 0 \
            --file_id 66 \
            --num_steps 100 \
            --lambda_normal 5.0 \
            --norm_loss 0

Reference Image Geometry Transfer

python test_reference_geometry_editing.py --outdir=[output_path] --batch=1 \
            --gen_pose_cond=True --num_steps 100 \
            --faceid_weights [face_id_path] \
            --w_dir [our dataset path] \
            --resolution 512 --truncation_psi 0.7 --id 41 --ref_id 5235

Pretrained Model and Dataset

our dataset path:

face_id_path:

cnf pretrained model path:

label path:

pretrained eg3d model:

Questions

If you have any questions/comments, feel free to open a github issue or pull a request or e-mail to the author Jichao Zhang ([email protected]).

Reference code

We would like to thank EG3D and StyleFlow for providing such a great and powerful codebase.

About

Official code of Training and Tuning Generative Neural Radiance Fields for Attribute-Conditional 3D-Aware Face Generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published