vis4d.data.datasets.bdd100k

BDD100K dataset.

Classes

BDD100K(data_root, annotation_path[, ...])

BDD100K type dataset, based on Scalabel.

class BDD100K(data_root, annotation_path, keys_to_load=('images', 'boxes2d'), category_map=None, config_path=None, global_instance_ids=False, bg_as_class=False, skip_empty_samples=False, attributes_to_load=None, cache_as_binary=False, cached_file_path=None, **kwargs)[source]

BDD100K type dataset, based on Scalabel.

Creates an instance of the class.

Parameters:
  • data_root (str) – Root directory of the data.

  • annotation_path (str) – Path to the annotation json(s).

  • keys_to_load (Sequence[str, ...], optional) – Keys to load from the dataset. Defaults to (K.images, K.boxes2d).

  • category_map (None | CategoryMap, optional) – Mapping from a Scalabel category string to an integer index. If None, the standard mapping in the dataset config will be used. Defaults to None.

  • config_path (None | str | Config, optional) – Path to the dataset config, can be added if it is not provided together with the labels or should be modified. Defaults to None.

  • global_instance_ids (bool) – Whether to convert tracking IDs of annotations into dataset global IDs or stay with local, per-video IDs. Defaults to false.

  • bg_as_class (bool) – Whether to include background pixels as an additional class for masks.

  • skip_empty_samples (bool) – Whether to skip samples without annotations.

  • attributes_to_load (Sequence[dict[str, str]]) – List of attributes dictionaries to load. Each dictionary is a mapping from the attribute name to its desired value. If any of the attributes dictionaries is matched, the corresponding frame will be loaded. Defaults to None.

  • cache_as_binary (bool) – Whether to cache the dataset as binary. Default: False.

  • cached_file_path (str | None) – Path to a cached file. If cached file exist then it will load it instead of generating the data mapping. Default: None.

__repr__()[source]

Concise representation of the dataset.

Return type:

str