Image

Classes:

Image([shape])

Metaclass for transformations of images

DLC([model_dir, model_zoo])

Do pose estimation with DeepLabCut-Live!!!!!

class Image(shape=None, *args, **kwargs)[source]

Bases: autopilot.transform.transforms.Transform

Metaclass for transformations of images

Attributes:

format_in

format_out

shape

property format_in: dict
property format_out: dict
property shape: Tuple[int, int]
class DLC(model_dir: Optional[str] = None, model_zoo: Optional[str] = None, *args, **kwargs)[source]

Bases: autopilot.transform.image.Image

Do pose estimation with DeepLabCut-Live!!!!!

Specify a model_dir (relative to <BASEDIR>/dlc or absolute) or a model name from the DLC model zoo.

All other args and kwargs are passed on to dlclive.DLCLive, see its documentation for details: https://github.com/DeepLabCut/DeepLabCut-live

Variables
  • model_type (str, 'local' or 'zoo') – whether a directory (local) or a modelzoo name (zoo) was passed

  • live (dlclive.DLCLive) – the DLCLive object

Must give either model_dir or model_zoo

Parameters
  • model_dir (str) – directory of model, either absolute or relative to <BASEDIR>/dlc. if None, use model_zoo

  • model_zoo (str) – name of modelzoo model. if None, use model_dir

  • *args – passed to DLCLive and superclass

  • **kwargs – passed to DLCLive and superclass

Methods:

process(input)

list_modelzoo()

List available modelzoo model names in local deeplabcut version

import_dlc()

create_modelzoo(model)

load_model()

export_model()

Attributes:

model

model_dir

dlc_paths

paths used by dlc in manipulating/using models

dlc_dir

{prefs.get('BASE_DIR')}/dlc :returns: str

format_in

format_out

process(input: numpy.ndarray) numpy.ndarray[source]
property model: str
property model_dir: str
property dlc_paths: dict

paths used by dlc in manipulating/using models

  • config: <model_dir>/config.yaml

  • train_pose_cfg: <model_dir>/dlc-models/iteration-<n>/<name>/train/pose_cfg.yaml,

  • export_pose_cfg: <model_dir>/exported-models/<name>/pose_cfg.yaml

  • export_dir: <model_dir>/exported-models/<name>

Returns

dict

property dlc_dir: str

{prefs.get('BASE_DIR')}/dlc :returns: str

classmethod list_modelzoo()[source]

List available modelzoo model names in local deeplabcut version

Returns

names of available modelzoo models

Return type

list

import_dlc()[source]
create_modelzoo(model)[source]
load_model()[source]
export_model()[source]
property format_in: dict
property format_out: dict