vis4d.data.datasets.s3dis

Stanford 3D indoor dataset.

Classes

S3DIS(data_root[, split, keys_to_load, ...])

S3DIS dataset class.

class S3DIS(data_root, split='trainNoArea5', keys_to_load=('points3d', 'colors3d', 'semantics3d', 'instances3d'), cache_points=True, cache_as_binary=False, cached_file_path=None, **kwargs)[source]

S3DIS dataset class.

Creates a new S3DIS dataset.

Parameters:
  • data_root (str) – Path to S3DIS folder

  • split (str) – which split to load. Must either be trainNoArea[1-6] or testArea[1-6]. e.g. trainNoArea5 will load all areas except area 5 and testArea5 will only load area 5.

  • keys_to_load (list[str]) – What kind of data should be loaded (e.g. colors, xyz, semantics, …)

  • cache_points (bool) – If true caches loaded points instead of reading them from the disk every time.

  • 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.

Raises:

ValueError – If requested split is malformed.

__getitem__(idx)[source]

Transform s3dis sample to vis4d input format.

Returns:

3D Poitns coordinate Shape(n x 3) colors: 3D Point colors Shape(n x 3) Semantic Classes: 3D Point classes Shape(n x 1)

Return type:

coordinates

Raises:

ValueError – If a requested key does not exist in this dataset.

__len__()[source]

Length of the datset.

Return type:

int

__repr__()[source]

Concise representation of the dataset.

Return type:

str

property num_classes: int

The number of classes int he datset.