diff --git a/README.md b/README.md index 7382036..442fdff 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,15 @@ This code implements a renderer for the reconstructions obtained with [3D Gaussian Splatting](/~https://github.com/graphdeco-inria/gaussian-splatting) +[👉 Click to run the web demo 👈](https://keksboter.github.io/web-splat/demo.html) + ## Build Clone the repository and run -``` -cargo build --release --bin viewer +```bash +cargo build --release --bin viewer + ``` ## Run @@ -20,6 +23,12 @@ Use the `point_cloud.ply` and `cameras.json` files generated by [3D Gaussian Spl cargo run --release --bin viewer point_cloud.ply cameras.json ``` +To load [compressed npz files](/~https://github.com/KeKsBoTer/c3dgs) the `npz` feature must be enabled: + +``` +cargo run --release --features npz --bin viewer point_cloud.npz cameras.json +``` +
Usage 3D Gaussian Splatting Viewer @@ -27,29 +36,15 @@ cargo run --release --bin viewer point_cloud.ply cameras.json Usage: viewer [OPTIONS] [SCENE] Arguments: - Input ply file - [SCENE] Scene json file + Input file + [SCENE] Scene json file Options: - --max-sh-deg maximum allowed Spherical Harmonics (SH) degree [default: 3] - --sh-dtype datatype used for SH coefficients [default: byte] [possible values: float, half, byte] - --no-vsync - -h, --help Print help - -V, --version Print version - + --no-vsync + -h, --help Print help + -V, --version Print version
- -## Controls - -Use the mouse and WASD + Shift + Space to navigate the camera. - -If a scene (`cameras.json`) file is provided: - -- The keys 0-9 can be used to select the views 0-9 -- Pressing the `R` key will select a random view -- Next/Previous view can be selected with Page Up/Down -- `N` snaps to nearest view -- `T` starts the tracking shot that visits the test views +king shot that visits the test views ## About @@ -58,7 +53,16 @@ If a scene (`cameras.json`) file is provided: **Performance**: The renderer reaches >200 FPS on a `NVIDIA 3090 RTX` and ~130 FPS on a `AMD Radeon R9 380 Series` (8 years old). Measurements where taken for the bonsai scene at 1200x799 resolution. -## TODO -- better camera controls -- make it work in the browser +## Citation +If you find our work useful, please cite: +``` +@misc{niedermayr2023compressed, + title={Compressed 3D Gaussian Splatting for Accelerated Novel View Synthesis}, + author={Simon Niedermayr and Josef Stumpfegger and Rüdiger Westermann}, + year={2023}, + eprint={2401.02436}, + archivePrefix={arXiv}, + primaryClass={cs.CV} +} +``` diff --git a/public/demo.html b/public/demo.html new file mode 100644 index 0000000..701f3b9 --- /dev/null +++ b/public/demo.html @@ -0,0 +1,610 @@ + + + + + + Web-Splat - Demo Scenes + + + + + + + + + + + + + +
+
+
+

Web-Splat - Demo Scenes

+

Scenes compressed with Compressed 3D Gaussian Splatting for Accelerated Novel View Synthesis

+
+ + + + + +
+
+ + + diff --git a/public/static/css/style.css b/public/static/css/style.css new file mode 100644 index 0000000..9180499 --- /dev/null +++ b/public/static/css/style.css @@ -0,0 +1,22 @@ +@import "https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css"; +@import "https://cdn.jsdelivr.net/npm/bulma-carousel@4.0.24/dist/css/bulma-carousel.min.css"; + +.demo-card { + min-width: 200px; + min-width: 300px; + flex-grow: 0; +} + +.demo-card .card-image img { + height: 200px; + object-fit: cover; + +} + +.demo-card .card { + transition: box-shadow .2s; +} + +.demo-card .card:hover { + box-shadow: 0 .5em 1em -.125em rgba(10, 10, 10, .3); +} \ No newline at end of file diff --git a/public/static/img/examples/bicycle.jpg b/public/static/img/examples/bicycle.jpg new file mode 100644 index 0000000..a709fc1 Binary files /dev/null and b/public/static/img/examples/bicycle.jpg differ diff --git a/public/static/img/examples/bonsai.jpg b/public/static/img/examples/bonsai.jpg new file mode 100644 index 0000000..5d2059b Binary files /dev/null and b/public/static/img/examples/bonsai.jpg differ diff --git a/public/static/img/examples/chair.jpg b/public/static/img/examples/chair.jpg new file mode 100644 index 0000000..b310c4a Binary files /dev/null and b/public/static/img/examples/chair.jpg differ diff --git a/public/static/img/examples/counter.jpg b/public/static/img/examples/counter.jpg new file mode 100644 index 0000000..f45b287 Binary files /dev/null and b/public/static/img/examples/counter.jpg differ diff --git a/public/static/img/examples/drjohnson.jpg b/public/static/img/examples/drjohnson.jpg new file mode 100644 index 0000000..4b4662e Binary files /dev/null and b/public/static/img/examples/drjohnson.jpg differ diff --git a/public/static/img/examples/drums.jpg b/public/static/img/examples/drums.jpg new file mode 100644 index 0000000..86bcf20 Binary files /dev/null and b/public/static/img/examples/drums.jpg differ diff --git a/public/static/img/examples/ficus.jpg b/public/static/img/examples/ficus.jpg new file mode 100644 index 0000000..ebcd83c Binary files /dev/null and b/public/static/img/examples/ficus.jpg differ diff --git a/public/static/img/examples/flowers.jpg b/public/static/img/examples/flowers.jpg new file mode 100644 index 0000000..f1bdf83 Binary files /dev/null and b/public/static/img/examples/flowers.jpg differ diff --git a/public/static/img/examples/garden.jpg b/public/static/img/examples/garden.jpg new file mode 100644 index 0000000..4f2e1d3 Binary files /dev/null and b/public/static/img/examples/garden.jpg differ diff --git a/public/static/img/examples/hotdog.jpg b/public/static/img/examples/hotdog.jpg new file mode 100644 index 0000000..fe9a7ee Binary files /dev/null and b/public/static/img/examples/hotdog.jpg differ diff --git a/public/static/img/examples/kitchen.jpg b/public/static/img/examples/kitchen.jpg new file mode 100644 index 0000000..ee076dc Binary files /dev/null and b/public/static/img/examples/kitchen.jpg differ diff --git a/public/static/img/examples/lego.jpg b/public/static/img/examples/lego.jpg new file mode 100644 index 0000000..139a0a9 Binary files /dev/null and b/public/static/img/examples/lego.jpg differ diff --git a/public/static/img/examples/materials.jpg b/public/static/img/examples/materials.jpg new file mode 100644 index 0000000..6adc19e Binary files /dev/null and b/public/static/img/examples/materials.jpg differ diff --git a/public/static/img/examples/mic.jpg b/public/static/img/examples/mic.jpg new file mode 100644 index 0000000..9d26948 Binary files /dev/null and b/public/static/img/examples/mic.jpg differ diff --git a/public/static/img/examples/playroom.jpg b/public/static/img/examples/playroom.jpg new file mode 100644 index 0000000..1585496 Binary files /dev/null and b/public/static/img/examples/playroom.jpg differ diff --git a/public/static/img/examples/room.jpg b/public/static/img/examples/room.jpg new file mode 100644 index 0000000..cce817c Binary files /dev/null and b/public/static/img/examples/room.jpg differ diff --git a/public/static/img/examples/ship.jpg b/public/static/img/examples/ship.jpg new file mode 100644 index 0000000..f907850 Binary files /dev/null and b/public/static/img/examples/ship.jpg differ diff --git a/public/static/img/examples/stump.jpg b/public/static/img/examples/stump.jpg new file mode 100644 index 0000000..cdd0d5f Binary files /dev/null and b/public/static/img/examples/stump.jpg differ diff --git a/public/static/img/examples/train.jpg b/public/static/img/examples/train.jpg new file mode 100644 index 0000000..4f36548 Binary files /dev/null and b/public/static/img/examples/train.jpg differ diff --git a/public/static/img/examples/treehill.jpg b/public/static/img/examples/treehill.jpg new file mode 100644 index 0000000..f17c451 Binary files /dev/null and b/public/static/img/examples/treehill.jpg differ diff --git a/public/static/img/examples/truck.jpg b/public/static/img/examples/truck.jpg new file mode 100644 index 0000000..f8d71f1 Binary files /dev/null and b/public/static/img/examples/truck.jpg differ