MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / create_tracking_dataset

Function create_tracking_dataset

deeplabcut/compat.py:1001–1136  ·  view source on GitHub ↗

Creates a tracking dataset to train a ReID tracklet stitcher. Parameters ---------- config: str Full path of the config.yaml file. videos: list[str] A list of strings containing the full paths to videos from which to create a tracking dataset, or a path to t

(
    config: str,
    videos: list[str],
    track_method: str,
    video_extensions: str | Sequence[str] | None = None,
    shuffle: int = 1,
    trainingsetindex: int = 0,
    gputouse: int | None = None,
    destfolder: str | None = None,
    batch_size: int | None = None,
    cropping: list[int] | None = None,
    TFGPUinference: bool = True,
    modelprefix: str = "",
    robust_nframes: bool = False,
    n_triplets: int = 1000,
    engine: Engine | None = None,
)

Source from the content-addressed store, hash-verified

999@renamed_parameter(old="batchsize", new="batch_size", since="3.0.0")
1000@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
1001def create_tracking_dataset(
1002 config: str,
1003 videos: list[str],
1004 track_method: str,
1005 video_extensions: str | Sequence[str] | None = None,
1006 shuffle: int = 1,
1007 trainingsetindex: int = 0,
1008 gputouse: int | None = None,
1009 destfolder: str | None = None,
1010 batch_size: int | None = None,
1011 cropping: list[int] | None = None,
1012 TFGPUinference: bool = True,
1013 modelprefix: str = "",
1014 robust_nframes: bool = False,
1015 n_triplets: int = 1000,
1016 engine: Engine | None = None,
1017) -> str:
1018 """Creates a tracking dataset to train a ReID tracklet stitcher.
1019
1020 Parameters
1021 ----------
1022 config: str
1023 Full path of the config.yaml file.
1024
1025 videos: list[str]
1026 A list of strings containing the full paths to videos from which to create a
1027 tracking dataset, or a path to the directory where all the videos with same
1028 extension are stored.
1029
1030 track_method: str
1031 Specifies the tracker used to generate the pose estimation data. Must be either
1032 'box', 'skeleton', or 'ellipse'.
1033
1034 video_extensions : str | Sequence[str] | None, optional, default=None
1035 Controls how ``videos`` are filtered, based on file extension.
1036 File paths and directory contents are treated differently:
1037 - ``None`` (default): file paths are accepted as-is; directories are
1038 scanned for files with a recognized video extension.
1039 - ``str`` or ``Sequence[str]`` (e.g. ``"mp4"`` or ``["mp4", "avi"]``):
1040 both file paths and directory contents are filtered by the given
1041 extension(s).
1042
1043 shuffle: int, optional, default=1
1044 An integer specifying the shuffle index of the training dataset used for
1045 training the network.
1046
1047 trainingsetindex: int, optional, default=0
1048 Integer specifying which TrainingsetFraction to use.
1049 By default the first (note that TrainingFraction is a list in config.yaml).
1050
1051 gputouse: int or None, optional, default=None
1052 Only for the TensorFlow engine (for the PyTorch engine use ``device``).
1053 Indicates the GPU to use (see number in ``nvidia-smi``). If you do not have a
1054 GPU put ``None``. See:
1055 https://nvidia.custhelp.com/app/answers/detail/a_id/3751/~/useful-nvidia-smi-queries
1056
1057 TFGPUinference: bool, optional, default=True
1058 Only for the TensorFlow engine.

Callers

nothing calls this directly

Calls 3

get_shuffle_engineFunction · 0.90
create_tracking_datasetFunction · 0.90
_load_configFunction · 0.85

Tested by

no test coverage detected