GithubHelp home page GithubHelp logo

jackzhousz / otavatar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theericma/otavatar

0.0 0.0 0.0 12.61 MB

This is the official repository for OTAvatar: One-shot Talking Face Avatar with Controllable Tri-plane Rendering [CVPR2023].

Shell 0.10% C++ 5.94% Python 75.74% Cuda 18.22%

otavatar's Introduction

OTAvatar : One-shot Talking Face Avatar with Controllable Tri-plane Rendering

Update

April.4: The preprocessed dataset is released, please see the Data preparation section. Some missing files are also uploaded.

Get started

Environment Setup

git clone [email protected]:theEricMa/OTAvatar.git
cd OTAvatar
conda env create -f environment.yml
conda activate otavatar

Pre-trained Models

Download and copy EG3D FFHQ model (named by ffhqrebalanced512-64.pth) from Baidu Netdisk to the pretrained directory. It is the ffhqrebalanced512-64.pkl file obtained from webpage, and converted to .pth format using the pkl2pth script.

Download arcface_resnet18.pth and save to the pretrained directory.

Data preparation

We upload the processed dataset (named by hdtf_lmdb_inv) in Baidu Netdisk (password: CBSR). Then in the root directory,

mkdir datasets
mv <your hdtf_lmdb_inv path> datasets/

Generally the processing scripts is a mixture of that in PIRenderer and ADNeRF. We plan to further open a new repo to upload our revised preocessing script.

Face Animation

Create the folder result/otavatarif it does not exist. Please the model (TODO) under this directory. Run,

export CUDA_VISIBLE_DEVICES=0
python -m torch.distributed.launch --nproc_per_node=1 --master_port 12345 inference_refine_1D_cam.py \
--config ./config/otavatar.yaml \
--name config/otavatar.yaml \
--no_resume \
--which_iter 2000 \
--image_size 512 \
--ws_plus \
--cross_id \
--cross_id_target WRA_EricCantor_000 \
--output_dir ./result/otavatar/evaluation/cross_ws_plus_WRA_EricCantor_000

To animate each identity given the motion from WRA_EricCantor_000.

Or simply run,

sh scripts/inference.sh

Start Training

Run,

export CUDA_VISIBLE_DEVICES=0,1,2,3
python -m torch.distributed.launch --nproc_per_node=4 --master_port 12346 train_inversion.py \
--config ./config/otavatar.yaml \
--name otavatar

Or simply run,

sh scripts/train.sh

Acknowledgement

We appreciate the model or code from EG3D, PIRenderer, StyleHEAT, EG3D-projector.

Citation

If you find this work helpful, please cite:

@article{ma2023otavatar,
  title={OTAvatar: One-shot Talking Face Avatar with Controllable Tri-plane Rendering},
  author={Ma, Zhiyuan and Zhu, Xiangyu and Qi, Guojun and Lei, Zhen and Zhang, Lei},
  journal={arXiv preprint arXiv:2303.14662},
  year={2023}
}

otavatar's People

Contributors

theericma avatar 87003697 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.