diff --git a/docs/batching.html b/docs/batching.html index 3306898a4..44e2b0efc 100644 --- a/docs/batching.html +++ b/docs/batching.html @@ -76,4 +76,4 @@

Use cases for batch modes

The need for different mesh batch modes is inherent to the way PyTorch operators are implemented. To fully utilize the optimized PyTorch ops, the Meshes data structure allows for efficient conversion between the different batch modes. This is crucial when aiming for a fast and efficient training cycle. An example of this is Mesh R-CNN. Here, in the same forward pass different parts of the network assume different inputs, which are computed by converting between the different batch modes. In particular, vert_align assumes a padded input tensor while immediately after graph_conv assumes a packed input tensor.

meshrcnn

-
Last updated by Jeremy Reizenstein
Data loadersCubify
\ No newline at end of file +
Last updated by Jeremy Reizenstein
Data loadersCubify
\ No newline at end of file diff --git a/docs/batching/index.html b/docs/batching/index.html index 3306898a4..44e2b0efc 100644 --- a/docs/batching/index.html +++ b/docs/batching/index.html @@ -76,4 +76,4 @@

Use cases for batch modes

The need for different mesh batch modes is inherent to the way PyTorch operators are implemented. To fully utilize the optimized PyTorch ops, the Meshes data structure allows for efficient conversion between the different batch modes. This is crucial when aiming for a fast and efficient training cycle. An example of this is Mesh R-CNN. Here, in the same forward pass different parts of the network assume different inputs, which are computed by converting between the different batch modes. In particular, vert_align assumes a padded input tensor while immediately after graph_conv assumes a packed input tensor.

meshrcnn

-
Last updated by Jeremy Reizenstein
Data loadersCubify
\ No newline at end of file +
Last updated by Jeremy Reizenstein
Data loadersCubify
\ No newline at end of file diff --git a/docs/cameras.html b/docs/cameras.html index 67ce2eefc..809996545 100644 --- a/docs/cameras.html +++ b/docs/cameras.html @@ -125,7 +125,7 @@

\ No newline at end of file +
Last updated by Xiao Xuan
\ No newline at end of file diff --git a/docs/cameras/index.html b/docs/cameras/index.html index 67ce2eefc..809996545 100644 --- a/docs/cameras/index.html +++ b/docs/cameras/index.html @@ -125,7 +125,7 @@

\ No newline at end of file +
Last updated by Xiao Xuan
\ No newline at end of file diff --git a/docs/cubify.html b/docs/cubify.html index e627fb115..261ecf9e9 100644 --- a/docs/cubify.html +++ b/docs/cubify.html @@ -66,4 +66,4 @@

The cubify operator converts an 3D occupancy grid of shape BxDxHxW, where B is the batch size, into a mesh instantiated as a Meshes data structure of B elements. The operator replaces every occupied voxel (if its occupancy probability is greater than a user defined threshold) with a cuboid of 12 faces and 8 vertices. Shared vertices are merged, and internal faces are removed resulting in a watertight mesh.

The operator provides three alignment modes {topleft, corner, center} which define the span of the mesh vertices with respect to the voxel grid. The alignment modes are described in the figure below for a 2D grid.

input

-
Last updated by Jeremy Reizenstein
\ No newline at end of file +
Last updated by Jeremy Reizenstein
\ No newline at end of file diff --git a/docs/cubify/index.html b/docs/cubify/index.html index e627fb115..261ecf9e9 100644 --- a/docs/cubify/index.html +++ b/docs/cubify/index.html @@ -66,4 +66,4 @@

The cubify operator converts an 3D occupancy grid of shape BxDxHxW, where B is the batch size, into a mesh instantiated as a Meshes data structure of B elements. The operator replaces every occupied voxel (if its occupancy probability is greater than a user defined threshold) with a cuboid of 12 faces and 8 vertices. Shared vertices are merged, and internal faces are removed resulting in a watertight mesh.

The operator provides three alignment modes {topleft, corner, center} which define the span of the mesh vertices with respect to the voxel grid. The alignment modes are described in the figure below for a 2D grid.

input

-
Last updated by Jeremy Reizenstein
\ No newline at end of file +
Last updated by Jeremy Reizenstein
\ No newline at end of file diff --git a/docs/datasets.html b/docs/datasets.html index adaf83e03..3487bd02f 100644 --- a/docs/datasets.html +++ b/docs/datasets.html @@ -70,4 +70,4 @@

R2N2

The R2N2 dataset contains 13 categories that are a subset of the ShapeNetCore v.1 dataset. The R2N2 dataset also contains its own 24 renderings of each object and voxelized models. The R2N2 Dataset can be downloaded following the instructions here.

The PyTorch3D R2N2 data loader is initialized with the paths to the ShapeNet dataset, the R2N2 dataset and the splits file for R2N2. Just like ShapeNetCore, it can be passed to torch.utils.data.DataLoader with a customized collate_fn: collate_batched_R2N2 from the pytorch3d.dataset.r2n2.utils module. It returns all the data that ShapeNetCore returns, and in addition, it returns the R2N2 renderings (24 views for each model) along with the camera calibration matrices and a voxel representation for each model. Similar to ShapeNetCore, it has a customized render function that supports rendering specified models with the PyTorch3D differentiable renderer. In addition, it supports rendering models with the same orientations as R2N2's original renderings.

-
Last updated by Jeremy Reizenstein
\ No newline at end of file +
Last updated by Jeremy Reizenstein
\ No newline at end of file diff --git a/docs/datasets/index.html b/docs/datasets/index.html index adaf83e03..3487bd02f 100644 --- a/docs/datasets/index.html +++ b/docs/datasets/index.html @@ -70,4 +70,4 @@

R2N2

The R2N2 dataset contains 13 categories that are a subset of the ShapeNetCore v.1 dataset. The R2N2 dataset also contains its own 24 renderings of each object and voxelized models. The R2N2 Dataset can be downloaded following the instructions here.

The PyTorch3D R2N2 data loader is initialized with the paths to the ShapeNet dataset, the R2N2 dataset and the splits file for R2N2. Just like ShapeNetCore, it can be passed to torch.utils.data.DataLoader with a customized collate_fn: collate_batched_R2N2 from the pytorch3d.dataset.r2n2.utils module. It returns all the data that ShapeNetCore returns, and in addition, it returns the R2N2 renderings (24 views for each model) along with the camera calibration matrices and a voxel representation for each model. Similar to ShapeNetCore, it has a customized render function that supports rendering specified models with the PyTorch3D differentiable renderer. In addition, it supports rendering models with the same orientations as R2N2's original renderings.

