Visitar URL original
Update FMPose3D modelzoo integration by deruyter92 · Pull Request #3221 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8d8795c
Route FMPose3D through modelzoo video inference
deruyter92 Feb 25, 2026
c03fb2f
Move fmpose 3d module to pose_estimation_pytorch/modelzoo
deruyter92 Feb 25, 2026
34909b9
add dedicated FMPose3D video inference function
deruyter92 Feb 25, 2026
6d2eb0d
skip 3d predictions for invalid/empty 2d poses
deruyter92 Feb 25, 2026
785b55f
update tests
deruyter92 Feb 25, 2026
75f160c
Include 3d outputs in return
deruyter92 Feb 25, 2026
afc64a7
Clamp and warn: set max_individuals to 1
deruyter92 Feb 25, 2026
1f4cd90
change 3d data to dataframe
deruyter92 Feb 25, 2026
79306d6
add tests
deruyter92 Feb 25, 2026
04518bd
Update documentation
deruyter92 Feb 25, 2026
de1c573
Update modelzoo documentation fmpose3d
deruyter92 Feb 26, 2026
45f91b2
add commment legenda to __init__ for keypoint refactoring
deruyter92 Feb 26, 2026
a541c84
Add future note for keypoint refactoring
deruyter92 Feb 26, 2026
a96b8ca
fmpose3d: Add pytest markers for fmpose3d, unittest and functional
deruyter92 Feb 26, 2026
dd042b4
Apply formatting
deruyter92 Feb 26, 2026
1b3d94c
fix parameter name change in docs
deruyter92 Feb 26, 2026
8412c73
adjust parameter name -> fmpose_return_3d
deruyter92 Feb 26, 2026
ae8af5a
Update parameter naming superanimal_name
deruyter92 Feb 26, 2026
c0de52e
change recommended superanimal name for fmpose_3d
deruyter92 Feb 28, 2026
b771f33
Merge branch 'main' into jaap/fmpose_modelzoo_integration
deruyter92 Mar 12, 2026
8923015
Merge branch 'main' into jaap/fmpose_modelzoo_integration
deruyter92 Mar 19, 2026
f2c14c5
bump required version extra fmpose3d >= 0.0.8
deruyter92 Mar 19, 2026
9c78ddc
Merge branch 'main' into jaap/fmpose_modelzoo_integration
MMathisLab Mar 19, 2026
18203b9
apply linting
deruyter92 Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update parameter naming superanimal_name
  • Loading branch information
deruyter92 committed Feb 26, 2026
commit ae8af5a2febe7aec8593678bfd6f0622f1e892c7
16 changes: 12 additions & 4 deletions deeplabcut/modelzoo/video_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,19 @@ def video_inference_superanimal(
if model_name.startswith("fmpose3d"):
logger.info("Running video inference on %s using %s", videos, model_name)

if superanimal_name:
recommended_superanimal_name = {
"fmpose3d_animals": "superanimal_quadruped",
"fmpose3d_humans": "superanimal_humanbody",
}.get(model_name)

Comment thread
deruyter92 marked this conversation as resolved.
Resolved
provided_superanimal_name = superanimal_name or "<not provided>"
if superanimal_name != recommended_superanimal_name:
warnings.warn(
"For FMPose3D models, 'superanimal_name' is ignored for pipeline "
f"selection (selected model_name={model_name!r}, "
f"superanimal_name={superanimal_name!r}).",
"For FMPose3D models, model selection is driven by 'model_name'. But for API "
"consistency, it is recommended to set 'superanimal_name' to the corresponding value."
f"Provided superanimal_name={provided_superanimal_name!r} differs from the "
f"recommended value for {model_name!r}: "
f"{recommended_superanimal_name!r}.",
stacklevel=2,
)
Comment thread
deruyter92 marked this conversation as resolved.
Resolved

Expand Down
8 changes: 5 additions & 3 deletions docs/ModelZoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ deeplabcut.video_inference_superanimal([video_path],
### Practical example: FMPose3D monocular 3D inference

For FMPose3D models, use `model_name="fmpose3d_animals"` or
`model_name="fmpose3d_humans"`. The parameter `superanimal_name` is
accepted for API compatibility but ignored for model selection.
`model_name="fmpose3d_humans"`. Model selection is still determined by
`model_name`, but to stay aligned with SuperAnimal naming conventions use:
`superanimal_name="superanimal_quadruped"` for `fmpose3d_animals`, and
`superanimal_name="superanimal_humanbody"` for `fmpose3d_humans`.

Like the 2D superanimal models, this inference branch writes
intermediate 2D predictions to `<video>_DLC_fmpose3d_*.h5` and `<video>_DLC_fmpose3d_*.json`. In addition, 3D predictions are saved to
Expand All @@ -109,7 +111,7 @@ import deeplabcut
video_path = "demo-video.mp4"
result = deeplabcut.video_inference_superanimal(
videos=[video_path],
superanimal_name="", # ignored for fmpose3d models
superanimal_name="superanimal_quadruped",
model_name="fmpose3d_animals",
batch_size=8,
fmpose_return_3d=True, # include 3D dataframe in returned payload
Comment thread
deruyter92 marked this conversation as resolved.
Resolved
Expand Down
Loading