Mashaan blog

3D Gaussian Splatting

Acknowledgment:

I borrowed some code from gaussian-splatting-colab.

References:

@Article{kerbl3Dgaussians,
 author       = {Kerbl, Bernhard and Kopanas, Georgios and Leimk{\"u}hler, Thomas and Drettakis, George},
 title        = {3D Gaussian Splatting for Real-Time Radiance Field Rendering},
 journal      = {ACM Transactions on Graphics},
 number       = {4},
 volume       = {42},
 month        = {July},
 year         = {2023},
 url          = {https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/}
}
@article{ye2024gsplatopensourcelibrarygaussian,
 title    = {gsplat: An Open-Source Library for {Gaussian} Splatting},
 author   = {Vickie Ye and Ruilong Li and Justin Kerr and Matias Turkulainen and Brent Yi and Zhuoyang Pan and Otto Seiskari and Jianbo Ye and Jeffrey Hu and Matthew Tancik and Angjoo Kanazawa},
 year     = {2024},
 eprint   = {2409.06765},
 journal  = {arXiv preprint arXiv:2409.06765},
 archivePrefix= {arXiv},
 primaryClass = {cs.CV},
 url      = {https://arxiv.org/abs/2409.06765},
}

Gaussians in 1D, 2D, and 3D

image

image

Input to 3DGS algorithm

image

image

Forward and backward computation graphs as illustrated in Figure 4 in gsplat paper

image

source: (Ye et al., 2024)

Forward and backward passes

image

image

image

Training 3DGS

%cd /content
!git clone --recursive https://github.com/camenduru/gaussian-splatting
!pip install -q plyfile

%cd /content/gaussian-splatting
!pip install -q /content/gaussian-splatting/submodules/diff-gaussian-rasterization
!pip install -q /content/gaussian-splatting/submodules/simple-knn

!wget https://huggingface.co/camenduru/gaussian-splatting/resolve/main/tandt_db.zip
!unzip tandt_db.zip
!python train.py -s /content/gaussian-splatting/tandt/truck

Viewing 3DGS output

After training, you can find a .ply file under /content/gaussian-splatting/output/{some numbers}/point_cloud/iteration_30000/point_cloud.ply

image

Go to: https://antimatter15.com/splat/ and drag the .ply file and drop it onto the viewer.

image