Coder Social home page Coder Social logo

peterzs / imavatar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhengyuf/imavatar

0.0 0.0 0.0 51.96 MB

Official repository for CVPR 2022 paper: I M Avatar: Implicit Morphable Head Avatars from Videos

License: MIT License

Shell 2.18% Python 91.13% Cython 6.69%

imavatar's Introduction

I M Avatar: Implicit Morphable Head Avatars from Videos

Paper | Video Youtube | Video Download | Project Page

Official Repository for CVPR 2022 paper I M Avatar: Implicit Morphable Head Avatars from Videos.

Getting Started

  • Clone this repo: git clone --recursive [email protected]:zhengyuf/IMavatar.git
  • Create a conda environment conda env create -f environment.yml and activate conda activate IMavatar
  • We use libmise to extract 3D meshes, build libmise by running cd code; python setup.py install
  • Download FLAME model, choose FLAME 2020 and unzip it, copy 'generic_model.pkl' into ./code/flame/FLAME2020
  • When choosing your GPU, avoid RTX30xx since it seems unstable with broyden's method, see here if you want to know more. The results in the paper are obtained from a GeForce RTX2080Ti GPU. Quadro RTX6000 is also tested to converge well.

Preparing dataset

Download a preprocessed dataset from Google drive or ETH Zurich server. You can run download_data.bash.

Or prepare your own dataset following intructions in ./preprocess/README.md.

Link the dataset folder to ./data/datasets. Link the experiment output folder to ./data/experiments.

Training

python scripts/exp_runner.py ---conf ./confs/IMavatar_supervised.conf [--wandb_workspace IMavatar] [--is_continue]

Evaluation

Set the is_eval flag for evaluation, optionally set checkpoint (if not, the latest checkpoint will be used) and load_path

python scripts/exp_runner.py --conf ./confs/IMavatar_supervised.conf --is_eval [--checkpoint 60] [--load_path ...]

Pre-trained model

Download a pretrained model from Google drive or ETH Zurich server. See download_data.bash.

Additional features

The following features are not used in the main paper, but helpful for training.

  • Semantic-guided Training: set loss.gt_w_seg to True to use semantic segmentation during training. Using semantic maps leads to improved training stability, and better teeth reconstruction quality.
  • Ghost Bone: If FLAME global rotations in your dataset are not identity matrices, set deformer_network.ghostbone to True. This allow the shoulder and upper body to remain un-transformed.
  • Pose Optimization: When the FLAME parameters are noisy, I find it helpful to set optimize_camera to True. This optimizes both the FLAME pose parameters and the camera translation parameters. Similarly, set optimize_expression and optimize_latent_code to True to optimize input expression parameters and per-frame latent codes.

Warning

  • Our preprocessing script scales FLAME head meshes by 4 so that it would fit the unit sphere tighter. Remember to adjust camera positions accordingly if you are using your own preprocessing pipeline.
  • Multi-GPU training is not tested. We found a single GPU to be sufficient in terms of batch size.

Citation

If you find our code or paper useful, please cite as:

@inproceedings{zheng2022imavatar,
  title={{I} {M} {Avatar}: Implicit Morphable Head Avatars from Videos},
  author={Zheng, Yufeng and Abrevaya, Victoria Fernández and Bühler, Marcel C. and Chen, Xu and Black, Michael J. and Hilliges, Otmar},
  booktitle = {Computer Vision and Pattern Recognition (CVPR)},
  year = {2022}
}

imavatar's People

Contributors

zhengyuf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.