diff --git a/colab/demo.ipynb b/colab/demo.ipynb
new file mode 100644
index 000000000..86e286caa
--- /dev/null
+++ b/colab/demo.ipynb
@@ -0,0 +1,377 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": [],
+ "collapsed_sections": [],
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ },
+ "accelerator": "GPU",
+ "gpuClass": "standard"
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "
\n",
+ "
\n",
+ "
'))\n", + " display(HTML('
Note: This may take time, especially on hires inputs, so we recommend to download dataset after creation.'))\n",
+ " !mkdir -p /content/data/nerfstudio/custom_data\n",
+ " if scene == 'upload your images':\n",
+ " !mkdir -p /content/data/nerfstudio/custom_data/raw_images\n",
+ " %cd /content/data/nerfstudio/custom_data/raw_images\n",
+ " uploaded = files.upload()\n",
+ " dir = os.getcwd()\n",
+ " else:\n",
+ " %cd /content/data/nerfstudio/custom_data/\n",
+ " uploaded = files.upload()\n",
+ " dir = os.getcwd()\n",
+ " preupload_datasets = [os.path.join(dir, f) for f in uploaded.keys()]\n",
+ " del uploaded\n",
+ " %cd /content/\n",
+ "\n",
+ " if scene == 'upload your images':\n",
+ " !ns-process-data images --data /content/data/nerfstudio/custom_data/raw_images --output-dir /content/data/nerfstudio/custom_data/\n",
+ " else:\n",
+ " video_path = preupload_datasets[0]\n",
+ " !ns-process-data video --data $video_path --output-dir /content/data/nerfstudio/custom_data/\n",
+ "\n",
+ " scene = \"custom_data\""
+ ],
+ "metadata": {
+ "id": "msVLprI4gRA4",
+ "cellView": "form",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "c5eb5997-37d9-4c9f-a3d2-7b67f4b6d346"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "/content\n",
+ "Downloading...\n",
+ "From: https://drive.google.com/uc?id=1dmjWGXlJnUxwosN6MVooCDQe970PkD-1\n",
+ "To: /content/data/nerfstudio/poster.zip\n",
+ "100% 750M/750M [00:03<00:00, 218MB/s]\n",
+ "\u001b[0m"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#@title # Set Up Viewer\n",
+ "\n",
+ "%cd /content\n",
+ "\n",
+ "# Install localtunnel\n",
+ "# We are using localtunnel https://github.com/localtunnel/localtunnel but ngrok could also be used\n",
+ "!npm install -g localtunnel\n",
+ "\n",
+ "# Tunnel port 7007, the default for\n",
+ "!rm url.txt 2> /dev/null\n",
+ "get_ipython().system_raw('lt --port 7007 >> url.txt 2>&1 &')"
+ ],
+ "metadata": {
+ "id": "Eju-3p2hjcB2",
+ "cellView": "form",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "c9ff081c-2436-44c6-d292-f22dc3ef78b5"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "/content\n",
+ "\u001b[K\u001b[?25h/tools/node/bin/lt -> /tools/node/lib/node_modules/localtunnel/bin/lt.js\n",
+ "+ localtunnel@2.0.2\n",
+ "added 22 packages from 22 contributors in 1.536s\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#@title # Start Viewer\n",
+ "\n",
+ "with open('url.txt') as f:\n",
+ " lines = f.readlines()\n",
+ "websocket_url = lines[0].split(\": \")[1].strip().replace(\"https\", \"wss\")\n",
+ "# from nerfstudio.utils.io import load_from_json\n",
+ "# from pathlib import Path\n",
+ "# json_filename = \"nerfstudio/nerfstudio/viewer/app/package.json\"\n",
+ "# version = load_from_json(Path(json_filename))[\"version\"]\n",
+ "url = f\"https://viewer.nerf.studio/?websocket_url={websocket_url}\"\n",
+ "print(url)\n",
+ "print(\"You may need to click Refresh Page after you start training!\")\n",
+ "from IPython import display\n",
+ "display.IFrame(src=url, height=800, width=\"100%\")"
+ ],
+ "metadata": {
+ "id": "VoKDxqEcjmfC",
+ "cellView": "form",
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 857
+ },
+ "outputId": "b966821b-7d18-43ee-ceb3-724ac2d0c022"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "https://viewer.nerf.studio/?websocket_url=wss://good-ways-ask-34-83-255-230.loca.lt\n",
+ "You may need to click Refresh Page after you start training!\n"
+ ]
+ },
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "Export the camera path from within the viewer, then run this cell.
\n",
+ "#@markdown The rendered video should be at renders/output.mp4!
\n",
+ "\n",
+ "\n",
+ "base_dir = \"/content/outputs/data-nerfstudio-\" + scene + \"/nerfacto/\"\n",
+ "training_run_dir = base_dir + os.listdir(base_dir)[0]\n",
+ "\n",
+ "from IPython.core.display import display, HTML\n",
+ "display(HTML('Upload the camera path JSON.
'))\n",
+ "%cd $training_run_dir\n",
+ "uploaded = files.upload()\n",
+ "uploaded_camera_path_filename = list(uploaded.keys())[0]\n",
+ "\n",
+ "config_filename = training_run_dir + \"/config.yml\"\n",
+ "camera_path_filename = training_run_dir + \"/\" + uploaded_camera_path_filename\n",
+ "camera_path_filename = camera_path_filename.replace(\" \", \"\\\\ \").replace(\"(\", \"\\\\(\").replace(\")\", \"\\\\)\")\n",
+ "\n",
+ "%cd /content/\n",
+ "!ns-render --load-config $config_filename --traj filename --camera-path-filename $camera_path_filename --output-path renders/output.mp4"
+ ],
+ "metadata": {
+ "id": "WGt8ukG6Htg3",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "outputId": "fa946890-c7d8-4e46-a54e-7231bc5a2059",
+ "cellView": "form"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\u001b[2;36m[19:48:48]\u001b[0m\u001b[2;36m \u001b[0mSkipping \u001b[1;36m0\u001b[0m files in dataset split train. \u001b]8;id=527413;file:///content/nerfstudio/nerfstudio/data/dataparsers/nerfstudio_dataparser.py\u001b\\\u001b[2mnerfstudio_dataparser.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=243595;file:///content/nerfstudio/nerfstudio/data/dataparsers/nerfstudio_dataparser.py#91\u001b\\\u001b[2m91\u001b[0m\u001b]8;;\u001b\\\n",
+ "\u001b[2;36m \u001b[0m\u001b[2;36m \u001b[0mSkipping \u001b[1;36m0\u001b[0m files in dataset split test. \u001b]8;id=109270;file:///content/nerfstudio/nerfstudio/data/dataparsers/nerfstudio_dataparser.py\u001b\\\u001b[2mnerfstudio_dataparser.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=464675;file:///content/nerfstudio/nerfstudio/data/dataparsers/nerfstudio_dataparser.py#91\u001b\\\u001b[2m91\u001b[0m\u001b]8;;\u001b\\\n",
+ "\u001b[2KLoading data batch \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25h/usr/local/lib/python3.7/site-packages/torch/utils/data/dataloader.py:566: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.\n",
+ " cpuset_checked))\n",
+ "\u001b[2KLoading data batch \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25h/usr/local/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.\n",
+ " f\"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, \"\n",
+ "/usr/local/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=AlexNet_Weights.IMAGENET1K_V1`. You can also use `weights=AlexNet_Weights.DEFAULT` to get the most up-to-date weights.\n",
+ " warnings.warn(msg)\n",
+ "Loading latest checkpoint from load_dir\n",
+ "✅ Done loading checkpoint from \n",
+ "outputs/data-nerfstudio-poster/nerfacto/\u001b[1;36m2022\u001b[0m-\u001b[1;36m10\u001b[0m-29_192844/nerfstudio_models/step-\u001b[1;36m000014000.\u001b[0mckpt\n",
+ "\u001b[1;32mCreating trajectory video\u001b[0m\n",
+ "\u001b[2K🎥 Rendering 🎥 \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[31m0.14 fps\u001b[0m \u001b[33m11:47\u001b[0m\n",
+ "\u001b[2K\u001b[32m( ● )\u001b[0m \u001b[33mSaving video\u001b[0m\n",
+ "\u001b[1A\u001b[2K\u001b[92m────────────────────────────────────────────── \u001b[0m\u001b[32m 🎉 🎉 🎉 Success 🎉 🎉 🎉\u001b[0m\u001b[92m ──────────────────────────────────────────────\u001b[0m\n",
+ " \u001b[32mSaved video to renders/output.mp4\u001b[0m \n",
+ "\u001b[0m"
+ ]
+ }
+ ]
+ }
+ ]
+}