-
Last updated by Jeremy Reizenstein
Loading from fileBatching
\ No newline at end of file +
Last updated by Jeremy Reizenstein
Loading from fileBatching
\ No newline at end of file diff --git a/docs/io.html b/docs/io.html index 8cf216599..93608e351 100644 --- a/docs/io.html +++ b/docs/io.html @@ -65,16 +65,16 @@

File IO

There is a flexible interface for loading and saving point clouds and meshes from different formats.

The main usage is via the pytorch3d.io.IO object, and its methods -load_mesh, save_mesh, load_point_cloud and save_point_cloud.

+load_mesh, save_mesh, load_pointcloud and save_pointcloud.

For example, to load a mesh you might do

from pytorch3d.io import IO
 
 device=torch.device("cuda:0")
-mesh = IO().load_mesh("mymesh.ply", device=device)
+mesh = IO().load_mesh("mymesh.obj", device=device)
 

and to save a pointcloud you might do

pcl = Pointclouds(...)
-IO().save_point_cloud(pcl, "output_pointcloud.obj")
+IO().save_pointcloud(pcl, "output_pointcloud.ply")
 

For meshes, this supports OBJ, PLY and OFF files.

For pointclouds, this supports PLY files.

@@ -82,5 +82,5 @@ glTF 2 assets stored either in a GLB container file or a glTF JSON file with embedded binary data. This must be enabled explicitly, as described in -pytorch3d/io/experimental_gltf_io.ply.

-
Last updated by Jeremy Reizenstein
\ No newline at end of file +pytorch3d/io/experimental_gltf_io.py.

+
Last updated by Jeremy Reizenstein
Why PyTorch3DLoading from file
\ No newline at end of file diff --git a/docs/io/index.html b/docs/io/index.html index 8cf216599..93608e351 100644 --- a/docs/io/index.html +++ b/docs/io/index.html @@ -65,16 +65,16 @@

File IO

There is a flexible interface for loading and saving point clouds and meshes from different formats.

The main usage is via the pytorch3d.io.IO object, and its methods -load_mesh, save_mesh, load_point_cloud and save_point_cloud.

+load_mesh, save_mesh, load_pointcloud and save_pointcloud.

For example, to load a mesh you might do

from pytorch3d.io import IO
 
 device=torch.device("cuda:0")
-mesh = IO().load_mesh("mymesh.ply", device=device)
+mesh = IO().load_mesh("mymesh.obj", device=device)
 

and to save a pointcloud you might do

pcl = Pointclouds(...)
-IO().save_point_cloud(pcl, "output_pointcloud.obj")
+IO().save_pointcloud(pcl, "output_pointcloud.ply")
 

For meshes, this supports OBJ, PLY and OFF files.

For pointclouds, this supports PLY files.

@@ -82,5 +82,5 @@ glTF 2 assets stored either in a GLB container file or a glTF JSON file with embedded binary data. This must be enabled explicitly, as described in -pytorch3d/io/experimental_gltf_io.ply.

-
Last updated by Jeremy Reizenstein
\ No newline at end of file +pytorch3d/io/experimental_gltf_io.py.

+
Last updated by Jeremy Reizenstein
Why PyTorch3DLoading from file
\ No newline at end of file diff --git a/docs/iou3d.html b/docs/iou3d.html index ab3783005..7462c72e0 100644 --- a/docs/iou3d.html +++ b/docs/iou3d.html @@ -122,4 +122,4 @@

2020}, } -
Last updated by Ji Hou
CubifyPlotly Visualization
\ No newline at end of file +
Last updated by Ji Hou
CubifyPlotly Visualization
\ No newline at end of file diff --git a/docs/iou3d/index.html b/docs/iou3d/index.html index ab3783005..7462c72e0 100644 --- a/docs/iou3d/index.html +++ b/docs/iou3d/index.html @@ -122,4 +122,4 @@

2020}, } -
Last updated by Ji Hou
CubifyPlotly Visualization
\ No newline at end of file +
Last updated by Ji Hou
CubifyPlotly Visualization
\ No newline at end of file diff --git a/docs/meshes_io.html b/docs/meshes_io.html index 9d2bfde90..1505540eb 100644 --- a/docs/meshes_io.html +++ b/docs/meshes_io.html @@ -116,4 +116,4 @@

    meshes = Meshes(verts=[verts], faces=[faces])
 
-
Last updated by Jeremy Reizenstein
File IOData loaders
\ No newline at end of file +
Last updated by Jeremy Reizenstein
File IOData loaders
\ No newline at end of file diff --git a/docs/meshes_io/index.html b/docs/meshes_io/index.html index 9d2bfde90..1505540eb 100644 --- a/docs/meshes_io/index.html +++ b/docs/meshes_io/index.html @@ -116,4 +116,4 @@

    meshes = Meshes(verts=[verts], faces=[faces])
 
-
Last updated by Jeremy Reizenstein
File IOData loaders
\ No newline at end of file +
Last updated by Jeremy Reizenstein
File IOData loaders
\ No newline at end of file diff --git a/docs/renderer.html b/docs/renderer.html index c6f8d0f03..124ea30c5 100644 --- a/docs/renderer.html +++ b/docs/renderer.html @@ -109,4 +109,4 @@

[6] Yifan et al, 'Differentiable Surface Splatting for Point-based Geometry Processing', SIGGRAPH Asia 2019

[7] Loubet et al, 'Reparameterizing Discontinuous Integrands for Differentiable Rendering', SIGGRAPH Asia 2019

[8] Chen et al, 'Learning to Predict 3D Objects with an Interpolation-based Differentiable Renderer', NeurIPS 2019

-
Last updated by Krzysztof Chalupka
Plotly VisualizationGetting Started
\ No newline at end of file +
Last updated by Krzysztof Chalupka
Plotly VisualizationGetting Started
\ No newline at end of file diff --git a/docs/renderer/index.html b/docs/renderer/index.html index c6f8d0f03..124ea30c5 100644 --- a/docs/renderer/index.html +++ b/docs/renderer/index.html @@ -109,4 +109,4 @@

