duytranus/point-cloud-registration
1
Point Cloud Registration Demo
Interactive Gradio application for pairwise point cloud registration using Open3D and 3DMatch RedKitchen fragments.
Features
- Demo Pairs: Pre-selected point cloud pairs from 3DMatch RedKitchen dataset
- Upload Mode: Register your own point clouds
- Multiple Algorithms:
- RANSAC + ICP (global + local)
- RANSAC only (global)
- ICP only (local)
- Hyperparameter Control: Voxel size, normal radius, FPFH radius, RANSAC iterations, ICP iterations
- Visualization: Before/after 3D point clouds with colors
- Metrics: Fitness, RMSE, transformation matrix
- Download: Save aligned source point cloud
Usage
Run Locally
pip install -r requirements.txt
python app.pyThen open http://localhost:7860 in your browser.
Data Source
3DMatch Geometric Registration Benchmark - RedKitchen Scene
- Fragment dataset: Point clouds integrated from 50 depth frames using TSDF fusion
- Evaluation files: Ground-truth transformation matrices
- Reference: https://3dmatch.cs.princeton.edu/
Pipeline
- Load source and target point clouds
- Preprocess: Remove non-finite points, remove duplicates, voxel downsample
- Features: Estimate normals, compute FPFH descriptors
- Global Registration: RANSAC-based feature matching
- Local Registration: ICP refinement
- Visualization: Before/after 3D views with metrics
Project Structure
├── app.py # Main Gradio application
├── requirements.txt # Python dependencies
├── packages.txt # System dependencies
├── README.md # This file
│
├── scripts/
│ ├── inspect_3dmatch.py # Inspect dataset structure
│ ├── build_pair_index.py # Parse evaluation logs
│ ├── benchmark_pairs.py # Benchmark pairs with Open3D
│ └── prepare_demo_pairs.py # Prepare examples for demo
│
├── examples/
│ ├── pair_metadata.json # Demo pair metadata
│ ├── redkitchen_pair_01_source.ply
│ ├── redkitchen_pair_01_target.ply
│ └── ...
│
└── data/
├── raw/3dmatch/ # (local only, not pushed)
└── processed/ # (local only, not pushed)Development
Prepare Data Locally
# Download and unzip
mkdir -p data/raw/3dmatch
cd data/raw/3dmatch
wget https://3dvision.princeton.edu/projects/2016/3DMatch/downloads/fragments/7-scenes-redkitchen.zip
wget https://3dvision.princeton.edu/projects/2016/3DMatch/downloads/fragments/7-scenes-redkitchen-evaluation.zip
unzip -q 7-scenes-redkitchen.zip
unzip -q 7-scenes-redkitchen-evaluation.zip
cd ../../..
# Inspect
python scripts/inspect_3dmatch.py
# Build index
python scripts/build_pair_index.py
# Benchmark
python scripts/benchmark_pairs.py
# Prepare examples
python scripts/prepare_demo_pairs.pyNotes
- Point clouds are stored using Git LFS (.gitattributes configured)
- Raw dataset and processed data are not pushed to repository
- Demo pairs are downsampled for performance (typically 30k-60k points)
