From 1b4b682bceb9c0e81441768d1af959c33e2ac1ea Mon Sep 17 00:00:00 2001 From: Ling Jing <111032642+Jing1Ling@users.noreply.github.com> Date: Tue, 13 Feb 2024 06:10:14 +0800 Subject: [PATCH] add zipnerf-pytorch as external method (#2850) * add zipnerf-pytorch as external method --- docs/index.md | 1 + docs/nerfology/methods/index.md | 1 + docs/nerfology/methods/zipnerf.md | 33 ++++++++++++++++++++++++++ nerfstudio/configs/external_methods.py | 16 +++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 docs/nerfology/methods/zipnerf.md diff --git a/docs/index.md b/docs/index.md index 685dc635e..fcb62c644 100644 --- a/docs/index.md +++ b/docs/index.md @@ -156,6 +156,7 @@ This documentation is organized into 3 parts: - [Instruct-GS2GS](nerfology/methods/igs2gs.md): Editing 3DGS Scenes with Instructions - [PyNeRF](nerfology/methods/pynerf.md): Pyramidal Neural Radiance Fields - [SeaThru-NeRF](nerfology/methods/seathru_nerf.md): Neural Radiance Field for subsea scenes +- [Zip-NeRF](nerfology/methods/zipnerf.md): Anti-Aliased Grid-Based Neural Radiance Fields **Eager to contribute a method?** We'd love to see you use nerfstudio in implementing new (or even existing) methods! Please view our {ref}`guide` for more details about how to add to this list! diff --git a/docs/nerfology/methods/index.md b/docs/nerfology/methods/index.md index d29477221..5284b6887 100644 --- a/docs/nerfology/methods/index.md +++ b/docs/nerfology/methods/index.md @@ -42,6 +42,7 @@ The following methods are supported in nerfstudio: Instruct-GS2GS PyNeRF SeaThru-NeRF + Zip-NeRF ``` (own_method_docs)= diff --git a/docs/nerfology/methods/zipnerf.md b/docs/nerfology/methods/zipnerf.md new file mode 100644 index 000000000..f435eabb3 --- /dev/null +++ b/docs/nerfology/methods/zipnerf.md @@ -0,0 +1,33 @@ +# Zip-NeRF + +

A pytorch implementation of "Zip-NeRF: Anti-Aliased Grid-Based Neural Radiance Fields"

+ +```{button-link} https://jonbarron.info/zipnerf/ +:color: primary +:outline: +Paper Website +``` +```{button-link} https://github.com/SuLvXiangXin/zipnerf-pytorch +:color: primary +:outline: +Code +``` +### Installation +First, install nerfstudio and its dependencies. Then run: +``` +pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch#subdirectory=extensions/cuda +pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch +``` +Finally, install torch_scatter corresponding to your cuda version(https://pytorch-geometric.com/whl/torch-2.0.1%2Bcu118.html). + + +### Running Model + +```bash +ns-train zipnerf --data {DATA_DIR/SCENE} +``` + +## Overview +Zipnerf combines mip-NeRF 360’s overall framework with iNGP’s featurization approach. +Following mip-NeRF, zipnerf assume each pixel corresponds to a cone. Given an interval along the ray, it construct a set of multisamples that approximate the shape of that conical frustum. +Also, it present an alternative loss that, unlike mip-NeRF 360’s interlevel loss, is continuous and smooth with respect to distance along the ray to prevent z-aliasing. \ No newline at end of file diff --git a/nerfstudio/configs/external_methods.py b/nerfstudio/configs/external_methods.py index 7dbae661f..a0982f098 100644 --- a/nerfstudio/configs/external_methods.py +++ b/nerfstudio/configs/external_methods.py @@ -192,6 +192,22 @@ To enable Seathru-NeRF, you must install it first by running: ) ) +# Zip-NeRF +external_methods.append( + ExternalMethod( + """[bold yellow]Zip-NeRF[/bold yellow] +For more information visit https://docs.nerf.studio/nerfology/methods/zipnerf.html + +To enable Zip-NeRF, you must install it first by running: + [grey]pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch#subdirectory=extensions/cuda + and pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch[/grey]""", + configurations=[ + ("zipnerf", "A pytorch implementation of 'Zip-NeRF: Anti-Aliased Grid-Based Neural Radiance Fields'") + ], + pip_package="pip install git+https://github.com/SuLvXiangXin/zipnerf-pytorch", + ) +) + @dataclass class ExternalMethodDummyTrainerConfig: