deeplabcut.pose_estimation_pytorch.modelzoo.config
Methods to create the configuration files to fine-tune SuperAnimal models.
Functions:
| Name | Description |
|---|---|
create_config_from_modelzoo |
Creates a model configuration file to fine-tune a SuperAnimal model. |
make_super_animal_finetune_config |
Creates a PyTorch pose configuration file to finetune a SuperAnimal model on a |
create_config_from_modelzoo
create_config_from_modelzoo(
super_animal: str,
model_name: str,
detector_name: str | None,
converted_bodyparts: list[str],
weight_init: WeightInitialization,
project_config: dict,
pose_config_path: str | Path,
) -> dict
Creates a model configuration file to fine-tune a SuperAnimal model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The SuperAnimal dataset on which the model was trained. |
required |
|
str
|
The type of neural net to finetune. |
required |
|
str | None
|
The type of detector to use for the SuperAnimal model. If None is given, the model will be set to a Bottom-Up framework. |
required |
|
list[str]
|
The project bodyparts that the model will learn. |
required |
|
WeightInitialization
|
The weight initialization to use. |
required |
|
dict
|
The project configuration. |
required |
|
str | Path
|
The path where the pose configuration file will be saved. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
The generated pose configuration file. |
Source code in deeplabcut/pose_estimation_pytorch/modelzoo/config.py
make_super_animal_finetune_config
make_super_animal_finetune_config(
weight_init: WeightInitialization,
project_config: dict,
pose_config_path: str | Path,
model_name: str,
detector_name: str | None,
save: bool = False,
) -> dict
Creates a PyTorch pose configuration file to finetune a SuperAnimal model on a downstream project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
WeightInitialization
|
The weight initialization configuration. |
required |
|
dict
|
The project configuration. |
required |
|
str | Path
|
The path where the pose configuration file will be saved |
required |
|
str
|
The type of neural net to finetune. |
required |
|
str | None
|
The type of detector to use for the SuperAnimal model. If None is given, the model will be set to a Bottom-Up framework. |
required |
|
bool
|
Whether to save the model configuration file to the |
False
|
Returns:
| Type | Description |
|---|---|
dict
|
The generated pose configuration file. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |