An open API service indexing awesome lists of open source software.

https://github.com/prs-eth/dynamic-lidar-resimulation

[CVPR 2024, highlight] Dynamic LiDAR Re-simulation using Compositional Neural Fields
https://github.com/prs-eth/dynamic-lidar-resimulation

Last synced: over 1 year ago
JSON representation

[CVPR 2024, highlight] Dynamic LiDAR Re-simulation using Compositional Neural Fields

Awesome Lists containing this project

README

          

## Dynamic LiDAR Re-simulation using Compositional Neural Fields
This repository represents the official implementation of the paper:

### [Dynamic LiDAR Re-simulation using Compositional Neural Fields](https://arxiv.org/abs/2312.05247)

[Hanfeng Wu1,2](https://www.linkedin.com/in/hanfeng-wu-089602203/), [Xingxing Zuo2](https://xingxingzuo.github.io/), [Stefan Leutenegger2](https://www.professoren.tum.de/leutenegger-stefan), [Or Litany3](https://orlitany.github.io/), [Konrad Schindler1](https://prs.igp.ethz.ch/group/people/person-detail.schindler.html), [Shengyu Huang1](https://shengyuh.github.io) \
1 ETH Zurich | 2 Technical University of Munich | 3 Technion | 4 NVIDIA

## Introduction
This code consists of two parts. The folder `DyNFL` contains our nerfstudio-based DyNFL implementation. The folder `WaymoPreprocessing` contains the preprocessing scripts to generate dataset used for training and evaluation.

## Enrionment setup
This code has been tested on
- Python 3.10.10, PyTorch 1.13.1, CUDA 11.6, Nerfstudio 0.3.4, GeForce RTX 3090/GeForce GTX 1080Ti

To create a conda environment and install the required dependences, please run:
```shell
conda create -n "dynfl" python=3.10.10
conda activate dynfl
```
Then install nerfstudio from [official guidelines](https://docs.nerf.studio/quickstart/installation.html) in your conda environment.

After intalling nerfstudio, install DyNFL and required packages as follows:
```
git clone git@github.com:prs-eth/DyNFL-Dynamic-LiDAR-Re-simulation-using-Compositional-Neural-Fields.git
cd DyNFL
pip install -e .

pip install NFLStudio/ChamferDistancePytorch/chamfer3D/
pip install NFLStudio/raymarching/
```

## Prepare Datasets
Please refer to [WaymoPreprocessing](./WaymoPreprocessing).

## Training
After generating the datasets, please run
```shell
ns-train NFLStudio --pipeline.datamanager.dataparser-config.context_name --pipeline.datamanager.dataparser-config.root_dir --experiment_name
```
You can set the batch-size in [NFLDataManagerConfig](./DyNFL/NFLStudio/datamanager.py) or pass it as arguments along with the `ns-train` command
## Evaluation and visulization
After training, a folder containing weights will be saved in your working folder as `outputs//NFLStudio//nerfstudio_models`

### Quantitative results
In order to get quantitative results, please uncomment in [tester](./DyNFL/NFLStudio/tester.py)
```
# pipeline.get_numbers() # get numbers of the LiDARs
```
and run
```
cd NFLStudio
python tester.py --context_name --model_dir
```

for example
```
python tester.py --context_name "1083056852838271990_4080_000_4100_000" --model_dir "outputs//NFLStudio//nerfstudio_modelss"
```

### Reproduce our results
We provide you the pretrained model weights of 4 Waymo Dynamic scenes to reproduce our results, the weights are avaliable [here](https://mega.nz/file/R7N3nRJT#R_avxijtzFYtxyEM_ExxSHH8AiQdA2gE8-AGxmHaxtg). Unpack the pretrained weights under `DyNFL/NFLStudio/`
and run

```
cd NFLStudio
bash test.sh
```

### Visulization
To visulize the results, uncomment in [tester](./DyNFL/NFLStudio/tester.py)
```
# pipeline.get_pcd(context_name) # get pcd to display
```
and run
```
cd NFLStudio
python tester.py --context_name --model_dir
```

After that, you will have a folder in `NFLStudio` called `pcd_out`.

replace the `dir` and `context_name` with `path/to/pcd_out` and in [NFLStudio/render_full_lidar_inputs.py](./DyNFL/NFLStudio/render_full_lidar_inputs.py)

and run
```
cd NFLStudio
python render_full_lidar_inputs.py
```
It will generate two windows like follows:
![vis](figs/vis.png)
## Citation
```bibtex
@inproceedings{Wu2023dynfl,
title={Dynamic LiDAR Re-simulation using Compositional Neural Fields},
author={Wu, Hanfeng and Zuo, Xingxing and Leutenegger, Stefan and Litany, Or and Schindler, Konrad and Huang, Shengyu},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2024},
}
```
## Acknowledgement
We use the nerfstudio framework in this project, we thank the contributors for their open-sourcing and maintenance of the work.