mot#

Functions

ann_txt_to_df

Read the .txt MOT annotations into a dataframe.

from_mot

Load a dataset stored in the MOT format.

ann_txt_to_df(ann_txt: Path | str) DataFrame[source]#

Read the .txt MOT annotations into a dataframe.

Parameters:

ann_txt – path to .txt annotation of your original MOT dataset

Returns:

a dataframe containing the MOT annotations

Return type:

pd.DataFrame

from_mot(ann_txt: Path | str, images_folder: Path | str, category_id: int, category_str: str, split: str | None = None) Dataset[source]#

Load a dataset stored in the MOT format.

See specifications

Note

The image filenames must represent the image’s id (e.g. 0001.jpg). This id is used in the .txt annotation file to associate annotations with this image

Parameters:
  • ann_txt – path to the .txt file containing the MOT annotations.

  • images_folder – path to the folder containing the dataset’s images which must be at the root of this folder.

  • category_id – category_id of the objects that are annotated in your MOT dataset. this means that your dataset contains only one class, which is the case of the MOT datasets we’ve tested so far (MOT20Det, CroHD).

  • category_str – category_str of the objects annotated in your MOT dataset.

  • split – split of the loaded dataset.

Returns:

Loaded dataset object