kaolin.io.modelnet

API

class kaolin.io.modelnet.ModelNet(root, categories=None, split='train')

Bases: Generic[torch.utils.data.dataset.T_co]

Dataset class for the ModelNet dataset.

The __getitem__ method will return a KaolinDatasetItem, with its data field containing a namedtuple returned by kaolin.io.off.import_mesh().

Parameters
  • root (str) – Path to the base directory of the ModelNet dataset.

  • split (str) – Split to load (‘train’ vs ‘test’, default: ‘train’).

  • categories (list) – List of categories to load. If None is provided, all categories will be loaded. (default: None).

get_attributes(index)

Returns the attributes at the given index. Attributes are usually not transformed by wrappers such as ProcessedDataset.

get_cache_key(index)
get_data(index)

Returns the data at the given index.