kaolin.io.shrec¶
API¶
- class kaolin.io.shrec.SHREC16(root, categories=None, split='train', transform=None, output_dict=False)¶
Bases:
Dataset
Dataset class for SHREC16, used for the “Large-scale 3D shape retrieval from ShapeNet Core55” contest at Eurographics 2016. More details about the challenge and the dataset are available here.
The __getitem__ method will return:
if output_dict=True: a dictionary with the following key-value pairs:
‘mesh’: containing a
kaolin.rep.SurfaceMesh
returned bykaolin.io.obj.import_mesh()
.‘name’: the model name (i.e the subfolder name)
‘path’: the full path to the .off
‘synset’: the synset associated to the category
‘labels’: the labels associated to the category (see
synset_to_labels
)
if output_dict=False (deprecated): a
KaolinDatasetItem
with the fields:data
: containing akaolin.rep.SurfaceMesh
returned bykaolin.io.obj.import_mesh()
.attributes
: containing a dictionary with the following key-value pairs:‘name’: the model name (i.e the subfolder name)
‘path’: the full path to the .off
‘synset’: the synset associated to the category
‘labels’: the labels associated to the category (see
synset_to_labels
)
Deprecated since version 0.13.0: output_dict=False is deprecated. Datasets should always output a dictionary to be compatible with
ProcessedDataset
.- Parameters
root (str) – Path to the root directory of the dataset.
categories (list) – List of categories to load (each class is specified as a string, and must be a valid SHREC16 category). If this argument is not specified, all categories are loaded by default.
split (str) – String to indicate what split to load, among [“train”, “val”, “test”]. Default: “train”.
transform (Callable) – A function/transform that takes in a dictionary or
KaolinDatasetItem
and returns a transformed version.output_dict (bool) – If True, __getitem__ output a dictionary, else
KaolinDatasetItem
(deprecated) Default: False.
- get_attributes(index)¶
- get_cache_key(index)¶
- get_data(index)¶