Skip to content

Latest commit

 

History

History
98 lines (76 loc) · 3.46 KB

README.md

File metadata and controls

98 lines (76 loc) · 3.46 KB

We have an automatic script for data processing, preprocess_dataset.sh, but a few manual steps are required for obtaining the data. All these steps should be started in the current directory: data_preparation.

1. Download the SMPL model

Download SMPL paramters from [the SMPL website]{https://smpl.is.tue.mpg.de/index.html} (you need to register to do so). Choose the following version: SMPL_python_v.1.1.0.zip.

mkdir AMASS
# Copy `SMPL_python_v.1.1.0.zip` to this location
unzip SMPL_python_v.1.1.0.zip
mkdir -p AMASS/models_with_chumpy
cp SMPL_python_v.1.1.0/smpl/models/basicmodel_neutral_lbs_10_207_0_v1.1.0.pkl AMASS/models_with_chumpy/SMPL_NEUTRAL.pkl
cp SMPL_python_v.1.1.0/smpl/models/basicmodel_f_lbs_10_207_0_v1.1.0.pkl AMASS/models_with_chumpy/SMPL_FEMALE.pkl
cp SMPL_python_v.1.1.0/smpl/models/basicmodel_m_lbs_10_207_0_v1.1.0.pkl AMASS/models_with_chumpy/SMPL_MALE.pkl
rm -r SMPL_python_v.1.1.0

The file strucrture should be:

|-- models_with_chumpy
    |-- SMPL_FEMALE.pkl
    |-- SMPL_NEUTRAL.pkl
    |-- SMPL_MALE.pkl

2. Download the AMASS datasets

For processing the AMASS, first, download the AMASS dataset from AMASS to AMASS/datasets. You should download the SMPL-H format (gender based).

These files should be available

ACCAD.tar.bz2        DanceDB.tar.bz2           HumanEva.tar.bz2   SSM.tar.bz2
BMLhandball.tar.bz2  EKUT.tar.bz2              KIT.tar.bz2        TCDHands.tar.bz2
BMLmovi.tar.bz2      EyesJapanDataset.tar.bz2  MoSh.tar.bz2       TotalCapture.tar.bz2
BMLrub.tar.bz2       GRAB.tar.bz2              PosePrior.tar.bz2  Transitions.tar.bz2
CMU.tar.bz2          HDM05.tar.bz2             SFU.tar.bz2
DFaust.tar.bz2       HUMAN4D.tar.bz2           SOMA.tar.bz2
mkdir AMASS/datasets
cd AMASS/datasets
# Download AMASS datasets there
find . -name "*.tar.bz2" -exec tar -xf {} \;

Decompress all the files in the AMASS/datasets folder.

3. Generate qpos, qvel and observation

We have prepared a bash script preprocess_dataset.sh for simplifying the data processing. At the end of the previous steps, you should have the following structure:

|-- data_preparation
    |-- AMASS
        |-- datasets
            |-- one folder for each dataset
        |-- models_with_chumpy
            |-- SMPL_FEMALE.pkl
            |-- SMPL_NEUTRAL.pkl
            |-- SMPL_MALE.pkl

You should then run the bash script (we assume that conda and git are available on your machine):

bash -i preprocess_dataset.sh

This script generates H5 files in the folder humenv_amass. You can customize the script, in particular you should change NUM_WORKERS based on your machine to use parallel processing.

H5 Structure

Here we report an example of the structure of the h5 files generated by the script

|-- humenv_amass/0-CMU_62_62_01_poses.hdf5
    |-- num_episodes: 1
    |-- ep_0
        |-- motion_id (541, 1) int64
        |-- observation (541, 358) float64
        |-- qpos (541, 76) float32
        |-- qvel (541, 75) float32
        |-- terminated (541, 1) bool
        |-- truncated (541, 1) bool

Generate Goal Poses

For the GoalEvaluation benchmark (and only for it), it is necessary to extract goal poses from the AMASS dataset. To generate this dataset, you can tun the following command:

python goal_pose_selection.py

, which will generate json files with zero and original velocities in goal_poses.json, as well as the rendered image of each the goal poses.