open3d.ml.torch.datasets.S3DIS¶
-
class
open3d.ml.torch.datasets.
S3DIS
(dataset_path, name='S3DIS', task='segmentation', cache_dir='./logs/cache', use_cache=False, class_weights=[3370714, 2856755, 4919229, 318158, 375640, 478001, 974733, 650464, 791496, 88727, 1284130, 229758, 2272837], num_points=40960, test_area_idx=3, ignored_label_inds=[], ignored_objects=['wall', 'floor', 'ceiling', 'beam', 'column', 'clutter'], test_result_folder='./test', **kwargs)¶ This class is used to create a dataset based on the S3DIS (Stanford Large-Scale 3D Indoor Spaces) dataset, and used in visualizer, training, or testing.
The S3DIS dataset is best used to train models for building indoors.
-
__init__
(dataset_path, name='S3DIS', task='segmentation', cache_dir='./logs/cache', use_cache=False, class_weights=[3370714, 2856755, 4919229, 318158, 375640, 478001, 974733, 650464, 791496, 88727, 1284130, 229758, 2272837], num_points=40960, test_area_idx=3, ignored_label_inds=[], ignored_objects=['wall', 'floor', 'ceiling', 'beam', 'column', 'clutter'], 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 (S3DIS in this case).
task – One of {segmentation, detection} for semantic segmentation and object detection.
cache_dir – The directory where the cache is stored.
use_cache – Indicates if the dataset should be cached.
class_weights – The class weights to use in the dataset.
num_points – The maximum number of points to use when splitting the dataset.
test_area_idx – The area to use for testing. The valid values are 1 through 6.
ignored_label_inds – A list of labels that should be ignored in the dataset.
ignored_objects – Ignored objects
test_result_folder – The folder where the test results should be stored.
-
static
create_ply_files
(dataset_path, class_names)¶
-
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.
-
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)¶
-
is_tested
(attr)¶ Checks whether a datum has been tested.
- Parameters
attr – The attributes associated with the datum.
- Returns
This returns True if the test result has been stored for the datum with the specified attribute; else returns False.
-
static
read_bboxes
(bboxes, ignored_objects)¶
-
save_test_result
(results, attr)¶ Saves the output of a model.
- Parameters
results – The output of a model for the datum associated with the attribute passed.
attr – The attributes that correspond to the outputs passed in results.
-