deeplabcut.pose_estimation_pytorch.modelzoo.utils
Functions:
| Name | Description |
|---|---|
download_super_animal_snapshot |
Downloads a SuperAnimal snapshot. |
get_gpu_memory_map |
Get the current gpu usage. |
get_model_configs_folder_path |
Returns: the folder containing the SuperAnimal model configuration files |
get_project_configs_folder_path |
Returns: the folder containing the SuperAnimal project configuration files |
get_snapshot_folder_path |
Returns: the path to the folder containing the SuperAnimal model snapshots |
get_super_animal_model_config_path |
Gets the path to the configuration file for a SuperAnimal model. |
get_super_animal_project_config_path |
Gets the path to a SuperAnimal project configuration file. |
get_super_animal_snapshot_path |
Gets the path to the snapshot containing SuperAnimal model weights. |
load_super_animal_config |
Loads the model configuration file for a model, detector and SuperAnimal. |
update_config |
Loads the model configuration file for a model, detector and SuperAnimal. |
download_super_animal_snapshot
Downloads a SuperAnimal snapshot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The name of the SuperAnimal dataset for which to download a snapshot. |
required |
|
str
|
The name of the model for which to download a snapshot. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the downloaded snapshot. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
get_gpu_memory_map
Get the current gpu usage.
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
get_model_configs_folder_path
Returns: the folder containing the SuperAnimal model configuration files
get_project_configs_folder_path
Returns: the folder containing the SuperAnimal project configuration files
get_snapshot_folder_path
Returns: the path to the folder containing the SuperAnimal model snapshots
get_super_animal_model_config_path
Gets the path to the configuration file for a SuperAnimal model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The name of the model for which to get the path. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the config file for a SuperAnimal model. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
get_super_animal_project_config_path
Gets the path to a SuperAnimal project configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The name of the SuperAnimal for which to get the config path. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the config file for a SuperAnimal project. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
get_super_animal_snapshot_path
Gets the path to the snapshot containing SuperAnimal model weights.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The name of the SuperAnimal dataset. |
required |
|
str
|
The name of the model. |
required |
|
bool
|
Whether to download the weights if they aren't already there. |
True
|
Returns:
| Type | Description |
|---|---|
Path
|
The path to the weights for a SuperAnimal model. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
load_super_animal_config
load_super_animal_config(
super_animal: str,
model_name: str,
detector_name: str | None = None,
max_individuals: int = 30,
device: str | None = None,
) -> dict
Loads the model configuration file for a model, detector and SuperAnimal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The name of the SuperAnimal for which to create the model config. |
required |
|
str
|
The name of the model for which to create the model config. |
required |
|
str | None
|
The name of the detector for which to create the model config. |
None
|
|
int
|
The maximum number of detections to make in an image |
30
|
|
str | None
|
The device to use to train/run inference on the model |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
The model configuration for a SuperAnimal-pretrained model. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/utils.py
update_config
Loads the model configuration file for a model, detector and SuperAnimal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
dict
|
The default model configuration file. |
required |
|
int
|
The maximum number of detections to make in an image |
required |
|
str
|
The device to use to train/run inference on the model |
required |
Returns:
| Type | Description |
|---|---|
|
The model configuration for a SuperAnimal-pretrained model. |