MarlNox / 3DFaceCAM

Implementation of a 3D Face Generative Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Controllable 3D Generative Adversarial Face Model via Disentangling Shape and Appearance

Fariborz Teherkhani, Aashish Rai*, Shaunak Srivastava*, Quankai Gao*, Xuanbai Chen, Fernando de la Torre, Steven Song, Aayush Prakash, Daeil Kim (* equal contribution)

Carnegie Mellon University, Facebook/Meta

This is the official Pytorch implementation of the paper.

[Project Page] [Video] [Colab Demo] [Arxiv]

Testing

Download pre-trained weights and put the "checkpoints" folder in the main directory. [Link]

  • Generate 3D Faces (mesh and texture)

    python generate_faces.py
    
  • Generate meshes only

    python test_gan3d.py
    
  • Generate textures only

    python test_texture.py
    

Train your own model

Preprocess data

- Download Facescape dataset and specify path to the "facescape_trainset" folder.

python preprocess_traindata.py

Start training

  • Shape

    Train AE
    python train_ae.py 
    
    Generate Reduced Data
    python gen_reduced_data.py 
    
    Train GAN
    python train_gan3d.py 
    
  • Texture

    Train P-GAN
    python train_texture.py --init_step 1 --batch_size 128
    

License

The code is available under MIT License. Please read the license terms available at [Link]

Citation

If you use find this paper/code useful, please consider citing:

@misc{taherkhani2022controllable,
      title={Controllable 3D Generative Adversarial Face Model via Disentangling Shape and Appearance}, 
      author={Fariborz Taherkhani and Aashish Rai and Quankai Gao and Shaunak Srivastava and Xuanbai Chen and Fernando de la Torre and Steven Song and Aayush Prakash and Daeil Kim},
      year={2022},
      eprint={2208.14263},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

About

Implementation of a 3D Face Generative Model

License:MIT License


Languages

Language:Python 100.0%