Registry / ai-ml / point-cloud-utils

point-cloud-utils

JSON →
library0.34.0pypypi✓ verified 86d ago

A Python library for common tasks on 3D point clouds and meshes, including sampling, distance computation (chamfer, Hausdorff, Earth Mover's), normal estimation, mesh reconstruction, and more. Current version: 0.34.0. Released under MIT license (since v0.30.0). Active development with frequent releases.

pip install point-cloud-utils
INSTALL
IMPORT
SIG · POINT-CLOUD-UTILS
P
point-cloud-utils
ai-mlpythonv0.34.0
Install
7.7s avg
Import
266ms
Disk
270MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.34.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.7s · import 0.266s · 267MB
270MB installed
● package 270MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

point_cloud_utils
import point_cloud_utils as pcu
import point_cloud_utils
Most examples use 'pcu' alias.
chamfer_distance
from point_cloud_utils import chamfer_distance
from pcu import chamfer_distance
Should import from point_cloud_utils directly, not from the alias.

Basic usage: load mesh, compute chamfer distance, and downsample.

import point_cloud_utils as pcu import numpy as np # Load a point cloud from a PLY file verts, faces = pcu.load_mesh_vf("bunny.ply") # Compute chamfer distance between two point clouds pcd1 = np.random.randn(100, 3).astype(np.float32) pcd2 = np.random.randn(200, 3).astype(np.float32) chamfer_dist, _ = pcu.chamfer_distance(pcd1, pcd2) print("Chamfer distance:", chamfer_dist) # Downsample point cloud sampled_indices = pcu.downsample_point_cloud_uniform(pcd1, 50) sampled_pcd = pcd1[sampled_indices]
Debug
Known issues
breakingIn v0.30.0, the license changed from GPL to MIT. All GPL dependencies were removed. If you relied on any functionality that might have been dropped, check the release notes.
fix
Upgrade to latest version (>=0.30.0) and verify that all needed functions still exist.
affects: <0.30.0
deprecatedSome functions may have been renamed between versions. For example, 'voxelize_mesh' was changed in v0.30.0 to have the voxel center at origin. Existing code that expects previous behavior may produce different results.
fix
Update calls to voxelize_mesh to account for the origin shift.
affects: >=0.30.0
gotchaInput point clouds and meshes must often be float32 arrays. Using float64 may silently cause issues or performance degradation.
fix
Ensure arrays are np.float32 before passing to pcu functions.
affects: all
breakingIn v0.32.0, numpy 2.0 ABI compatibility was fixed. Older versions may crash with numpy 2.0.
fix
Upgrade to v0.32.0 or later if using numpy 2.0+.
affects: <0.32.0
Errors
Common errors & fixes
ImportError: DLL load failed while importing point_cloud_utils: The specified module could not be found.
Missing or incompatible C++ runtime libraries (e.g., Visual C++ Redistributable on Windows).
fix
Install Microsoft Visual C++ Redistributable (2015-2022) from https://aka.ms/vs/17/release/vc_redist.x64.exe.
RuntimeError: CUDA error: no kernel image is available for execution on the device
The library was compiled for a specific CUDA architecture, but the GPU does not support it.
fix
Install a version of point-cloud-utils built for your GPU architecture, or use pip install --no-binary point-cloud-utils to build from source with your CUDA setup.
AttributeError: module 'point_cloud_utils' has no attribute 'chamfer_distance'
Using an outdated version that did not have that function, or typo.
fix
Update to latest version: pip install --upgrade point-cloud-utils. Double-check the spelling: it's 'chamfer_distance'.
Upgrade
Version history
0.34.0latest on PyPI · released Apr 14, 2025
Audit
Dependencies
numpyrequiredCore operations on point clouds use numpy arrays.
scipyrequiredK-d tree, spatial queries, and interpolation.
Agent activity
8 hits · last 30 days
node
8
Resources
point-cloud-utils — pip install point-cloud-utils · libregistry