Skip to content

cotton-ahn/amass_preprocess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMASS preprocess

  • In this repository, we provide the code for preprocessing and visulization of the Amass dataset.
  • Preprocessing includes (1) saving parameters into .h5py format, (2) reduce the frame-per-second to 30hz.
  • Also, we introduce how to rotate the motion for the augmentation. Refer to Rotate_hdf5.ipynb

Pre-requisites

  1. Download ALL "SMPL-X Gender Specific" body information from the official webpage of AMASS dataset.
  2. Unzip all *.tar.bz2 files.
  3. Prepare Conda.

Installation

  1. Prepare clean and new conda environment with Python3.7. Below the environment name is "amass".
conda create --name amass python=3.7
conda activate amass
  1. Clone this Repository.
git clone https://github.com/cotton-ahn/amass_preprocess
cd amass_preprocess
  1. Install Human_Body_Prior
git clone https://github.com/nghorbani/human_body_prior
cd human_body_prior
pip install -r requirements.txt
  • (Tested on 23.12.2021) If you do until here, you would get the error of ERROR: No matching distribution found for torch==1.8.2.
  • Check your CUDA environment and install PyTorch properly. Below example is for cuda 11.0. Refer HERE.
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
  • Modify requirements.txt. The pytorch version should be same as the one you installed
  • And run pip install -r requirements.txt again in the folder of human_body_prior.
  • If you get error regarding gcc and boost, try to install it. i.e, sudo apt-get install libboost-all-dev...
  • And install the human_body_prior.
cd ${This Repository}/human_body_prior
python setup.py develop
  1. Install PyRender
  • Follow the description in Link
  1. Download Gender-Specific SMPL-X models.
  • Download SMPL-X with "removed head bun" for AMASS dataset.
  • Put SMPL-X into folder of ${This Repository}/body_models/smplx, as below tree.
├── body_models/
│   ├── smplx/
│     ├── female/
│     ├── male/
│     ├── neutral/
│     ├── version.txt
└── README.md
  1. Install body_visualizer
cd ${This Repository}
git clone https://github.com/nghorbani/body_visualizer
cd body_visualizer
pip install -r requirements.txt
python setup.py develop
  1. Install other Dependencies
pip install h5py matplotlib 
  1. Install jupyter notebook and add the activated conda environment.
pip install jupyter notebook
python -m ipykernel install --user --name=amass

How to use

  1. Run Preprocess_hdf5.ipynb to save downloaded .npz data into .hdf5
  • properly change amass_dir and h5py_dir.
  1. Refer to Visualize_hdf5.ipynb to see how the saved hdf5 file work.
  2. Refer to Rotate_hdf5.ipynb to see how to rotate the augment the given motion

About

Tool for using AMASS dataset (maybe) easier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published