Skip to content

[WACV'25] Uni-SLAM: Uncertainty-Aware Neural Implicit SLAM for Real-Time Dense Indoor Scene Reconstruction

License

Notifications You must be signed in to change notification settings

dfki-av/Uni-SLAM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uni-SLAM:

Uncertainty-Aware Neural Implicit SLAM for Real-Time Dense Indoor Scene Reconstruction

Shaoxiang Wang, Yaxu Xie, Chun-Peng Chang, Christen Millerdurai, Alain Pagani, Didier Stricker
WACV 2025

Logo


Installation

Please set up the project by following the instructions below.

git clone [email protected]:dfki-av/Uni-SLAM.git
cd Uni-SLAM
# Create conda environment
conda create -n unislam python=3.8
conda activate unislam

# Install the appropriate version of PyTorch based on your CUDA version. (tiny-cuda-nn has strict version requirements.)
# https://pytorch.org/get-started/previous-versions/
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117

# Install all the dependencies via pip
pip install -r requirements.txt

### Following only if you can not install tiny-cuda-nn in requirements.txt ###
# Build tinycudann 
git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
cd tiny-cuda-nn

# (Optional) Reset to a stable version. Try this version if the latest one doesn’t work
# git reset --hard 91ee479d275d322a65726435040fc20b56b9c991

cd bindings/torch
python setup.py install

Run

Replica

Download the data as below and the data is saved into the ./Datasets/Replica folder.

bash scripts/download_replica.sh

and you can run unislam:

python -W ignore run.py configs/Replica/room0.yaml

The mesh for evaluation is saved as $OUTPUT_FOLDER/mesh/final_mesh_eval_rec_culled.ply, where the unseen and occluded regions are culled using all frames.

ScanNet

Please follow the data downloading procedure on ScanNet website, and extract color/depth frames from the .sens file using this code.

Once the data is downloaded and set up properly, you can run unislam:

python -W ignore run.py configs/ScanNet/scene0000.yaml

The final mesh is saved as $OUTPUT_FOLDER/mesh/final_mesh_culled.ply.

TUM RGB-D

Download the data as below and the data is saved into the ./Datasets/TUM folder.

bash scripts/download_tum.sh

and you can run unislam:

python -W ignore run.py configs/TUM_RGBD/freiburg1_desk.yaml

The final mesh is saved as $OUTPUT_FOLDER/mesh/final_mesh_culled.ply.

Evaluation

Average Trajectory Error

To evaluate the average trajectory error. Run the command below with the corresponding config file:

# An example for room0 of Replica
python src/tools/eval_ate.py configs/Replica/room0.yaml

Uncertainty bar and activated mapping bar are also visualized here.

Reconstruction Error

To evaluate the reconstruction error, first download the ground truth Replica meshes. Those meshes are already culled by cull_mesh.py accoding to gt camera pose, to remove unseen and occluded area.

bash scripts/download_replica_mesh.sh

Then run the command below. The 2D metric requires rendering of 100 depth images, which will take some time. Use -2d to enable 2D metric. Use -3d to enable 3D metric. To evaluate the accuracy of the reconstructed mesh, you can measure the completion ratio under different distance thresholds (e.g., 1 cm, 3 cm, 5 cm, etc.).

# An example for room0 of Replica
OUTPUT_FOLDER=output/Replica/room0
GT_MESH=Datasets/Replica/cull_replica_mesh/room0_mesh_culled.ply
python src/tools/eval_recon.py --rec_mesh $OUTPUT_FOLDER/mesh/final_mesh_eval_rec_culled.ply --gt_mesh $GT_MESH -2d -3d

Visualizing UNISLAM Results

For visualizing the results, we recommend to set mesh_freq: 50 in configs/UNISLAM.yaml and run unislam from scratch.

After unislam is trained, run the following command for visualization.

python visualizer.py configs/Replica/room0.yaml --output output/Replica/room0 --top_view --save_rendering

The green trajectory indicates the ground truth trajectory, and the red one is the trajectory of unislam.

Note: mesh_freq: 50 means extracting a mesh every 50 input frames. Since extracting a mesh with a high resolution (e.g., 1 cm). takes some time, for faster running of unislam for visualization set meshing resolution in configs/Replica/replica.yaml to a higher value before running unislam (e.g., 5 cm).

Related Repositories

We would like to extend our gratitude to the authors of ESLAM and NICE-SLAM for their exceptional work. Their code served as a valuable foundation for our own project, and we are appreciative of the effort they put into their work.

Contact

You can contact the author through email: [email protected].

Citing

If you find our work useful, please consider citing:

@inproceedings{wang2025uni,
      title={Uni-slam: Uncertainty-aware neural implicit slam for real-time dense indoor scene reconstruction},
      author={Wang, Shaoxiang and Xie, Yaxu and Chang, Chun-Peng and Millerdurai, Christen and Pagani, Alain and Stricker, Didier},
      booktitle={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
      pages={2228--2239},
      year={2025},
      organization={IEEE}
    }

Acknowledgement

This research has been partially funded by the EU projects CORTEX2 (GA Nr 101070192) and FLUENTLY (GA Nr 101058680).

About

[WACV'25] Uni-SLAM: Uncertainty-Aware Neural Implicit SLAM for Real-Time Dense Indoor Scene Reconstruction

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published