nogu-atsu / ENARF-GAN

71 stars 5 forks source link

Official implementation of ENARF-GAN

Unsupervised Learning of Efficient Geometry-Aware Neural Articulated Representations \ Atsuhiro Noguchi, Xiao Sun, Stephen Lin, Tatsuya Harada

Project page / Paper

Installation

git clone --recursive git@github.com:nogu-atsu/ENARF-GAN.git
cd ENARF-GAN
conda create -n enarfgan python=3.9
conda activate enarfgan
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
cd cuda_extention
python setup.py install

# For dataset preprocessing
cd ../
git clone git@github.com:google/aistplusplus_api.git
cd aistplusplus_api
pip install -r requirements.txt
python setup.py install

We have only tested the code on NVIDIA A100, A6000, and RTX3080Ti GPUs.

If you get RuntimeError: Ninja is required to load C++ extension, this may be helpful.

Dataset Preprocessing

You only need to generate sample data for the demo.

Training data format

Dictionary of all data is stored in a single pickle file.

{
  "img": numpy array of all images. each image is compressed by blosc. [N],
  "camera_intrinsic": camera intrinsic matrix [N, 3, 3],
  "camera_rotation": camera rotation matrix (optional) [N, 3, 3],
  "camera_translation": camera translation matrix (optional)[N, 3, 1],
  "smpl_pose": pose of SMPL. pose is in world coordinate if camera rotation and translation are provided, otherwise in camera coordinate.[N, 24, 4, 4],
  "frame_id": frame index of video (optional) [N]
}

Prepare SMPL models

DeepCap Dataset

ZJU MOCAP

SURREAL Dataset

AIST++ Dataset

Demo

Please run sample data generation before running the demo.

Pretrained models

Dynamic Scene Overfitting (DSO)

GAN

Training

We tested training on a single A100 GPU.

Please install mmpose before running compute_PCK.py

python evaluation/compute_depth.py --config configs/enarfgan_train/SURREAL/config.yml --num_workers 2 --iteration -1 --truncation 0.4
python evaluation/compute_PCK.py --config configs/enarfgan_train/SURREAL/config.yml --num_workers 2 --iteration -1 --truncation 0.4
python evaluation/compute_fid.py --config configs/enarfgan_train/SURREAL/config.yml --num_workers 2 --iteration -1

Citation

If you find this work useful for your research, please cite:

@inproceedings{noguchi2022unsupervised,
  author    = {Noguchi, Atsuhiro and Sun, Xiao and Lin, Stephen and Harada, Tatsuya},
  title     = {Unsupervised Learning of Efficient Geometry-Aware Neural Articulated Representations},
  booktitle = {European Conference on Computer Vision},
  year      = {2022},
}