In this document, the process of preparing a custom dataset is elaborated. Any dataset that provides 3D mesh files (.obj) together with SMPL-X parameters can be used. We will describe the process using the THuman2.0 dataset as an example.
$ROOT/datasets
└── THuman
└── THuman2.0_Release
└── THuman2.0_smplx
└── split_train.txt
└── split_val.txt
└── smplx_uv.obj
└── val
├── img
└── mask
└── transform
└── position_map_uv_space
└── position_map_uv_space_outer_shell_1
└── position_map_uv_space_outer_shell_2
└── position_map_uv_space_outer_shell_3
└── position_map_uv_space_outer_shell_4
└── visibility_map_uv_space
└── visibility_map_uv_space_outer_shell_1
└── visibility_map_uv_space_outer_shell_2
└── visibility_map_uv_space_outer_shell_3
└── visibility_map_uv_space_outer_shell_4
mkdir $ROOT/datasets/THuman
First, download the target dataset and corresponding SMPL-X parameters.
- Create the directory to store the raw dataset
cd $ROOT/datasets/THuman
mkdir THuman2.0_Release
cd THuman2.0_Release
-
Download the original THuman 2.0 dataset (THuman2.0_Release.zip) under
$ROOT/datasets/THuman/THuman2.0_Release
. Please complete the request form and send it to Yebin Liu ([email protected]) and cc Tao Yu ([email protected]) to request the download link. -
Unzip the dataset.
unzip THuman2.0_Release.zip
- Download the SMPL-X parameters (THuman2.0_smplx.tar.gz) corresponding to the original THuman 2.0 scans from here.
Place the .tar.gz file under
$ROOT/datasets/THuman
and extract it.
tar -xvzf THuman2.0_smplx.tar.gz
-
Create the dataset split files (.txt) and place them under
$ROOT/datasets/THuman
. You can refer to the dataset split files for GHG as a reference. The train split file can be downloaded here. The test split can be downloaded here. -
Download the smplx_uv.obj from the official SMPL-X website and place it under
$ROOT/datasets/THuman
.
7.Render RGB images and mask images.
python process_dataset/render_image.py
Please download the SMPL-X pkl files from the official SMPL-X website.
$ROOT/datasets
└── THuman
└── models
└── smplx
├── SMPLX_NEUTRAL.pkl
├── SMPLX_FEMALE.pkl
└── SMPLX_MALE.pkl
During the rendering process, 3D scans are randomly transformed. To generate the matching SMPL-X obj, run the following command:
python process_dataset/generate_smplx_obj.py
Please install the NVDiffrast.
git clone https://github.com/NVlabs/nvdiffrast
pip install .
Render the position maps.
python process_dataset/render_position_map.py
Please make sure to modify the image_height and image_width to match the image plane shape of your dataset.
python process_dataset/render_visibility_map.py