MCPcopy Index your code
hub / github.com/AdaptiveMotorControlLab/FMPose3D

github.com/AdaptiveMotorControlLab/FMPose3D @v0.0.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.9 ↗ · + Follow
699 symbols 1,885 edges 79 files 240 documented · 34%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FMPose3D: monocular 3D pose estimation via flow matching

Version PyPI version PyPI Downloads

Code:License: Apache 2.0 Models:License: NC

This is the official implementation of the approach described in:

FMPose3D: monocular 3D pose estimation via flow matching CVPR 2026
Ti Wang, Xiaohang Yu, Mackenzie Weygandt Mathis

🚀 TL;DR

FMPose3D creates a 3D pose from a single 2D image. It leverages fast Flow Matching, generating multiple plausible 3D poses via an ODE in just a few steps, then aggregates them using a reprojection-based Bayesian module (RPEA) for accurate predictions, achieving state-of-the-art results on human and animal 3D pose benchmarks.

News!

  • [X] Feb 2026: The FMPose3D paper was accepted to CVPR 2026! 🔥
  • [X] Feb 2026: the FMPose3D code and our arXiv paper is released - check out the demos here or on our project page
  • [X] March 2026: This method is integrated into DeepLabCut

Installation

Set up an environment

Make sure you have Python 3.10+. You can set this up with:

conda create -n fmpose_3d python=3.10
conda activate fmpose_3d

pip install fmpose3d

For the animal pipeline, install the optional DeepLabCut dependency:

pip install "fmpose3d[animals]"

Demos

Testing on in-the-wild images (humans)

This visualization script is designed for single-frame based model, allowing you to easily run 3D human pose estimation on any single image.

Pre-trained weights are downloaded automatically from Hugging Face the first time you run inference, so no manual setup is needed.

Alternatively, you can use your own trained weights or download ours from Google Drive, place them in the ./pre_trained_models directory, and set model_weights_path in the shell script (e.g. demo/vis_in_the_wild.sh).

Next, put your test images into folder demo/images. Then run the visualization script:

sh vis_in_the_wild.sh

The predictions will be saved to folder demo/predictions.

Training and Inference

Dataset Setup

Setup from original source

You can obtain the Human3.6M dataset from the Human3.6M website, and then set it up using the instructions provided in VideoPose3D.

Setup from preprocessed dataset (Recommended)

You also can access the processed data by downloading it from here.

Place the downloaded files in the dataset/ folder of this project:

<project_root>/
├── dataset/
│   ├── data_3d_h36m.npz
│   ├── data_2d_h36m_gt.npz
│   └── data_2d_h36m_cpn_ft_h36m_dbb.npz

Training

The training logs, checkpoints, and related files of each training time will be saved in the './checkpoint' folder.

For training on Human3.6M:

sh ./scripts/FMPose3D_train.sh

Inference

Pre-trained weights are fetched automatically from Hugging Face on the first run. You can also use local weights by setting model_weights_path in the shell script (see Demos above for details).

To run inference on Human3.6M:

sh ./scripts/FMPose3D_test.sh

Inference API

FMPose3D also ships a high-level Python API for end-to-end 3D pose estimation from images. See the Inference API documentation for the full reference.

Experiments on non-human animals

For animal training/testing and demo scripts, see animals/README.md.

Citation

@misc{wang2026fmpose3dmonocular3dpose,
      title={FMPose3D: monocular 3D pose estimation via flow matching}, 
      author={Ti Wang and Xiaohang Yu and Mackenzie Weygandt Mathis},
      year={2026},
      journal={CVPR},
      url={https://arxiv.org/abs/2602.05755}, 
}

Acknowledgements

We thank the Swiss National Science Foundation (SNSF Project # 320030-227871) and the Kavli Foundation for providing financial support for this project.

Our code is extended from the following repositories. We thank the authors for releasing the code.

Core symbols most depended-on inside this repo

pose_3d
called by 24
fmpose3d/inference_api/fmpose3d.py
_ingest_input
called by 16
fmpose3d/inference_api/fmpose3d.py
update
called by 9
fmpose3d/lib/sort/sort.py
update
called by 9
fmpose3d/common/utils.py
update
called by 7
fmpose3d/animals/common/utils.py
compute_limb_regularization_matrix
called by 7
fmpose3d/inference_api/fmpose3d.py
_map_keypoints
called by 6
fmpose3d/inference_api/fmpose3d.py
parse_args
called by 5
fmpose3d/lib/sort/sort.py

Shape

Method 357
Function 228
Class 114

Languages

Python100%

Modules by API surface

tests/fmpose3d_api/test_fmpose3d.py88 symbols
fmpose3d/inference_api/fmpose3d.py51 symbols
tests/test_config.py38 symbols
tests/fmpose3d_api/test_pipeline.py36 symbols
fmpose3d/models/fmpose3d/model_GAMLP.py28 symbols
fmpose3d/animals/models/model_animal3d.py27 symbols
animals/models/model_animals.py27 symbols
fmpose3d/lib/yolov3/darknet.py26 symbols
fmpose3d/animals/common/utils.py25 symbols
fmpose3d/lib/hrnet/lib/models/pose_hrnet.py23 symbols
fmpose3d/common/config.py23 symbols
fmpose3d/common/utils.py22 symbols

For agents

$ claude mcp add FMPose3D \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact