- 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
- Download ALL "SMPL-X Gender Specific" body information from the official webpage of AMASS dataset.
- Unzip all *.tar.bz2 files.
- Prepare Conda.
- 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
- Clone this Repository.
git clone https://github.com/cotton-ahn/amass_preprocess
cd amass_preprocess
- 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 ofhuman_body_prior
. - If you get error regarding
gcc
andboost
, 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
- Install PyRender
- Follow the description in Link
- 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
- 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
- Install other Dependencies
pip install h5py matplotlib
- Install jupyter notebook and add the activated conda environment.
pip install jupyter notebook
python -m ipykernel install --user --name=amass
- Run Preprocess_hdf5.ipynb to save downloaded .npz data into .hdf5
- properly change
amass_dir
andh5py_dir
.
- Refer to Visualize_hdf5.ipynb to see how the saved hdf5 file work.
- Refer to Rotate_hdf5.ipynb to see how to rotate the augment the given motion