Skip to content

Add MPI-INF-3DHP test evaluation workflow#32

Merged
xiu-cs merged 28 commits into
mainfrom
3dhp
Jun 14, 2026
Merged

Add MPI-INF-3DHP test evaluation workflow#32
xiu-cs merged 28 commits into
mainfrom
3dhp

Conversation

@xiu-cs

@xiu-cs xiu-cs commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a self-contained MPI-INF-3DHP test evaluation workflow for monocular 3D pose lifting models, including a processed-test-set loader, inference entrypoint, shell launcher, and metric reporting for MPJPE, P-MPJPE, PCK, and AUC.

It also documents how to prepare the official MPI-INF-3DHP test annotations into the expected .npz format, how to configure packaged or local model definitions, and how to use either auto-downloaded or local human FMPose3D weights.

Changes

  • Add 3dhp_test/infer_3dhp.py for running 3DHP test-set inference with multi-hypothesis flow-matching sampling and RPEA aggregation.
  • Add 3DHP-specific dataset, camera, metric, and utility helpers under 3dhp_test/lib/.
  • Add 3dhp_test/test_3dhp.sh with configurable model_type, model_weights_path, model_path, subjects, batch size, GPU, and sampling settings.
  • Add 3dhp_test/dataset/prepare_3dhp_test_npz.py to convert official MPI-INF-3DHP TS*/annot_data.mat files into data_test_3dhp.npz.
  • Document dataset preparation, model/weights configuration, and P-STMO preprocessing acknowledgement in 3dhp_test/README.md.
  • Add ignore rules so generated .npz files, results, caches, and local checkpoints are not committed while 3dhp_test/lib/*.py remains trackable.
  • Add tests covering registry model loading, per-sample camera tensor selection for mixed-subject batches, and use of the shared FMPose3D weight resolver.

xiu-cs added 17 commits June 13, 2026 19:25
…paration, model configuration, and conversion instructions
…ing model loading logic to resolve weights path dynamically.
…hon files, while maintaining exclusion for predictions directory.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new, self-contained workflow under 3dhp_test/ to run MPI-INF-3DHP test-set inference for monocular 3D pose lifting models and report standard 3DHP metrics, plus documentation and ignore rules to keep generated artifacts out of the repo.

Changes:

  • Introduces a 3DHP test inference entrypoint (infer_3dhp.py) with multi-hypothesis sampling, RPEA aggregation, and metric reporting (MPJPE / P-MPJPE / PCK / AUC).
  • Adds 3DHP-specific helpers for dataset loading, camera normalization/projection, and metric computation under 3dhp_test/lib/.
  • Adds dataset preparation script + user documentation + gitignore updates for generated .npz and evaluation outputs.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
3dhp_test/test_3dhp.sh Shell launcher for running the 3DHP test inference with configurable model/weights/sampling parameters.
3dhp_test/README.md Documents model/weights configuration and how to convert official MPI-INF-3DHP test annotations into the expected .npz.
3dhp_test/lib/utils.py Minimal utilities for accumulating/formatting error metrics and defining the 3DHP action list.
3dhp_test/lib/eval_cal.py Implements MPJPE, P-MPJPE, PCK, and AUC computations and per-action aggregation/printing.
3dhp_test/lib/dataset_3dhp.py Loads processed test .npz, applies valid mask + joint mapping + normalization + optional flip augmentation.
3dhp_test/lib/camera.py 3DHP-specific screen normalization, projection model, and subject-dependent intrinsics/resolution.
3dhp_test/lib/__init__.py Marks 3dhp_test/lib as a package.
3dhp_test/infer_3dhp.py Main inference/evaluation script that loads a model, resolves weights, runs sampling + aggregation, and writes metrics JSON/logs.
3dhp_test/dataset/prepare_3dhp_test_npz.py Converts official TS*/annot_data.mat files into a compressed .npz consumed by the evaluator.
3dhp_test/.gitignore Prevents committing generated results, local checkpoints, caches, and dataset .npz files in 3dhp_test/.
.gitignore Ensures 3dhp_test/lib/*.py remains trackable despite the repository’s broader lib/ ignore rule; normalizes a predictions ignore entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread 3dhp_test/lib/eval_cal.py Outdated
Comment thread 3dhp_test/infer_3dhp.py Outdated
Comment thread 3dhp_test/infer_3dhp.py Outdated
Comment thread 3dhp_test/README.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.

Comment thread 3dhp_test/lib/utils.py Outdated
Comment thread 3dhp_test/dataset/prepare_3dhp_test_npz.py
Comment thread 3dhp_test/infer_3dhp.py
Comment thread 3dhp_test/infer_3dhp.py
@xiu-cs xiu-cs merged commit 54dd3fb into main Jun 14, 2026
5 checks passed
@xiu-cs xiu-cs deleted the 3dhp branch June 14, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants