Skip to content

pipeline.py

get_dlc_root_data_dir()

Returns a list of root directories for Element DeepLabCut

Source code in workflow_deeplabcut/paths.py
 5
 6
 7
 8
 9
10
11
12
13
def get_dlc_root_data_dir() -> list:
    """Returns a list of root directories for Element DeepLabCut"""
    dlc_root_dirs = dj.config.get("custom", {}).get("dlc_root_data_dir")
    if not dlc_root_dirs:
        return None
    elif not isinstance(dlc_root_dirs, abc.Sequence):
        return list(dlc_root_dirs)
    else:
        return dlc_root_dirs

get_dlc_processed_data_dir()

Returns an output directory relative to custom 'dlc_output_dir' root

Source code in workflow_deeplabcut/paths.py
16
17
18
19
20
21
22
23
24
def get_dlc_processed_data_dir() -> str:
    """Returns an output directory relative to custom 'dlc_output_dir' root"""
    from pathlib import Path

    dlc_output_dir = dj.config.get("custom", {}).get("dlc_output_dir")
    if dlc_output_dir:
        return Path(dlc_output_dir)
    else:
        return None

Device

Bases: dj.Lookup

Table for managing lab equipment.

In Element DeepLabCut, this table is referenced by model.VideoRecording. The primary key is also used to generate inferred output directories when running pose estimation inference. Refer to the definition attribute for the table design.

Attributes:

Name Type Description
device varchar(32)

Device short name.

modality varchar(64)

Modality for which this device is used.

description varchar(256)

Optional. Description of device.

Source code in workflow_deeplabcut/pipeline.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@lab.schema
class Device(dj.Lookup):
    """Table for managing lab equipment.

    In Element DeepLabCut, this table is referenced by `model.VideoRecording`.
    The primary key is also used to generate inferred output directories when
    running pose estimation inference. Refer to the `definition` attribute
    for the table design.

    Attributes:
        device ( varchar(32) ): Device short name.
        modality ( varchar(64) ): Modality for which this device is used.
        description ( varchar(256) ): Optional. Description of device.
    """

    definition = """
    device             : varchar(32)
    ---
    modality           : varchar(64)
    description=null   : varchar(256)
    """
    contents = [
        ["Camera1", "Pose Estimation", "Panasonic HC-V380K"],
        ["Camera2", "Pose Estimation", "Panasonic HC-V770K"],
    ]