• Stars
    star
    443
  • Rank 98,504 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 2 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŒŸ SHINE-Mapping: Large-Scale 3D Mapping Using Sparse Hierarchical Implicit Neural Representations (ICRA 2023)

โœจ SHINE-Mapping: Large-Scale 3D Mapping Using Sparse Hierarchical Implicit Neural Representations

Xingguang Zhong* ยท Yue Pan* ยท Jens Behley ยท Cyrill Stachniss

University of Bonn

(* Equal Contribution)

Arxiv | Paper | Video

Incremental Mapping Reconstruction Results
shine_incremental.mp4
shine_reconresult.mp4
Table of Contents
  1. Abstract
  2. Installation
  3. Prepare data
  4. How to run
  5. Evaluation
  6. Tips
  7. Citation
  8. Contact
  9. Acknowledgment

Abstract

Accurate mapping of large-scale environments is an essential building block of most outdoor autonomous systems. Challenges of traditional mapping methods include the balance between memory consumption and mapping accuracy. This paper addresses the problems of achieving large-scale 3D reconstructions with implicit representations using 3D LiDAR measurements. We learn and store implicit features through an octree-based hierarchical structure, which is sparse and extensible. The features can be turned into signed distance values through a shallow neural network. We leverage binary cross entropy loss to optimize the local features with the 3D measurements as supervision. Based on our implicit representation, we design an incremental mapping system with regularization to tackle the issue of catastrophic forgetting in continual learning. Our experiments show that our 3D reconstructions are more accurate, complete, and memory-efficient than current state-of-the-art 3D mapping methods.


Installation

1. Clone SHINE Mapping repository

git clone [email protected]:PRBonn/SHINE_mapping.git
cd SHINE_mapping

2. Set up conda environment

conda create --name shine python=3.7
conda activate shine

3. Install the key requirement kaolin

Kaolin depends on Pytorch (>= 1.8, <= 1.13.1), please install the corresponding Pytorch for your CUDA version (can be checked by nvcc --version). You can find the installation commands here.

For example, for CUDA version >=11.6, you can use:

pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116

Kaolin now supports installation with wheels. For example, to install kaolin 0.12.0 over torch 1.12.1 and cuda 11.6:

pip install kaolin==0.12.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.1_cu116.html
[Or you can build kaolin by yourself (click to expand)]

Follow the instructions to install kaolin. Firstly, clone kaolin to a local directory:

git clone --recursive https://github.com/NVIDIAGameWorks/kaolin
cd kaolin

Then install kaolin by:

python setup.py develop

Use python -c "import kaolin; print(kaolin.__version__)" to check if kaolin is successfully installed.

4. Install the other requirements

pip install open3d scikit-image wandb tqdm natsort 

Prepare data

Generally speaking, you only need to provide:

  1. pc_path : the folder containing the point cloud (.bin, .ply or .pcd format) for each frame.
  2. pose_path : the pose file (.txt) containing the transformation matrix of each frame.
  3. calib_path : the calib file (.txt) containing the static transformation between sensor and body frames (optional, would be identity matrix if set as '').

They all follow the KITTI odometry data format.

After preparing the data, you need to correctly set the data path (pc_path, pose_path and calib_path) in the config files under config folder. You may also set a path output_root to store the experiment results and logs.

Here, we provide the link to several publicly available datasets for testing SHINE Mapping:

MaiCity synthetic LiDAR dataset

Download the dataset from here or use the following script to download (3.4GB):

sh ./scripts/download_maicity.sh

KITTI real-world LiDAR dataset

Download the full dataset from here.

If you want to use an example part of the dataset (seq 00) for the test, you can use the following script to download (117 MB):

sh ./scripts/download_kitti_example.sh

Newer College real-world LiDAR dataset

Download the full dataset from here.

If you want to use an example part of the dataset (Quad) for the test, you can use the following script to download (634 MB):

sh ./scripts/download_ncd_example.sh

RGB-D datasets

SHINE Mapping also supports the mapping on RGB-D datasets. You may first try the synthetic dataset from NeuralRGB-D. You can download the full dataset from here or use the following script to download (7.25 GB).

sh ./scripts/download_neural_rgbd_data.sh

