Yahao Shi1
Yanmin Wu2
Chenming Wu3
Xing Liu3
Chen Zhao3
Haocheng Feng3
Jian Zhang2
Bin Zhou1
Errui Ding3
Jingdong Wang3
1 Beihang University, 2 Peking University, 3 Baidu VIS
[Prerelease] Official implementation of "GIR: 3D Gaussian Inverse Rendering for Relightable Scene Factorization".
The installation of GIR is similar to 3D Gaussian Splatting.
# Clone the Repository
git clone https://github.com/guduxiaolang/GIR.git
# Create the environment
conda create -n gir python=3.7
conda activate gir
# Install the dependencies
pip install -r requirements.txt
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
pip install -e submodules/diff-gaussian-rasterization
pip install -e submodules/simple-knn
pip install -e submodules/envlight
pip install tqdm plyfile
# Load HDR images correctly
pip install imageio[full]
The files are as follows:
Blender Dataset
[DATA_ROOT]
|---test
| |---<image 0>
| |---<image 1>
| |---...
|---train
| |---<image 0>
| |---<image 1>
| |---...
|---transforms_test.json
|---transforms_train.json
COLMAP Dataset
[DATA_ROOT]
|---images
| |---<image 0>
| |---<image 1>
| |---...
|---sparse
|---0
|---cameras.bin
|---images.bin
|---points3D.bin
The training and evaluation commands for each dataset are provided in the shell scripts located in the scripts folder.
The basic training and testing commands are shown below.
# training
python train.py -s $data_dir --eval --port $port_num --random_background --hdr_rotation
# rendering
python render.py -m $model_dir --skip_train --save_name "render" -w --hdr_rotation
# relighting
python render.py -m $model_dir --skip_train --save_name ${hdr_list_name%.*} -w --hdr_rotation --environment_texture $hdr_dir --render_relight
We are quite grateful for 3DGS, NeRO, and Filament