Code Monkey home page Code Monkey logo

vid2avatar's Introduction

Vid2Avatar: 3D Avatar Reconstruction from Videos in the Wild via Self-supervised Scene Decomposition

Official Repository for CVPR 2023 paper Vid2Avatar: 3D Avatar Reconstruction from Videos in the Wild via Self-supervised Scene Decomposition.

Getting Started

  • Clone this repo: git clone https://github.com/MoyGcc/vid2avatar
  • Create a python virtual environment and activate. conda create -n v2a python=3.7 and conda activate v2a
  • Install dependenices. cd vid2avatar, pip install -r requirement.txt and cd code; python setup.py develop
  • Install Kaolin. We use version 0.10.0.
  • Download SMPL model (1.0.0 for Python 2.7 (10 shape PCs)) and move them to the corresponding places:
mkdir code/lib/smpl/smpl_model/
mv /path/to/smpl/models/basicModel_f_lbs_10_207_0_v1.0.0.pkl code/lib/smpl/smpl_model/SMPL_FEMALE.pkl
mv /path/to/smpl/models/basicmodel_m_lbs_10_207_0_v1.0.0.pkl code/lib/smpl/smpl_model/SMPL_MALE.pkl

Download preprocessed demo data

You can quickly start trying out Vid2Avatar with a preprocessed demo sequence including the pre-trained checkpoint. This can be downloaded from Google drive which is originally a video clip provided by NeuMan. Put this preprocessed demo data under the folder data/ and put the folder checkpoints under outputs/parkinglot/.

Training

Before training, make sure that the metaninfo in the data config file /code/confs/dataset/video.yaml does match the expected training video. You can also continue the training by changing the flag is_continue in the model config file code/confs/model/model_w_bg. And then run:

cd code
python train.py

The training usually takes 24-48 hours. The validation results can be found at outputs/.

Test

Run the following command to obtain the final outputs. By default, this loads the latest checkpoint.

cd code
python test.py

3D Visualization

We use AITViewer to visualize the human models in 3D. First install AITViewer: pip install aitviewer imgui==1.4.1, and then run the following command to visualize the canonical mesh (--mode static) or deformed mesh sequence (--mode dynamic):

cd visualization 
python vis.py --mode {MODE} --path {PATH}

Play on custom video

  • We use ROMP to obtain initial SMPL shape and poses: pip install --upgrade simple-romp
  • Install OpenPose as well as the python bindings.
  • Put the video frames under the folder preprocessing/raw_data/{SEQUENCE_NAME}/frames
  • Modify the preprocessing script preprocessing/run_preprocessing.sh accordingly: the data source, sequence name, and the gender. The data source is by default "custom" which will estimate camera intrinsics. If the camera intrinsics are known, it's better if the true camera parameters can be given.
  • Run preprocessing: cd preprocessing and bash run_preprocessing.sh. The processed data will be stored in data/. The intermediate outputs of the preprocessing can be found at preprocessing/raw_data/{SEQUENCE_NAME}/
  • Launch training and test in the same way as above. The metainfo in the data config file /code/confs/dataset/video.yaml should be changed according to the custom video.

Acknowledgement

We have used codes from other great research work, including VolSDF, NeRF++, SMPL-X, Anim-NeRF, I M Avatar and SNARF. We sincerely thank the authors for their awesome work! We also thank the authors of ICON and SelfRecon for discussing experiment.

Related Works

Here are more recent related human body reconstruction projects from our team:

@inproceedings{guo2023vid2avatar,
      title={Vid2Avatar: 3D Avatar Reconstruction from Videos in the Wild via Self-supervised Scene Decomposition},
      author={Guo, Chen and Jiang, Tianjian and Chen, Xu and Song, Jie and Hilliges, Otmar},    
      booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
      month     = {June},
      year      = {2023},
    }

vid2avatar's People

Contributors

moygcc 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.