diff --git a/.vscode/launch.json b/.vscode/launch.json
index 8b92b869d..935d7ae8b 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -77,8 +77,8 @@
"--viewer.enable",
"--viewer.zmq-url=tcp://127.0.0.1:6001",
"--viewer.websocket-port=8014",
- "--trainer.steps_per_save=1000000",
- "--trainer.steps_per_test=1000000",
+ "--steps_per_save=1000000",
+ "--steps_per_test=1000000",
"--pipeline.model.density-field-params.base-scale=4",
"--pipeline.model.density-field-params.num-cascades=1",
"pipeline.datamanager.train-dataparser:friends-data-parser-config",
diff --git a/Dockerfile b/Dockerfile
index 9cfcb77b6..c2e3ab82b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# Define base image.
-FROM nvidia/cudagl:11.3.1-devel
+FROM nvidia/cuda:11.7.1-devel-ubuntu22.04
# Set environment variables.
## Set non-interactive to prevent asking for user inputs blocking image creation.
@@ -11,7 +11,7 @@ ENV TCNN_CUDA_ARCHITECTURES=86
## CUDA Home, required to find CUDA in some packages.
ENV CUDA_HOME="/usr/local/cuda"
-# Install required apt packages.
+# Install required apt packages and clear cache afterwards.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
@@ -36,10 +36,11 @@ RUN apt-get update && \
libsuitesparse-dev \
nano \
protobuf-compiler \
- python3.8-dev \
+ python3.10-dev \
python3-pip \
qtbase5-dev \
- wget
+ wget && \
+ rm -rf /var/lib/apt/lists/*
# Install GLOG (required by ceres).
RUN git clone --branch v0.6.0 https://github.com/google/glog.git --single-branch && \
@@ -50,7 +51,7 @@ RUN git clone --branch v0.6.0 https://github.com/google/glog.git --single-branch
make -j && \
make install && \
cd ../.. && \
- rm -r glog
+ rm -rf glog
# Add glog path to LD_LIBRARY_PATH.
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
@@ -64,18 +65,19 @@ RUN git clone --branch 2.1.0 https://ceres-solver.googlesource.com/ceres-solver.
make -j && \
make install && \
cd ../.. && \
- rm -r ceres-solver
+ rm -rf ceres-solver
# Install colmap.
RUN git clone --branch 3.7 https://github.com/colmap/colmap.git --single-branch && \
cd colmap && \
mkdir build && \
cd build && \
- cmake .. && \
+ cmake .. -DCUDA_ENABLED=ON \
+ -DCUDA_NVCC_FLAGS="--std c++14" && \
make -j && \
make install && \
cd ../.. && \
- rm -r colmap
+ rm -rf colmap
# Create non root user and setup environment.
RUN useradd -m -d /home/user -u 1000 user
@@ -89,11 +91,11 @@ ENV PATH="${PATH}:/home/user/.local/bin"
SHELL ["/bin/bash", "-c"]
# Upgrade pip and install packages.
-RUN python3.8 -m pip install --upgrade pip setuptools pathtools promise
+RUN python3.10 -m pip install --upgrade pip setuptools pathtools promise
# Install pytorch and submodules.
-RUN python3.8 -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
+RUN python3.10 -m pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
# Install tynyCUDNN.
-RUN python3.8 -m pip install git+https://github.com/NVlabs/tiny-cuda-nn.git#subdirectory=bindings/torch
+RUN python3.10 -m pip install git+https://github.com/NVlabs/tiny-cuda-nn.git#subdirectory=bindings/torch
# Copy nerfstudio folder and give ownership to user.
ADD . /home/user/nerfstudio
@@ -103,7 +105,7 @@ USER 1000:1000
# Install nerfstudio dependencies.
RUN cd nerfstudio && \
- python3.8 -m pip install -e . && \
+ python3.10 -m pip install -e . && \
cd ..
# Change working directory
diff --git a/README.md b/README.md
index edef31622..d4c29ce9c 100644
--- a/README.md
+++ b/README.md
@@ -151,7 +151,7 @@ Navigating to the link at the end of the terminal will load the webviewer. If yo
It is possible to load a pretrained model by running
```bash
-ns-train nerfacto --data data/nerfstudio/poster --trainer.load-dir {outputs/.../nerfstudio_models}
+ns-train nerfacto --data data/nerfstudio/poster --load-dir {outputs/.../nerfstudio_models}
```
This will automatically start training. If you do not want it to train, add `--viewer.start-train False` to your training command.
@@ -162,9 +162,9 @@ Once you have a NeRF model you can either render out a video or export a point c
### Render Video
-First we must create a path for the camera to follow. This can be done in the viewer under the "RENDER" tab. Orient your 3D view to the location where you wish the video to start, then press "ADD CAMERA". This will set the first camera key frame. Continue to new viewpoints adding additional cameras to create the camera path. We provide other parameters to further refine your camera path. Once satisfied, press "RENDER" which will display a modal that contains the command needed to render the video. Kill the training job (or create a new terminal if you have lots of compute) and the command to generate the video.
+First we must create a path for the camera to follow. This can be done in the viewer under the "RENDER" tab. Orient your 3D view to the location where you wish the video to start, then press "ADD CAMERA". This will set the first camera key frame. Continue to new viewpoints adding additional cameras to create the camera path. We provide other parameters to further refine your camera path. Once satisfied, press "RENDER" which will display a modal that contains the command needed to render the video. Kill the training job (or create a new terminal if you have lots of compute) and run the command to generate the video.
-Other video export options are available, learn more by running,
+Other video export options are available, learn more by running
```bash
ns-render --help
@@ -174,7 +174,7 @@ ns-render --help
While NeRF models are not designed to generate point clouds, it is still possible. Navigate to the "EXPORT" tab in the 3D viewer and select "POINT CLOUD". If the crop option is selected, everything in the yellow square will be exported into a point cloud. Modify the settings as desired then run the command at the bottom of the panel in your command line.
-Alternatively you can use the CLI without the viewer. Learn about the export options by running,
+Alternatively you can use the CLI without the viewer. Learn about the export options by running
```bash
ns-export pointcloud --help
@@ -198,7 +198,7 @@ Using an existing dataset is great, but likely you want to use your own data! We
### Training models other than nerfacto
-We provide other models than nerfacto, for example if you want to train the original nerf model, use the following command,
+We provide other models than nerfacto, for example if you want to train the original nerf model, use the following command
```bash
ns-train vanilla-nerf --data DATA_PATH
@@ -245,7 +245,7 @@ If you're interested in learning more on how to create your own pipelines, devel
# Supported Features
-We provide the following support structures to make life easier for getting started with NeRFs. For a full description, please refer to our [features page](#).
+We provide the following support structures to make life easier for getting started with NeRFs.
**If you are looking for a feature that is not currently supported, please do not hesitate to contact the Nerfstudio Team on [Discord](https://discord.gg/uMbNqcraFc)!**
diff --git a/colab/demo.ipynb b/colab/demo.ipynb
index 148da3b88..e92f8b04d 100644
--- a/colab/demo.ipynb
+++ b/colab/demo.ipynb
@@ -7,7 +7,7 @@
"colab_type": "text"
},
"source": [
- ""
+ "
"
]
},
{
@@ -63,9 +63,8 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"metadata": {
- "cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/"
},
@@ -98,7 +97,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
- "cellView": "form",
"id": "9oyLHl8QfYwP"
},
"outputs": [],
@@ -121,7 +119,8 @@
"# Install nerfstudio\n",
"%cd /content/\n",
"# !pip install nerfstudio\n",
- "!pip install git+https://github.com/nerfstudio-project/nerfstudio.git"
+ "!pip install git+https://github.com/nerfstudio-project/nerfstudio.git\n",
+ "!conda remove --force qt-main"
]
},
{
@@ -293,8 +292,9 @@
"if os.path.exists(f\"data/nerfstudio/{scene}/transforms.json\"):\n",
" !ns-train nerfacto --viewer.websocket-port 7007 nerfstudio-data --data data/nerfstudio/$scene --downscale-factor 4\n",
"else:\n",
- " display(HTML('