[6] Yifan et al, 'Differentiable Surface Splatting for Point-based Geometry Processing', SIGGRAPH Asia 2019

[7] Loubet et al, 'Reparameterizing Discontinuous Integrands for Differentiable Rendering', SIGGRAPH Asia 2019

[8] Chen et al, 'Learning to Predict 3D Objects with an Interpolation-based Differentiable Renderer', NeurIPS 2019

-
Last updated by Krzysztof Chalupka
Plotly VisualizationGetting Started
\ No newline at end of file +
Last updated by Krzysztof Chalupka
Plotly VisualizationGetting Started
\ No newline at end of file diff --git a/docs/renderer_getting_started.html b/docs/renderer_getting_started.html index 0c0cba641..b12b0c49b 100644 --- a/docs/renderer_getting_started.html +++ b/docs/renderer_getting_started.html @@ -168,4 +168,4 @@

✔️ -
Last updated by Jeremy Reizenstein
OverviewCameras
\ No newline at end of file +
Last updated by Jeremy Reizenstein
OverviewCameras
\ No newline at end of file diff --git a/docs/renderer_getting_started/index.html b/docs/renderer_getting_started/index.html index 0c0cba641..b12b0c49b 100644 --- a/docs/renderer_getting_started/index.html +++ b/docs/renderer_getting_started/index.html @@ -168,4 +168,4 @@

✔️ -
Last updated by Jeremy Reizenstein
OverviewCameras
\ No newline at end of file +
Last updated by Jeremy Reizenstein
OverviewCameras
\ No newline at end of file diff --git a/docs/visualization.html b/docs/visualization.html index 7b17a64c3..baceb94db 100644 --- a/docs/visualization.html +++ b/docs/visualization.html @@ -75,4 +75,4 @@

fig = ... fig.write_image("image_name.png") -
Last updated by Alex Naumann
IoU3DOverview
\ No newline at end of file +
Last updated by Alex Naumann
IoU3DOverview
\ No newline at end of file diff --git a/docs/visualization/index.html b/docs/visualization/index.html index 7b17a64c3..baceb94db 100644 --- a/docs/visualization/index.html +++ b/docs/visualization/index.html @@ -75,4 +75,4 @@

fig = ... fig.write_image("image_name.png") -
Last updated by Alex Naumann
IoU3DOverview
\ No newline at end of file +
Last updated by Alex Naumann
IoU3DOverview
\ No newline at end of file diff --git a/docs/why_pytorch3d.html b/docs/why_pytorch3d.html index 57048ab81..04a628d11 100644 --- a/docs/why_pytorch3d.html +++ b/docs/why_pytorch3d.html @@ -65,4 +65,4 @@

Why PyTorch3D

Our goal with PyTorch3D is to help accelerate research at the intersection of deep learning and 3D. 3D data is more complex than 2D images and while working on projects such as Mesh R-CNN and C3DPO, we encountered several challenges including 3D data representation, batching, and speed. We have developed many useful operators and abstractions for working on 3D deep learning and want to share this with the community to drive novel research in this area.

In PyTorch3D we have included efficient 3D operators, heterogeneous batching capabilities, and a modular differentiable rendering API, to equip researchers in this field with a much needed toolkit to implement cutting-edge research with complex 3D inputs.

-
Last updated by Patrick Labatut
\ No newline at end of file +
Last updated by Patrick Labatut
File IO
\ No newline at end of file diff --git a/docs/why_pytorch3d/index.html b/docs/why_pytorch3d/index.html index 57048ab81..04a628d11 100644 --- a/docs/why_pytorch3d/index.html +++ b/docs/why_pytorch3d/index.html @@ -65,4 +65,4 @@

Why PyTorch3D

Our goal with PyTorch3D is to help accelerate research at the intersection of deep learning and 3D. 3D data is more complex than 2D images and while working on projects such as Mesh R-CNN and C3DPO, we encountered several challenges including 3D data representation, batching, and speed. We have developed many useful operators and abstractions for working on 3D deep learning and want to share this with the community to drive novel research in this area.

In PyTorch3D we have included efficient 3D operators, heterogeneous batching capabilities, and a modular differentiable rendering API, to equip researchers in this field with a much needed toolkit to implement cutting-edge research with complex 3D inputs.

-
Last updated by Patrick Labatut
\ No newline at end of file +
Last updated by Patrick Labatut
File IO
\ No newline at end of file diff --git a/en/help.html b/en/help.html index 0d800f33f..37e5c5c97 100644 --- a/en/help.html +++ b/en/help.html @@ -12,4 +12,4 @@

Ask questions about the documentation and project

Stay up to date

Find out what's new with this project

-
\ No newline at end of file + \ No newline at end of file diff --git a/en/help/index.html b/en/help/index.html index 0d800f33f..37e5c5c97 100644 --- a/en/help/index.html +++ b/en/help/index.html @@ -12,4 +12,4 @@

Ask questions about the documentation and project

Stay up to date

Find out what's new with this project

