Home

Awesome

FastMAC: Stochastic Spectral Sampling of Correspondence Graph (CVPR 2024)

Source code of FastMAC: Stochastic Spectral Sampling of Correspondence Graph

Introduction

3D correspondence, i.e., a pair of 3D points, is a fundamental concept in computer vision. A set of 3D correspondences, when equipped with compatibility edges, forms a correspondence graph. This graph is a critical component in several state-of-the-art 3D point cloud registration approaches, e.g., the one based on maximal cliques (MAC). However, its properties have not been well understood. So we present the first study that introduces graph signal processing into the domain of correspondence graph. We exploit the generalized degree signal on correspondence graph and pursue sampling strategies that preserve high-frequency components of this signal. To address time-consuming singular value decomposition in deterministic sampling, we resort to a stochastic approximate sampling strategy. As such, the core of our method is the stochastic spectral sampling of correspondence graph. As an application, we build a complete 3D registration algorithm termed as FastMAC, that reaches real-time speed while leading to little to none performance drop. Through extensive experiments, we validate that FastMAC works for both indoor and outdoor benchmarks. For example, FastMAC can accelerate MAC by 80 times while maintaining high registration success rate on KITTI.

News

Installation

Please install PyTorch first, and then install other dependencies by the following command. Code has been tested with Python 3.8.10, PyTorch 1.12.0, CUDA 11.3 and cuDNN 8302 on Ubuntu 22.04.

pip install -r requirements.txt

Finally, install MAC(3D Registration with Maximal Cliques) as instructed.

NOTE: As our PCR method is based on MAC, please install and run MAC first. Or If you only want the output sampled correspondences, then it's OK to only install our code.

Datasets

The test datasets include KITTI, 3DMatch, 3DLoMatch. Please download them from MAC(3D Registration with Maximal Cliques).

Usage

To demonstrate the reliability of our method's boosting performance for MAC, we use the original MAC as the registration module. Therefore, to run the complete pipeline, use the code we present here to downsample the input correspondences and then feed them into MAC, using the code in MAC repository. In the future we would integrate the two parts into one codebase to form a complete pipeline for practical usage.

KITTI

To run FastMAC on KITTI, please use the following command:

python sota.py

In function Config(), modify "data_dir", "filename", "gtname", "labelname" and "outpath" as the actual path you set. "ratio" refers to the downsampling ratio from 0 to 1.

NOTE: set 'thresh' to 0.999 if using FCGF descriptor, 0.9 if using FPFH descriptor.

3DMatch

To run FastMAC on 3DMatch, please use the following command:

python 3dmatch.py

In function Config(), modify "data_dir", "descriptor" as the actual path you set. The output path will be the original dataset direction for convenience to apply MAC. "ratio" refers to the downsampling ratio from 0 to 1. Set "name" to "3dmatch" to run on 3DMatch.

3DLoMatch

To run FastMAC on 3DMatch, please use the following command:

python 3dmatch.py

In function Config(), modify "data_dir", "descriptor" as the actual path you set. The output path will be the original dataset direction for convenience to apply MAC. "ratio" refers to the downsampling ratio from 0 to 1. Set "name" to "3dlomatch" to run on 3DLoMatch.

Results

KITTI

DescriptorRatio(%)RRRE(°)TE(cm)
FPFH10097.66%0.4057728.61193
FPFH5097.84%0.4103938.61099
FPFH2097.84%0.4150118.64669
FPFH1098.02%0.4472999.06907
FPFH597.12%0.4911539.64376
FPFH194.05%0.83131713.5936
DescriptorRatio(%)RRRE(°)TE(cm)
FCGF10097.12%0.3551217.99152
FCGF5097.48%0.3681488.0161
FCGF2097.30%0.3910298.45734
FCGF1096.94%0.4459499.20145
FCGF596.04%0.52536310.0375
FCGF171.89%0.99697814.8993

3DMatch

DescriptorRatio(%)RRRE(°)TE(cm)
FPFH10083.86%2.109526.79597
FPFH5082.87%2.151026.73052
FPFH2080.71%2.173696.80735
FPFH1078.87%2.282927.05551
FPFH574.49%2.29496.97654
FPFH158.04%2.449247.28792
DescriptorRatio(%)RRRE(°)TE(cm)
FCGF10093.72%2.027466.53953
FCGF5092.67%1.996116.46513
FCGF2092.30%2.02056.51827
FCGF1090.94%2.026946.52478
FCGF589.40%2.065176.75127
FCGF158.23%2.162457.10037

3DLoMatch

DescriptorRatio(%)RRRE(°)TE(cm)
FPFH10041.21%4.0513710.6133
FPFH5038.46%4.0376910.4745
FPFH2034.31%4.1182610.8244
FPFH1031.56%4.3546711.3328
FPFH527.40%4.4488311.3483
FPFH112.24%4.3964912.5056
DescriptorRatio(%)RRRE(°)TE(cm)
FCGF10060.19%3.7599610.6147
FCGF5058.23%3.8041610.8137
FCGF2055.25%3.8357510.7118
FCGF1054.35%3.9455810.9791
FCGF551.49%4.0754911.0795
FCGF137.06%4.470612.1996