ocnn.dataset

Transform

A boilerplate class which transforms an input data for ocnn.

CollateBatch

Merge a list of octrees and points into a batch.

class Transform(depth: int, full_depth: int, distort: bool, angle: list, interval: list, scale: float, uniform: bool, jitter: float, flip: list, orient_normal: str = '', **kwargs)[source]

A boilerplate class which transforms an input data for ocnn. The input data is first converted to Points, then randomly transformed (if enabled), and converted to an Octree.

Parameters:
  • depth (int) – The octree depth.

  • full_depth (int) – The octree layers with a depth small than full_depth are forced to be full.

  • distort (bool) – If true, performs the data augmentation.

  • angle (list) – A list of 3 float values to generate random rotation angles.

  • interval (list) – A list of 3 float values to represent the interval of rotation angles.

  • scale (float) – The maximum relative scale factor.

  • uniform (bool) – If true, performs uniform scaling.

  • jitter (float) – The maximum jitter values.

  • flip (list) – A list of 3 float values to represent the probability of flipping each axis.

  • orient_normal (str) – Orient point normals along the specified axis, which is useful when normals are not oriented.

preprocess(sample: dict, idx: int)[source]

Transforms sample to Points and performs some specific transformations, like normalization.

transform(sample: dict, idx: int)[source]

Applies the general transformations provided by ocnn.

points2octree(points: Points)[source]

Converts the input points to an octree.

rnd_parameters()[source]

Generates random parameters for data augmentation.

class CollateBatch(merge_points: bool = False)[source]

Merge a list of octrees and points into a batch.