-
\ No newline at end of file + \ No newline at end of file diff --git a/en/index.html b/en/index.html index 34931cbf8..8a3c012e0 100644 --- a/en/index.html +++ b/en/index.html @@ -28,4 +28,4 @@ sample_test = sample_points_from_meshes(test_mesh, 5000) loss_chamfer, _ = chamfer_distance(sample_sphere, sample_test) - \ No newline at end of file + \ No newline at end of file diff --git a/en/users.html b/en/users.html index 2cf056bbf..bc350fc3f 100644 --- a/en/users.html +++ b/en/users.html @@ -6,4 +6,4 @@ ga('create', 'UA-157376881-1', 'auto'); ga('send', 'pageview'); -
\ No newline at end of file +
\ No newline at end of file diff --git a/en/users/index.html b/en/users/index.html index 2cf056bbf..bc350fc3f 100644 --- a/en/users/index.html +++ b/en/users/index.html @@ -6,4 +6,4 @@ ga('create', 'UA-157376881-1', 'auto'); ga('send', 'pageview'); -
\ No newline at end of file +
\ No newline at end of file diff --git a/files/bundle_adjustment.ipynb b/files/bundle_adjustment.ipynb index 2c7a8048e..34b728b32 100644 --- a/files/bundle_adjustment.ipynb +++ b/files/bundle_adjustment.ipynb @@ -89,7 +89,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -101,9 +101,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/bundle_adjustment.py b/files/bundle_adjustment.py index a05293f09..a49d78ad4 100644 --- a/files/bundle_adjustment.py +++ b/files/bundle_adjustment.py @@ -49,7 +49,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -61,9 +61,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/camera_position_optimization_with_differentiable_rendering.ipynb b/files/camera_position_optimization_with_differentiable_rendering.ipynb index 037a3a32a..6a482eb28 100644 --- a/files/camera_position_optimization_with_differentiable_rendering.ipynb +++ b/files/camera_position_optimization_with_differentiable_rendering.ipynb @@ -76,7 +76,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -88,9 +88,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/camera_position_optimization_with_differentiable_rendering.py b/files/camera_position_optimization_with_differentiable_rendering.py index cc5a6277a..8855932a2 100644 --- a/files/camera_position_optimization_with_differentiable_rendering.py +++ b/files/camera_position_optimization_with_differentiable_rendering.py @@ -36,7 +36,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -48,9 +48,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/dataloaders_ShapeNetCore_R2N2.ipynb b/files/dataloaders_ShapeNetCore_R2N2.ipynb index ac72e0742..01209bed6 100644 --- a/files/dataloaders_ShapeNetCore_R2N2.ipynb +++ b/files/dataloaders_ShapeNetCore_R2N2.ipynb @@ -51,7 +51,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -63,9 +63,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/dataloaders_ShapeNetCore_R2N2.py b/files/dataloaders_ShapeNetCore_R2N2.py index 5af6f0c7a..2b7cd86f1 100644 --- a/files/dataloaders_ShapeNetCore_R2N2.py +++ b/files/dataloaders_ShapeNetCore_R2N2.py @@ -31,7 +31,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -43,9 +43,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/deform_source_mesh_to_target_mesh.ipynb b/files/deform_source_mesh_to_target_mesh.ipynb index f3ec139bd..a669267e6 100644 --- a/files/deform_source_mesh_to_target_mesh.ipynb +++ b/files/deform_source_mesh_to_target_mesh.ipynb @@ -90,7 +90,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -102,9 +102,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, @@ -192,7 +189,7 @@ "outputs": [], "source": [ "# Load the dolphin mesh.\n", - "trg_obj = os.path.join('dolphin.obj')" + "trg_obj = 'dolphin.obj'" ] }, { @@ -247,7 +244,7 @@ "id": "dYWDl4VGWHRK" }, "source": [ - "### Visualize the source and target meshes" + "## 2. Visualize the source and target meshes" ] }, { @@ -485,7 +482,7 @@ "final_verts = final_verts * scale + center\n", "\n", "# Store the predicted mesh using save_obj\n", - "final_obj = os.path.join('./', 'final_model.obj')\n", + "final_obj = 'final_model.obj'\n", "save_obj(final_obj, final_verts, final_faces)" ] }, diff --git a/files/deform_source_mesh_to_target_mesh.py b/files/deform_source_mesh_to_target_mesh.py index b9eef2832..6d2a5a30d 100644 --- a/files/deform_source_mesh_to_target_mesh.py +++ b/files/deform_source_mesh_to_target_mesh.py @@ -48,7 +48,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -60,9 +60,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") @@ -112,7 +109,7 @@ # Load the dolphin mesh. -trg_obj = os.path.join('dolphin.obj') +trg_obj = 'dolphin.obj' # In[ ]: @@ -146,7 +143,7 @@ src_mesh = ico_sphere(4, device) -# ### Visualize the source and target meshes +# ## 2. Visualize the source and target meshes # In[ ]: @@ -288,7 +285,7 @@ def plot_pointcloud(mesh, title=""): final_verts = final_verts * scale + center # Store the predicted mesh using save_obj -final_obj = os.path.join('./', 'final_model.obj') +final_obj = 'final_model.obj' save_obj(final_obj, final_verts, final_faces) diff --git a/files/fit_simple_neural_radiance_field.ipynb b/files/fit_simple_neural_radiance_field.ipynb index 0aaaa1ef3..3f5fde531 100644 --- a/files/fit_simple_neural_radiance_field.ipynb +++ b/files/fit_simple_neural_radiance_field.ipynb @@ -56,7 +56,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -68,9 +68,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/fit_simple_neural_radiance_field.py b/files/fit_simple_neural_radiance_field.py index 7f9213830..c96ba22b2 100644 --- a/files/fit_simple_neural_radiance_field.py +++ b/files/fit_simple_neural_radiance_field.py @@ -42,7 +42,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -54,9 +54,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/fit_textured_mesh.ipynb b/files/fit_textured_mesh.ipynb index 2e5247f0f..cc79a3dcc 100644 --- a/files/fit_textured_mesh.ipynb +++ b/files/fit_textured_mesh.ipynb @@ -68,7 +68,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -80,9 +80,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/fit_textured_mesh.py b/files/fit_textured_mesh.py index 63873ad43..9cc442a1a 100644 --- a/files/fit_textured_mesh.py +++ b/files/fit_textured_mesh.py @@ -31,7 +31,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -43,9 +43,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/fit_textured_volume.ipynb b/files/fit_textured_volume.ipynb index 552ca9cff..2c26555c8 100644 --- a/files/fit_textured_volume.ipynb +++ b/files/fit_textured_volume.ipynb @@ -47,7 +47,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -59,9 +59,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/fit_textured_volume.py b/files/fit_textured_volume.py index a5b5d2052..6bc1b72f5 100644 --- a/files/fit_textured_volume.py +++ b/files/fit_textured_volume.py @@ -32,7 +32,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -44,9 +44,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/implicitron_config_system.ipynb b/files/implicitron_config_system.ipynb index 572192f4d..c2bc65784 100644 --- a/files/implicitron_config_system.ipynb +++ b/files/implicitron_config_system.ipynb @@ -78,7 +78,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -90,9 +90,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/implicitron_config_system.py b/files/implicitron_config_system.py index 63a7453a6..820f1acd8 100644 --- a/files/implicitron_config_system.py +++ b/files/implicitron_config_system.py @@ -35,7 +35,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -47,9 +47,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/implicitron_volumes.ipynb b/files/implicitron_volumes.ipynb index c964b6d75..c614f3f74 100644 --- a/files/implicitron_volumes.ipynb +++ b/files/implicitron_volumes.ipynb @@ -72,7 +72,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -84,9 +84,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/implicitron_volumes.py b/files/implicitron_volumes.py index f2841b8ba..c91d2db44 100644 --- a/files/implicitron_volumes.py +++ b/files/implicitron_volumes.py @@ -30,7 +30,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -42,9 +42,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/render_colored_points.ipynb b/files/render_colored_points.ipynb index 3b4f3ef1f..7a719ae9c 100644 --- a/files/render_colored_points.ipynb +++ b/files/render_colored_points.ipynb @@ -50,7 +50,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -62,9 +62,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/render_colored_points.py b/files/render_colored_points.py index ac3907e1d..8056fb717 100644 --- a/files/render_colored_points.py +++ b/files/render_colored_points.py @@ -30,7 +30,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -42,9 +42,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/render_densepose.ipynb b/files/render_densepose.ipynb index 5402c8c1c..38184b5f2 100644 --- a/files/render_densepose.ipynb +++ b/files/render_densepose.ipynb @@ -57,7 +57,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -69,9 +69,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/render_densepose.py b/files/render_densepose.py index f0f87cf77..4073dbf42 100644 --- a/files/render_densepose.py +++ b/files/render_densepose.py @@ -34,7 +34,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -46,9 +46,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/files/render_textured_meshes.ipynb b/files/render_textured_meshes.ipynb index 147b7c270..7a7729357 100644 --- a/files/render_textured_meshes.ipynb +++ b/files/render_textured_meshes.ipynb @@ -73,7 +73,7 @@ "except ModuleNotFoundError:\n", " need_pytorch3d=True\n", "if need_pytorch3d:\n", - " if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n", + " if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", @@ -85,9 +85,6 @@ " !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", " # We try to install PyTorch3D from source.\n", - " !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n", - " !tar xzf 1.10.0.tar.gz\n", - " os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n", " !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'" ] }, diff --git a/files/render_textured_meshes.py b/files/render_textured_meshes.py index b073cd785..1c95eccb9 100644 --- a/files/render_textured_meshes.py +++ b/files/render_textured_meshes.py @@ -32,7 +32,7 @@ except ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -44,9 +44,6 @@ get_ipython().system('pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html') else: # We try to install PyTorch3D from source. - get_ipython().system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz') - get_ipython().system('tar xzf 1.10.0.tar.gz') - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" get_ipython().system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'") diff --git a/help.html b/help.html index a662f7d25..009917083 100644 --- a/help.html +++ b/help.html @@ -12,4 +12,4 @@

