deeplabcut.pose_estimation_pytorch.runners.ctd
Configuration for CTD tracking.
Classes:
| Name | Description |
|---|---|
CTDTrackingConfig |
Configuration for CTD tracking. |
CTDTrackingConfig
dataclass
Configuration for CTD tracking.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
bool
|
When True, the BU model is run when there are fewer conditions found than the expected number of individuals in the video. |
True
|
|
int | None
|
The minimum frequency at which the BU model is run to generate conditions. If None, the BU model is only run to initialize the pose in the first frame, and then is not run again. If a positive number N, the BU model is run every N frames. The BU predictions are then combined with the CTD predictions to continue the tracklets. |
None
|
|
int | None
|
The maximum frequency at which the BU model can be run. Must
be greater than |
100
|
|
float
|
The OKS threshold below which a BU pose must be (wrt. any existing CTD pose) to be added to the poses. |
0.25
|
|
float
|
The score threshold below which detected keypoints are NOT given to the CTD model to predict pose for the next frame. |
0.01
|
|
float
|
The OKS threshold for non-maximum suppression to remove duplicates poses when two CTD model predictions converge to a single animal. |
0.9
|
Methods:
| Name | Description |
|---|---|
build |
Builds a CTD tracking configuration from a configuration dictionary. |
Source code in deeplabcut/pose_estimation_pytorch/runners/ctd.py
build
staticmethod
Builds a CTD tracking configuration from a configuration dictionary.
Examples:
Building a CTDTrackingConfig from a basic dict:
Building a CTDTrackingConfig from a basic dict:
>>> ctd_tracking = CTDTrackingConfig.build(
>>> dict(
>>> bu_on_lost_idv=True,
>>> bu_max_frequency=5, # When no FPS is given, this is in frames!
>>> threshold_nms=0.5,
>>> )
>>> )
Building a CTDTrackingConfig from a dict for a video with a given FPS:
>>> ctd_tracking = CTDTrackingConfig.build(
>>> dict(
>>> bu_on_lost_idv=True,
>>> bu_min_frequency=1, # When an FPS is given, this is in seconds!
>>> bu_max_frequency=5, # When an FPS is given, this is in seconds!
>>> threshold_ctd=0.1,
>>> threshold_nms=0.9
>>> ),
>>> video_fps=30.0,
>>> )