Skip to content

Add Scaffold-GS to methods #3623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/nerfology/methods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ The following methods are supported in nerfstudio:
BioNeRF<bionerf.md>
NeRFtoGSandBack<nerf2gs2nerf.md>
OpenNeRF<opennerf.md>
Scaffold-GS<scaffold_gs.md>
GSDF<scaffold_gs.md>
```

(own_method_docs)=
Expand Down
48 changes: 48 additions & 0 deletions docs/nerfology/methods/scaffold_gs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Scaffold-GS + GSDF

<h4>Unofficial implementations of "Scaffold-GS: Structured 3D Gaussians for View-Adaptive Rendering" and "GSDF: 3DGS Meets SDF for Improved Neural Rendering and Reconstruction"</h4>

```{button-link} https://city-super.github.io/scaffold-gs/
:color: primary
:outline:
Scaffold-GS Website
```
```{button-link} https://city-super.github.io/GSDF/
:color: primary
:outline:
GSDF Website
```
```{button-link} https://github.com/brian-xu/scaffold-gs-nerfstudio
:color: primary
:outline:
Code
```

<video id="teaser" muted autoplay playsinline loop controls width="100%">
<source id="mp4" src="https://www.brian-xu.com/content/scaffold_gs_teaser.mp4" type="video/mp4">
</video>


### Installation
Ensure that nerfstudio has been installed according to the instructions. Then run the following command:
```
pip install git+https://github.com/brian-xu/scaffold-gs-nerfstudio
```
You must also install the correct torch_scatter for your environment (https://pytorch-geometric.com/whl/torch-2.1.2%2Bcu118.html).


### Running Model

This repository creates two new Nerfstudio methods, named "scaffold-gs" and "gsdf". To train with them, run the following commands:

```bash
ns-train scaffold-gs --data [PATH]
ns-train gsdf --data [PATH]
```

GSDF also supports mesh export. Follow the guide for [exporting geometry](../../quickstart/export_geometry.md).

## Overview
Scaffold-GS replaces the Gaussian kernel described in [3D Gaussian Splatting](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) with neural Gaussians that are bound to anchor points. During rasterization, the attributes (opacity, color, scale, rotation) of these neural Gaussians are calculated with respect to the viewing direction and distance. This view-adaptive rendering improves results in challenging conditions, such as texture-less areas, insufficient observations, fine-scale details, view-dependent light effects and multi-scale observations.

GSDF is a dual-branch model that uses 3D Gaussian Splatting to supervise the training of a neural Signed Distance Field. The gaussian splatting branch provides depth maps to supervise SDF training. Once sufficiently initialized, the SDF can be used to guide the splitting and pruning of gaussians, ensuring geometric consistency and reducing floaters.
30 changes: 30 additions & 0 deletions nerfstudio/configs/external_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,36 @@ class ExternalMethod:
)
)

# Scaffold-GS
external_methods.append(
ExternalMethod(
"""[bold yellow]Scaffold-GS[/bold yellow]
For more information visit: https://docs.nerf.studio/nerfology/methods/scaffold_gs.html

To enable Scaffold-GS, you must install it first by running:
[grey]pip install git+https://github.com/brian-xu/scaffold-gs-nerfstudio"[/grey]""",
configurations=[
("scaffold-gs", "Scaffold-GS: Structured 3D Gaussians for View-Adaptive Rendering"),
],
pip_package="git+https://github.com/brian-xu/scaffold-gs-nerfstudio",
)
)

# GSDF
external_methods.append(
ExternalMethod(
"""[bold yellow]GSDF/bold yellow]
For more information visit: https://docs.nerf.studio/nerfology/methods/scaffold_gs.html

To enable GSDF, you must install it first by running:
[grey]pip install git+https://github.com/brian-xu/scaffold-gs-nerfstudio"[/grey]""",
configurations=[
("gsdf", "Scaffold-GS: GSDF: 3DGS Meets SDF for Improved Neural Rendering and Reconstruction"),
],
pip_package="git+https://github.com/brian-xu/scaffold-gs-nerfstudio",
)
)


@dataclass
class ExternalMethodDummyTrainerConfig:
Expand Down
Loading