GeDi: Learning general and distinctive 3D local deep descriptors for point cloud registration - IEEE T-PAMI
Fork of GeDi. Paper (pdf)
- Windows/Linux OS
- Python: 3.9/3.10/3.11/3.12
- CPU
- CUDA: 11.8/12.1/12.4/12.6/12.8/12.9
- CUDA_ARCH: 6.0/6.1/7.5/8.6/8.9
Required: Install pixi.
To build the wheel of GeDi, you first need to choose the Python/CPU/CUDA versions with which the wheel will be built (example: "py312-cu124").
Replace PIXI_ENV placeholder in the commands below with your environment name.
Run on Windows:
pixi run -e PIXI_ENV wheel-build-windows
Run on Linux:
pixi run -e PIXI_ENV wheel-build-linux
The wheel will be created in ./Release folder.
The registration function compute_registration_matrix is structured as follows:
def compute_registration_matrix(
pcd0_points: np.ndarray,
pcd1_points: np.ndarray,
samples_per_batch: int = 500,
samples_per_patch_lrf: int = 4000,
samples_per_patch_out: int = 512,
lrf_radius: float = 0.5,
voxel_size: float = 0.01,
patches_per_pair: int = 5000,
max_correspondence_distance: float = 0.02,
edge_length_checker: float = 0.9,
distance_checker: float = 0.02,
ransac_iterations: int = 4000000,
ransac_correspondences_threshold: int = 40,
visualize: bool = False,
device: str = 'cuda'
) -> np.ndarray:
Inputs
pcd0_pointsis a NumPy array of shape [N, 3] containing the N-points of the first point cloud;pcd1_pointsis a NumPy array of shape [M, 3] containing the M-points of the second point cloud;samples_per_batchis the number of samples taken frompatches_per_pairthat are processed in a single batch; the number of batches will therefore bepatches_per_pair/samples_per_batch;samples_per_patch_lrfis the number of points to process with LRF;samples_per_patch_outis the number of points to sample for pointnet++;lrf_radiusis the radius used to compute the Local Reference Frame (LRF) for descriptor computation;voxel_sizeis the voxel size used to downsample the point clouds before registration;patches_per_pairis the number of point patches randomly sampled per point cloud to compute descriptors;max_correspondence_distanceis the maximum distance threshold for matching points during RANSAC;edge_length_checkeris the edge length similarity threshold for the RANSAC correspondence checker;distance_checkeris the distance similarity threshold for the RANSAC correspondence checker;ransac_iterationsis the maximum number of RANSAC iterations;ransac_correspondences_thresholdis the minimum number of correspondences required to consider RANSAC successful. After 3 unsuccessful attempts this threshold is lowered by 10 each cycle until Ransac becomes successful;visualize(bool) whether to visualize the clouds through Open3D visualizer;device(str) whether to use CPU (arg: 'cpu') or GPU (arg: 'cuda') to run registration. Note: Inference on CPU takes roughly 6× more time compared to GPU.
Output
- A
np.ndarray4×4 transformation matrix that alignspcd0topcd1.
The function compute_registration_matrix_from_path provides the same registration logic as compute_registration_matrix, but loads the point clouds from paths instead of receiving them as NumPy arrays:
Differences in Inputs
pcd0_pathis the file path (string) to the first point cloud;pcd1_pathis the file path (string) to the second point cloud;
All the other Inputs and the Output remain the same.
If you want to test or debug locally the registration you can run (replace PIXI_ENV placeholder with your environment tag):
pixi run -e PIXI_ENV python registration.py --pcd0 /path/to/cloud0 --pcd1 /path/to/cloud1 --visualize --device cuda
@inproceedings{Poiesi2021,
title = {Learning general and distinctive 3D local deep descriptors for point cloud registration},
author = {Poiesi, Fabio and Boscaini, Davide},
booktitle = {IEEE Trans. on Pattern Analysis and Machine Intelligence},
year = {(early access) 2022}
}