kaolin.io.dataset¶
API¶
-
class
kaolin.io.dataset.
Cache
(func: Callable, cache_dir: [<class 'str'>, <class 'pathlib.Path'>], cache_key: str)¶ Bases:
object
Caches the results of a function to disk. If already cached, data is returned from disk. Otherwise, the function is executed. Output tensors are always on CPU device.
Parameters:
-
class
kaolin.io.dataset.
CombinationDataset
(datasets)¶ Bases:
torch.utils.data.dataset.Dataset
Dataset combining a list of datasets into a unified dataset object.
Useful when multiple output representations are needed from a common base representation (Eg. when a mesh is to be served as both a pointcloud and a voxelgrid, etc.)
The output of get_attributes will be a tuple of all the get_attributes of the dataset list.
The output of get_data will be a tuple of all the get_data of the dataset list.
If a dataset does not have get_data, __getitem__ will be used instead.
The output of get_cache_key will be the cache key of the first dataset. If that dataset does not provide get_cache_key, the index will be used instead.
Parameters: datasets – list or tuple of datasets -
get_attributes
(index)¶
-
get_cache_key
(index)¶
-
get_data
(index)¶
-