Skip to content

deeplabcut.pose_estimation_pytorch.config.model

Model configuration class for DeepLabCut pose estimation models.

Classes:

Name Description
DetectorModelConfig

Configuration for detector models

ModelConfig

Complete model configuration.

DetectorModelConfig

Bases: DLCBaseConfig

Configuration for detector models

Attributes:

Name Type Description
type str

Type of detector model (e.g., FasterRCNN)

freeze_bn_stats bool

Whether to freeze batch normalization statistics

freeze_bn_weights bool

Whether to freeze batch normalization weights

variant str | None

Specific variant of the detector model

Source code in deeplabcut/pose_estimation_pytorch/config/model.py
class DetectorModelConfig(DLCBaseConfig):
    """Configuration for detector models

    Attributes:
        type: Type of detector model (e.g., FasterRCNN)
        freeze_bn_stats: Whether to freeze batch normalization statistics
        freeze_bn_weights: Whether to freeze batch normalization weights
        variant: Specific variant of the detector model
    """

    type: str = ""
    freeze_bn_stats: bool = False
    freeze_bn_weights: bool = False
    variant: str | None = None
    box_score_thresh: Fraction | None = None

ModelConfig

Bases: DLCBaseConfig

Complete model configuration.

Attributes:

Name Type Description
backbone dict

Backbone configuration

backbone_output_channels int | None

Number of output channels from backbone

heads dict[str, dict]

Dictionary of head configurations by name

neck dict | None

Neck configuration

pose_model dict | None

Pose model configuration

Source code in deeplabcut/pose_estimation_pytorch/config/model.py
class ModelConfig(DLCBaseConfig):
    """Complete model configuration.

    Attributes:
        backbone: Backbone configuration
        backbone_output_channels: Number of output channels from backbone
        heads: Dictionary of head configurations by name
        neck: Neck configuration
        pose_model: Pose model configuration
    """

    backbone: dict = Field(default_factory=dict)
    heads: dict[str, dict] = Field(default_factory=dict)
    backbone_output_channels: int | None = None
    neck: dict | None = None
    pose_model: dict | None = None