|
| 1 | +<div align="center"> |
| 2 | + <h1>Receding Moving Object Segmentation in 3D LiDAR Data Using Sparse 4D Convolutions</h1> |
| 3 | + <a href="https://github.com/PRBonn/4DMOS#how-to-use-it"><img src="https://img.shields.io/badge/python-3670A0?style=flat-square&logo=python&logoColor=ffdd54" /></a> |
| 4 | + <a href="https://github.com/PRBonn/4DMOS#installation"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" /></a> |
| 5 | + <a href="https://www.ipb.uni-bonn.de/pdfs/mersch2022ral.pdf"><img src="https://img.shields.io/badge/Paper-pdf-<COLOR>.svg?style=flat-square" /></a> |
| 6 | + <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a> |
| 7 | +</div> |
| 8 | + |
| 9 | + |
| 10 | +*Our moving object segmentation on the unseen SemanticKITTI test sequences 18 and 21. Red points are predicted as moving.* |
| 11 | + |
| 12 | +Please find the corresponding video [here](https://youtu.be/5aWew6caPNQ). |
| 13 | + |
| 14 | +<p align="center"> |
| 15 | + <img src="docs/introduction.png" width="600"> |
| 16 | +</p> |
| 17 | + |
| 18 | +*Given a sequence of point clouds, our method segments moving (red) from non-moving (black) points.* |
| 19 | + |
| 20 | +<p align="center"> |
| 21 | + <img src="docs/architecture.png"> |
| 22 | +</p> |
| 23 | + |
| 24 | +*We first create a sparse 4D point cloud of all points in a given receding window. We use sparse 4D convolutions from the [MinkowskiEngine](https://github.com/NVIDIA/MinkowskiEngine) to extract spatio-temporal features and predict per-points moving object scores.* |
| 25 | + |
| 26 | +## Important Update |
| 27 | +The current state of the repository is improved by internally aligning the scans using [KISS-ICP](https://github.com/PRBonn/kiss-icp). Also, the build system and pipeline are inspired from [MapMOS](https://github.com/PRBonn/MapMOS), so you can run it on most point cloud data formats. If you want to reproduce the original results from the paper, this version is tagged under `0.1`. You can checkout by |
| 28 | + |
| 29 | +```bash |
| 30 | +git checkout v0.1 |
| 31 | +``` |
| 32 | + |
| 33 | +## Installation |
| 34 | +First, make sure the [MinkowskiEngine](https://github.com/NVIDIA/MinkowskiEngine) is installed on your system, see [here](https://github.com/NVIDIA/MinkowskiEngine#installation) for more details. |
| 35 | + |
| 36 | +Next, clone our repository |
| 37 | +```bash |
| 38 | +git clone [email protected]:PRBonn/4DMOS && cd 4DMOS |
| 39 | +``` |
| 40 | + |
| 41 | +and install with |
| 42 | +```bash |
| 43 | +make install |
| 44 | +``` |
| 45 | + |
| 46 | +**or** |
| 47 | +```bash |
| 48 | +make install-all |
| 49 | +``` |
| 50 | +if you want to install the project with all optional dependencies (needed for the visualizer). In case you want to edit the Python code, install in editable mode: |
| 51 | +```bash |
| 52 | +make editable |
| 53 | +``` |
| 54 | + |
| 55 | +## How to Use It |
| 56 | +Just type |
| 57 | + |
| 58 | +```bash |
| 59 | +mos4d_pipeline --help |
| 60 | +``` |
| 61 | +to see how to run 4DMOS. |
| 62 | + |
| 63 | +Check the [Download](#downloads) section for a pre-trained model. Like [KISS-ICP](https://github.com/PRBonn/kiss-icp), our pipeline runs on a variety of point cloud data formats like `bin`, `pcd`, `ply`, `xyz`, `rosbags`, and more. To visualize these, just type |
| 64 | + |
| 65 | +```bash |
| 66 | +mos4d_pipeline --visualize /path/to/weights.ckpt /path/to/data |
| 67 | +``` |
| 68 | + |
| 69 | +<details> |
| 70 | +<summary>Want to evaluate with ground truth labels?</summary> |
| 71 | + |
| 72 | +Because these labels come in all shapes, you need to specify a dataloader. This is currently available for SemanticKITTI, NuScenes, HeLiMOS, and our labeled KITTI Tracking sequence 19 and Apollo sequences (see [Downloads](#downloads)). |
| 73 | + |
| 74 | +</details> |
| 75 | + |
| 76 | +## Training |
| 77 | +To train our approach, you need to first cache your data. To see how to do that, just `cd` into the `4DMOS` repository and type |
| 78 | + |
| 79 | +```bash |
| 80 | +python3 scripts/precache.py --help |
| 81 | +``` |
| 82 | + |
| 83 | +After this, you can run the training script. Again, `--help` shows you how: |
| 84 | +```bash |
| 85 | +python3 scripts/train.py --help |
| 86 | +``` |
| 87 | + |
| 88 | +<details> |
| 89 | +<summary>Want to verify the cached data?</summary> |
| 90 | + |
| 91 | +You can inspect the cached training samples by using the script `python3 scripts/cache_to_ply.py --help`. |
| 92 | + |
| 93 | +</details> |
| 94 | + |
| 95 | +<details> |
| 96 | +<summary>Want to change the logging directory?</summary> |
| 97 | + |
| 98 | +The training log and checkpoints will be saved by default to the current working directory. To change that, export the `export LOGS=/your/path/to/logs` environment variable before running the training script. |
| 99 | + |
| 100 | +</details> |
| 101 | + |
| 102 | +## HeLiMOS |
| 103 | +To train on the HeLiMOS data with different sensor configurations, use the following commands: |
| 104 | + |
| 105 | +```shell |
| 106 | +python3 scripts/precache.py /path/to/HeLiMOS helimos /path/to/cache --config config/helimos/*_training.yaml |
| 107 | +python3 scripts/train.py /path/to/HeLiMOS helimos /path/to/cache --config config/helimos/*_training.yaml |
| 108 | +``` |
| 109 | + |
| 110 | +by replacing the paths and the config file names. To evaluate for example on the Velodyne test data, run |
| 111 | + |
| 112 | +```shell |
| 113 | +mos4d_pipeline /path/to/weights.ckpt /path/to/HeLiMOS --dataloader helimos -s Velodyne/test.txt |
| 114 | +``` |
| 115 | + |
| 116 | +## Evaluation and Visualization |
| 117 | +We use the [SemanticKITTI API](https://github.com/PRBonn/semantic-kitti-api) to evaluate the intersection-over-union (IOU) of the moving class as well as to visualize the predictions. Clone the repository in your workspace, install the dependencies and then run the following command to visualize your predictions for e.g. sequence 8: |
| 118 | + |
| 119 | +``` |
| 120 | +cd semantic-kitti-api |
| 121 | +./visualize_mos.py --sequence 8 --dataset /path/to/dataset --predictions /path/to/4DMOS/predictions/ID/POSES/labels/STRATEGY/ |
| 122 | +``` |
| 123 | + |
| 124 | +## Benchmark |
| 125 | +To submit the results to the LiDAR-MOS benchmark, please follow the instructions [here](https://competitions.codalab.org/competitions/28894). |
| 126 | + |
| 127 | +## Downloads |
| 128 | +<p align="center"> |
| 129 | + <img src="docs/table.png" width="600"> |
| 130 | +</p> |
| 131 | + |
| 132 | +* [Model [A]: 5 scans @ 0.1s](https://www.ipb.uni-bonn.de/html/projects/4DMOS/5_scans.zip) |
| 133 | +* [Model [B]: 5 scans @ 0.2s](https://www.ipb.uni-bonn.de/html/projects/4DMOS/5_scans_dt_0p2.zip) |
| 134 | +* [Model [C]: 5 scans @ 0.3s](https://www.ipb.uni-bonn.de/html/projects/4DMOS/5_scans_dt_0p3.zip) |
| 135 | +* [Model [D]: 5 scans, no poses](https://www.ipb.uni-bonn.de/html/projects/4DMOS/5_scans_no_poses.zip) |
| 136 | +* [Model [E]: 5 scans input, 1 scan output](https://www.ipb.uni-bonn.de/html/projects/4DMOS/5_scans_single_output.zip) |
| 137 | +* [Model [F]: 2 scans](https://www.ipb.uni-bonn.de/html/projects/4DMOS/2_scans.zip) |
| 138 | +* [Model [G]: 10 scans](https://www.ipb.uni-bonn.de/html/projects/4DMOS/10_scans.zip) |
| 139 | + |
| 140 | +## Publication |
| 141 | +If you use our code in your academic work, please cite the corresponding [paper](https://www.ipb.uni-bonn.de/pdfs/mersch2022ral.pdf): |
| 142 | + |
| 143 | +```bibtex |
| 144 | +@article{mersch2022ral, |
| 145 | +author = {B. Mersch and X. Chen and I. Vizzo and L. Nunes and J. Behley and C. Stachniss}, |
| 146 | +title = {{Receding Moving Object Segmentation in 3D LiDAR Data Using Sparse 4D Convolutions}}, |
| 147 | +journal={IEEE Robotics and Automation Letters (RA-L)}, |
| 148 | +year = 2022, |
| 149 | +volume = {7}, |
| 150 | +number = {3}, |
| 151 | +pages = {7503--7510}, |
| 152 | + codeurl = {https://github.com/PRBonn/4DMOS}, |
| 153 | +} |
| 154 | +``` |
| 155 | + |
| 156 | +## Acknowledgments |
| 157 | +This implementation is heavily inspired by [KISS-ICP](https://github.com/PRBonn/kiss-icp). |
| 158 | + |
| 159 | +## License |
| 160 | +This project is free software made available under the MIT License. For details see the LICENSE file. |
0 commit comments