cloudViewer.ml.torch.datasets.ShapeNet#
- class cloudViewer.ml.torch.datasets.ShapeNet(dataset_path, name='ShapeNet', class_weights=[2690, 76, 55, 1824, 3746, 69, 787, 392, 1546, 445, 202, 184, 275, 66, 152, 5266], ignored_label_inds=[], test_result_folder='./test', task='classification', **kwargs)[source]#
This class is used to create a dataset based on the ShapeNet dataset, and used in object detection, visualizer, training, or testing.
The ShapeNet dataset includes a large set of 3D shapes.
- __init__(dataset_path, name='ShapeNet', class_weights=[2690, 76, 55, 1824, 3746, 69, 787, 392, 1546, 445, 202, 184, 275, 66, 152, 5266], ignored_label_inds=[], test_result_folder='./test', task='classification', **kwargs)[source]#
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 (ShapeNet in this case).
class_weights – The class weights to use in the dataset.
ignored_label_inds – A list of labels that should be ignored in the dataset.
test_result_folder – The folder where the test results should be stored.
task – The task that identifies the purpose. The valid values are classification and segmentation.
- Returns:
The corresponding class.
- Return type:
class
- static get_label_to_names(task='classification')[source]#
Returns a label to names dictonary object depending on the task. The valid values for task for classification and segmentation.
- Returns:
A dict where keys are label numbers and values are the corresponding names.
- get_split(split)[source]#
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)[source]#
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'. –