Arti4D: Statistical Analysis and Modeling of the Spatio-temporal Variability in Articulated 4D Shapes
ANONYMOUS AUTHOR(S)
This repository provides the implementation and demo scripts for the above paper. The codebase implements a MATLAB pipeline with Python visualization for SE(3) temporal alignment, geodesic path computation, PCA-based statistical modeling, and motion synthesis.
MATLAB:
- MATLAB R2020b or later
- Statistics and Machine Learning Toolbox
- Parallel Computing Toolbox (optional)
Python:
- Python 3.11 (recommended) or 3.10/3.9
- Python virtual environment (venv) will be created in the project directory
git clone https://github.com/Arti4D/Arti4D_code.git
cd Arti4D_code# Create Python virtual environment (use Python 3.11)
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt- SMPL-X Models (required for human motion data): Register and download from SMPL-X website and place in
models/smplx/- Required files:
SMPLX_MALE.npz,SMPLX_FEMALE.npz,SMPLX_NEUTRAL.npz
- Required files:
The repository includes demo datasets for quick testing:
-
DFaust_test: Included demo dataset for human motion (SMPL-X format)
- Located in
data/DFaust_test/ - Note: Requires SMPL-X models (see Step 3) to be downloaded and placed in
models/smplx/
- Located in
-
Full DFaust Dataset: For full DFaust dataset, register and download from DFaust website
- Place downloaded files in
data/DFaust/ - Data format:
.npzfiles (SMPL-X format) - Note: Requires SMPL-X models (see Step 3). The batch alignment and PCA scripts work best with action-based organization. If your data is organized by subject, use
data/preprocess_DFaust.mto reorganize it.
- Place downloaded files in
-
Animal_motion Dataset: Our generated animal motion dataset (SMAL format)
- Located in
data/Animal_motion/ - Data format:
.npyfiles - Structure:
Action/params_X.npy(e.g.,Walking/params_1.npy,Running/params_2.npy)
- Located in
The pipeline provides several scripts for different analysis tasks. Here are the recommended usage patterns:
To align one motion to another (temporal registration):
run_alignment('data/DFaust_test/50002_jumping_jacks_stageii.npz', ...
'data/DFaust_test/50004_jumping_jacks_stageii.npz');To see temporal warping and alignment recovery in action:
run_warping('data/DFaust_test/50002_jumping_jacks_stageii.npz');For complete analysis pipeline (co-registration → PCA → synthesis), use:
% Animal motion (can run immediately - SMAL model included)
results = run_complete_analysis('data/Animal_motion/Walking');
% Single action (DFaust_test demo) - requires SMPL-X models
results = run_complete_analysis('data/DFaust_test');
% Multiple animal actions
results = run_complete_analysis({'data/Animal_motion/Walking', 'data/Animal_motion/Running'});
% Multiple actions (co-registration) - requires SMPL-X models
results = run_complete_analysis({'data/DFaust/chicken_wings', 'data/DFaust/jumping_jacks'});
% Custom parameters (optional - all have sensible defaults)
results = run_complete_analysis('data/DFaust_test', ...
struct('n_pca_modes', 15, 'n_synthesis', 20));Results: All outputs saved in timestamped directories under experiments/
results.alignment_dir: Co-registered motions and mean motionresults.pca_dir: PCA statistics and mode visualizationsresults.synthesis_dir: Synthesized motions
Additional scripts are available for individual steps: run_batch_alignment, run_pca, run_synthesis, run_alignment, run_warping, run_geodesic. For detailed usage and custom parameters, see the comments in each script file.