Install PointDSC via Conda
masterTo set up the PointDSC environment, use the provided environment.yml file with conda.
conda env create -f environment.yml
conda activate pointdscrepository·master·Indexed 42 days ago
https://github.com/xuyangbai/pointdscA PyTorch implementation of a deep neural network for robust 3D point cloud registration. PointDSC explicitly incorporates spatial consistency to prune outlier correspondences. It supports registration using FPFH, FCGF, and D3Feat descriptors and provides training and evaluation scripts for the 3DMatch, KITTI, and 3DLoMatch benchmarks.
To set up the PointDSC environment, use the provided environment.yml file with conda.
conda env create -f environment.yml
conda activate pointdscRun the training script:
python train_KITTI.pyRun the evaluation script. Replace [exp_id] with your snapshot folder name:
python evaluation/test_KITTI.py --chosen_snapshot [exp_id] --use_icp FalseTo test traditional outlier rejection baselines, use baseline_scripts/baseline_KITTI.py.
python train_KITTI.py
python evaluation/test_KITTI.py --chosen_snapshot [exp_id] --use_icp FalseTo run multiway registration experiments, you must first download the Augmented_ICL dataset from the official website. The files must be organized into a specific directory structure where each scene (e.g., livingroom1-simulated) contains color and depth subdirectories containing .png files, accompanied by a trajectory file (e.g., livingroom1-traj.txt) in the parent directory.
├── livingroom1-simulated
│ ├── color
│ │ └── *.png
│ └── depth
│ └── *.png
├── livingroom1-traj.txt
├── livingroom2-simulated
│ ├── color
│ └── depth
├── livingroom2-traj.txt
├── office1-simulated
│ ├── color
│ └── depth
├── office1-traj.txt
├── office2-simulated
│ ├── color
│ └── depth
└── office2-traj.txtRun the training script:
python train_3dmatch.pyTraining configurations can be modified in config.py.
Run the evaluation script. Replace [exp_id] with your snapshot folder name (e.g., PointDSC_3DMatch_release):
python evaluation/test_3DMatch.py --chosen_snapshot [exp_id] --use_icp FalseResults are saved in logs/. To test traditional outlier rejection baselines, use baseline_scripts/baseline_3DMatch.py.
python train_3dmatch.py
python evaluation/test_3DMatch.py --chosen_snapshot [exp_id] --use_icp FalseIf you intend to use FCGF as the 3D local descriptor, you must perform additional installation steps:
To use the 3DMatch dataset, ensure your data folder follows this structure:
.
├── fragments
│ ├── 7-scene-redkitechen/
│ ├── sun3d-home_at-home_at_scan1_2013_jan_1/
│ └── ...
├── gt_result
│ ├── 7-scene-redkitechen-evaluation/
│ ├── sun3d-home_at-home_at_scan1_2013_jan_1-evaluation/
│ └── ...
├── threedmatch
│ ├── *.npz
│ └── *.txt To reduce training time, pre-compute 3D local descriptors (FCGF or FPFH) using the provided scripts so that input correspondences can be built via NN search during training:
misc/cal_fcgf.pymisc/cal_fpfh.pyExecute the multiway registration test using the test_multi_ate.py script. You must specify a --chosen_snapshot to indicate which model snapshot to use. Upon completion, the script saves and visualizes the combined point cloud.
python multiway/test_multi_ate.py --chosen_snapshot [snapshot]Local descriptors are computed for the generated .ply files to create putative correspondences for the network.
python misc/cal_fpfh.py.python misc/cal_fcgf.py.Note: If using FCGF, you must first download the pre-trained weights from this link.
python misc/cal_fpfh.py
# python misc/cal_fcgf.pyUse the make_fragments.py script to convert RGB-D sequences into point cloud fragments. You must provide a JSON configuration file for the specific scene. The resulting .ply files will be stored in a fragments/ directory within the scene's path.
python multiway/make_fragments.py redwood_simulated/livingroom1-simulated.jsonTo evaluate PointDSC on the 3DLoMatch benchmark, use the following command. If using the predator descriptor, you must first follow the official OverlapPredator instructions to extract features.
python evaluation/test_3DLoMatch.py --chosen_snapshot [exp_id] --descriptor [fcgf/predator] --num_points 5000You can run a demo to extract dense FPFH descriptors for two point clouds and register them using PointDSC. The demo uses files in the demo_data folder.
Note on Models:
Note on Descriptors:
python demo_registration.py --chosen_snapshot [PointDSC_3DMatch_release/PointDSC_KITTI_release] --descriptor [fcgf/fpfh]