Harmony4D Dataset Preparation

November 19, 2025 ยท View on GitHub

Follow the steps below to prepare the Harmony4D Dataset for SAM-3D-Body Data.


  • Set the following environment variables to simplify directory references:

    export HARMONY4D_DATA_DIR=/path/to/harmony4d/dataset
    export HARMONY4D_IMG_DIR=/path/to/harmony4d/undistorted/images
    
  • Download ๐Ÿ”— Harmony4D Dataset and extract all the files to $HARMONY4D_DATA_DIR, following the directory structure below.

    $HARMONY4D_DATA_DIR
    โ”œโ”€โ”€ test
    โ”‚   โ”œโ”€โ”€ 01_hugging
    โ”‚   โ”‚   โ””โ”€โ”€ 002_hugging
    โ”‚   โ”œโ”€โ”€ 03_grappling2
    โ”‚   โ”‚   โ”œโ”€โ”€ 025_grappling2
    โ”‚   โ”‚   โ””โ”€โ”€ ...
    โ”‚   โ”œโ”€โ”€ ...
    โ””โ”€โ”€ train
        โ”œโ”€โ”€ 01_hugging
        โ”‚   โ””โ”€โ”€ 001_hugging
        โ”œโ”€โ”€ 02_grappling
        โ”‚   โ”œโ”€โ”€ 001_grappling
        โ”‚   โ””โ”€โ”€ ...
        โ””โ”€โ”€ ...
    
  • Run the following command to undistort the Harmony4D images and save the results to $HARMONY4D_IMG_DIR.

    python scripts/harmony4d/undistort_harmony4d.py \
        --src_dir $HARMONY4D_DATA_DIR \
        --dst_dir $HARMONY4D_IMG_DIR
    
  • $HARMONY4D_IMG_DIR should the directory structure below.

    $HARMONY4D_IMG_DIR
    โ”œโ”€โ”€ test
    โ”‚   โ”œโ”€โ”€ 01_hugging
    โ”‚   โ”‚   โ””โ”€โ”€ 002_hugging
    โ”‚   โ”œโ”€โ”€ 03_grappling2
    โ”‚   โ”‚   โ”œโ”€โ”€ 025_grappling2
    โ”‚   โ”‚   โ””โ”€โ”€ ...
    โ”‚   โ”œโ”€โ”€ ...
    โ””โ”€โ”€ train
        โ”œโ”€โ”€ 01_hugging
        โ”‚   โ””โ”€โ”€ 001_hugging
        โ”œโ”€โ”€ 02_grappling
        โ”‚   โ”œโ”€โ”€ 001_grappling
        โ”‚   โ””โ”€โ”€ ...
        โ””โ”€โ”€ ...