tool

tracking tool.

Classes

class TrackingTool(device, overwrite=False, verbose=True)[source]

Bases: VideoTool

Parameters:
  • device (str)

  • overwrite (bool)

  • verbose (bool | int)

visualize(video_path, mask_paths, visualization_path, blackout=False, color=True, labels=True)[source]

Applies color masks to the video and writes a new video.

Parameters:
  • video_path (Union[str, Path]) – Path to original video.

  • mask_paths (Union[str, Path, list[Union[str, Path]]]) – Single or list of paths to .mp4 video masks.

  • visualization_path (Union[str, Path]) – Path to save the output video.

  • blackout (bool) – Whether to black out the background.

  • color (bool) – Whether to color each mask.

  • labels (bool) – Whether to draw labels.