first pretrained models support prototype #1
+518
−87
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.
Add Support for Pretrained DeepLabCut Models
issue: #141
Summary
This PR adds support for pretrained DeepLabCut models (e.g. SuperAnimal / Model Zoo) using the existing
Model→PoseEstimationTask→PoseEstimationworkflow.No parallel schema is introduced; trained and pretrained models are handled as two modes of the same pipeline.
Key Changes
PretrainedModellookuppretrained_model_name,source,version,species,backbone_model_name,detector_name,default_params,weights_path,description).is_pretrained(...),add(...)for explicit registration.Modelintegration_pretrained_model_namein config).PretrainedModel.Modelschema.PoseEstimationinferencemakewith two code paths:_do_pretrained_inference(...)do_trained(...)_do_pretrained_inference:PretrainedModelmetadata.deeplabcut.video_inference_superanimal(...)when available.video_inference(...)where appropriate.inspect.signature()to stay API-compatible.Backward Compatibility
Testing - TODO:
video_inferencewhenvideo_inference_superanimalis unavailable.PretrainedModel+ task overrides).