From d4119d40865ea35417d777267b4b8b187d627b4d Mon Sep 17 00:00:00 2001 From: Matthew Tancik Date: Thu, 10 Nov 2022 22:01:21 -0800 Subject: [PATCH] Add exporting docs (#940) --- docs/reference/cli/index.md | 2 ++ docs/reference/cli/ns_export.md | 9 +++++++++ scripts/exporter.py | 20 ++++++++++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 docs/reference/cli/ns_export.md diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md index af333742a..797f0d9eb 100644 --- a/docs/reference/cli/index.md +++ b/docs/reference/cli/index.md @@ -14,6 +14,7 @@ Here are the popular commands that we offer. If you've cloned the repo, you can | ns-train | Generate a NeRF | scripts/train.py | | ns-eval | Run evaluation metrics for your Model | scripts/eval.py | | ns-render | Render out a video of your NeRF | scripts/render.py | +| ns-export | Export a NeRF into other formats | scripts/exporter.py | ```{toctree} :maxdepth: 1 @@ -23,5 +24,6 @@ ns_process_data ns_download_data ns_train ns_render +ns_export ns_eval ``` diff --git a/docs/reference/cli/ns_export.md b/docs/reference/cli/ns_export.md new file mode 100644 index 000000000..cdfc54f2f --- /dev/null +++ b/docs/reference/cli/ns_export.md @@ -0,0 +1,9 @@ +# ns-export + +```{eval-rst} +.. argparse:: + :module: scripts.exporter + :func: get_parser_fn + :prog: ns-export + :nodefault: +``` diff --git a/scripts/exporter.py b/scripts/exporter.py index b251f50ae..730d604b9 100644 --- a/scripts/exporter.py +++ b/scripts/exporter.py @@ -31,7 +31,7 @@ class Exporter: @dataclass class ExportPointCloud(Exporter): - """Class to export meshes with the poisson algorithm.""" + """Export NeRF as a point cloud.""" num_points: int = 1000000 """Number of points to generate. May result in less if outlier removal is used.""" @@ -84,7 +84,10 @@ class ExportPointCloud(Exporter): @dataclass class ExportTSDFMesh(Exporter): - """Class to export meshes with the poisson algorithm.""" + """ + NOT YET IMPLEMENTED + Export a mesh using TSDF processing. + """ def main(self) -> None: """Export mesh""" @@ -93,7 +96,10 @@ class ExportTSDFMesh(Exporter): @dataclass class ExportPoissonMesh(Exporter): - """Exports a mesh using poisson mesh reconstruction.""" + """ + NOT YET IMPLEMENTED + Export a mesh using poisson surface reconstruction. + """ def main(self) -> None: """Export mesh""" @@ -102,7 +108,10 @@ class ExportPoissonMesh(Exporter): @dataclass class ExportMarchingCubesMesh(Exporter): - """Exports a mesh using marching cubes.""" + """ + NOT YET IMPLEMENTED + Export a mesh using marching cubes. + """ def main(self) -> None: """Export mesh""" @@ -125,3 +134,6 @@ def entrypoint(): if __name__ == "__main__": entrypoint() + +# For sphinx docs +get_parser_fn = lambda: tyro.extras.get_parser(Commands) # noqa