Dataset setup
Guides you through downloading and converting Human3.6M and 3DHP datasets into the npz format required by PoseAug.
What this file does
Guides you through downloading and converting Human3.6M and 3DHP datasets into the npz format required by PoseAug.
When to use it
- Setting up training data for PoseAug
- Reproducing PoseAug experiments from scratch
- Adding detected 2D poses (CPN, Detectron, HHR) to the pipeline
- Preparing 3DHP test data for evaluation
Assumes this stack
Dataset setup
Human3.6M
The code for Human3.6M data preparation is borrowed from VideoPose3D, SemGCN, EvoSkeleton.
Prepare the ground truth 2D 3D data pair for Human3.6
-
Setup from original source (recommended)
- Please follow the instruction from VideoPose3D to process the data from the official Human3.6M website.
- Then generate the 2D and 3D data by
prepare_data_h36m.py. (Note thatprepare_data_h36m.pyis borrowed from SemGCN with 16 joints configuration, which is slightly different from VideoPose3D with 17 joints configuration)
-
Setup from preprocessed dataset
- Get preprocessed
h36m.zip: Please follow the instruction from SemGCN to get theh36m.zip. - Convert
h36m.zipto ground-truth 2D 3D npz file: Processh36m.zipbyprepare_data_h36m.pyto getdata_3d_h36m.npzanddata_2d_h36m_gt.npz
- Get preprocessed
cd data
python prepare_data_h36m.py --from-archive h36m.zip
cd ..
After this step, you should end up with two files in the data directory: data_3d_h36m.npz for the 3D poses, and data_2d_h36m_gt.npz for the ground-truth 2D poses,
which will look like:
${PoseAug}
├── data
├── data_3d_h36m.npz
├── data_2d_h36m_gt.npz
Prepare other detected 2D pose for Human3.6M (optional)
In this step, you need to download the detected 2D pose npz file and delete the Neck/Nose axis (e.g., the shape of array: nx17x2 -> nx16x2; n: number_of_frame) for every subject and action.
- To download the Det and CPN 2D pose, please follow the instruction of VideoPose3D and download the
data_2d_h36m_cpn_ft_h36m_dbb.npzanddata_2d_h36m_detectron_ft_h36m.npz.
cd data
wget https://dl.fbaipublicfiles.com/video-pose-3d/data_2d_h36m_cpn_ft_h36m_dbb.npz
wget https://dl.fbaipublicfiles.com/video-pose-3d/data_2d_h36m_detectron_ft_h36m.npz
cd ..
-
To download the HHR 2D pose, please follow the instruction of EvoSkeleton and download the
twoDPose_HRN_test.npyandtwoDPose_HRN_train.npy, and convert them to the same format asdata_2d_h36m_gt.npz. -
You can also download our pre-processed joints files.
Until here, you will have a data folder:
${PoseAug}
├── data
├── data_3d_h36m.npz
├── data_2d_h36m_gt.npz
├── data_2d_h36m_detectron_ft_h36m.npz
├── data_2d_h36m_cpn_ft_h36m_dbb.npz
├── data_2d_h36m_hr.npz
Please make sure the 2D data are all 16 joints setting.
3DHP
The code for 3DHP data preparation is borrowed from SPIN
- Please follow the instruction from SPIN to download the preprocessed compression file
dataset_extras.tar.gzthen unzip it to get mpi_inf_3dhp_valid.npz and put it atdata_extra/dataset_extras/mpi_inf_3dhp_valid.npz(24 joints). - Then process the
dataset_extras/mpi_inf_3dhp_valid.npzwithprepare_data_3dhp.pyorprepare_data_3dhp.ipynbfile to get thetest_3dhp.npz(16 joints) and place it atdata_extra/test_set.
Until here, you will have a data_extra folder:
${PoseAug}
├── data_extra
├── bone_length_npy
├── hm36s15678_bl_templates.npy
├── dataset_extras
├── mpi_inf_3dhp_valid.npz
├── ... (not in use)
├── test_set
├── test_3dhp.npz
├── prepare_data_3dhp.ipynb
├── prepare_data_3dhp.py
All the data are set up.
What's inside
Two dataset sections, each with multiple setup paths and shell commands; 3 optional 2D pose sources; final directory listings.
Change this for your project
- Replace
${PoseAug}with your project's root directory name - Replace the Google Drive link
https://drive.google.com/drive/folders/1jVyz9HdT0Jq3-YPZnOQ6GEcOVDRZAifK?usp=sharingwith your own hosted files if you provide preprocessed joints - Replace
data_extrapath references if your project uses a different directory structure
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Providing both a manual source-based setup and a faster preprocessed archive path
- Offering optional detected 2D poses as separate download steps
- Including a final directory tree so users can verify completeness
Related Documents
SynthMoCap Datasets
Documents three synthetic datasets (SynthBody, SynthFace, SynthHand) for non-commercial use, with download scripts and metadata schemas.
deepmind.gqn-datasets
Documents seven GQN datasets for neural scene representation, with difficulty levels and a TensorFlow usage example.
First step, obtain your login credentials.
Walks through downloading and structuring five driving-scene segmentation datasets for a DecoupleSegNets project.