Ask questions about the documentation and project

Stay up to date

Find out what's new with this project

-
\ No newline at end of file + \ No newline at end of file diff --git a/help/index.html b/help/index.html index a662f7d25..009917083 100644 --- a/help/index.html +++ b/help/index.html @@ -12,4 +12,4 @@

Ask questions about the documentation and project

Stay up to date

Find out what's new with this project

-
\ No newline at end of file + \ No newline at end of file diff --git a/index.html b/index.html index b03c84372..f5ba27487 100644 --- a/index.html +++ b/index.html @@ -28,4 +28,4 @@ sample_test = sample_points_from_meshes(test_mesh, 5000) loss_chamfer, _ = chamfer_distance(sample_sphere, sample_test) - \ No newline at end of file + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 9c0614851..6095c016a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://pytorch3d.org/helpweekly0.5https://pytorch3d.org/indexweekly0.5https://pytorch3d.org/usersweekly0.5https://pytorch3d.org/docs/batchinghourly1.0https://pytorch3d.org/docs/camerashourly1.0https://pytorch3d.org/docs/cubifyhourly1.0https://pytorch3d.org/docs/datasetshourly1.0https://pytorch3d.org/docs/iohourly1.0https://pytorch3d.org/docs/iou3dhourly1.0https://pytorch3d.org/docs/meshes_iohourly1.0https://pytorch3d.org/docs/renderer_getting_startedhourly1.0https://pytorch3d.org/docs/rendererhourly1.0https://pytorch3d.org/docs/visualizationhourly1.0https://pytorch3d.org/docs/why_pytorch3dhourly1.0 \ No newline at end of file +https://pytorch3d.org/helpweekly0.5https://pytorch3d.org/indexweekly0.5https://pytorch3d.org/usersweekly0.5https://pytorch3d.org/docs/batchinghourly1.0https://pytorch3d.org/docs/camerashourly1.0https://pytorch3d.org/docs/cubifyhourly1.0https://pytorch3d.org/docs/datasetshourly1.0https://pytorch3d.org/docs/iohourly1.0https://pytorch3d.org/docs/iou3dhourly1.0https://pytorch3d.org/docs/meshes_iohourly1.0https://pytorch3d.org/docs/rendererhourly1.0https://pytorch3d.org/docs/renderer_getting_startedhourly1.0https://pytorch3d.org/docs/visualizationhourly1.0https://pytorch3d.org/docs/why_pytorch3dhourly1.0 \ No newline at end of file diff --git a/tutorials/bundle_adjustment.html b/tutorials/bundle_adjustment.html index 963fcc4f0..6d494071f 100644 --- a/tutorials/bundle_adjustment.html +++ b/tutorials/bundle_adjustment.html @@ -133,7 +133,7 @@

0. Install and Import Modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -141,14 +141,11 @@

0. Install and Import Modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,11 +196,11 @@

0. Install and Import ModulesIn [ ]: \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/bundle_adjustment/index.html b/tutorials/bundle_adjustment/index.html index 963fcc4f0..6d494071f 100644 --- a/tutorials/bundle_adjustment/index.html +++ b/tutorials/bundle_adjustment/index.html @@ -133,7 +133,7 @@

0. Install and Import Modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -141,14 +141,11 @@

0. Install and Import Modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,11 +196,11 @@

0. Install and Import ModulesIn [ ]: \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/camera_position_optimization_with_differentiable_rendering.html b/tutorials/camera_position_optimization_with_differentiable_rendering.html index 9f1d6a183..be032a898 100644 --- a/tutorials/camera_position_optimization_with_differentiable_rendering.html +++ b/tutorials/camera_position_optimization_with_differentiable_rendering.html @@ -127,7 +127,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -204,8 +201,8 @@

