from_mot#

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