diff --git a/colab/demo.ipynb b/colab/demo.ipynb index 1dceefaa6..6149ba4fe 100644 --- a/colab/demo.ipynb +++ b/colab/demo.ipynb @@ -3,11 +3,11 @@ { "cell_type": "markdown", "metadata": { - "colab_type": "text", - "id": "view-in-github" + "id": "view-in-github", + "colab_type": "text" }, "source": [ - "\"Open" + "\"Open" ] }, { @@ -59,24 +59,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "RGr33zHaHak0", - "outputId": "86df0e7f-35fe-4b79-8c0e-83692d42b124" + "outputId": "851bcce2-dce9-4cb4-8429-9ff0e27f73fe" }, "outputs": [ { - "name": "stdout", "output_type": "stream", + "name": "stdout", "text": [ "⏬ Downloading https://github.com/jaimergp/miniforge/releases/latest/download/Mambaforge-colab-Linux-x86_64.sh...\n", "📦 Installing...\n", "📌 Adjusting configuration...\n", "🩹 Patching environment...\n", - "⏲ Done in 0:00:23\n", + "⏲ Done in 0:00:19\n", "🔁 Restarting kernel...\n" ] } @@ -119,26 +119,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": { - "cellView": "form", "colab": { "base_uri": "https://localhost:8080/" }, "id": "msVLprI4gRA4", - "outputId": "c5eb5997-37d9-4c9f-a3d2-7b67f4b6d346" + "outputId": "0be99061-71e1-4e33-98ab-5096db323841" }, "outputs": [ { - "name": "stdout", "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" + "100% 750M/750M [00:03<00:00, 199MB/s]\n", + "\u001b[0mData Processing Succeeded!\n" ] } ], @@ -149,12 +148,25 @@ "from google.colab import files\n", "from IPython.core.display import display, HTML\n", "\n", - "scene = '\\uD83D\\uDDBC poster' #@param ['🖼 poster', '🚜 dozer', '🌄 desolation', '📤 upload your images' , '🎥 upload your own video']\n", + "scene = '\\uD83D\\uDDBC poster' #@param ['🖼 poster', '🚜 dozer', '🌄 desolation', '📤 upload your images' , '🎥 upload your own video', '💽 upload your own Record3D data']\n", "scene = ' '.join(scene.split(' ')[1:])\n", "\n", - "if scene not in ['upload your images', 'upload your own video']:\n", + "if scene not in ['upload your images', 'upload your own video', 'upload your own Record3D data']:\n", " %cd /content/\n", " !ns-download-data --dataset=nerfstudio --capture=$scene\n", + "elif scene == 'upload your own Record3D data':\n", + " display(HTML('

Zip your Record3D folder, and upload.

'))\n", + " display(HTML('

More information on Record3D can be found here.

'))\n", + " %cd /content/\n", + " !mkdir -p /content/data/nerfstudio/custom_data\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", + " record_3d_zipfile = preupload_datasets[0]\n", + " !unzip $record_3d_zipfile -d /content/data/nerfstudio/custom_data\n", + " custom_data_directory = glob.glob('/content/data/nerfstudio/custom_data/*')[0]\n", + " !ns-process-data record3d --data $custom_data_directory --output-dir /content/data/nerfstudio/custom_data/\n", "else:\n", " display(HTML('

Select your custom data

'))\n", " display(HTML('

You can select multiple images by pressing ctrl, cmd or shift and click.

'))\n", @@ -179,7 +191,8 @@ " 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\"" + " scene = \"custom_data\"\n", + "print(\"Data Processing Succeeded!\")" ] }, { @@ -283,7 +296,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "cellView": "form", "id": "m_N8_cLfjoXD" }, "outputs": [], @@ -360,8 +372,8 @@ "accelerator": "GPU", "colab": { "collapsed_sections": [], - "include_colab_link": true, - "provenance": [] + "provenance": [], + "include_colab_link": true }, "gpuClass": "standard", "kernelspec": { @@ -381,4 +393,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file