1. Load the ObjIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/camera_position_optimization_with_differentiable_rendering/index.html b/tutorials/camera_position_optimization_with_differentiable_rendering/index.html index 9f1d6a183..be032a898 100644 --- a/tutorials/camera_position_optimization_with_differentiable_rendering/index.html +++ b/tutorials/camera_position_optimization_with_differentiable_rendering/index.html @@ -127,7 +127,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -204,8 +201,8 @@

1. Load the ObjIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/dataloaders_ShapeNetCore_R2N2.html b/tutorials/dataloaders_ShapeNetCore_R2N2.html index acf16ae89..cccbfff16 100644 --- a/tutorials/dataloaders_ShapeNetCore_R2N2.html +++ b/tutorials/dataloaders_ShapeNetCore_R2N2.html @@ -126,7 +126,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -134,14 +134,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -194,7 +191,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/dataloaders_ShapeNetCore_R2N2/index.html b/tutorials/dataloaders_ShapeNetCore_R2N2/index.html index acf16ae89..cccbfff16 100644 --- a/tutorials/dataloaders_ShapeNetCore_R2N2/index.html +++ b/tutorials/dataloaders_ShapeNetCore_R2N2/index.html @@ -126,7 +126,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -134,14 +134,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -194,7 +191,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/deform_source_mesh_to_target_mesh.html b/tutorials/deform_source_mesh_to_target_mesh.html index 4ecbc19f2..a4d4f8c5d 100644 --- a/tutorials/deform_source_mesh_to_target_mesh.html +++ b/tutorials/deform_source_mesh_to_target_mesh.html @@ -146,7 +146,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -154,14 +154,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -225,7 +222,7 @@

1. Load an obj file and
In [ ]:
-
!wget https://dl.fbaipublicfiles.com/pytorch3d/data/dolphin/dolphin.obj
+
!wget https://dl.fbaipublicfiles.com/pytorch3d/data/dolphin/dolphin.obj
 
@@ -237,7 +234,7 @@

1. Load an obj file and
# Load the dolphin mesh.
-trg_obj = os.path.join('dolphin.obj')
+trg_obj = 'dolphin.obj'
 
@@ -288,7 +285,7 @@

1. Load an obj file and

-

Visualize the source and target meshes

+

2. Visualize the source and target meshes

@@ -482,7 +479,7 @@

5. Save the predicted meshfinal_verts = final_verts * scale + center # Store the predicted mesh using save_obj -final_obj = os.path.join('./', 'final_model.obj') +final_obj = 'final_model.obj' save_obj(final_obj, final_verts, final_faces) @@ -497,4 +494,4 @@

6. Conclusion - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/deform_source_mesh_to_target_mesh/index.html b/tutorials/deform_source_mesh_to_target_mesh/index.html index 4ecbc19f2..a4d4f8c5d 100644 --- a/tutorials/deform_source_mesh_to_target_mesh/index.html +++ b/tutorials/deform_source_mesh_to_target_mesh/index.html @@ -146,7 +146,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -154,14 +154,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -225,7 +222,7 @@

1. Load an obj file and
In [ ]:
-
!wget https://dl.fbaipublicfiles.com/pytorch3d/data/dolphin/dolphin.obj
+
!wget https://dl.fbaipublicfiles.com/pytorch3d/data/dolphin/dolphin.obj
 
@@ -237,7 +234,7 @@

1. Load an obj file and
# Load the dolphin mesh.
-trg_obj = os.path.join('dolphin.obj')
+trg_obj = 'dolphin.obj'
 
@@ -288,7 +285,7 @@

1. Load an obj file and

-

Visualize the source and target meshes

+

2. Visualize the source and target meshes

@@ -482,7 +479,7 @@

5. Save the predicted meshfinal_verts = final_verts * scale + center # Store the predicted mesh using save_obj -final_obj = os.path.join('./', 'final_model.obj') +final_obj = 'final_model.obj' save_obj(final_obj, final_verts, final_faces) @@ -497,4 +494,4 @@

6. Conclusion - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_simple_neural_radiance_field.html b/tutorials/fit_simple_neural_radiance_field.html index f0416bce8..0d9a51ac9 100644 --- a/tutorials/fit_simple_neural_radiance_field.html +++ b/tutorials/fit_simple_neural_radiance_field.html @@ -127,7 +127,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -203,8 +200,8 @@

0. Install and Import modulesIn [ ]:
-
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/plot_image_grid.py
-!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/generate_cow_renders.py
+
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/plot_image_grid.py
+!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/generate_cow_renders.py
 from plot_image_grid import image_grid
 from generate_cow_renders import generate_cow_renders
 
@@ -356,7 +353,7 @@

3. Define the neural radiance
class HarmonicEmbedding(torch.nn.Module):
     def __init__(self, n_harmonic_functions=60, omega0=0.1):
-        """
+        """
         Given an input tensor `x` of shape [minibatch, ... , dim],
         the harmonic embedding layer converts each feature
         in `x` into a series of harmonic features `embedding`
@@ -383,7 +380,7 @@ 

3. Define the neural radiance omega0 * (2.0 ** torch.arange(n_harmonic_functions)), ) def forward(self, x): - """ + """ Args: x: tensor of shape [..., dim] Returns: @@ -397,7 +394,7 @@

3. Define the neural radiance class NeuralRadianceField(torch.nn.Module): def __init__(self, n_harmonic_functions=60, n_hidden_neurons=256): super().__init__() - """ + """ Args: n_harmonic_functions: The number of harmonic functions used to form the harmonic embedding of each point. @@ -454,7 +451,7 @@

3. Define the neural radiance self.density_layer[0].bias.data[0] = -1.5 def _get_densities(self, features): - """ + """ This function takes `features` predicted by `self.mlp` and converts them to `raw_densities` with `self.density_layer`. `raw_densities` are later mapped to [0-1] range with @@ -464,7 +461,7 @@

3. Define the neural radiance return 1 - (-raw_densities).exp() def _get_colors(self, features, rays_directions): - """ + """ This function takes per-point `features` predicted by `self.mlp` and evaluates the color model in order to attach to each point a 3D vector of its RGB color. @@ -508,7 +505,7 @@

3. Define the neural radiance ray_bundle: RayBundle, **kwargs, ): - """ + """ The forward function accepts the parametrizations of 3D points sampled along projection rays. The forward pass is responsible for attaching a 3D vector @@ -562,7 +559,7 @@

