Git Product home page Git Product logo

sesdf's Introduction

SeSDF: Self-evolved Signed Distance Field for Implicit 3D Clothed Human Reconstruction

Yukang Cao, Kai Han, Kwan-Yee K. Wong

Paper page

Please refer to our webpage for more visualizations.

Abstract

We address the problem of clothed human reconstruction from a single image or uncalibrated multi-view images. Existing methods struggle with reconstructing detailed geometry of a clothed human and often require a calibrated setting for multi-view reconstruction. We propose a flexible framework which, by leveraging the parametric SMPL-X model, can take an arbitrary number of input images to reconstruct a clothed human model under an uncalibrated setting. At the core of our framework is our novel self-evolved signed distance field (SeSDF) module which allows the framework to learn to deform the signed distance field (SDF) derived from the fitted SMPL-X model, such that detailed geometry reflecting the actual clothed human can be encoded for better reconstruction. Besides, we propose a simple method for self-calibration of multi-view images via the fitted SMPL-X parameters. This lifts the requirement of tedious manual calibration and largely increases the flexibility of our method. Further, we introduce an effective occlusion-aware feature fusion strategy to account for the most useful features to reconstruct the human model. We thoroughly evaluate our framework on public benchmarks, and our framework establishes a new state-of-the-art.

Environment configuration

The environment (in conda yaml) for SeSDF training and testing.

conda env create -f environment_sesdf.yaml
conda activate sesdf

You may also need to install torch_scatter manually for the 3D encoder

pip install torch==1.10.0+cu102 torchvision==0.11.0+cu102 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-1.10.0+cu102.html

If you are using RTX 3090 or higher, please install torch, torchvision, and torch-scatter correspondingly, i.e.,

pip install torch==1.10.0+cu111 torchvision==0.11.1+cu111 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-1.10.0+cu111.html

Follow pytorch3d and kaolin to install the required package.

Dataset preprocessing

We use THUman2.0 dataset for training and testing. You can download it and corresponding SMPL-X parameters and meshes from this link after following the instruction and sending the request form.

  1. Generating the precomputed radiance transfer (PRT) for each obj mesh as in instructed in PIFu:
cd process_data
python -m prt_util -i {path_to_THUman2.0_dataset}
  1. Rendering the meshes into 360-degree images. Together with RENDER folder for images, it will generate the MASK, PARAM, UV_RENDER, UV_MASK, UV_NORMAL, UV_POS, and copy the meshes to GEO/OBJ. Remember to add -e to enable EGL rendering.
python -m render_data -i {path_to_THUman2.0_dataset} -o {path_to_THUman2.0_processed_for_training} -e
cd ..

After data preprocessing, the dataset directory would be like:

THU2_processed/
├── UV_RENDER
├── UV_POS
├── UV_NORMAL
├── UV_MASK
├── PARAM
├── MASK
├── GEO/OBJ
├── SMPLX
├── val.txt

Training

Training the single-view pipeline (The intermediate results and checkpoints are saved under ./results and ./checkpoints respectively.)

cd ./single-view
python -m apps.train_shape --dataroot {path_to_processed_THUman2.0_processed} --random_flip --random_scale --num_stack 4 --num_hourglass 2 --resolution 512 --hg_down 'ave_pool' --norm 'group' --val_train_error --val_test_error --gpu_ids=0,1,2 --batch_size 3 --learning_rate 0.0001 --sigma 0.02 --checkpoints_path {your_checkpoints_folder} --results_path {your_results_folder} --schedule 4 --num_threads 10

Training the multi-view pipeline

cd ../multi-view
python -m apps.train_shape --dataroot {path_to_processed_THUman2.0_processed} --random_flip --random_scale --num_stack 4 --num_hourglass 2 --resolution 512 --hg_down 'ave_pool' --norm 'group' --val_train_error --val_test_error --gpu_id=0 --batch_size 1 --learning_rate 0.0001 --sigma 0.02 --checkpoints_path {your_checkpoints_folder} --results_path {your_results_folder} --schedule 4 --num_threads 10 --num_views 3

See {your_results_folder}/pred.ply for intermediate visualizations during training.

Inference 🚧

Testing with the single-view pipeline (we follow a similar approach in ICON to obtain the estimated SMPL-X model.)

python ./apps/eval.py --batch_size 1 --num_stack 4 --num_hourglass 2 --resolution 512 --hg_down 'ave_pool' --norm 'group' --norm_color 'group' --test_folder_path {path_to_your_testdata} --load_netG_checkpoint_path {path_to_your_netG_checkpoint}

Misc.

If you want to cite our work, please use the following bib entry:

@inproceedings{cao2023sesdf,
author    = {Yukang Cao and Kai Han and Kwan-Yee K. Wong},
title     = {SeSDF: Self-evolved Signed Distance Field for Implicit 3D Clothed Human Reconstruction},
booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year      = {2023},
}

sesdf's People

Contributors

yukangcao avatar

Stargazers

zhaoqiang wang avatar  avatar NathanHuanrongLIU avatar 林杰 avatar 顾小东(Xiaodong Gu) avatar  avatar

Watchers

zhaoqiang wang avatar  avatar 林杰 avatar

sesdf's Issues

train_shape hangs up when train single-view

Hi, thanks for your great work.
I m trying to train with my own data.
I finished dataset preprocessing. but when I try to train the shape, the program hands up.
Even wait for a day, it still hands up there.

my command is:
python -m apps.train_shape --dataroot /mnt/d/wang/windows/repos/SeSDF/custom_data/generated --random_flip --random_scale --resolution 512 --hg_down 'ave_pool' --norm 'group' --val_train_error --val_test_error --gpu_ids=0 --batch_size 2 --learning_rate 0.0001 --sigma 0.02 --checkpoints_path /mnt/d/wang/windows/repos/SeSDF/custom_data/checkpoints --results_path /mnt/d/wang/windows/repos/SeSDF/custom_data/result

the output is as the following:

train data size: 180
test data size: 360
initialize network with normal
Using Network: hgpifu

it looks like it hangs up at this line of the code

for train_idx, train_data in enumerate(train_data_loader):

my env is as the following

      - torch==2.1.1+cu121
      - torch-scatter==2.1.2+pt21cu121
      - torchmetrics==0.9.1
      - torchvision==0.16.1+cu121
      - pytorch-lightning==1.6.4
      - pytorch3d==0.7.6
      - kaolin==0.15.0
      - python=3.8.13=h12debd9_0

my gpu is GX 4090.

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.