tracklab.callbacks package

Submodules

tracklab.callbacks.callback module

class tracklab.callbacks.callback.Callback[source]

Bases: object

after_saved_state = False
on_dataset_track_end(engine: TrackingEngine)[source]
on_dataset_track_start(engine: TrackingEngine)[source]
on_image_loop_end(engine: TrackingEngine, image_metadata: Series, image, image_idx: int, detections: DataFrame)[source]
on_image_loop_start(engine: TrackingEngine, image_metadata: Series, image_idx: int, index: int)[source]
on_module_end(engine: TrackingEngine, task: str, detections: DataFrame)[source]
on_module_start(engine: TrackingEngine, task: str, dataloader: DataLoader)[source]
on_module_step_end(engine: TrackingEngine, task: str, batch: Any, detections: DataFrame)[source]
on_module_step_start(engine: TrackingEngine, task: str, batch: Any)[source]
on_video_loop_end(engine: TrackingEngine, video_metadata: Series, video_idx: int, detections: DataFrame, image_pred: DataFrame)[source]
on_video_loop_start(engine: TrackingEngine, video_metadata: Series, video_idx: int, index: int)[source]

tracklab.callbacks.evaluate module

class tracklab.callbacks.evaluate.Evaluate(evaluator: Evaluator)[source]

Bases: Callback

on_dataset_track_end(engine: TrackingEngine)[source]

tracklab.callbacks.handle_regions module

class tracklab.callbacks.handle_regions.IgnoredRegions(max_intersection=0.9)[source]

Bases: Callback

compute_iou(bbox_ltrb, ignore_regions_x, ignore_regions_y)[source]

Compute the intersection of a detection and a list of ignore regions and check whether it is higher than a portion of the area or not.

Parameters:
  • bbox_ltrb (np.array) – bounding box of the detection [left, top, right, bottom]

  • ignore_regions_x (tuple) – list of ignore regions x coordinates

  • ignore_regions_y (tuple) – list of ignore regions y coordinates

Returns:

True if the area of the detection is higher than a certain threshold in an ignore region, False otherwise

Return type:

bool

mark_ignored(detection, image_metadatas)[source]
on_video_loop_end(engine: TrackingEngine, video_metadata: Series, video_idx: int, detections: DataFrame, image_pred: DataFrame)[source]

tracklab.callbacks.profiler module

tracklab.callbacks.progress module

class tracklab.callbacks.progress.Progressbar(use_rich=False, dummy=False)[source]

Bases: Callback

init_progress_bar(task, desc, length)[source]
class tracklab.callbacks.progress.RichProgressbar(use_rich=False, dummy=False)[source]

Bases: Progressbar

init_progress_bar(task, desc, length)[source]
on_dataset_track_end(engine: TrackingEngine)[source]
on_dataset_track_start(engine: TrackingEngine)[source]
on_module_end(engine: TrackingEngine, task: str, detections: DataFrame)[source]
on_module_start(engine: TrackingEngine, task: str, dataloader: DataLoader)[source]
on_module_step_end(engine: TrackingEngine, task: str, batch: Any, detections: DataFrame)[source]
on_video_loop_end(engine: TrackingEngine, video_metadata: Series, video_idx: int, detections: DataFrame, image_pred: DataFrame)[source]
on_video_loop_start(engine: TrackingEngine, video_metadata: Series, video_idx: int, index: int)[source]
class tracklab.callbacks.progress.TQDMProgressbar(use_rich=False, dummy=False)[source]

Bases: Progressbar

init_progress_bar(task, desc, length)[source]
on_dataset_track_end(engine: TrackingEngine)[source]
on_dataset_track_start(engine: TrackingEngine)[source]
on_module_end(engine: TrackingEngine, task: str, detections: DataFrame)[source]
on_module_start(engine: TrackingEngine, task: str, dataloader: DataLoader)[source]
on_module_step_end(engine: TrackingEngine, task: str, batch: Any, detections: DataFrame)[source]
on_video_loop_end(engine: TrackingEngine, video_metadata: Series, video_idx: int, detections: DataFrame, image_pred: DataFrame)[source]
on_video_loop_start(engine: TrackingEngine, video_metadata: Series, video_idx: int, index: int)[source]

tracklab.callbacks.wandb module