Skip to content

Conversation

@xiu-cs
Copy link
Collaborator

@xiu-cs xiu-cs commented Feb 10, 2026

This pull request updates the model loading and configuration system for FMPose3D and Animal3D workflows, moving from direct file path imports to a model registry approach. This makes it easier to specify models by name, improves reproducibility, and standardizes script arguments. It also updates pretrained model references and cleans up related scripts.

Model loading and registry improvements:

  • Replaced direct imports of model classes with a registry system using get_model and --model_type for both human and animal 3D pose estimation; updated code in main_animal3d.py, vis_animals.py, and FMPose3D_main.py to use this registry. [1] [2] [3]
  • Registered animal 3D model (Model) with the registry via @register_model("fmpose3d_animals") and made it inherit from BaseModel.
  • Updated model argument parsing to add --model_type (defaulting to fmpose3d_animals) and clarified the use of --model_path as an override.
  • Ensured all model subpackages (including animal models) are imported so their registry decorators execute.

Script and configuration updates:

  • Updated training, testing, and visualization shell scripts (train_animal3d.sh, test_animal3d.sh, vis_animals.sh, FMPose3D_train.sh, FMPose3D_test.sh) to use --model_type instead of --model_path, and set new default paths for pretrained weights. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Changed the Animal3D pretrained model download link in the documentation and updated instructions accordingly.

Minor improvements and cleanup:

  • Removed legacy code for copying local model files in experiment checkpointing.
  • Minor code and comment cleanups in various files. [1] [2] [3]

xiu-cs and others added 15 commits February 10, 2026 14:49
…istry using get_model, replacing the previous model_path approach.
…e, and update saved_model_path for consistency with model registry usage.
…pe for model registry integration, and comment out model_path for clarity.
…ered model registry, enhancing integration with the model registry.
…_model_path for consistency with the new model registry structure.
@xiu-cs xiu-cs requested a review from deruyter92 February 10, 2026 17:06
Copy link
Collaborator

@deruyter92 deruyter92 left a comment

Choose a reason for hiding this comment

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

Your changes look good to me!

A few remarks:

  • please take a look at the configs to see if the defaults are correct
  • are you happy with the model names? In case you want to change them (e.g. "fmpose3d" -> "fmpose3d_human"), now is still a good time, but later this will cause difficulties. All up to you what you think is best of course.
  • Are the demo predictions for the animal model tracked on GitHub on purpose? If not, maybe better to delete them.

return x

class Model(nn.Module):
@register_model("fmpose3d_animals")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you happy with the names "fmpose3d" for humans and "fmpose3d_animals" for animals? Or do you want to change "fmpose3d" -> "fmpose3d_humans" or something similar?

This would be a good moment to choose the final names, before these names will be used in other code as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I will change the name of the human model to 'fmpose3d_humans'

Comment on lines 28 to 47
_FMPOSE3D_DEFAULTS: Dict[str, Dict] = {
"fmpose3d": {
"n_joints": 17,
"out_joints": 17,
"dataset": "h36m",
"sample_steps": 3,
"joints_left": [4, 5, 6, 11, 12, 13],
"joints_right": [1, 2, 3, 14, 15, 16],
"root_joint": 0,
},
"fmpose3d_animals": {
"n_joints": 26,
"out_joints": 26,
"dataset": "animal3d",
"sample_steps": 3,
"joints_left": [0, 3, 5, 8, 10, 12, 14, 16, 20, 22],
"joints_right": [1, 4, 6, 9, 11, 13, 15, 17, 21, 23],
"root_joint": 7,
},
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@xiu-cs, please check if these default config values are correct and complete.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated this; it looks great overall.

Comment on lines +60 to +64
n_joints: int = INFER_FROM_MODEL_TYPE # type: ignore[assignment]
out_joints: int = INFER_FROM_MODEL_TYPE # type: ignore[assignment]
joints_left: List[int] = INFER_FROM_MODEL_TYPE # type: ignore[assignment]
joints_right: List[int] = INFER_FROM_MODEL_TYPE # type: ignore[assignment]
root_joint: int = INFER_FROM_MODEL_TYPE # type: ignore[assignment]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is added now, so you can load an FMPose3DConfig from model_type with the appropriate number of joints etc:

model_cfg = FMPose3DConfig(model_type="fmpose3d_animal')

… files for consistency in the FMPose3D framework.
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