Skip to content

Improve DLC project import integration #424

@talmo

Description

@talmo

Migrating from talmolab/sleap#734 since DLC I/O now lives in sleap-io
(sleap_io/io/dlc.py).

Current DLC import (load_dlc) reads CSV-based annotations into Labels, but
several pieces of DLC project metadata are still missing for a complete import:

  1. Training set splits: DLC stores train/val/test splits in
    Documentation_data-*.pickle (and related metadata files). sleap-io
    doesn't currently surface these — they'd map most naturally to a future
    per-frame split annotation or to a sidecar config consumed by sleap-nn.

  2. Cropping / ROI: DLC supports ROI cropping during labeling/training.
    sleap-io has no ROI primitive yet, so this is blocked on adding ROI
    support to the data model.

  3. Link single images back to original videos: DLC exports labeled
    frames as folders of images under labeled-data/<video_name>/. Today
    sleap-io creates a Video.from_filename(image_files) per folder; it
    could additionally parse the DLC config.yaml (which lists
    video_sets) to point back to the original .mp4/.avi files when
    available.

  4. Skeleton edges: _parse_multi_animal_structure and
    _parse_single_animal_structure (sleap_io/io/dlc.py:196-257) only
    build Skeleton(nodes=...) and never populate edges. DLC's
    config.yaml defines skeleton: as a list of edges — these should be
    parsed and added to the imported Skeleton.

Originally filed as talmolab/sleap#734 (2022). Related: talmolab/sleap#606.

This will likely be broken down into separate PRs / sub-tasks per item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions