Skip to content

deeplabcut

Modules:

Name Description
benchmark
cli
compat

Compatibility file for methods available with either PyTorch or Tensorflow.

core
create_project
generate_training_dataset
gui
modelzoo
pose_estimation_3d
pose_estimation_pytorch
pose_estimation_tensorflow
pose_tracking_pytorch
post_processing

DeepLabCut2.0 Toolbox (deeplabcut.org)

refine_training_dataset
utils

__dir__

__dir__() -> list[str]

Improve IDE / autocomplete discoverability.

Source code in deeplabcut/__init__.py
def __dir__() -> list[str]:
    """Improve IDE / autocomplete discoverability."""
    return sorted(set(globals()) | set(__all__))

__getattr__

__getattr__(name: str) -> Any

Lazily load optional public exports.

Source code in deeplabcut/__init__.py
def __getattr__(name: str) -> Any:
    """Lazily load optional public exports."""
    if name not in _OPTIONAL_EXPORTS:
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

    module_name, attr_name = _OPTIONAL_EXPORTS[name]

    try:
        module = import_module(module_name, package=__name__)
        value = getattr(module, attr_name)
    except (ModuleNotFoundError, ImportError) as exc:
        if name in {
            "launch_dlc",
            "label_frames",
            "refine_labels",
            "refine_tracklets",
            "SkeletonBuilder",
        }:
            raise AttributeError(
                f"{name!r} is unavailable because DeepLabCut was loaded without GUI dependencies."
            ) from exc

        if name == "transformer_reID":
            raise AttributeError(
                f"{name!r} is unavailable because the PyTorch-based tracking dependencies are not installed."
            ) from exc

        raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from exc

    # Cache the resolved object so future access is fast
    globals()[name] = value
    return value