# Make sure CUDA 12.1 is installed first
apt list cuda-12-1
git clone --recurse-submodules https://github.com/graphdeco-inria/gaussian-splatting
cd gaussian-splatting
# install dependencies
pip install plyfile torch pillow tqdm
# install submodules
pip install submodules/diff-gaussian-rasterization
pip install submodules/simple-knn
sudo apt install colmap # used when pre-processing the imagesDATA_DIR=data
mkdir $DATA_DIR
# copy your images into $DATA_DIR/input
python convert.py --source_path $DATA_DIR # preprocess the images (create optimization-ready Sfm data set)
python train.py -s $DATA_DIR # create thet gaussian model (the hard part). Requires around 24Gb of VRAM.
# To use less VRAM, run (replace 7000 with the iteration a bit before the one where it runs out of VRAM):
python train.py -s $DATA_DIR --test_iterations -1 --densify_until_iter 7000cd gaussian-splatting
cd SIBR_viewers
# install dependencies
sudo apt install libglew-dev libassimp-dev libboost-all-dev libgtk-3-dev libopencv-dev libglfw3-dev libavdevice-dev libavcodec-dev libeigen3-dev libxxf86vm-dev libembree-dev build-essential cmake ninja-build
# compile
export CUDACXX=/usr/local/cuda-12.1/bin/nvcc
cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release -G Ninja
cmake --build build -j24 --target installcd gaussian-splatting/SIBR_viewers/install/bin
./SIBR_gaussianViewer_app -m ../../../output/<model id>
# on a laptop with hybrid graphics, run the graphics on the gpu:
switcherooctl ./SIBR_gaussianViewer_app -m ../../../output/<model id>Move:
- W - forward
- S - back
- A - right
- D - left
- Q - down
- E - up
Turn:
- I - pitch up
- K - pitch down
- L - roll right
- J - roll left
- U - turn clockwise
- O - turn counterclockwise
Modes:
- V - toggle interp. mode (play the model as a video)
- B - toggle orbit mode
- Y - toggle trackball mode (move with mouse)
- Space - toggle snap to images