After downloading the data, you need to convert the dataset to the KITTI format by using for each sequence:

sh ./scripts/convert_rgbd_to_kitti_format.sh

Mapping without ground truth pose

[Details (click to expand)]

Our method is currently a mapping-with-known-pose system. If you do not have the ground truth pose file, you may use a LiDAR odometry system such as KISS-ICP to easily estimate the pose.

You can simply install KISS-ICP by:

pip install kiss-icp

And then run KISS-ICP with your data path pc_path

kiss_icp_pipeline <pc_path>

The estimated pose file can be found in ./results/latest/velodyne.txt. You can directly use it as your pose_path. In this case, you do not need a calib file, so just set calib_path: "" in the config file.


Run

We take the MaiCity dataset as an example to show how SHINE Mapping works. You can simply replace maicity with your dataset name in the config file path, such as ./config/[dataset]/[dataset]_[xxx].yaml.

The results will be stored with your experiment name with the starting timestamp in the output_root directory as what you set in the config file. You can find the reconstructed mesh (*.ply format) and optimized model in mesh and model folder, respectively. If the save_map option is turned on, then you can find the grid sdf map in map folder.

For mapping based on offline batch processing, use:

python shine_batch.py ./config/maicity/maicity_batch.yaml
[Expected results (click to expand)]
maicity_shine_batch_20cm.mp4

For incremental mapping with a regularization strategy, use:

python shine_incre.py ./config/maicity/maicity_incre_reg.yaml

An interactive visualizer would pop up if you set o3d_vis_on: True (by default) in the config file. You can press space to pause and resume.

[Expected results (click to expand)]

For the sake of efficiency, we sacrifice a bit of mapping quality to use a 50cm leaf voxel size for the feature octree.

maicity_shine_incre_reg_50cm.mp4

For incremental mapping with replay strategy (within a local bounding box), use:

python shine_incre.py ./config/maicity/maicity_incre_replay.yaml
[Expected results (click to expand)]

For the sake of efficiency, we sacrifice a bit mapping quality to use a 50cm leaf voxel size for the feature octree here.

maicity_shine_incre_replay_50cm.mp4
[Expected results on other datasets (click to expand)]

KITTI

Newer College

Apollo

Wild Place Forests

IPB Office

Replica

ICL Living Room

The logs can be monitored via Weights & Bias online if you turn the wandb_vis_on option on. If it's your first time to use Weights & Bias, you would be requested to register and login to your wandb account.

Evaluation

To evaluate the reconstruction quality, you need to provide the (reference) ground truth point cloud and your reconstructed mesh. The ground truth point cloud can be found (or sampled from) the downloaded folder of MaiCity, Newer College and Neural RGBD datasets.

Please change the data path and evaluation set-up in ./eval/evaluator.py and then run:

python ./eval/evaluator.py

to get the reconstruction metrics such as Chamfer distance, completeness, F-score, etc.

As mentioned in the paper, we also compute a fairer accuracy metric using the ground truth point cloud masked by the intersection of the reconstructed meshes of all the compared methods. To generate such masked ground truth point clouds, you can configure the data path in ./eval/crop_intersection.py and then run it.

Tips