3. Define the neural radiance n_batches: int = 16, **kwargs, ): - """ + """ This function is used to allow for memory efficient processing of input rays. The input rays are first split to `n_batches` chunks and passed through the `self.forward` function one at a time @@ -639,7 +636,7 @@

4. Helper functions -

\ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_simple_neural_radiance_field/index.html b/tutorials/fit_simple_neural_radiance_field/index.html index f0416bce8..0d9a51ac9 100644 --- a/tutorials/fit_simple_neural_radiance_field/index.html +++ b/tutorials/fit_simple_neural_radiance_field/index.html @@ -127,7 +127,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -203,8 +200,8 @@

0. Install and Import modulesIn [ ]:
-
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/plot_image_grid.py
-!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/generate_cow_renders.py
+
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/plot_image_grid.py
+!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/generate_cow_renders.py
 from plot_image_grid import image_grid
 from generate_cow_renders import generate_cow_renders
 
@@ -356,7 +353,7 @@

3. Define the neural radiance
class HarmonicEmbedding(torch.nn.Module):
     def __init__(self, n_harmonic_functions=60, omega0=0.1):
-        """
+        """
         Given an input tensor `x` of shape [minibatch, ... , dim],
         the harmonic embedding layer converts each feature
         in `x` into a series of harmonic features `embedding`
@@ -383,7 +380,7 @@ 

3. Define the neural radiance omega0 * (2.0 ** torch.arange(n_harmonic_functions)), ) def forward(self, x): - """ + """ Args: x: tensor of shape [..., dim] Returns: @@ -397,7 +394,7 @@

3. Define the neural radiance class NeuralRadianceField(torch.nn.Module): def __init__(self, n_harmonic_functions=60, n_hidden_neurons=256): super().__init__() - """ + """ Args: n_harmonic_functions: The number of harmonic functions used to form the harmonic embedding of each point. @@ -454,7 +451,7 @@

3. Define the neural radiance self.density_layer[0].bias.data[0] = -1.5 def _get_densities(self, features): - """ + """ This function takes `features` predicted by `self.mlp` and converts them to `raw_densities` with `self.density_layer`. `raw_densities` are later mapped to [0-1] range with @@ -464,7 +461,7 @@

3. Define the neural radiance return 1 - (-raw_densities).exp() def _get_colors(self, features, rays_directions): - """ + """ This function takes per-point `features` predicted by `self.mlp` and evaluates the color model in order to attach to each point a 3D vector of its RGB color. @@ -508,7 +505,7 @@

3. Define the neural radiance ray_bundle: RayBundle, **kwargs, ): - """ + """ The forward function accepts the parametrizations of 3D points sampled along projection rays. The forward pass is responsible for attaching a 3D vector @@ -562,7 +559,7 @@

3. Define the neural radiance n_batches: int = 16, **kwargs, ): - """ + """ This function is used to allow for memory efficient processing of input rays. The input rays are first split to `n_batches` chunks and passed through the `self.forward` function one at a time @@ -639,7 +636,7 @@

4. Helper functions -

\ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_textured_mesh.html b/tutorials/fit_textured_mesh.html index 77863f10a..6b059525e 100644 --- a/tutorials/fit_textured_mesh.html +++ b/tutorials/fit_textured_mesh.html @@ -125,7 +125,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -133,14 +133,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -208,7 +205,7 @@

0. Install and Import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_textured_mesh/index.html b/tutorials/fit_textured_mesh/index.html index 77863f10a..6b059525e 100644 --- a/tutorials/fit_textured_mesh/index.html +++ b/tutorials/fit_textured_mesh/index.html @@ -125,7 +125,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -133,14 +133,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -208,7 +205,7 @@

0. Install and Import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_textured_volume.html b/tutorials/fit_textured_volume.html index 50cd86f0f..6ae4ff5db 100644 --- a/tutorials/fit_textured_volume.html +++ b/tutorials/fit_textured_volume.html @@ -118,7 +118,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -126,14 +126,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -183,8 +180,8 @@

0. Install and Import modulesIn [ ]: \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/fit_textured_volume/index.html b/tutorials/fit_textured_volume/index.html index 50cd86f0f..6ae4ff5db 100644 --- a/tutorials/fit_textured_volume/index.html +++ b/tutorials/fit_textured_volume/index.html @@ -118,7 +118,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -126,14 +126,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -183,8 +180,8 @@

0. Install and Import modulesIn [ ]: \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/implicitron_config_system.html b/tutorials/implicitron_config_system.html index e8e0bf521..ca7369fb8 100644 --- a/tutorials/implicitron_config_system.html +++ b/tutorials/implicitron_config_system.html @@ -125,7 +125,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -133,14 +133,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -159,7 +156,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/implicitron_config_system/index.html b/tutorials/implicitron_config_system/index.html index e8e0bf521..ca7369fb8 100644 --- a/tutorials/implicitron_config_system/index.html +++ b/tutorials/implicitron_config_system/index.html @@ -125,7 +125,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -133,14 +133,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -159,7 +156,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/implicitron_volumes.html b/tutorials/implicitron_volumes.html index 6055d26ea..536725a9e 100644 --- a/tutorials/implicitron_volumes.html +++ b/tutorials/implicitron_volumes.html @@ -115,7 +115,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -123,14 +123,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -149,7 +146,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/implicitron_volumes/index.html b/tutorials/implicitron_volumes/index.html index 6055d26ea..536725a9e 100644 --- a/tutorials/implicitron_volumes/index.html +++ b/tutorials/implicitron_volumes/index.html @@ -115,7 +115,7 @@

0. Install and import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -123,14 +123,11 @@

0. Install and import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -149,7 +146,7 @@

0. Install and import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/index.html b/tutorials/index.html index 233343c6e..491ad02de 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -62,4 +62,4 @@ }; } }); -

Welcome to the PyTorch3D Tutorials

Here you can learn about the structure and applications of PyTorch3D from examples which are in the form of ipython notebooks.

Run interactively

At the top of each example you can find a button named "Run in Google Colab" which will open the notebook in Google Colaboratory where you can run the code directly in the browser with access to GPU support - it looks like this:

You can modify the code and experiment with varying different settings. Remember to install the latest stable version of PyTorch3D and its dependencies. Code to do this with pip is provided in each notebook.

