vis4d.data.datasets.nuscenes_trajectory

NuScenes trajectory dataset.

Classes

NuScenesTrajectory(detector, pure_detection, ...)

NuScenes Trajectory dataset with given detection results.

class NuScenesTrajectory(detector, pure_detection, data_root, version='v1.0-trainval', split='train', min_seq_len=10, cache_as_binary=False, cached_file_path=None)[source]

NuScenes Trajectory dataset with given detection results.

It will generate a trajectory data pair with minimum sequence length. The detection results will be matched with the ground truth trajectory according to the BEV distance.

Init dataset.

Parameters:
  • detector (str) – The detector name.

  • pure_detection (str) – The path to the pure detection results. It should be the same format as nuScenes submission format.

  • data_root (str) – The root path of the dataset.

  • version (str, optional) – The version of the dataset. Defaults to “v1.0-trainval”.

  • split (str, optional) – The split of the dataset. Defaults to “train”.

  • min_seq_len (int, optional) – The minimum sequence length of the trajectory. Defaults to 10.

  • cache_as_binary (bool, optional) – Whether to cache the dataset as binary. Defaults to False.

  • cached_file_path (str | None, optional) – The path to the cached file. Defaults to None.

__getitem__(idx)[source]

Return the item at the given index.

The trajectory will be randomly cropped to the minimum sequence length.

Return type:

Dict[str, Any]

__len__()[source]

Return the length of the dataset.

Return type:

int

__repr__()[source]

Concise representation of the dataset.

Return type:

str