[Details (click to expand)]
  1. You can play with different loss functions for SHINE Mapping. With the ray_loss: False option, the loss would be calculated from the sdf at each sample point. In this case, you can then select from sdf_bce (the proposed method), sdf_l1 and sdf_l2 loss as the main_loss_type. With the ray_loss: True option, the loss would be calculated from each ray containing multiple point samples as a depth rendering procedure. In this case, you can select from dr and dr_neus as the main_loss_type. According to our experiments, using our proposed sdf_bce loss can achieve the best reconstruction efficiently. We can get a decent reconstruction of a scene with several hundred frames in just one minute. Additionally, you can use the ekional_loss_on option to turn on/off the Ekional loss and use weight_e as its weight.

  2. The feature octree is built mainly according to leaf_vox_size, tree_level_world and tree_level_feat. leaf_vox_size represents the size of the leaf voxel size in meter. tree_level_world and tree_level_feat represent the total tree level and the tree levels with latent feature codes, respectively. tree_level_world should be large enough to guarantee all the map data lies inside the cube with the size leaf_vox_size**(tree_level_world+1).

  3. SHINE Mapping supports both offline batch mapping and incremental sequential mapping. For incremental mapping, one can either load a fixed pre-trained decoder from the batching mapping on a similar dataset (set load_model: True) or train the decoder for freeze_after_frame frames on-the-fly and then freeze it afterwards (set load_model: False). The first option would lead to better mapping performance.

  4. You can use the mc_vis_level parameter to have a trade-off between the scene completion and the exact measurement accuracy. This parameter indicates at which level of the octree the marching cubes reconstruction would be conducted. The larger the value of mc_vis_level (but not larger than tree_level_feat), the more scene completion ability you would gain (but also some artifacts such as a double wall may appear). And with the small value, SHINE mapping would only reconstruct the part with actual measurements without filling the holes. The safest way to avoid the holes on the ground is to set mc_mask_on: False to disable the masking for marching cubes. By turning on the mc_with_octree option, you can achieve a faster marching cubes reconstruction only in the region within the octree nodes.

  5. The incremental mapping with regularization strategy (setting continual_learning_reg: True) can achieve incremental neural mapping without storing an ever-growing data pool which would be a burden for the memory. The coefficient lambda_forget needs to be fine-tuned under different feature octree and point sampling settings. The recommended value is from 1e5 to 1e8. A pre-trained decoder is also recommended to be loaded during incremental mapping with regularization for better performance.

  6. We also provide an option to conduct incremental mapping with a replay strategy in a local sliding window. You can turn this on by setting window_replay_on: True with a valid window_radius_m indicating the size of the sliding window.

  7. It's also possible to incorporate semantic information in our SHINE-Mapping framework. You may set semantic_on = True in the utils/config.py file to enable semantic mapping and also provide semantic supervision by setting the label_path in the config file.


Citation

If you use SHINE Mapping for any academic work, please cite our original paper.

@inproceedings{zhong2023icra,
  title={SHINE-Mapping: Large-Scale 3D Mapping Using Sparse Hierarchical Implicit NEural Representations},
  author={Zhong, Xingguang and Pan, Yue and Behley, Jens and Stachniss, Cyrill},
  booktitle = {Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)},
  year={2023}
}

Contact

If you have any questions, please contact:

Acknowledgment

This work has partially been funded by the European Unionโ€™s HORIZON programme under grant agreement No 101070405 (DigiForest) and grant agreement No 101017008 (Harmony).

Additionally, we thank greatly for the authors of the following opensource projects:

  • NGLOD (octree based hierarchical feature structure built based on kaolin)
  • VDBFusion (comparison baseline)
  • Voxblox (comparison baseline)
  • Puma (comparison baseline and the MaiCity dataset)
  • KISS-ICP (simple yet effective pose estimation)

More Repositories

1

kiss-icp

A LiDAR odometry pipeline that just works
Python
1,479
star
2

depth_clustering

๐Ÿš• Fast and robust clustering of point clouds generated with a Velodyne sensor.
C++
1,105
star
3

lidar-bonnetal

Semantic and Instance Segmentation of LiDAR point clouds for autonomous driving
Python
912
star
4

semantic_suma

SuMa++: Efficient LiDAR-based Semantic SLAM (Chen et al IROS 2019)
C++
902
star
5

semantic-kitti-api

SemanticKITTI API for visualizing dataset, processing data, and evaluating results.
Python
762
star
6

OverlapNet

OverlapNet - Loop Closing for 3D LiDAR-based SLAM (chen2020rss)
Python
649
star
7

LiDAR-MOS

(LMNet) Moving Object Segmentation in 3D LiDAR Data: A Learning-based Approach Exploiting Sequential Data (RAL/IROS 2021)
Python
574
star
8

vdbfusion

C++/Python Sparse Volumetric TSDF Fusion
C++
456
star
9

puma

Poisson Surface Reconstruction for LiDAR Odometry and Mapping
Python
400
star
10

PIN_SLAM

