Shreyas Singh, Aryan Garg, Kaushik Mitra (* indicates equal contribution)
Webpage | arXiv
Abstract: The recent advent of 3D Gaussian Splatting (3DGS) has revolutionized the 3D scene reconstruction space enabling high-fidelity novel view synthesis in real-time. However, with the exception of RawNeRF, all prior 3DGS and NeRF-based methods rely on 8-bit tone-mapped Low Dynamic Range (LDR) images for scene reconstruction. Such methods struggle to achieve accurate reconstructions in scenes that require a higher dynamic range. Examples include scenes captured in nighttime or poorly lit indoor spaces having a low signal-to-noise ratio, as well as daylight scenes with shadow regions exhibiting extreme contrast. Our proposed method HDRSplat tailors 3DGS to train directly on 14-bit linear raw images in near darkness which preserves the scenes' full dynamic range and content. Our key contributions are two-fold: Firstly, we propose a linear HDR space-suited loss that effectively extracts scene information from noisy dark regions and nearly saturated bright regions simultaneously, while also handling view-dependent colors without increasing the degree of spherical harmonics. Secondly, through careful rasterization tuning, we implicitly overcome the heavy reliance and sensitivity of 3DGS on point cloud initialization. This is critical for accurate reconstruction in regions of low texture, high depth of field, and low illumination. HDRSplat is the fastest method to date that does 14-bit (HDR) 3D scene reconstruction in ≤15 minutes/scene (∼30x faster than prior state-of-the-art RawNeRF). It also boasts the fastest inference speed at ≥120fps. We further demonstrate the applicability of our HDR scene reconstruction by showcasing various applications like synthetic defocus, dense depth map extraction, and post-capture control of exposure, tone-mapping and view-point.
@article{singh24_hdrsplat,
author = {Singh, Shreyas and Garg, Aryan and Mitra, Kaushik},
title = {HDRSplat: Gaussian Splatting for High Dynamic Range 3D Scene Reconstruction from Raw Images},
journal = {BMVC},
year = {2024},
}
}
# SSH
git clone git@github.com:graphdeco-inria/gaussian-splatting.git
or
# HTTPS
git clone https://github.com/graphdeco-inria/gaussian-splatting
The codebase has 3 main components:
The code has been developed on Ubuntu 20.02 Please note that this process assumes that you have CUDA SDK 11 installed, not 12.
Our default, provided install method is based on Conda package and environment management:
conda env create --file environment.yml
conda activate gaussian_splatting
To set-up the differentiable rasterization and simple-knn modules run
cd submodules/simple-knn
pip install -e .
cd ../diff-gaussian-rasterization
pip install -e .
HDRSplat uses the RawNeRF dataset introduced by Mildenhall.et.al. The dataset can be downloaded from their website. The directory structure should look like this.
<location>
|---scene1
|---raw
| |---<raw image 0>
| |---<raw image metadata 0>
| |---<raw image 1>
| |---<raw image metadata 1>
| |---...
|---images
| |---<image 0>
| |---<image 1>
| |---...
|---sparse
|---0
|---cameras.bin
|---images.bin
|---points3D.bin
|---scene2
|---....
1. To proccess your own dataset, or generate a HDRSplat style dataset from RawNeRF dataset follow these steps:
To undistort the dataset (ie: convert to a simple pinhole type camera model) Follow the instructions at:
https://colmap.github.io/cli.html
To create a train test split for a scene using random sampling, run
python create_train_test_split.py <path to COLMAP dataset scene> --test_percentage 15
To demosaic and then denoise the images using PMRID and save them to disk, run
python generate_denoised_images.py --scene_path <path to COLMAP dataset>
this will create a sub-folder called denoised in the scene folder with the following structure.
<location>
|---raw
|---images
|---sparse
|---denoised
|---PMRID_raw
| |---<Demosaiced & Denoised raw image 0>
| |---<Demosaiced & Denoised raw image 1>
| |---...
|---PMRID
| |---<Demosaiced & Denoised raw image converted to 8 bit LDR 0>
| |---<Demosaiced & Denoised raw image converted to 8 bit LDR 1>
| |---...
|---demosaiced_raw
| |---<Demosaiced raw image 0>
| |---<Demosaiced raw image 1>
| |---...
|---demosaiced
| |---<Demosaiced raw image converted to 8 bit LDR 0>
| |---<Demosaiced raw image converted to 8 bit LDR 1>
| |---...
|---metadata
| |---<metadata for raw image 0>
| |---<metadata for raw image 1>
| |---...
The follwing folder contains the Demosaied Bayer raw images and PMRID denoised images and their corresponding LDR versions (converted using our minimalistic pipeline for visualization). The PMRID denoised images are used to train our HDRSplat model and the simply demosaiced images are used to train our RAw3DGS baseline. The script additionally also generates a metadata.ply file for each view in the scene. The follwing 5 metadata values are essential for our end to end pipeline:
ISO,
Exposure
BlackLevel
WhiteLevel
Cam2RGB
Or
2. Directly download our processed dataset from Link, and skip straight to the training and evaluation stage!
To train our HDRSplat model
bash ./scripts/run_hdrsplat.sh
To train the RAw3DGS baseline model (3DGS trained directly with RawNeRF loss, w/o PMRID denoising), run
bash ./scripts/run_raw3DGS.sh
To train the LDR3DGS baseline model (3DGS directly trained on 8-bit LDR images), run
bash ./scripts/run_ldr3DGS.sh
NOTE: Before running the scripts please edit the follwing variables in the script:
NOTE The script trains renders and evaluates the models all in one go!
To independently render a checkpoint for a scene, run
python render.py -m <path to trained model> # Generate renderings
To independently evalauate a checkpointfor a scene, run
python metrics.py -m <path to trained model> # Compute error metrics on renderings
To render and evalaute the models presented by us in the paper for benchmarking:
Download our trained checkpoints:
i. HDRSplat
ii. Raw3DGS (Baseline)
iii. LDR3DGS (Baseline)
Run the following scripts in order
python render.py -m <path to trained model> # Generate renderings
python metrics.py -m <path to trained model> # Compute error metrics on renderings
The authors of this paper wish to express their gratitude to the following works for their significant contributions to the field, which have greatly enabled and inspired our research.
There's a lot of excellent work that was introduced around the same time as ours.
HDR-GS also introduces HDR space 3D reconstructions.
LE3D uses a color-MLP explicitly unlike ours to represent RAW color space.