deeplabcut.pose_estimation_pytorch.apis.ctd
Methods to help with conditional top-down models.
Functions:
| Name | Description |
|---|---|
get_conditions_provider_for_video |
Tries to create a conditions loader from a pre-computed video predictions file. |
load_conditions_for_evaluation |
Loads the conditions needed to evaluate a CTD model. |
get_conditions_provider_for_video
get_conditions_provider_for_video(cond_provider: ConditionsModelConfig, video: str | Path) -> CondFromFile | None
Tries to create a conditions loader from a pre-computed video predictions file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ConditionsModelConfig
|
The resolved |
required |
|
str | Path
|
The path to the video file for which to look for the conditions. |
required |
Returns:
| Type | Description |
|---|---|
CondFromFile | None
|
None if no condition files for this BU model and video can be found. The CondFromFile provider to load the conditions for the video from a file. |
Source code in deeplabcut/pose_estimation_pytorch/apis/ctd.py
load_conditions_for_evaluation
Loads the conditions needed to evaluate a CTD model.
Evaluation loads pre-computed BU predictions from disk via CondFromFile.
Supported inference.conditions forms:
ConditionsFileConfig/ path string — load that predictions fileConditionsShuffleConfig/ shuffle dict — resolve the BU shuffle's evaluation.h5(projectconfig.yamlis injected from the loader when missing)
ConditionsModelConfig is not valid here (that form is for live BU inference).
File-path conditions are evaluation-only and cannot be used with analyze_*.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Loader
|
The Loader for the CTD model to evaluate. |
required |
|
list[str]
|
A list of image paths to load conditions for. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, ndarray]
|
The conditions for the images. |