scomup / EasyGaussianSplatting

MIT License
106 stars 6 forks source link

Easy Gaussian Splatting

What is this?

For learning purposes, we offer an unofficial implementation of 3D Gaussian Splatting for Real-Time Radiance Field Rendering. Additionally, we provide a set of tools and documentation to facilitate the study of 3D Gaussian Splatting.

Why this name?

We want our implementation to be easy to use, the code to be easy to read, and the documentation to be easy to understand. Therefore, we named our project "EasyGaussianSplatting".

Overview

Requirements

pip3 install -r requirements.txt
pip3 install gsplatcu/.

Rendering

Given camera information, render 3D Gaussian data onto the 2D image.

The TRAINED_FILE is the .ply file generated by the official Gaussian Splatting, or the .npy file generated by our train.py.

CPU version

python3 forward_cpu.py --gs='THE_PATH_OF_YOUR_TRAINED_FILE'

GPU version.

python3 forward_gpu.py --gs='THE_PATH_OF_YOUR_TRAINED_FILE'

forward demo

Training

Download the T&T+DB COLMAP datasets. T&T+DB COLMAP (650MB)

python3 train.py --path='THE_PATH_OF_DATASET'

3D Gaussian Viewer

A efficient 3D Gaussian splatting viewer for showing 3D Gaussian data.

Press the keyboard key [M] to open the settings window. You will find more fun functions there.

python3 gaussian_viewer.py --gs='THE_PATH_OF_YOUR_TRAINED_FILE'

Our viewer supports checking your dataset.

python3 gaussian_viewer.py --path='THE_PATH_OF_DATASET'

Spherical harmonics demo

A demo showing how spherical harmonics work.

python3 sh_demo.py

sh demo "The ground truth Earth image is modified from URL. By Solar System Scope. Licensed under CC-BY-4.0"

Verify the backward process

Verify all computation processes of backward using numerical differentiation.

python3 backward_cpu.py
python3 backward_gpu.py