I borrowed some code from gaussian-splatting-colab.
@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},
}
Given camera positions and sparsely scattered 3D points:
We initialize 3D gaussians centered at each one of these 3D points. The optimization process involves:
Forward and backward computation graphs as illustrated in Figure 4 in gsplat
paper:
source: (Ye et al., 2024)
%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
After training, you can find a .ply
file under /content/gaussian-splatting/output/{some numbers}/point_cloud/iteration_30000/point_cloud.ply
Go to: https://antimatter15.com/splat/ and drag the .ply
file and drop it onto the viewer.