diplomat.frontends.deeplabcut.load_model.load_model
- diplomat.frontends.deeplabcut.load_model.load_model(config: PathLike | str, num_outputs: int | None = None, batch_size: int | None = None, gpu_index: int | None = None, model_prefix: str = '', shuffle: int = 1, training_set_index: int = 0, use_cpu: bool = False) Tuple[ModelInfo, Callable][source]
Run DIPLOMAT tracking on videos using a DEEPLABCUT project and trained network.
- Parameters:
config – The path to the DLC config for the DEEPLABCUT project.
shuffle – int, optional. Integer specifying which TrainingsetFraction to use. By default, the first (note that TrainingFraction is a list in config.yaml).
training_set_index – int, optional. Integer specifying which TrainingsetFraction to use. By default the first (note that TrainingFraction is a list in config.yaml).
gpu_index – Integer index of the GPU to use for inference (in tensorflow) defaults to 0, or selecting the first detected GPU if available.
batch_size – The batch size to use while processing. Defaults to None, which uses the default batch size for the project.
model_prefix – The string prefix of the DEEPLABCUT model to use defaults to no prefix (the default model).
num_outputs – The number of outputs, or bodies to track in the video. Defaults to the value specified in the DLC config, or None if one is not specified.
use_cpu – If True, run on cpu even if a gpu is available. Defaults to False.
- Returns:
A model info dictionary, and a deeplabcut model wrapper that can be used to estimate poses from video frames.