mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Move scripts folder into nerfstudio (#1897)
move scripts folder into nerfstudio
This commit is contained in:
1 parent
82c0c5545b
commit
72a14b0b22
58 files changed
+446
-112
No files matched your search
+1
-1
@@ -12,7 +12,7 @@ build/
|
|||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
!scripts/downloads/
|
!nerfstudio/scripts/downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
lib/
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ jobs:
|
|||||||
pip install --upgrade --upgrade-strategy eager -e .[dev]
|
pip install --upgrade --upgrade-strategy eager -e .[dev]
|
||||||
- name: Run license checks
|
- name: Run license checks
|
||||||
run: |
|
run: |
|
||||||
./scripts/licensing/license_headers.sh --check
|
./nerfstudio/scripts/licensing/license_headers.sh --check
|
||||||
- name: Check notebook cell metadata
|
- name: Check notebook cell metadata
|
||||||
run: |
|
run: |
|
||||||
python ./scripts/docs/add_nb_tags.py --check
|
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
|
||||||
- name: Run isort
|
- name: Run isort
|
||||||
run: isort docs/ nerfstudio/ scripts/ tests/ --profile black --check
|
run: isort docs/ nerfstudio/ tests/ --profile black --check
|
||||||
- name: Run Black
|
- name: Run Black
|
||||||
run: black docs/ nerfstudio/ scripts/ tests/ --check
|
run: black docs/ nerfstudio/ tests/ --check
|
||||||
- name: Python Pylint
|
- name: Python Pylint
|
||||||
run: |
|
run: |
|
||||||
pylint nerfstudio tests scripts
|
pylint nerfstudio tests
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
pytest
|
pytest
|
||||||
+1
-1
@@ -12,7 +12,7 @@ build/
|
|||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
!scripts/downloads/
|
!nerfstudio/scripts/downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
lib/
|
||||||
|
|||||||
Vendored
+12
-12
@@ -30,7 +30,7 @@
|
|||||||
"name": "Python: train",
|
"name": "Python: train",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": [
|
"args": [
|
||||||
"instant_ngp",
|
"instant_ngp",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"name": "Python: train ngp",
|
"name": "Python: train ngp",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": ["instant_ngp"]
|
"args": ["instant_ngp"]
|
||||||
},
|
},
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"name": "Python: train ngp nerfstudio",
|
"name": "Python: train ngp nerfstudio",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": [
|
"args": [
|
||||||
"instant_ngp",
|
"instant_ngp",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"name": "Python: train ngp-friends",
|
"name": "Python: train ngp-friends",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": [
|
"args": [
|
||||||
"instant_ngp",
|
"instant_ngp",
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
"name": "Python: train semantic_nerfw",
|
"name": "Python: train semantic_nerfw",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": ["semantic_nerf"]
|
"args": ["semantic_nerf"]
|
||||||
},
|
},
|
||||||
@@ -97,10 +97,10 @@
|
|||||||
"name": "Python: NeuS on Replica",
|
"name": "Python: NeuS on Replica",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false,
|
"justMyCode": false,
|
||||||
"env": {"CUDA_VISIBLE_DEVICES":"0"},
|
"env": { "CUDA_VISIBLE_DEVICES": "0" },
|
||||||
"args": [
|
"args": [
|
||||||
"neus",
|
"neus",
|
||||||
"--pipeline.model.sdf-field.inside-outside=True",
|
"--pipeline.model.sdf-field.inside-outside=True",
|
||||||
@@ -116,10 +116,10 @@
|
|||||||
"name": "Python: NeuS-facto on Replica",
|
"name": "Python: NeuS-facto on Replica",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false,
|
"justMyCode": false,
|
||||||
"env": {"CUDA_VISIBLE_DEVICES":"0"},
|
"env": { "CUDA_VISIBLE_DEVICES": "0" },
|
||||||
"args": [
|
"args": [
|
||||||
"neus-facto",
|
"neus-facto",
|
||||||
"--pipeline.model.sdf-field.inside-outside=True",
|
"--pipeline.model.sdf-field.inside-outside=True",
|
||||||
@@ -135,10 +135,10 @@
|
|||||||
"name": "Python: NeuS-facto on DTU (no mono-prior)",
|
"name": "Python: NeuS-facto on DTU (no mono-prior)",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "scripts/train.py",
|
"program": "nerfstudio/scripts/train.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"justMyCode": false,
|
"justMyCode": false,
|
||||||
"env": {"CUDA_VISIBLE_DEVICES":"0"},
|
"env": { "CUDA_VISIBLE_DEVICES": "0" },
|
||||||
"args": [
|
"args": [
|
||||||
"neus-facto",
|
"neus-facto",
|
||||||
"--pipeline.model.sdf-field.inside-outside=False",
|
"--pipeline.model.sdf-field.inside-outside=False",
|
||||||
@@ -148,6 +148,6 @@
|
|||||||
"--include_mono_prior=False",
|
"--include_mono_prior=False",
|
||||||
"--auto-orient=True"
|
"--auto-orient=True"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ To launch training jobs automatically on each of these items, you can call:
|
|||||||
|
|
||||||
```bash
|
```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.
|
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.
|
- `-s`: Launch a single job per GPU.
|
||||||
- `-v {VIS}`: Use another visualization than wandb, which is the default. Only other option is tensorboard.
|
- `-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.
|
- `{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
|
:::{admonition} Tip
|
||||||
:class: info
|
: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:
|
A full example would be:
|
||||||
|
|
||||||
- Specifying gpus
|
- 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
|
- Automatically find available gpus
|
||||||
```bash
|
```bash
|
||||||
./scripts/benchmarking/launch_train_blender.sh -m nerfacto
|
./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.
|
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
|
## 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:
|
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
|
```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:
|
The flags used in the benchmarking script are defined as follows:
|
||||||
@@ -90,4 +90,4 @@ outputs
|
|||||||
:class: warning
|
:class: warning
|
||||||
|
|
||||||
Since we are running multiple backgrounded processes concurrently with this script, please note the terminal logs may be messy.
|
Since we are running multiple backgrounded processes concurrently with this script, please note the terminal logs may be messy.
|
||||||
:::
|
:::
|
||||||
@@ -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/).
|
1. The add-on requires Blender 3.0 or newer, install Blender [here](https://www.blender.org/).
|
||||||
|
|
||||||
2. Download <a href="https://raw.githubusercontent.com/nerfstudio-project/nerfstudio/main/scripts/blender/nerfstudio_blender.py" download="nerfstudio_blender.py">Blender Add-on Script</a>
|
2. Download <a href="https://raw.githubusercontent.com/nerfstudio-project/nerfstudio/main/nerfstudio/scripts/blender/nerfstudio_blender.py" download="nerfstudio_blender.py">Blender Add-on Script</a>
|
||||||
|
|
||||||
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.
|
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.
|
||||||
<center>
|
<center>
|
||||||
@@ -136,34 +136,34 @@ You can composite NeRF objects into a scene with a NeRF background by rendering
|
|||||||
1. Import the background NeRF scene as a point cloud (or mesh, but point cloud is preferred for large scenes).
|
1. Import the background NeRF scene as a point cloud (or mesh, but point cloud is preferred for large scenes).
|
||||||
|
|
||||||
2. Export a cropped NeRF mesh of the NeRF object(s)
|
2. Export a cropped NeRF mesh of the NeRF object(s)
|
||||||
- Open the NeRF object from the Nerfstudio viewer and select "Crop Viewport" and accordingly adjust the Scale and Center values of the bounding box to crop the NeRF scene to around the bounds of the object of interest.
|
|
||||||
|
|
||||||
<center>
|
- Open the NeRF object from the Nerfstudio viewer and select "Crop Viewport" and accordingly adjust the Scale and Center values of the bounding box to crop the NeRF scene to around the bounds of the object of interest.
|
||||||
<img width="300" alt="image" src="https://user-images.githubusercontent.com/9502341/232264554-26357747-6f09-4084-9710-dabf60c61909.jpg">
|
|
||||||
</center>
|
|
||||||
|
|
||||||
- Copy over the scale and center values into the Export panel and export the NeRF object as a mesh (point cloud will also work but shadows can be rendered if the object is a mesh)
|
|
||||||
|
|
||||||
- Keep note of the scale and center values for the crop. This can be done by creating a new JSON camera path in the editor which will add a crop section towards the end of the file.
|
<center>
|
||||||
|
<img width="300" alt="image" src="https://user-images.githubusercontent.com/9502341/232264554-26357747-6f09-4084-9710-dabf60c61909.jpg">
|
||||||
|
</center>
|
||||||
|
|
||||||
<center>
|
- Copy over the scale and center values into the Export panel and export the NeRF object as a mesh (point cloud will also work but shadows can be rendered if the object is a mesh)
|
||||||
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232264430-0b991e20-838f-4e06-9834-7d1d8c1d0042.png">
|
|
||||||
</center>
|
- Keep note of the scale and center values for the crop. This can be done by creating a new JSON camera path in the editor which will add a crop section towards the end of the file.
|
||||||
|
|
||||||
|
<center>
|
||||||
|
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232264430-0b991e20-838f-4e06-9834-7d1d8c1d0042.png">
|
||||||
|
</center>
|
||||||
|
|
||||||
3. Import the NeRF object representation. Rescale and position the scene and NeRF object and background environment. You can also animate either of them.
|
3. Import the NeRF object representation. Rescale and position the scene and NeRF object and background environment. You can also animate either of them.
|
||||||
|
|
||||||
4. (Optional) To add shadows of the NeRF object(s)
|
4. (Optional) To add shadows of the NeRF object(s)
|
||||||
- Add a plane representing the ground of the environment. In object properties, select "Shadow Catcher" under Visibility. You may have to switch to the cycles renderer to see the shadow catcher option.
|
|
||||||
|
|
||||||
- In the object properties of the NeRF object, go to the Ray Visibility section and deselect the "Camera" option. This will hide the mesh in the Blender render, but keep its shadow.
|
- Add a plane representing the ground of the environment. In object properties, select "Shadow Catcher" under Visibility. You may have to switch to the cycles renderer to see the shadow catcher option.
|
||||||
|
|
||||||
|
|
||||||
<center>
|
- In the object properties of the NeRF object, go to the Ray Visibility section and deselect the "Camera" option. This will hide the mesh in the Blender render, but keep its shadow.
|
||||||
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232265212-ca077af8-fb3a-491f-8d60-304cb9fae57e.png">
|
|
||||||
</center>
|
<center>
|
||||||
|
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232265212-ca077af8-fb3a-491f-8d60-304cb9fae57e.png">
|
||||||
- Render the Blender animation with only the shadow of the object on the shadow catcher visible. Render with a transparent background by selecting "Transparent" under the Film Settings in the Render Properties.
|
</center>
|
||||||
|
|
||||||
|
- Render the Blender animation with only the shadow of the object on the shadow catcher visible. Render with a transparent background by selecting "Transparent" under the Film Settings in the Render Properties.
|
||||||
|
|
||||||
5. Go to the Nerfstudio Add-on in Render Properties and expand the "Nerfstudio Path Generator" tab in the panel. Use the object selector to select the NeRF environment representation. Then, select the file path for the output JSON camera path file. Click "Generate JSON file". The output JSON file is named `camera_path_blender.json`. It is recommended to rename this JSON file to keep track of the multiple camera paths that will be used to construct the full render.
|
5. Go to the Nerfstudio Add-on in Render Properties and expand the "Nerfstudio Path Generator" tab in the panel. Use the object selector to select the NeRF environment representation. Then, select the file path for the output JSON camera path file. Click "Generate JSON file". The output JSON file is named `camera_path_blender.json`. It is recommended to rename this JSON file to keep track of the multiple camera paths that will be used to construct the full render.
|
||||||
|
|
||||||
@@ -172,29 +172,32 @@ You can composite NeRF objects into a scene with a NeRF background by rendering
|
|||||||
7. Render the NeRF of the background environment using the generated camera path for the environment using the Nerfstudio in the command line or terminal.
|
7. Render the NeRF of the background environment using the generated camera path for the environment using the Nerfstudio in the command line or terminal.
|
||||||
|
|
||||||
8. Render the NeRF object
|
8. Render the NeRF object
|
||||||
- Open the recently generated blender Nerfstudio JSON camera path and add the crop parameters to the camera path. This section will be placed towards the end of the Blender Nerfstudio camera path after the `is_cycle` field. This can be done by copying over the crop section from the JSON camera path with the scene crop which was exported earlier. Alternatively, you can enter the crop values manually in this format.
|
|
||||||
<center>
|
|
||||||
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232264689-d2e7747c-ce53-425b-810b-1b2954eceb62.png">
|
|
||||||
</center>
|
|
||||||
|
|
||||||
- Render the NeRF object using Nerfstudio and the edited camera path in the command line or terminal. This will be the RGB render.
|
- Open the recently generated blender Nerfstudio JSON camera path and add the crop parameters to the camera path. This section will be placed towards the end of the Blender Nerfstudio camera path after the `is_cycle` field. This can be done by copying over the crop section from the JSON camera path with the scene crop which was exported earlier. Alternatively, you can enter the crop values manually in this format.
|
||||||
|
<center>
|
||||||
|
<img width="200" alt="image" src="https://user-images.githubusercontent.com/9502341/232264689-d2e7747c-ce53-425b-810b-1b2954eceb62.png">
|
||||||
|
</center>
|
||||||
|
|
||||||
- Next, render the accumulation render as an alpha mask of the NeRF object by adding the command line argument `--rendered-output-names accumulation` to the render command.
|
- Render the NeRF object using Nerfstudio and the edited camera path in the command line or terminal. This will be the RGB render.
|
||||||
|
|
||||||
<center>
|
- Next, render the accumulation render as an alpha mask of the NeRF object by adding the command line argument `--rendered-output-names accumulation` to the render command.
|
||||||
<img width="450" alt="image" src="https://user-images.githubusercontent.com/9502341/232264813-195c970f-b194-4761-843b-983123f128f7.jpg">
|
|
||||||
</center>
|
<center>
|
||||||
|
<img width="450" alt="image" src="https://user-images.githubusercontent.com/9502341/232264813-195c970f-b194-4761-843b-983123f128f7.jpg">
|
||||||
|
</center>
|
||||||
|
|
||||||
9. Convert each of the Nerfstudio render videos into an image sequence of frames as PNG or JPG files. This will ensure that the frames will be aligned when compositing. You can convert the video mp4 to an image sequence by creating a Blender Video Editing file and rendering the mp4 as JPGs or PNGs.
|
9. Convert each of the Nerfstudio render videos into an image sequence of frames as PNG or JPG files. This will ensure that the frames will be aligned when compositing. You can convert the video mp4 to an image sequence by creating a Blender Video Editing file and rendering the mp4 as JPGs or PNGs.
|
||||||
|
|
||||||
10. Composite the NeRF renders in a video editing software such as Adobe Premiere Pro.
|
10. Composite the NeRF renders in a video editing software such as Adobe Premiere Pro.
|
||||||
|
|
||||||
- Place the render of the Nerfstudio background environment at the lowest layer, then place the shadow render of the NeRF object if created.
|
- Place the render of the Nerfstudio background environment at the lowest layer, then place the shadow render of the NeRF object if created.
|
||||||
|
|
||||||
- Place the RGB NeRF render of the NeRF object over the environment (and shadow if present) layers and then place the accumulation NeRF object render over the RGB NeRF object render.
|
- Place the RGB NeRF render of the NeRF object over the environment (and shadow if present) layers and then place the accumulation NeRF object render over the RGB NeRF object render.
|
||||||
|
|
||||||
- Apply a filter to use the accumulation render as an alpha mask. In Premiere Pro, apply the effect "Track Matte Key" to the RGB render and select the "Matte" as the video track of the accumulation render and under "Composite Using" select "Matte Luma".
|
- Apply a filter to use the accumulation render as an alpha mask. In Premiere Pro, apply the effect "Track Matte Key" to the RGB render and select the "Matte" as the video track of the accumulation render and under "Composite Using" select "Matte Luma".
|
||||||
|
|
||||||
### Additional Details
|
### Additional Details
|
||||||
|
|
||||||
- The RGB and accumulation renders will need to be rendered for each NeRF cropped object in the scene, but not for the NeRF environment if it is not cropped.
|
- The RGB and accumulation renders will need to be rendered for each NeRF cropped object in the scene, but not for the NeRF environment if it is not cropped.
|
||||||
- If you will composite a shadow layer, the quality of the exported mesh of the NeRF object should have enough fidelity to cast a shadow, but the texture doesn't need to be clear.
|
- If you will composite a shadow layer, the quality of the exported mesh of the NeRF object should have enough fidelity to cast a shadow, but the texture doesn't need to be clear.
|
||||||
- If motion tracking or compositing over real camera footage, you can add planes or cubes to represent walls or doorways as shadow catcher or holdout objects. This will composite the shadow layer over the NeRF environment and help create alpha masks.
|
- If motion tracking or compositing over real camera footage, you can add planes or cubes to represent walls or doorways as shadow catcher or holdout objects. This will composite the shadow layer over the NeRF environment and help create alpha masks.
|
||||||
@@ -202,6 +205,7 @@ You can composite NeRF objects into a scene with a NeRF background by rendering
|
|||||||
- A walkthrough of this section is included in the tutorial video.
|
- A walkthrough of this section is included in the tutorial video.
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img width="300" alt="image" src="https://user-images.githubusercontent.com/9502341/232274012-27fb912c-3d3e-47b2-bb6b-68abf8f0692a.gif">
|
<img width="300" alt="image" src="https://user-images.githubusercontent.com/9502341/232274012-27fb912c-3d3e-47b2-bb6b-68abf8f0692a.gif">
|
||||||
<img width="225" alt="image" src="https://user-images.githubusercontent.com/9502341/232274049-d03e9768-8905-4668-b41b-d8ad4f122829.gif">
|
<img width="225" alt="image" src="https://user-images.githubusercontent.com/9502341/232274049-d03e9768-8905-4668-b41b-d8ad4f122829.gif">
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ Poisson surface reconstruction gives the highest quality meshes. See the steps b
|
|||||||
> **Note:**
|
> **Note:**
|
||||||
> This will only work with a Model that computes or predicts normals, e.g., nerfacto.
|
> This will only work with a Model that computes or predicts normals, e.g., nerfacto.
|
||||||
|
|
||||||
|
|
||||||
1. Train nerfacto with network settings that predict normals.
|
1. Train nerfacto with network settings that predict normals.
|
||||||
|
|
||||||
```bash
|
```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`.
|
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
|
||||||
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
|
## Dependencies
|
||||||
|
|||||||
+10
-10
@@ -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.
|
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 |
|
| Command | Description | Filename |
|
||||||
| ------------------------------------ | -------------------------------------- | ---------------------------------- |
|
| ------------------------------------ | -------------------------------------- | --------------------------------------------- |
|
||||||
| [ns-install-cli](ns_install_cli) | Install tab completion for all scripts | scripts/completions/install.py |
|
| [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 | scripts/process_data.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 | scripts/downloads/download_data.py |
|
| [ns-download-data](ns_download_data) | Download existing captures | nerfstudio/scripts/downloads/download_data.py |
|
||||||
| [ns-train](ns_train) | Generate a NeRF | scripts/train.py |
|
| [ns-train](ns_train) | Generate a NeRF | nerfstudio/scripts/train.py |
|
||||||
| [ns-viewer](ns_viewer) | View a trained NeRF | scripts/viewer/run_viewer.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 | scripts/eval.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 | scripts/render.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 | scripts/exporter.py |
|
| [ns-export](ns_export) | Export a NeRF into other formats | nerfstudio/scripts/exporter.py |
|
||||||
|
|
||||||
```{toctree}
|
```{toctree}
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.downloads.download_data
|
:module: nerfstudio.scripts.downloads.download_data
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-download-data
|
:prog: ns-download-data
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.eval
|
:module: nerfstudio.scripts.eval
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-eval
|
:prog: ns-eval
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.exporter
|
:module: nerfstudio.scripts.exporter
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-export
|
:prog: ns-export
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.completions.install
|
:module: nerfstudio.scripts.completions.install
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-install-cli
|
:prog: ns-install-cli
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ You may also want to install [hloc](https://github.com/cvg/Hierarchical-Localiza
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.process_data
|
:module: nerfstudio.scripts.process_data
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-process-data
|
:prog: ns-process-data
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Make sure to have [FFmpeg](https://ffmpeg.org/download.html) installed.
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.render
|
:module: nerfstudio.scripts.render
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-render
|
:prog: ns-render
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. argparse::
|
.. argparse::
|
||||||
:module: scripts.viewer.run_viewer
|
:module: nerfstudio.scripts.viewer.run_viewer
|
||||||
:func: get_parser_fn
|
:func: get_parser_fn
|
||||||
:prog: ns-viewer
|
:prog: ns-viewer
|
||||||
:nodefault:
|
:nodefault:
|
||||||
|
|||||||
@@ -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.
|
The project is set up for development in VSCode, we recommend using it if you plan to contribute.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Below are the various tooling features our team uses to maintain this codebase.
|
Below are the various tooling features our team uses to maintain this codebase.
|
||||||
|
|
||||||
| Tooling | Support |
|
| Tooling | Support |
|
||||||
| --------------- | ------------- |
|
| --------------- | ---------------------------------------------------------- |
|
||||||
| Linter | [Black](https://black.readthedocs.io/en/stable/) |
|
| Linter | [Black](https://black.readthedocs.io/en/stable/) |
|
||||||
| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) |
|
| Testing | [PyTest](https://docs.pytest.org/en/7.1.x/) |
|
||||||
| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) |
|
| Docs | [Sphinx](https://www.sphinx-doc.org/en/master/) |
|
||||||
| Docstring style | [Google](https://google.github.io/styleguide/pyguide.html) |
|
| Docstring style | [Google](https://google.github.io/styleguide/pyguide.html) |
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -53,8 +54,8 @@ conda install -c conda-forge pandoc
|
|||||||
|
|
||||||
:::{admonition} Attention
|
:::{admonition} Attention
|
||||||
:class: 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! 💌
|
3. Open pull request! 💌
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ conda install -c conda-forge pandoc
|
|||||||
Run the following to build the documentation:
|
Run the following to build the documentation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python scripts/docs/build_docs.py
|
python nerfstudio/scripts/docs/build_docs.py
|
||||||
```
|
```
|
||||||
|
|
||||||
:::{admonition} Tip
|
:::{admonition} Tip
|
||||||
@@ -84,7 +85,7 @@ If you want the code to build on save you can use [sphinx autobuild](https://git
|
|||||||
:class: info
|
:class: info
|
||||||
|
|
||||||
If changes to the structure are made, the build files may be incorrect.
|
If changes to the structure are made, the build files may be incorrect.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install sphinx-autobuild
|
pip install sphinx-autobuild
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class NuScenesDataParserConfig(DataParserConfig):
|
|||||||
Each clip was recorded with a suite of sensors including 6 surround cameras.
|
Each clip was recorded with a suite of sensors including 6 surround cameras.
|
||||||
It also includes 3D cuboid annotations around objects.
|
It also includes 3D cuboid annotations around objects.
|
||||||
We optionally use these cuboids to mask dynamic objects by specifying the mask_dir flag.
|
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)
|
_target: Type = field(default_factory=lambda: NuScenes)
|
||||||
|
|||||||
@@ -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.
|
||||||
File renamed without changes.
File renamed without changes.
@@ -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.
|
||||||
+14
@@ -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
|
nerfstudio_blender.py
|
||||||
"""
|
"""
|
||||||
File renamed without changes.
@@ -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.
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""Configuration script for setting up tab completion for nerfstudio in bash and zsh."""
|
"""Configuration script for setting up tab completion for nerfstudio in bash and zsh."""
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+14
@@ -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
|
import os
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -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.
|
||||||
@@ -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."""
|
"""Helper that add tags to notebooks based on cell comments."""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@@ -60,7 +74,8 @@ def main(check: bool = False):
|
|||||||
if incorrect_metadata:
|
if incorrect_metadata:
|
||||||
if check:
|
if check:
|
||||||
CONSOLE.print(
|
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
|
any_missing = True
|
||||||
else:
|
else:
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""Simple yaml debugger"""
|
"""Simple yaml debugger"""
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -32,7 +46,7 @@ def main(clean_cache: bool = False):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
CONSOLE.print("[green]Adding notebook documentation metadata")
|
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
|
# Add checks for building documentation
|
||||||
CONSOLE.print("[green]Building Documentation")
|
CONSOLE.print("[green]Building Documentation")
|
||||||
@@ -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.
|
||||||
@@ -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."""
|
"""Download datasets and specific captures from the datasets."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
eval.py
|
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.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Script for exporting NeRF into other formats.
|
Script for exporting NeRF into other formats.
|
||||||
"""
|
"""
|
||||||
@@ -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.
|
||||||
+14
@@ -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"""
|
"""Trace Stable Diffusion UNet for speed improvement"""
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
@@ -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.
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""Simple yaml debugger"""
|
"""Simple yaml debugger"""
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -57,7 +71,9 @@ def run_github_actions_file(filename: str, continue_on_fail: bool = False):
|
|||||||
# Add checks for building documentation
|
# Add checks for building documentation
|
||||||
CONSOLE.line()
|
CONSOLE.line()
|
||||||
CONSOLE.rule("[bold green]Adding notebook documentation metadata")
|
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.line()
|
||||||
CONSOLE.rule("[bold green]Building Documentation")
|
CONSOLE.rule("[bold green]Building Documentation")
|
||||||
success = success and run_command("cd docs/; make html SPHINXOPTS='-W;'", continue_on_fail=continue_on_fail)
|
success = success and run_command("cd docs/; make html SPHINXOPTS='-W;'", continue_on_fail=continue_on_fail)
|
||||||
File renamed without changes.
+2
-2
@@ -27,7 +27,7 @@ do
|
|||||||
echo "$i missing copyright header"
|
echo "$i missing copyright header"
|
||||||
check_failed=true
|
check_failed=true
|
||||||
else
|
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."
|
echo "Adding license header to $i."
|
||||||
fi
|
fi
|
||||||
added_headers=true
|
added_headers=true
|
||||||
@@ -36,7 +36,7 @@ done
|
|||||||
|
|
||||||
if [ "$check_failed" = true ];
|
if [ "$check_failed" = true ];
|
||||||
then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""Processes a video or image sequence to a nerfstudio compatible dataset."""
|
"""Processes a video or image sequence to a nerfstudio compatible dataset."""
|
||||||
|
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
render.py
|
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.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Script to texture an existing mesh file.
|
Script to texture an existing mesh file.
|
||||||
"""
|
"""
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""Train a radiance field with nerfstudio.
|
"""Train a radiance field with nerfstudio.
|
||||||
For real captures, we recommend using the [bright_yellow]nerfacto[/bright_yellow] model.
|
For real captures, we recommend using the [bright_yellow]nerfacto[/bright_yellow] model.
|
||||||
@@ -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.
|
||||||
@@ -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
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
Starts viewer in eval mode.
|
Starts viewer in eval mode.
|
||||||
+14
@@ -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."""
|
"""Generate viser message definitions for TypeScript, by parsing Python dataclasses."""
|
||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
+12
-13
@@ -99,17 +99,17 @@ docs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
# Note, add entrypoint name to scripts/completions/install.py to include CLI completion
|
# Note, add entrypoint name to nerfstudio/scripts/completions/install.py to include CLI completion
|
||||||
ns-install-cli = "scripts.completions.install:entrypoint"
|
ns-install-cli = "nerfstudio.scripts.completions.install:entrypoint"
|
||||||
ns-process-data = "scripts.process_data:entrypoint"
|
ns-process-data = "nerfstudio.scripts.process_data:entrypoint"
|
||||||
ns-download-data = "scripts.downloads.download_data:entrypoint"
|
ns-download-data = "nerfstudio.scripts.downloads.download_data:entrypoint"
|
||||||
ns-train = "scripts.train:entrypoint"
|
ns-train = "nerfstudio.scripts.train:entrypoint"
|
||||||
ns-viewer = "scripts.viewer.run_viewer:entrypoint"
|
ns-viewer = "nerfstudio.scripts.viewer.run_viewer:entrypoint"
|
||||||
ns-eval = "scripts.eval:entrypoint"
|
ns-eval = "nerfstudio.scripts.eval:entrypoint"
|
||||||
ns-render = "scripts.render:entrypoint"
|
ns-render = "nerfstudio.scripts.render:entrypoint"
|
||||||
ns-export = "scripts.exporter:entrypoint"
|
ns-export = "nerfstudio.scripts.exporter:entrypoint"
|
||||||
ns-dev-test = "scripts.github.run_actions:entrypoint"
|
ns-dev-test = "nerfstudio.scripts.github.run_actions:entrypoint"
|
||||||
ns-dev-sync-viser-message-defs = "scripts.viewer.sync_viser_message_defs:entrypoint"
|
ns-dev-sync-viser-message-defs = "nerfstudio.scripts.viewer.sync_viser_message_defs:entrypoint"
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
# equivalent to using --extra-index-url with pip, which is needed for specifying the CUDA version torch and torchvision
|
# 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]
|
[tool.setuptools.packages.find]
|
||||||
include = ["nerfstudio*","scripts*"]
|
include = ["nerfstudio*"]
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
[tool.setuptools.package-data]
|
||||||
"*" = ["*.cu", "*.json", "py.typed", "setup.bash", "setup.zsh"]
|
"*" = ["*.cu", "*.json", "py.typed", "setup.bash", "setup.zsh"]
|
||||||
@@ -132,7 +132,6 @@ line-length = 120
|
|||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
generated-members = ["numpy.*", "torch.*", "cv2.*", "cv.*"]
|
generated-members = ["numpy.*", "torch.*", "cv2.*", "cv.*"]
|
||||||
good-names-rgxs = "^[_a-zA-Z][_a-z0-9]?$"
|
good-names-rgxs = "^[_a-zA-Z][_a-z0-9]?$"
|
||||||
ignore-paths = ["scripts/colmap2nerf.py"]
|
|
||||||
jobs = 0
|
jobs = 0
|
||||||
ignored-classes = ["TensorDataclass"]
|
ignored-classes = ["TensorDataclass"]
|
||||||
|
|
||||||
|
|||||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
+1
-1
@@ -13,7 +13,7 @@ from nerfstudio.configs.method_configs import method_configs
|
|||||||
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
|
from nerfstudio.data.dataparsers.blender_dataparser import BlenderDataParserConfig
|
||||||
from nerfstudio.data.dataparsers.minimal_dataparser import MinimalDataParserConfig
|
from nerfstudio.data.dataparsers.minimal_dataparser import MinimalDataParserConfig
|
||||||
from nerfstudio.engine.trainer import TrainerConfig
|
from nerfstudio.engine.trainer import TrainerConfig
|
||||||
from scripts.train import train_loop
|
from nerfstudio.scripts.train import train_loop
|
||||||
|
|
||||||
BLACKLIST = [
|
BLACKLIST = [
|
||||||
"base",
|
"base",
|
||||||
|
|||||||
Reference in new issue
Block a user