๐Ÿ“PIN-SLAM: LiDAR SLAM Using a Point-Based Implicit Neural Representation for Achieving Global Map Consistency [TRO' 24]
Python
341
star
11

bonnet

Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics.
Python
323
star
12

range-mcl

Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps (chen2021icra)
Python
278
star
13

overlap_localization

chen2020iros: Learning an Overlap-based Observation Model for 3D LiDAR Localization.
Python
270
star
14

rangenet_lib

Inference module for RangeNet++ (milioto2019iros, chen2019iros)
C++
238
star
15

refusion

ReFusion: 3D Reconstruction in Dynamic Environments for RGB-D Cameras Exploiting Residuals
C++
235
star
16

bonnetal

Bonnet and then some! Deep Learning Framework for various Image Recognition Tasks. Photogrammetry and Robotics Lab, University of Bonn
Python
226
star
17

4DMOS

Receding Moving Object Segmentation in 3D LiDAR Data Using Sparse 4D Convolutions (RAL 2022)
Python
201
star
18

MapClosures

Effectively Detecting Loop Closures using Point Cloud Density Maps
Python
196
star
19

LiDiff

[CVPR'24] Scaling Diffusion Models to Real-World 3D LiDAR Scene Completion
Python
194
star
20

visual-crop-row-navigation

This is a visual-servoing based robot navigation framework tailored for navigating in row-crop fields. It uses the images from two on-board cameras and exploits the regular crop-row structure present in the fields for navigation, without performing explicit localization or mapping. It allows the robot to follow the crop-rows accurately and handles the switch to the next row seamlessly within the same framework.
C++
178
star
21

pole-localization

Online Range Image-based Pole Extractor for Long-term LiDAR Localization in Urban Environments
Python
167
star
22

online_place_recognition

Graph-based image sequences matching for the visual place recognition in changing environments.
C++
150
star
23

agribot

The mission of the project is to build an agricultural robot (AgriBot) from scratch with the aim of serving as a data-recording platform in fields. For further information about the design and purpose of the robot, please follow the About the AgriBot Project page
C++
143
star
24

LocNDF

LocNDF: Neural Distance Field Mapping for Robot Localization
Python
136
star
25

4dNDF

3D LiDAR Mapping in Dynamic Environments using a 4D Implicit Neural Representation (CVPR 2024)
Python
131
star
26

make_it_dense

Make it Dense: Self-Supervised Geometric Scan Completion of Sparse 3D LiDAR Scans in Large Outdoor Environments
Python
127
star
27

point-cloud-prediction

Self-supervised Point Cloud Prediction Using 3D Spatio-temporal Convolutional Networks
Python
125
star
28

ir-mcl

IR-MCL: Implicit Representation-Based Online Global Localization https://arxiv.org/abs/2210.03113
Python
120
star
29

MutiverseOdometry

Code for Simple But Effective Redundant Odometry for Autonomous Vehicles
C++
111
star
30

vpr_relocalization

The framework for visual place recognition in changing enviroments. Matches two sequence of images of arbitrary trajectory overlap.
C++
107
star
31

TARL

[CVPR'23] TARL: Temporal Consistent 3D LiDAR Representation Learning for Semantic Perception in Autonomous Driving
Python
99
star
32

lidar-visualizer

A LiDAR visualization tool for all your datasets
Python
96
star
33

deep-point-map-compression

Python
95
star
34

segcontrast

Python
92
star
35

auto-mos

Automatic Labeling to Generate Training Data for Online LiDAR-based Moving Object Segmentation
Python
91
star
36

3DUIS

Python
80
star
37

lidar_transfer

Code for Langer et al. "Domain Transfer for Semantic Segmentation of LiDAR Data using Deep Neural Networks", IROS, 2020.
Python
70
star
38

descriptor-dr

[ICRA 2023] Learning-Based Dimensionality Reduction for Computing Compact and Effective Local Feature Descriptors
Python
61
star
39

hsmcl

C++
60
star
40

SIMP

Python
59
star
41

ContMAV

[CVPR2024] Open-world Semantic Segmentation Including Class Similarity
Python
59
star
42

extrinsic_calibration

Motion Based Multi-Sensor Extrinsic Calibration
Python
57
star
43

vdbfusion_ros

ROS1 Wrapper for VDBFusion https://github.com/PRBonn/vdbfusion
C++
57
star
44

DCPCR

DCPCR: Deep Compressed Point Cloud Registration in Large-Scale Outdoor Environments
Python
55
star
45

HortiMapping

๐Ÿซ‘ Panoptic Mapping with Fruit Completion and Pose Estimation for Horticultural Robots (IROS' 23)
Python
53
star
46

fast_change_detection

Fast Image-Based Geometric Change Detection Given a 3D Model
C++
44
star
47

contrastive_association

Contrastive Instance Association for 4D Panoptic Segmentation using Sequences of 3D LiDAR Scans
Python
43
star
48

retriever

Point Cloud-based Place Recognition in Compressed Map
Python
40
star
49

4d_plant_registration

Python
38
star
50

tmcl

Text Guided MCL
C++
34
star
51

dynamic-point-removal

Static Map Generation from 3D LiDAR Point Clouds Exploiting Ground Segmentation
Python
34
star
52

MaskPLS

Mask-Based Panoptic LiDAR Segmentation for Autonomous Driving, RA-L, 2023
Python
32
star
53

manifold_python

Python bindings for https://github.com/hjwdzh/Manifold
C++
30
star
54

PS-res-excite

Python
26
star
55

kppr

KPPR: Exploiting Momentum Contrast for Point Cloud-Based Place Recognition
Python
26
star
56

goPro-meta

App to sample images from goPro Hero 5 video and syncronize sensor frames to them. Output is yaml file and extracted images.
C++
25
star
57

geometrical_stem_detection

Code for fast and accurate geometrical plant stem detection
C++
24
star
58

PartiallyObservedInverseGames.jl

An inverse game solver for inferring objectives from noise-corrupted partial state observations of non-cooperative multi-agent interactions.
Julia
23
star
59

pybonirob

Set of tools to access bonirob datasets in Python
Python
23
star
60

phenobench-baselines

Baselines of the PhenoBench Dataset
Python
20
star
61

voxblox_pybind

Python bindings for the Voxblox library
C++
20
star
62

catkin_tools_fetch

๐Ÿ• "fetch" and "update" dependencies of projects in your catkin workspace with a new verb "dependencies" for catkin_tools
Python
16
star
63

nuscenes2kitti

Python
16
star
64

StyleGenForLabels

StyleGAN-based generation of labels for crop-weed segmentation
Python
12
star
65

plants_temporal_matcher

This system can perform 3D point-to-point associations between plants' point clouds acquired in different session even in presence of highly repetitive structures and drastic changes.
Python
12
star
66

ipb_homework_checker

โœ”๏ธ A generic homework checker that we use to automatically check students homework
Python
11
star
67

leaf_mesher

Precise 3D Reconstruction of Plants from UAV Imagery Combining Bundle Adjustment and Template Matching
9
star
68

HAPT

Python
9
star
69

sigf

Image Matching for Crop Fields Using Similarity Invariant Geometric Feature
MATLAB
8
star
70

DG-CWS

Towards Domain Generalization in Crop and Weed Segmentation for Precision Farming Robots
Python
7
star
71

agri-pretraining

Python
7
star
72

leaf-plant-instance-segmentation

In-Field Phenotyping Based on Crop Leaf and Plant Instance Segmentation
Python
5
star
73

MinkowskiPanoptic

Panoptic segmentation baseline implemented based on the MinkowskiEngine library
Python
5
star
74

Unsupervised-Pre-Training-for-3D-Leaf-Instance-Segmentation

Official repository of Unsupervised Pre-Training for 3D Leaf Instance Segmentation by Roggiolani et al.
Python
5
star
75

vdb_to_numpy

Tool to convert VDB grids to numpy arrays.
Jupyter Notebook
4
star
76

g2o_catkin

:octocat: G2O meets catkin
CMake
3
star
77

ipb_workspace

An empty default workspace for development inside IPB lab
3
star
78

plant_pcd_segmenter

High Precision Leaf Instance Segmentation for Phenotyping in Point Clouds Obtained Under Real Field Conditions
2
star
79

cinderella-geometric-animations

Animations of geometric properties relevant to Photogrammetry, Computer Vision and Robotics created with Cinderella
HTML
1
star