diff --git a/.dockerignore b/.dockerignore index e1590ed27..92619bde0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,7 +12,7 @@ build/ develop-eggs/ dist/ downloads/ -!scripts/downloads/ +!nerfstudio/scripts/downloads/ eggs/ .eggs/ lib/ diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index 62128edff..3e30fba7d 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -28,17 +28,17 @@ jobs: pip install --upgrade --upgrade-strategy eager -e .[dev] - name: Run license checks run: | - ./scripts/licensing/license_headers.sh --check + ./nerfstudio/scripts/licensing/license_headers.sh --check - name: Check notebook cell metadata run: | - python ./scripts/docs/add_nb_tags.py --check + python ./nerfstudio/scripts/docs/add_nb_tags.py --check - name: Run isort - run: isort docs/ nerfstudio/ scripts/ tests/ --profile black --check + run: isort docs/ nerfstudio/ tests/ --profile black --check - name: Run Black - run: black docs/ nerfstudio/ scripts/ tests/ --check + run: black docs/ nerfstudio/ tests/ --check - name: Python Pylint run: | - pylint nerfstudio tests scripts + pylint nerfstudio tests - name: Test with pytest run: | pytest diff --git a/.gitignore b/.gitignore index cfa4358d2..7f1688d59 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ build/ develop-eggs/ dist/ downloads/ -!scripts/downloads/ +!nerfstudio/scripts/downloads/ eggs/ .eggs/ lib/ diff --git a/.vscode/launch.json b/.vscode/launch.json index da293a07b..6e4dc7c4a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,7 +30,7 @@ "name": "Python: train", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -42,7 +42,7 @@ "name": "Python: train ngp", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": ["instant_ngp"] }, @@ -50,7 +50,7 @@ "name": "Python: train ngp nerfstudio", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -70,7 +70,7 @@ "name": "Python: train ngp-friends", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": [ "instant_ngp", @@ -89,7 +89,7 @@ "name": "Python: train semantic_nerfw", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "args": ["semantic_nerf"] }, @@ -97,10 +97,10 @@ "name": "Python: NeuS on Replica", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus", "--pipeline.model.sdf-field.inside-outside=True", @@ -116,10 +116,10 @@ "name": "Python: NeuS-facto on Replica", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=True", @@ -135,10 +135,10 @@ "name": "Python: NeuS-facto on DTU (no mono-prior)", "type": "python", "request": "launch", - "program": "scripts/train.py", + "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": {"CUDA_VISIBLE_DEVICES":"0"}, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=False", @@ -148,6 +148,6 @@ "--include_mono_prior=False", "--auto-orient=True" ] - }, + } ] } diff --git a/docs/developer_guides/debugging_tools/benchmarking.md b/docs/developer_guides/debugging_tools/benchmarking.md index 5e213fb1b..b38c09277 100644 --- a/docs/developer_guides/debugging_tools/benchmarking.md +++ b/docs/developer_guides/debugging_tools/benchmarking.md @@ -9,7 +9,7 @@ To launch training jobs automatically on each of these items, you can call: ```bash -./scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}] +./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m {METHOD_NAME} [-s] [-v {VIS}] [{GPU_LIST}] ``` Simply replace the arguments in brackets with the correct arguments. @@ -18,31 +18,31 @@ Simply replace the arguments in brackets with the correct arguments. - `-s`: Launch a single job per GPU. - `-v {VIS}`: Use another visualization than wandb, which is the default. Only other option is tensorboard. - `{GPU_LIST}`: (optional) Specify the list of gpus you want to use on your machine space separated. for instance, if you want to use GPU's 0-3, you will need to pass in `0 1 2 3`. If left empty, the script will automatically find available GPU's and distribute training jobs on the available GPUs. - + :::{admonition} Tip :class: info -To view all the arguments and annotations, you can run `./scripts/benchmarking/launch_train_blender.sh --help` - ::: - +To view all the arguments and annotations, you can run `./nerfstudio/scripts/benchmarking/launch_train_blender.sh --help` +::: A full example would be: - Specifying gpus - ```bash - ./scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3 - ``` + + ```bash + ./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto 0 1 2 3 + ``` - Automatically find available gpus - ```bash - ./scripts/benchmarking/launch_train_blender.sh -m nerfacto - ``` + ```bash + ./nerfstudio/scripts/benchmarking/launch_train_blender.sh -m nerfacto + ``` The script will automatically launch training on all of the items and save the checkpoints in an output directory with the experiment name and current timestamp. ## Evaluating trained Blender models -Once you have launched training, and training converges, you can test your method with `scripts/benchmarking/launch_eval_blender.sh`. +Once you have launched training, and training converges, you can test your method with `nerfstudio/scripts/benchmarking/launch_eval_blender.sh`. Say we ran a benchmark on 08-10-2022 for `instant-ngp`. By default, the train script will save the benchmarks in the following format: @@ -65,7 +65,7 @@ If we wanted to run the benchmark on all the blender data for the above example, ```bash -./scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}] +./nerfstudio/scripts/benchmarking/launch_eval_blender.sh -m instant-ngp -o outputs/ -t 2022-08-10_172517 [{GPU_LIST}] ``` The flags used in the benchmarking script are defined as follows: @@ -90,4 +90,4 @@ outputs :class: warning Since we are running multiple backgrounded processes concurrently with this script, please note the terminal logs may be messy. - ::: +::: diff --git a/docs/extensions/blender_addon.md b/docs/extensions/blender_addon.md index 842d9bb38..8e2fa4bd2 100644 --- a/docs/extensions/blender_addon.md +++ b/docs/extensions/blender_addon.md @@ -16,7 +16,7 @@ This Blender add-on allows for compositing with a Nerfstudio render as a backgro 1. The add-on requires Blender 3.0 or newer, install Blender [here](https://www.blender.org/). -2. Download Blender Add-on Script +2. Download Blender Add-on Script 3. Install and enable the add-on in Blender in `Edit → Preferences → Add-Ons`. The add-on will be visible in the Render Properties tab on the right panel.
-
+
-
+
-
+
-
+
-
+
diff --git a/docs/quickstart/export_geometry.md b/docs/quickstart/export_geometry.md
index 28d29fc54..2ffd51895 100644
--- a/docs/quickstart/export_geometry.md
+++ b/docs/quickstart/export_geometry.md
@@ -19,7 +19,6 @@ Poisson surface reconstruction gives the highest quality meshes. See the steps b
> **Note:**
> This will only work with a Model that computes or predicts normals, e.g., nerfacto.
-
1. Train nerfacto with network settings that predict normals.
```bash
@@ -51,7 +50,7 @@ ns-export --help
Say you want to simplify and/or smooth a mesh offline, and then you want to texture it with NeRF. You can do that with the following command. It will work for any mesh filetypes that [PyMeshLab](https://pymeshlab.readthedocs.io/en/latest/) can support, for example a `.ply`.
```python
-python scripts/texture.py --load-config CONFIG.yml --input-mesh-filename FILENAME --output-dir OUTPUT_DIR
+python nerfstudio/scripts/texture.py --load-config CONFIG.yml --input-mesh-filename FILENAME --output-dir OUTPUT_DIR
```
## Dependencies
diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md
index 7bc95834f..4daee6555 100644
--- a/docs/reference/cli/index.md
+++ b/docs/reference/cli/index.md
@@ -6,16 +6,16 @@ We provide a command line interface for training your own NeRFs (no coding neces
Here are the popular commands that we offer. If you've cloned the repo, you can also look at the [pyproject.toml file](https://github.com/nerfstudio-project/nerfstudio/blob/main/pyproject.toml) at the `[project.scripts]` section for details.
-| Command | Description | Filename |
-| ------------------------------------ | -------------------------------------- | ---------------------------------- |
-| [ns-install-cli](ns_install_cli) | Install tab completion for all scripts | scripts/completions/install.py |
-| [ns-process-data](ns_process_data) | Generate a dataset from your own data | scripts/process_data.py |
-| [ns-download-data](ns_download_data) | Download existing captures | scripts/downloads/download_data.py |
-| [ns-train](ns_train) | Generate a NeRF | scripts/train.py |
-| [ns-viewer](ns_viewer) | View a trained NeRF | scripts/viewer/run_viewer.py |
-| [ns-eval](ns_eval) | Run evaluation metrics for your Model | scripts/eval.py |
-| [ns-render](ns_render) | Render out a video of your NeRF | scripts/render.py |
-| [ns-export](ns_export) | Export a NeRF into other formats | scripts/exporter.py |
+| Command | Description | Filename |
+| ------------------------------------ | -------------------------------------- | --------------------------------------------- |
+| [ns-install-cli](ns_install_cli) | Install tab completion for all scripts | nerfstudio/scripts/completions/install.py |
+| [ns-process-data](ns_process_data) | Generate a dataset from your own data | nerfstudio/scripts/process_data.py |
+| [ns-download-data](ns_download_data) | Download existing captures | nerfstudio/scripts/downloads/download_data.py |
+| [ns-train](ns_train) | Generate a NeRF | nerfstudio/scripts/train.py |
+| [ns-viewer](ns_viewer) | View a trained NeRF | nerfstudio/scripts/viewer/run_viewer.py |
+| [ns-eval](ns_eval) | Run evaluation metrics for your Model | nerfstudio/scripts/eval.py |
+| [ns-render](ns_render) | Render out a video of your NeRF | nerfstudio/scripts/render.py |
+| [ns-export](ns_export) | Export a NeRF into other formats | nerfstudio/scripts/exporter.py |
```{toctree}
:maxdepth: 1
diff --git a/docs/reference/cli/ns_download_data.md b/docs/reference/cli/ns_download_data.md
index d096b4e07..1105ef12b 100644
--- a/docs/reference/cli/ns_download_data.md
+++ b/docs/reference/cli/ns_download_data.md
@@ -2,7 +2,7 @@
```{eval-rst}
.. argparse::
- :module: scripts.downloads.download_data
+ :module: nerfstudio.scripts.downloads.download_data
:func: get_parser_fn
:prog: ns-download-data
:nodefault:
diff --git a/docs/reference/cli/ns_eval.md b/docs/reference/cli/ns_eval.md
index a794ac9e8..86e4aa0ba 100644
--- a/docs/reference/cli/ns_eval.md
+++ b/docs/reference/cli/ns_eval.md
@@ -2,7 +2,7 @@
```{eval-rst}
.. argparse::
- :module: scripts.eval
+ :module: nerfstudio.scripts.eval
:func: get_parser_fn
:prog: ns-eval
:nodefault:
diff --git a/docs/reference/cli/ns_export.md b/docs/reference/cli/ns_export.md
index cdfc54f2f..839211915 100644
--- a/docs/reference/cli/ns_export.md
+++ b/docs/reference/cli/ns_export.md
@@ -2,7 +2,7 @@
```{eval-rst}
.. argparse::
- :module: scripts.exporter
+ :module: nerfstudio.scripts.exporter
:func: get_parser_fn
:prog: ns-export
:nodefault:
diff --git a/docs/reference/cli/ns_install_cli.md b/docs/reference/cli/ns_install_cli.md
index e9c1a9541..30fa9598f 100644
--- a/docs/reference/cli/ns_install_cli.md
+++ b/docs/reference/cli/ns_install_cli.md
@@ -2,7 +2,7 @@
```{eval-rst}
.. argparse::
- :module: scripts.completions.install
+ :module: nerfstudio.scripts.completions.install
:func: get_parser_fn
:prog: ns-install-cli
:nodefault:
diff --git a/docs/reference/cli/ns_process_data.md b/docs/reference/cli/ns_process_data.md
index bb5bd24ac..9f9540d44 100644
--- a/docs/reference/cli/ns_process_data.md
+++ b/docs/reference/cli/ns_process_data.md
@@ -8,7 +8,7 @@ You may also want to install [hloc](https://github.com/cvg/Hierarchical-Localiza
```{eval-rst}
.. argparse::
- :module: scripts.process_data
+ :module: nerfstudio.scripts.process_data
:func: get_parser_fn
:prog: ns-process-data
:nodefault:
diff --git a/docs/reference/cli/ns_render.md b/docs/reference/cli/ns_render.md
index 7a01f9bae..e006e62ee 100644
--- a/docs/reference/cli/ns_render.md
+++ b/docs/reference/cli/ns_render.md
@@ -7,7 +7,7 @@ Make sure to have [FFmpeg](https://ffmpeg.org/download.html) installed.
```{eval-rst}
.. argparse::
- :module: scripts.render
+ :module: nerfstudio.scripts.render
:func: get_parser_fn
:prog: ns-render
:nodefault:
diff --git a/docs/reference/cli/ns_viewer.md b/docs/reference/cli/ns_viewer.md
index 841472a5f..bb6333550 100644
--- a/docs/reference/cli/ns_viewer.md
+++ b/docs/reference/cli/ns_viewer.md
@@ -2,7 +2,7 @@
```{eval-rst}
.. argparse::
- :module: scripts.viewer.run_viewer
+ :module: nerfstudio.scripts.viewer.run_viewer
:func: get_parser_fn
:prog: ns-viewer
:nodefault:
diff --git a/docs/reference/contributing.md b/docs/reference/contributing.md
index a9651cbed..101cb873e 100644
--- a/docs/reference/contributing.md
+++ b/docs/reference/contributing.md
@@ -7,13 +7,14 @@ Below, we document the contribution pipeline and good-to-knows for when you're r
The project is set up for development in VSCode, we recommend using it if you plan to contribute.
## Overview
+
Below are the various tooling features our team uses to maintain this codebase.
-| Tooling | Support |
-| --------------- | ------------- |
-| Linter | [Black](https://black.readthedocs.io/en/stable/) |
-| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) |
-| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) |
+| Tooling | Support |
+| --------------- | ---------------------------------------------------------- |
+| Linter | [Black](https://black.readthedocs.io/en/stable/) |
+| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) |
+| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) |
| Docstring style | [Google](https://google.github.io/styleguide/pyguide.html) |
## Requirements
@@ -53,8 +54,8 @@ conda install -c conda-forge pandoc
:::{admonition} Attention
:class: attention
- In order to merge changes to the code base, all of these checks must be passing. If you pass these tests locally, you will likely pass on github servers as well (results in a green checkmark next to your commit).
- :::
+ In order to merge changes to the code base, all of these checks must be passing. If you pass these tests locally, you will likely pass on github servers as well (results in a green checkmark next to your commit).
+ :::
3. Open pull request! 💌
@@ -65,7 +66,7 @@ conda install -c conda-forge pandoc
Run the following to build the documentation:
```bash
-python scripts/docs/build_docs.py
+python nerfstudio/scripts/docs/build_docs.py
```
:::{admonition} Tip
@@ -84,7 +85,7 @@ If you want the code to build on save you can use [sphinx autobuild](https://git
:class: info
If changes to the structure are made, the build files may be incorrect.
- :::
+:::
```bash
pip install sphinx-autobuild
diff --git a/nerfstudio/data/dataparsers/nuscenes_dataparser.py b/nerfstudio/data/dataparsers/nuscenes_dataparser.py
index ddf15dc8b..99b75a214 100644
--- a/nerfstudio/data/dataparsers/nuscenes_dataparser.py
+++ b/nerfstudio/data/dataparsers/nuscenes_dataparser.py
@@ -55,7 +55,7 @@ class NuScenesDataParserConfig(DataParserConfig):
Each clip was recorded with a suite of sensors including 6 surround cameras.
It also includes 3D cuboid annotations around objects.
We optionally use these cuboids to mask dynamic objects by specifying the mask_dir flag.
- To create these masks use scripts/datasets/process_nuscenes_masks.py.
+ To create these masks use nerfstudio/scripts/datasets/process_nuscenes_masks.py.
"""
_target: Type = field(default_factory=lambda: NuScenes)
diff --git a/nerfstudio/scripts/__init__.py b/nerfstudio/scripts/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/benchmarking/launch_eval_blender.sh b/nerfstudio/scripts/benchmarking/launch_eval_blender.sh
similarity index 100%
rename from scripts/benchmarking/launch_eval_blender.sh
rename to nerfstudio/scripts/benchmarking/launch_eval_blender.sh
diff --git a/scripts/benchmarking/launch_train_blender.sh b/nerfstudio/scripts/benchmarking/launch_train_blender.sh
similarity index 100%
rename from scripts/benchmarking/launch_train_blender.sh
rename to nerfstudio/scripts/benchmarking/launch_train_blender.sh
diff --git a/nerfstudio/scripts/blender/__init__.py b/nerfstudio/scripts/blender/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/blender/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/blender/nerfstudio_blender.py b/nerfstudio/scripts/blender/nerfstudio_blender.py
similarity index 96%
rename from scripts/blender/nerfstudio_blender.py
rename to nerfstudio/scripts/blender/nerfstudio_blender.py
index 6ee80f066..6a416e369 100644
--- a/scripts/blender/nerfstudio_blender.py
+++ b/nerfstudio/scripts/blender/nerfstudio_blender.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""
nerfstudio_blender.py
"""
diff --git a/scripts/completions/.gitignore b/nerfstudio/scripts/completions/.gitignore
similarity index 100%
rename from scripts/completions/.gitignore
rename to nerfstudio/scripts/completions/.gitignore
diff --git a/nerfstudio/scripts/completions/__init__.py b/nerfstudio/scripts/completions/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/completions/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/completions/install.py b/nerfstudio/scripts/completions/install.py
similarity index 96%
rename from scripts/completions/install.py
rename to nerfstudio/scripts/completions/install.py
index 67957cf4b..cba1d672b 100644
--- a/scripts/completions/install.py
+++ b/nerfstudio/scripts/completions/install.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""Configuration script for setting up tab completion for nerfstudio in bash and zsh."""
diff --git a/scripts/completions/setup.bash b/nerfstudio/scripts/completions/setup.bash
similarity index 100%
rename from scripts/completions/setup.bash
rename to nerfstudio/scripts/completions/setup.bash
diff --git a/scripts/completions/setup.zsh b/nerfstudio/scripts/completions/setup.zsh
similarity index 100%
rename from scripts/completions/setup.zsh
rename to nerfstudio/scripts/completions/setup.zsh
diff --git a/scripts/datasets/process_nuscenes_masks.py b/nerfstudio/scripts/datasets/process_nuscenes_masks.py
similarity index 90%
rename from scripts/datasets/process_nuscenes_masks.py
rename to nerfstudio/scripts/datasets/process_nuscenes_masks.py
index 07b5f5e99..748a27fd2 100644
--- a/scripts/datasets/process_nuscenes_masks.py
+++ b/nerfstudio/scripts/datasets/process_nuscenes_masks.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import os
from dataclasses import dataclass
from pathlib import Path
diff --git a/nerfstudio/scripts/docs/__init__.py b/nerfstudio/scripts/docs/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/docs/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/docs/add_nb_tags.py b/nerfstudio/scripts/docs/add_nb_tags.py
similarity index 78%
rename from scripts/docs/add_nb_tags.py
rename to nerfstudio/scripts/docs/add_nb_tags.py
index 4a7d97fe0..a110e0d76 100644
--- a/scripts/docs/add_nb_tags.py
+++ b/nerfstudio/scripts/docs/add_nb_tags.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Helper that add tags to notebooks based on cell comments."""
import sys
@@ -60,7 +74,8 @@ def main(check: bool = False):
if incorrect_metadata:
if check:
CONSOLE.print(
- f"[bold yellow]{ipath} has incorrect metadata. Call `python scripts.docs.add_nb_tags.py` to add it."
+ f"[bold yellow]{ipath} has incorrect metadata. "
+ "Call `python nerfstudio.scripts.docs.add_nb_tags.py` to add it."
)
any_missing = True
else:
diff --git a/scripts/docs/build_docs.py b/nerfstudio/scripts/docs/build_docs.py
similarity index 66%
rename from scripts/docs/build_docs.py
rename to nerfstudio/scripts/docs/build_docs.py
index cb31e54b3..1959220a1 100644
--- a/scripts/docs/build_docs.py
+++ b/nerfstudio/scripts/docs/build_docs.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""Simple yaml debugger"""
import subprocess
@@ -32,7 +46,7 @@ def main(clean_cache: bool = False):
"""
CONSOLE.print("[green]Adding notebook documentation metadata")
- run_command("python scripts/docs/add_nb_tags.py")
+ run_command("python nerfstudio/scripts/docs/add_nb_tags.py")
# Add checks for building documentation
CONSOLE.print("[green]Building Documentation")
diff --git a/nerfstudio/scripts/downloads/__init__.py b/nerfstudio/scripts/downloads/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/downloads/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/downloads/download_data.py b/nerfstudio/scripts/downloads/download_data.py
similarity index 96%
rename from scripts/downloads/download_data.py
rename to nerfstudio/scripts/downloads/download_data.py
index a92798bbb..d97dd659b 100644
--- a/scripts/downloads/download_data.py
+++ b/nerfstudio/scripts/downloads/download_data.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Download datasets and specific captures from the datasets."""
from __future__ import annotations
diff --git a/scripts/eval.py b/nerfstudio/scripts/eval.py
similarity index 72%
rename from scripts/eval.py
rename to nerfstudio/scripts/eval.py
index 6f90bb35a..517da3179 100644
--- a/scripts/eval.py
+++ b/nerfstudio/scripts/eval.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""
eval.py
diff --git a/scripts/exporter.py b/nerfstudio/scripts/exporter.py
similarity index 96%
rename from scripts/exporter.py
rename to nerfstudio/scripts/exporter.py
index 0f4f4ec60..dfca20637 100644
--- a/scripts/exporter.py
+++ b/nerfstudio/scripts/exporter.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""
Script for exporting NeRF into other formats.
"""
diff --git a/nerfstudio/scripts/generative/__init__.py b/nerfstudio/scripts/generative/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/generative/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/generative/trace_stable_diffusion.py b/nerfstudio/scripts/generative/trace_stable_diffusion.py
similarity index 84%
rename from scripts/generative/trace_stable_diffusion.py
rename to nerfstudio/scripts/generative/trace_stable_diffusion.py
index eee069eb3..3a426cb2c 100644
--- a/scripts/generative/trace_stable_diffusion.py
+++ b/nerfstudio/scripts/generative/trace_stable_diffusion.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Trace Stable Diffusion UNet for speed improvement"""
import functools
diff --git a/nerfstudio/scripts/github/__init__.py b/nerfstudio/scripts/github/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/github/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/github/run_actions.py b/nerfstudio/scripts/github/run_actions.py
similarity index 81%
rename from scripts/github/run_actions.py
rename to nerfstudio/scripts/github/run_actions.py
index 19179725c..8f5bb7ce1 100644
--- a/scripts/github/run_actions.py
+++ b/nerfstudio/scripts/github/run_actions.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""Simple yaml debugger"""
import subprocess
@@ -57,7 +71,9 @@ def run_github_actions_file(filename: str, continue_on_fail: bool = False):
# Add checks for building documentation
CONSOLE.line()
CONSOLE.rule("[bold green]Adding notebook documentation metadata")
- success = success and run_command("python scripts/docs/add_nb_tags.py", continue_on_fail=continue_on_fail)
+ success = success and run_command(
+ "python nerfstudio/scripts/docs/add_nb_tags.py", continue_on_fail=continue_on_fail
+ )
CONSOLE.line()
CONSOLE.rule("[bold green]Building Documentation")
success = success and run_command("cd docs/; make html SPHINXOPTS='-W;'", continue_on_fail=continue_on_fail)
diff --git a/scripts/licensing/copyright.txt b/nerfstudio/scripts/licensing/copyright.txt
similarity index 100%
rename from scripts/licensing/copyright.txt
rename to nerfstudio/scripts/licensing/copyright.txt
diff --git a/scripts/licensing/license_headers.sh b/nerfstudio/scripts/licensing/license_headers.sh
similarity index 80%
rename from scripts/licensing/license_headers.sh
rename to nerfstudio/scripts/licensing/license_headers.sh
index 36482085c..286d7ffb1 100755
--- a/scripts/licensing/license_headers.sh
+++ b/nerfstudio/scripts/licensing/license_headers.sh
@@ -27,7 +27,7 @@ do
echo "$i missing copyright header"
check_failed=true
else
- cat scripts/licensing/copyright.txt $i >$i.new && mv $i.new $i
+ cat nerfstudio/scripts/licensing/copyright.txt $i >$i.new && mv $i.new $i
echo "Adding license header to $i."
fi
added_headers=true
@@ -36,7 +36,7 @@ done
if [ "$check_failed" = true ];
then
- echo "Run '.scripts/licensing/license_headers.sh to add missing headers.'"
+ echo "Run '.nerfstudio/scripts/licensing/license_headers.sh to add missing headers.'"
exit 1
fi
diff --git a/scripts/process_data.py b/nerfstudio/scripts/process_data.py
similarity index 96%
rename from scripts/process_data.py
rename to nerfstudio/scripts/process_data.py
index 02c164d4e..4c2f3829b 100644
--- a/scripts/process_data.py
+++ b/nerfstudio/scripts/process_data.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""Processes a video or image sequence to a nerfstudio compatible dataset."""
diff --git a/scripts/render.py b/nerfstudio/scripts/render.py
similarity index 96%
rename from scripts/render.py
rename to nerfstudio/scripts/render.py
index bdff762d9..f3f6b6789 100644
--- a/scripts/render.py
+++ b/nerfstudio/scripts/render.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""
render.py
diff --git a/scripts/texture.py b/nerfstudio/scripts/texture.py
similarity index 79%
rename from scripts/texture.py
rename to nerfstudio/scripts/texture.py
index 2dfbd679b..98f26b846 100644
--- a/scripts/texture.py
+++ b/nerfstudio/scripts/texture.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""
Script to texture an existing mesh file.
"""
diff --git a/scripts/train.py b/nerfstudio/scripts/train.py
similarity index 93%
rename from scripts/train.py
rename to nerfstudio/scripts/train.py
index 8f2e0b719..408e80d2b 100644
--- a/scripts/train.py
+++ b/nerfstudio/scripts/train.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""Train a radiance field with nerfstudio.
For real captures, we recommend using the [bright_yellow]nerfacto[/bright_yellow] model.
diff --git a/nerfstudio/scripts/viewer/__init__.py b/nerfstudio/scripts/viewer/__init__.py
new file mode 100644
index 000000000..d926cf95c
--- /dev/null
+++ b/nerfstudio/scripts/viewer/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/scripts/viewer/run_viewer.py b/nerfstudio/scripts/viewer/run_viewer.py
similarity index 84%
rename from scripts/viewer/run_viewer.py
rename to nerfstudio/scripts/viewer/run_viewer.py
index ff49300c7..62abe8941 100644
--- a/scripts/viewer/run_viewer.py
+++ b/nerfstudio/scripts/viewer/run_viewer.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
#!/usr/bin/env python
"""
Starts viewer in eval mode.
diff --git a/scripts/viewer/sync_viser_message_defs.py b/nerfstudio/scripts/viewer/sync_viser_message_defs.py
similarity index 73%
rename from scripts/viewer/sync_viser_message_defs.py
rename to nerfstudio/scripts/viewer/sync_viser_message_defs.py
index 369836acb..c693db288 100644
--- a/scripts/viewer/sync_viser_message_defs.py
+++ b/nerfstudio/scripts/viewer/sync_viser_message_defs.py
@@ -1,3 +1,17 @@
+# Copyright 2022 The Nerfstudio Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Generate viser message definitions for TypeScript, by parsing Python dataclasses."""
import json
import pathlib
diff --git a/pyproject.toml b/pyproject.toml
index 9b09c6ef9..abe400912 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -99,17 +99,17 @@ docs = [
]
[project.scripts]
-# Note, add entrypoint name to scripts/completions/install.py to include CLI completion
-ns-install-cli = "scripts.completions.install:entrypoint"
-ns-process-data = "scripts.process_data:entrypoint"
-ns-download-data = "scripts.downloads.download_data:entrypoint"
-ns-train = "scripts.train:entrypoint"
-ns-viewer = "scripts.viewer.run_viewer:entrypoint"
-ns-eval = "scripts.eval:entrypoint"
-ns-render = "scripts.render:entrypoint"
-ns-export = "scripts.exporter:entrypoint"
-ns-dev-test = "scripts.github.run_actions:entrypoint"
-ns-dev-sync-viser-message-defs = "scripts.viewer.sync_viser_message_defs:entrypoint"
+# Note, add entrypoint name to nerfstudio/scripts/completions/install.py to include CLI completion
+ns-install-cli = "nerfstudio.scripts.completions.install:entrypoint"
+ns-process-data = "nerfstudio.scripts.process_data:entrypoint"
+ns-download-data = "nerfstudio.scripts.downloads.download_data:entrypoint"
+ns-train = "nerfstudio.scripts.train:entrypoint"
+ns-viewer = "nerfstudio.scripts.viewer.run_viewer:entrypoint"
+ns-eval = "nerfstudio.scripts.eval:entrypoint"
+ns-render = "nerfstudio.scripts.render:entrypoint"
+ns-export = "nerfstudio.scripts.exporter:entrypoint"
+ns-dev-test = "nerfstudio.scripts.github.run_actions:entrypoint"
+ns-dev-sync-viser-message-defs = "nerfstudio.scripts.viewer.sync_viser_message_defs:entrypoint"
[options]
# equivalent to using --extra-index-url with pip, which is needed for specifying the CUDA version torch and torchvision
@@ -118,7 +118,7 @@ dependency_links = [
]
[tool.setuptools.packages.find]
-include = ["nerfstudio*","scripts*"]
+include = ["nerfstudio*"]
[tool.setuptools.package-data]
"*" = ["*.cu", "*.json", "py.typed", "setup.bash", "setup.zsh"]
@@ -132,7 +132,6 @@ line-length = 120
max-line-length = 120
generated-members = ["numpy.*", "torch.*", "cv2.*", "cv.*"]
good-names-rgxs = "^[_a-zA-Z][_a-z0-9]?$"
-ignore-paths = ["scripts/colmap2nerf.py"]
jobs = 0
ignored-classes = ["TensorDataclass"]
diff --git a/scripts/__init__.py b/scripts/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/blender/__init__.py b/scripts/blender/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/completions/__init__.py b/scripts/completions/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/docs/__init__.py b/scripts/docs/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/downloads/__init__.py b/scripts/downloads/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/generative/__init__.py b/scripts/generative/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/github/__init__.py b/scripts/github/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/scripts/viewer/__init__.py b/scripts/viewer/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tests/test_train.py b/tests/test_train.py
index d4992a6f8..37b0ac41e 100644
--- a/tests/test_train.py
+++ b/tests/test_train.py
@@ -13,7 +13,7 @@ from nerfstudio.configs.method_configs import method_configs
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
from nerfstudio.data.dataparsers.minimal_dataparser import MinimalDataParserConfig
from nerfstudio.engine.trainer import TrainerConfig
-from scripts.train import train_loop
+from nerfstudio.scripts.train import train_loop
BLACKLIST = [
"base",