Run locally

There is also a button to download the notebook and source code to run it locally.

\ No newline at end of file +

Welcome to the PyTorch3D Tutorials

Here you can learn about the structure and applications of PyTorch3D from examples which are in the form of ipython notebooks.

Run interactively

At the top of each example you can find a button named "Run in Google Colab" which will open the notebook in Google Colaboratory where you can run the code directly in the browser with access to GPU support - it looks like this:

You can modify the code and experiment with varying different settings. Remember to install the latest stable version of PyTorch3D and its dependencies. Code to do this with pip is provided in each notebook.

Run locally

There is also a button to download the notebook and source code to run it locally.

\ No newline at end of file diff --git a/tutorials/render_colored_points.html b/tutorials/render_colored_points.html index 362e5e49a..8b39c728c 100644 --- a/tutorials/render_colored_points.html +++ b/tutorials/render_colored_points.html @@ -124,7 +124,7 @@

Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -132,14 +132,11 @@

Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,8 +196,8 @@

Load a point cloud and corr
In [ ]:
- \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/render_colored_points/index.html b/tutorials/render_colored_points/index.html index 362e5e49a..8b39c728c 100644 --- a/tutorials/render_colored_points/index.html +++ b/tutorials/render_colored_points/index.html @@ -124,7 +124,7 @@

Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -132,14 +132,11 @@

Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,8 +196,8 @@

Load a point cloud and corr
In [ ]:
- \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/render_densepose.html b/tutorials/render_densepose.html index cdf2e21bb..97aee4ece 100644 --- a/tutorials/render_densepose.html +++ b/tutorials/render_densepose.html @@ -127,7 +127,7 @@

Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -154,7 +151,7 @@

Import modules
# We also install chumpy as it is needed to load the SMPL model pickle file.
-!pip install chumpy
+!pip install chumpy
 
@@ -221,12 +218,12 @@

Load the SMPL model
# Texture image
-!wget -P data/DensePose https://raw.githubusercontent.com/facebookresearch/DensePose/master/DensePoseData/demo_data/texture_from_SURREAL.png
+!wget -P data/DensePose https://raw.githubusercontent.com/facebookresearch/DensePose/master/DensePoseData/demo_data/texture_from_SURREAL.png
 
 # UV_processed.mat
-!wget https://dl.fbaipublicfiles.com/densepose/densepose_uv_data.tar.gz
-!tar xvf densepose_uv_data.tar.gz -C data/DensePose
-!rm densepose_uv_data.tar.gz
+!wget https://dl.fbaipublicfiles.com/densepose/densepose_uv_data.tar.gz
+!tar xvf densepose_uv_data.tar.gz -C data/DensePose
+!rm densepose_uv_data.tar.gz
 
@@ -505,4 +502,4 @@

Conclusion - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/render_densepose/index.html b/tutorials/render_densepose/index.html index cdf2e21bb..97aee4ece 100644 --- a/tutorials/render_densepose/index.html +++ b/tutorials/render_densepose/index.html @@ -127,7 +127,7 @@

Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -135,14 +135,11 @@

Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -154,7 +151,7 @@

Import modules
# We also install chumpy as it is needed to load the SMPL model pickle file.
-!pip install chumpy
+!pip install chumpy
 
@@ -221,12 +218,12 @@

Load the SMPL model
# Texture image
-!wget -P data/DensePose https://raw.githubusercontent.com/facebookresearch/DensePose/master/DensePoseData/demo_data/texture_from_SURREAL.png
+!wget -P data/DensePose https://raw.githubusercontent.com/facebookresearch/DensePose/master/DensePoseData/demo_data/texture_from_SURREAL.png
 
 # UV_processed.mat
-!wget https://dl.fbaipublicfiles.com/densepose/densepose_uv_data.tar.gz
-!tar xvf densepose_uv_data.tar.gz -C data/DensePose
-!rm densepose_uv_data.tar.gz
+!wget https://dl.fbaipublicfiles.com/densepose/densepose_uv_data.tar.gz
+!tar xvf densepose_uv_data.tar.gz -C data/DensePose
+!rm densepose_uv_data.tar.gz
 
@@ -505,4 +502,4 @@

Conclusion - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/render_textured_meshes.html b/tutorials/render_textured_meshes.html index 322991459..0c11d320b 100644 --- a/tutorials/render_textured_meshes.html +++ b/tutorials/render_textured_meshes.html @@ -126,7 +126,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -134,14 +134,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,7 +196,7 @@

0. Install and Import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/render_textured_meshes/index.html b/tutorials/render_textured_meshes/index.html index 322991459..0c11d320b 100644 --- a/tutorials/render_textured_meshes/index.html +++ b/tutorials/render_textured_meshes/index.html @@ -126,7 +126,7 @@

0. Install and Import modulesexcept ModuleNotFoundError: need_pytorch3d=True if need_pytorch3d: - if torch.__version__.startswith("1.13.") and sys.platform.startswith("linux"): + if torch.__version__.startswith(("1.13.", "2.0.")) and sys.platform.startswith("linux"): # We try to install PyTorch3D via a released wheel. pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ @@ -134,14 +134,11 @@

0. Install and Import modulestorch.version.cuda.replace(".",""), f"_pyt{pyt_version_str}" ]) - !pip install fvcore iopath - !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html + !pip install fvcore iopath + !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html else: # We try to install PyTorch3D from source. - !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz - !tar xzf 1.10.0.tar.gz - os.environ["CUB_HOME"] = os.getcwd() + "/cub-1.10.0" - !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' + !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable' @@ -199,7 +196,7 @@

0. Install and Import modulesIn [ ]: - \ No newline at end of file + \ No newline at end of file diff --git a/users.html b/users.html index 3cb3a2670..c8ebc695f 100644 --- a/users.html +++ b/users.html @@ -6,4 +6,4 @@ ga('create', 'UA-157376881-1', 'auto'); ga('send', 'pageview'); - \ No newline at end of file + \ No newline at end of file diff --git a/users/index.html b/users/index.html index 3cb3a2670..c8ebc695f 100644 --- a/users/index.html +++ b/users/index.html @@ -6,4 +6,4 @@ ga('create', 'UA-157376881-1', 'auto'); ga('send', 'pageview'); - \ No newline at end of file + \ No newline at end of file