Add animal pipeline support to FMPose3DInference (and add test suite)#16
Merged
deruyter92 merged 10 commits intomainfrom Feb 12, 2026
Merged
Add animal pipeline support to FMPose3DInference (and add test suite)#16deruyter92 merged 10 commits intomainfrom
deruyter92 merged 10 commits intomainfrom
Conversation
C-Achard
approved these changes
Feb 11, 2026
C-Achard
left a comment
There was a problem hiding this comment.
Looks good ! Should be easy to use downstream, definitely great there is some testing.
Some minor comments for future usage but nothing major.
… files for consistency in the FMPose3D framework.
…onsistency across the FMPose3D framework.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FMPose3DInferencewith full animal (26-joint Animal3D) pipeline support,including
SuperAnimalEstimator(DeepLabCut 2D),AnimalPostProcessor(limbregularisation), and the
for_animals()convenience constructor.tests/test_fmpose3d.py) covering all public andinternal components of the inference API with 78 tests (64 unit + 14 functional).
Changes
fmpose3d/fmpose3d.pySuperAnimalEstimator: wraps DeepLabCut SuperAnimal, maps quadruped80K keypointsto the 26-joint Animal3D layout via
_map_keypoints, handles missing detections(zero-fill fallback).
AnimalPostProcessor: applies limb regularisation (Rodrigues rotation aligningaverage limb direction to vertical) instead of root-zeroing / camera_to_world.
compute_limb_regularization_matrixandapply_limb_regularizationhelpers._default_componentsresolver that selects the correct estimator + postprocessorbased on
model_type.FMPose3DInference.for_animals()class method for one-line animal pipeline setup.tests/test_fmpose3d.py(new)_map_keypoints(direct mapping, interpolation, out-of-range,multi-individual), limb regularisation (identity, rotation, 180-degree, degenerate,
valid-rotation properties), both postprocessors (shape, mutation, camera_rotation
handling, all-zero pose),
_default_components,FMPose3DInferenceconstruction(
for_animals, custom injection,_resolve_pad),_ingest_input(arrays, paths,directories, 8 error cases),
_load_weightserror paths,pose_3dinput validation(wrong ndim, zero frames, 4D→first person, TTA path, progress callback, seed
reproducibility), dataclasses, mocked
SuperAnimalEstimator.predict(no-detectionand valid-detection branches).
root-zeroed, world z-floor, finite, seed reproducibility) and full animal pipeline
(DLC 2D → FMPose3D-animals 3D, shape checks, finite, magnitude sanity,
reproducibility). Marked
@pytest.mark.functionaland auto-skipped when pretrainedweights are not present.
pyproject.tomlfunctionalpytest marker.