MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / convert_detections2tracklets

Function convert_detections2tracklets

deeplabcut/compat.py:1429–1591  ·  view source on GitHub ↗

This should be called at the end of deeplabcut.analyze_videos for multianimal projects! Parameters ---------- config : string Full path of the config.yaml file as a string. videos : list A list of strings containing the full paths to videos for analysis or a pat

(
    config: str,
    videos: list[str],
    video_extensions: str | Sequence[str] | None = None,
    shuffle: int = 1,
    trainingsetindex: int = 0,
    overwrite: bool = False,
    destfolder: str | None = None,
    ignore_bodyparts: list[str] | None = None,
    inferencecfg: dict | None = None,
    modelprefix: str = "",
    greedy: bool = False,
    calibrate: bool = False,
    window_size: int = 0,
    identity_only: int = False,
    track_method: str = "",
    engine: Engine | None = None,
)

Source from the content-addressed store, hash-verified

1427
1428@renamed_parameter(old="videotype", new="video_extensions", since="3.0.0")
1429def convert_detections2tracklets(
1430 config: str,
1431 videos: list[str],
1432 video_extensions: str | Sequence[str] | None = None,
1433 shuffle: int = 1,
1434 trainingsetindex: int = 0,
1435 overwrite: bool = False,
1436 destfolder: str | None = None,
1437 ignore_bodyparts: list[str] | None = None,
1438 inferencecfg: dict | None = None,
1439 modelprefix: str = "",
1440 greedy: bool = False,
1441 calibrate: bool = False,
1442 window_size: int = 0,
1443 identity_only: int = False,
1444 track_method: str = "",
1445 engine: Engine | None = None,
1446):
1447 """This should be called at the end of deeplabcut.analyze_videos for multianimal
1448 projects!
1449
1450 Parameters
1451 ----------
1452 config : string
1453 Full path of the config.yaml file as a string.
1454
1455 videos : list
1456 A list of strings containing the full paths to videos for analysis or a path to the directory,
1457 where all the videos with same extension are stored.
1458
1459 video_extensions : str | Sequence[str] | None, optional, default=None
1460 Controls how ``videos`` are filtered, based on file extension.
1461 File paths and directory contents are treated differently:
1462 - ``None`` (default): file paths are accepted as-is; directories are
1463 scanned for files with a recognized video extension.
1464 - ``str`` or ``Sequence[str]`` (e.g. ``"mp4"`` or ``["mp4", "avi"]``):
1465 both file paths and directory contents are filtered by the given
1466 extension(s).
1467
1468 shuffle: int, optional
1469 An integer specifying the shuffle index of the training dataset used for training the network. T
1470 he default is 1.
1471
1472 trainingsetindex: int, optional
1473 Integer specifying which TrainingsetFraction to use.
1474 By default the first (note that TrainingFraction is a list in config.yaml).
1475
1476 overwrite: bool, optional.
1477 Overwrite tracks file i.e. recompute tracks from full detections and overwrite.
1478
1479 destfolder: string, optional
1480 Specifies the destination folder for analysis data (default is the path of the video).
1481 Note that for subsequent analysis this
1482 folder also needs to be passed.
1483
1484 ignore_bodyparts: optional
1485 List of body part names that should be ignored during tracking (advanced).
1486 By default, all the body parts are used.

Callers

nothing calls this directly

Calls 3

get_shuffle_engineFunction · 0.90
_load_configFunction · 0.85

Tested by

no test coverage detected