open3d.ml.torch.datasets.MatterportObjects#

class open3d.ml.torch.datasets.MatterportObjects(dataset_path, name='MatterportObjects', cache_dir='./logs/cache', use_cache=False, val_split=5000, test_result_folder='./test', **kwargs)#

This class is used to create a dataset based on the Matterport-Chair dataset and other related datasets.

The Matterport-Chair dataset is introduced in Sparse PointPillars as a chair detection task for an embodied agent in various homes in Matterport3D (https://niessner.github.io/Matterport/). The training and test splits for Matterport-Chair are available on the Sparse PointPillars project webpage (https://vedder.io/sparse_point_pillars) and code to generate Matterport-Chair can be used to generate datasets of other objects in Matterport3D (https://github.com/kylevedder/MatterportDataSampling).

Point clouds and bounding boxes are stored as numpy arrays serialized with joblib. All coordinates are in the standard robot coordinate frame (https://en.wikipedia.org/wiki/Right-hand_rule#Coordinates), with X forward, Y to the left, and Z up. All bounding boxes are assumed to only have a rotation along the Z axis in the form of yaw (positive yaw is counterclockwise).

Like with KITTI, before you use Matterport-Chair you should run scripts/collect_bboxes.py to generate the bbox dictionary for data augmentation, but with ‘–dataset_type MatterportObjects’ specified.

If you use this in your research, we ask that you please cite Sparse PointPillars (https://github.com/kylevedder/SparsePointPillars#citation).

__init__(dataset_path, name='MatterportObjects', cache_dir='./logs/cache', use_cache=False, val_split=5000, test_result_folder='./test', **kwargs)#

Initialize the function by passing the dataset and other details.

Parameters:
  • dataset_path – The path to the dataset to use.

  • name – The name of the dataset (MatterportObjects in this case).

  • cache_dir – The directory where the cache is stored.

  • use_cache – Indicates if the dataset should be cached.

  • val_split – The split value to get a set of images for training,

  • validation

  • testing. (for) –

  • test_result_folder – Path to store test output.

Returns:

The corresponding class.

Return type:

class

static get_label_to_names()#

Returns a label to names dictonary object.

Returns:

A dict where keys are label numbers and values are the corresponding names.

Names are extracted from Matterport3D’s metadata/category_mapping.tsv’s “ShapeNetCore55” column.

get_split(split)#

Returns a dataset split.

Parameters:
  • split – A string identifying the dataset split that is usually one of

  • 'training'

  • 'test'

  • 'validation'

  • 'all'. (or) –

Returns:

A dataset split object providing the requested subset of the data.

get_split_list(split)#

Returns the list of data splits available.

Parameters:
  • split – A string identifying the dataset split that is usually one of

  • 'training'

  • 'test'

  • 'validation'

  • 'all'. (or) –

Returns:

A dataset split object providing the requested subset of the data.

Raises:
  • ValueError – Indicates that the split name passed is incorrect. The

  • split name should be one of 'training', 'test', 'validation', or

  • 'all'.

is_tested(attr)#

Checks if a datum in the dataset has been tested.

Parameters:
  • dataset – The current dataset to which the datum belongs to.

  • attr – The attribute that needs to be checked.

Returns:

If the dataum attribute is tested, then resturn the path where the attribute is stored; else, returns false.

static read_label(path)#

Reads labels of bound boxes.

Returns:

The data objects with bound boxes information.

static read_lidar(path)#

Reads lidar data from the path provided.

Returns:

A data object with lidar information.

save_test_result(results, attrs)#

Saves the output of a model.

Parameters:
  • results – The output of a model for the datum associated with the

  • passed. (attribute) –

  • attrs – The attributes that correspond to the outputs passed in

  • results.