SamplePoints
¶
Bases: BaseTransform
Uniformly samples a fixed number of points on the faces of a mesh
(pos and face), with probabilities proportional to the face areas
(with mx.random).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num
|
int
|
The number of points to sample. |
required |
remove_faces
|
bool
|
If |
True
|
include_normals
|
bool
|
If |
False
|
Example:
from mlx_graphs.datasets import ModelNet
from mlx_graphs.transforms import SamplePoints
dataset = ModelNet("10", transform=SamplePoints(1024))
Source code in mlx_graphs/transforms/point_cloud.py
from mlx_graphs.transforms import SamplePoints · mlx_graphs/transforms/point_cloud.py