deeplabcut.pose_estimation_pytorch.config.pose
Main pose configuration class for DeepLabCut pose estimation models.
Classes:
| Name | Description |
|---|---|
PoseConfig |
Main configuration class for DeepLabCut pose estimation models. |
TestConfig |
Configuration class for DeepLabCut test/inference settings. |
PoseConfig
Bases: DLCVersionedConfig
Main configuration class for DeepLabCut pose estimation models.
This is the top-level configuration that brings together all the different configuration domains (project, model, data, training, etc.).
Attributes:
| Name | Type | Description |
|---|---|---|
net_type |
NetType
|
Network architecture type (e.g., resnet_50, hrnet_w32, dlcrnet_stride16_ms5) |
method |
MethodType
|
Method type (bu=Bottom-Up, td=Top-Down, ctd=Conditional Top-Down) |
device |
str
|
Device configuration (auto, cpu, cuda) |
project |
str
|
Project configuration (skeleton, individuals, etc.) |
model |
ModelConfig
|
Model configuration (backbone, heads, etc.) |
detector |
DetectorConfig | None
|
Detector configuration (for top-down models) |
data |
DataConfig
|
Data configuration (loaders, transforms, etc.) |
training |
DataConfig
|
Training configuration (runner, optimizer, etc.) |
inference |
InferenceConfig
|
Inference configuration (multithreading, compilation, etc.) |
logger |
CSVLoggerConfig | WandbLoggerConfig | None
|
Logger configuration (e.g., WandB or CSV logger) |
with_center_keypoints |
bool
|
Whether to include center keypoints (for DEKR models) |
Methods:
| Name | Description |
|---|---|
build |
Build a typed PoseConfig for a project |
Source code in deeplabcut/pose_estimation_pytorch/config/pose.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
build
classmethod
build(
project_config: ProjectConfig | dict | Path | str,
pose_config_path: str | Path,
*,
top_down: bool,
multi_animal: bool | None = None,
net_type: NetType | str | None = None,
detector_type: DetectorType | str | None = None,
weight_init: WeightInitialization | dict | Path | str | None = None,
ctd_conditions: int | str | Path | tuple[int, str] | tuple[int, int] | None = None,
save: bool = False
) -> Self
Build a typed PoseConfig for a project
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ProjectConfig | dict | Path | str
|
The project configuration. |
required |
|
str | Path
|
The path to the pose configuration. |
required |
|
bool
|
Whether to use a top-down backbone. |
required |
|
NetType | str | None
|
The network architecture type (without 'top_down_' prefix). If None, the default net type from the project config will be used. |
None
|
|
DetectorType | str | None
|
The detector architecture. Required for td models. |
None
|
|
WeightInitialization | None
|
The weight initialization object or path. |
None
|
|
int | str | Path | tuple[int, str] | tuple[int, int] | None
|
The conditional top-down conditions. Only required for CTD models. |
None
|
|
bool
|
Whether to save the pose configuration. |
False
|
Note
For generic backbone models, method is resolved from top_down. For non-backbone models,
the top_down is ignored and method is resolved from the default config.
Source code in deeplabcut/pose_estimation_pytorch/config/pose.py
TestConfig
Bases: DLCBaseConfig
Configuration class for DeepLabCut test/inference settings.
This configuration is used for downstream tracking and evaluation, containing the essential metadata about joints and network architecture.
Attributes:
| Name | Type | Description |
|---|---|---|
dataset |
Path
|
Path to the project/dataset. |
dataset_type |
DatasetType
|
Type of dataset (required for downstream tracking). |
num_joints |
NonNegativeInt
|
Total number of joints (bodyparts + unique bodyparts). |
all_joints |
list[list[NonNegativeInt]]
|
List of joint indices, each as a single-element list. |
all_joints_names |
UniqueStrList
|
List of joint names. |
net_type |
NetType
|
Network architecture type. |
global_scale |
Fraction
|
Global scale factor for inference. |
scoremap_dir |
Path
|
Directory for score maps. |