Skip to content

pointcloud

Base class for point cloud datasets cached on disk under a raw/ + processed/ layout.

Classes:

  • PointCloudDataset –

    Base class for point-cloud datasets stored under a raw/ + processed/ disk layout.

PointCloudDataset

PointCloudDataset(root: PathLike)

Bases: Dataset

Base class for point-cloud datasets stored under a raw/ + processed/ disk layout.

Data for a concrete dataset lives under <root>/<name>/, with the original download in raw/ and the preprocessed cache in processed/. Subclasses implement __getitem__ / __len__ and return per-sample Dict[str, Tensor] objects keyed by DataKeys members; batching is left to the caller (see torch_pointcloud.utils.data.collate).

Note

Datasets that keep their samples in an in-memory cache return a shallow dict copy from __getitem__, so adding or replacing keys on a returned sample never mutates the cache. The tensor values still share storage with the cache: treat them as read-only and let transforms return new tensors instead of writing in place.

Parameters:

  • root (PathLike) –

    The root directory under which the dataset directory is created.

Attributes:

  • name (str) –

    Name of the dataset directory.

  • data_dir (str) –

    Path to the dataset directory <root>/<name>.

  • raw_dir (str) –

    Path to the raw download directory.

  • processed_dir (str) –

    Path to the processed cache directory.

name property

name: str

Name of the dataset directory.

data_dir property

data_dir: str

Path to the dataset directory <root>/<name>.

raw_dir property

raw_dir: str

Path to the raw download directory.

processed_dir property

processed_dir: str

Path to the processed cache directory.