diff --git a/docs/tutorials/fit_simple_neural_radiance_field.ipynb b/docs/tutorials/fit_simple_neural_radiance_field.ipynb index b2c047a9..9a413646 100644 --- a/docs/tutorials/fit_simple_neural_radiance_field.ipynb +++ b/docs/tutorials/fit_simple_neural_radiance_field.ipynb @@ -106,11 +106,6 @@ " ray_bundle_to_ray_points,\n", ")\n", "\n", - "# add path for demo utils functions \n", - "sys.path.append(os.path.abspath(''))\n", - "from utils.plot_image_grid import image_grid\n", - "from utils.generate_cow_renders import generate_cow_renders\n", - "\n", "# obtain the utilized device\n", "if torch.cuda.is_available():\n", " device = torch.device(\"cuda:0\")\n", @@ -125,6 +120,35 @@ " device = torch.device(\"cpu\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/plot_image_grid.py\n", + "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/generate_cow_renders.py\n", + "from plot_image_grid import image_grid\n", + "from generate_cow_renders import generate_cow_renders" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "OR if running locally uncomment and run the following cell:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# from utils.generate_cow_renders import generate_cow_renders\n", + "# from utils import image_grid" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/docs/tutorials/fit_textured_volume.ipynb b/docs/tutorials/fit_textured_volume.ipynb index 9762f36e..3c68fdd9 100644 --- a/docs/tutorials/fit_textured_volume.ipynb +++ b/docs/tutorials/fit_textured_volume.ipynb @@ -92,11 +92,6 @@ ")\n", "from pytorch3d.transforms import so3_exp_map\n", "\n", - "# add path for demo utils functions \n", - "sys.path.append(os.path.abspath(''))\n", - "from utils.plot_image_grid import image_grid\n", - "from utils.generate_cow_renders import generate_cow_renders\n", - "\n", "# obtain the utilized device\n", "if torch.cuda.is_available():\n", " device = torch.device(\"cuda:0\")\n", @@ -105,6 +100,35 @@ " device = torch.device(\"cpu\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/plot_image_grid.py\n", + "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/generate_cow_renders.py\n", + "from plot_image_grid import image_grid\n", + "from generate_cow_renders import generate_cow_renders" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "OR if running locally uncomment and run the following cell:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# from utils.generate_cow_renders import generate_cow_renders\n", + "# from utils import image_grid" + ] + }, { "cell_type": "markdown", "metadata": {},