tracklab.datastruct package

Submodules

tracklab.datastruct.datapipe module

class tracklab.datastruct.datapipe.EngineDatapipe(model)[source]

Bases: Dataset

update(image_filepaths: dict, img_metadatas, detections)[source]

tracklab.datastruct.tracker_state module

class tracklab.datastruct.tracker_state.TrackerState(tracking_set: TrackingSet, load_file=None, json_file=None, save_file=None, load_from_groundtruth=False, load_from_public_dets=False, compression=0, bbox_format=None, pipeline=None)[source]

Bases: AbstractContextManager

load()[source]
Returns:

True if the pickle contains the video detections,

and False otherwise.

Return type:

bool

load_detections_pred_from_json(json_file)[source]
load_groundtruth(load_columns)[source]
load_public_dets(load_columns)[source]
on_video_loop_end(engine: TrackingEngine, video_metadata: Series, video_idx: int, detections: DataFrame, image_pred: DataFrame)[source]
save()[source]

Saves a pickle in a zip file if the video_id is not yet stored in it.

update(detections: DataFrame, image_metadata)[source]

tracklab.datastruct.tracking_dataset module

class tracklab.datastruct.tracking_dataset.SetsDict[source]

Bases: dict

class tracklab.datastruct.tracking_dataset.TrackingDataset(dataset_path: str, sets: dict[str, TrackingSet], nvid: int = -1, nframes: int = -1, vids_dict: list | None = None, *args, **kwargs)[source]

Bases: ABC

process_trackeval_results(results, dataset_config, eval_config)[source]
save_for_eval(detections: DataFrame, image_metadatas: DataFrame, video_metadatas: DataFrame, save_folder: str, bbox_column_for_eval='bbox_ltwh', save_classes=False, is_ground_truth=False, save_zip=True)[source]

Save predictions in MOT Challenge format.

class tracklab.datastruct.tracking_dataset.TrackingSet(video_metadatas: ~pandas.core.frame.DataFrame, image_metadatas: ~pandas.core.frame.DataFrame, detections_gt: ~pandas.core.frame.DataFrame, image_gt: ~pandas.core.frame.DataFrame = Empty DataFrame Columns: [video_id] Index: [])[source]

Bases: object

TrackingSet(video_metadatas: pandas.core.frame.DataFrame, image_metadatas: pandas.core.frame.DataFrame, detections_gt: pandas.core.frame.DataFrame, image_gt: pandas.core.frame.DataFrame = Empty DataFrame Columns: [video_id] Index: [])

detections_gt: DataFrame
image_gt: DataFrame = Empty DataFrame Columns: [video_id] Index: []
image_metadatas: DataFrame
video_metadatas: DataFrame