diff --git a/docs/batching.html b/docs/batching.html index 3306898a..44e2b0ef 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 3306898a..44e2b0ef 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 67ce2eef..80999654 100644 --- a/docs/cameras.html +++ b/docs/cameras.html @@ -125,7 +125,7 @@ cameras_ndc = PerspectiveCameras(focal_length=fcl_ndc, principal_point=prp_ndc) # Screen space camera image_size = ((128, 256),) # (h, w) fcl_screen = (76.8,) # fcl_ndc * min(image_size) / 2 -prp_screen = ((115.2, 48), ) # w / 2 - px_ndc * min(image_size) / 2, h / 2 - py_ndc * min(image_size) / 2 +prp_screen = ((115.2, 32), ) # w / 2 - px_ndc * min(image_size) / 2, h / 2 - py_ndc * min(image_size) / 2 cameras_screen = PerspectiveCameras(focal_length=fcl_screen, principal_point=prp_screen, in_ndc=False, image_size=image_size)

The relationship between screen and NDC specifications of a camera's focal_length and principal_point is given by the following equations, where s = min(image_width, image_height). @@ -136,4 +136,4 @@ The transformation of x and y coordinates between screen and NDC is exactly the px_ndc = - (px_screen - image_width / 2.0) * 2.0 / s py_ndc = - (py_screen - image_height / 2.0) * 2.0 / s -

Last updated by Jeremy Reizenstein
Getting Started
\ No newline at end of file +
Last updated by Xiao Xuan
Getting Started
\ No newline at end of file diff --git a/docs/cameras/index.html b/docs/cameras/index.html index 67ce2eef..80999654 100644 --- a/docs/cameras/index.html +++ b/docs/cameras/index.html @@ -125,7 +125,7 @@ cameras_ndc = PerspectiveCameras(focal_length=fcl_ndc, principal_point=prp_ndc) # Screen space camera image_size = ((128, 256),) # (h, w) fcl_screen = (76.8,) # fcl_ndc * min(image_size) / 2 -prp_screen = ((115.2, 48), ) # w / 2 - px_ndc * min(image_size) / 2, h / 2 - py_ndc * min(image_size) / 2 +prp_screen = ((115.2, 32), ) # w / 2 - px_ndc * min(image_size) / 2, h / 2 - py_ndc * min(image_size) / 2 cameras_screen = PerspectiveCameras(focal_length=fcl_screen, principal_point=prp_screen, in_ndc=False, image_size=image_size)

The relationship between screen and NDC specifications of a camera's focal_length and principal_point is given by the following equations, where s = min(image_width, image_height). @@ -136,4 +136,4 @@ The transformation of x and y coordinates between screen and NDC is exactly the px_ndc = - (px_screen - image_width / 2.0) * 2.0 / s py_ndc = - (py_screen - image_height / 2.0) * 2.0 / s -

Last updated by Jeremy Reizenstein
Getting Started
\ No newline at end of file +
Last updated by Xiao Xuan
Getting Started
\ No newline at end of file diff --git a/docs/cubify.html b/docs/cubify.html index e627fb11..261ecf9e 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
BatchingIoU3D
\ No newline at end of file +
Last updated by Jeremy Reizenstein
BatchingIoU3D
\ No newline at end of file diff --git a/docs/cubify/index.html b/docs/cubify/index.html index e627fb11..261ecf9e 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
BatchingIoU3D
\ No newline at end of file +
Last updated by Jeremy Reizenstein
BatchingIoU3D
\ No newline at end of file diff --git a/docs/datasets.html b/docs/datasets.html index adaf83e0..3487bd02 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
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/datasets/index.html b/docs/datasets/index.html index adaf83e0..3487bd02 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 8cf21659..93608e35 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 @@ mesh = IO().loadglTF 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 8cf21659..93608e35 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 @@ mesh = IO().loadglTF 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 ab378300..7462c72e 100644 --- a/docs/iou3d.html +++ b/docs/iou3d.html @@ -122,4 +122,4 @@ intersection_vol, iou_3d = box3d_overlap(boxes1, boxes2) year = {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 ab378300..7462c72e 100644 --- a/docs/iou3d/index.html +++ b/docs/iou3d/index.html @@ -122,4 +122,4 @@ intersection_vol, iou_3d = box3d_overlap(boxes1, boxes2) year = {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 9d2bfde9..1505540e 100644 --- a/docs/meshes_io.html +++ b/docs/meshes_io.html @@ -116,4 +116,4 @@ are not triangles will be split into triangles. A Meshes object containing a single mesh can be created from this data using

    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 9d2bfde9..1505540e 100644 --- a/docs/meshes_io/index.html +++ b/docs/meshes_io/index.html @@ -116,4 +116,4 @@ are not triangles will be split into triangles. A Meshes object containing a single mesh can be created from this data using

    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 c6f8d0f0..124ea30c 100644 --- a/docs/renderer.html +++ b/docs/renderer.html @@ -109,4 +109,4 @@ total_memory = memory_forward_pass + memory_backward_pass

[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 c6f8d0f0..124ea30c 100644 --- a/docs/renderer/index.html +++ b/docs/renderer/index.html @@ -109,4 +109,4 @@ total_memory = memory_forward_pass + memory_backward_pass

[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 0c0cba64..b12b0c49 100644 --- a/docs/renderer_getting_started.html +++ b/docs/renderer_getting_started.html @@ -168,4 +168,4 @@ renderer = MeshRenderer( SoftSilhouetteShader✔️ -
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 0c0cba64..b12b0c49 100644 --- a/docs/renderer_getting_started/index.html +++ b/docs/renderer_getting_started/index.html @@ -168,4 +168,4 @@ renderer = MeshRenderer( SoftSilhouetteShader✔️ -
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 7b17a64c..baceb94d 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 7b17a64c..baceb94d 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 57048ab8..04a628d1 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 57048ab8..04a628d1 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 0d800f33..37e5c5c9 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 0d800f33..37e5c5c9 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 34931cbf..8a3c012e 100644 --- a/en/index.html +++ b/en/index.html @@ -28,4 +28,4 @@ sample_sphere = sample_points_from_meshes(sphere_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 2cf056bb..bc350fc3 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 2cf056bb..bc350fc3 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 2c7a8048..34b728b3 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 a05293f0..a49d78ad 100644 --- a/files/bundle_adjustment.py +++ b/files/bundle_adjustment.py @@ -49,7 +49,7 @@ try: 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 @@ if need_pytorch3d: 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 037a3a32..6a482eb2 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 cc5a6277..8855932a 100644 --- a/files/camera_position_optimization_with_differentiable_rendering.py +++ b/files/camera_position_optimization_with_differentiable_rendering.py @@ -36,7 +36,7 @@ try: 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 @@ if need_pytorch3d: 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 ac72e074..01209bed 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 5af6f0c7..2b7cd86f 100644 --- a/files/dataloaders_ShapeNetCore_R2N2.py +++ b/files/dataloaders_ShapeNetCore_R2N2.py @@ -31,7 +31,7 @@ try: 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 @@ if need_pytorch3d: 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 f3ec139b..a669267e 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 b9eef283..6d2a5a30 100644 --- a/files/deform_source_mesh_to_target_mesh.py +++ b/files/deform_source_mesh_to_target_mesh.py @@ -48,7 +48,7 @@ try: 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 @@ if need_pytorch3d: 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 @@ get_ipython().system('wget https://dl.fbaipublicfiles.com/pytorch3d/data/dolphin # Load the dolphin mesh. -trg_obj = os.path.join('dolphin.obj') +trg_obj = 'dolphin.obj' # In[ ]: @@ -146,7 +143,7 @@ trg_mesh = Meshes(verts=[verts], faces=[faces_idx]) src_mesh = ico_sphere(4, device) -# ### Visualize the source and target meshes +# ## 2. Visualize the source and target meshes # In[ ]: @@ -288,7 +285,7 @@ final_verts, final_faces = new_src_mesh.get_mesh_verts_faces(0) 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 0aaaa1ef..3f5fde53 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 7f921383..c96ba22b 100644 --- a/files/fit_simple_neural_radiance_field.py +++ b/files/fit_simple_neural_radiance_field.py @@ -42,7 +42,7 @@ try: 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 @@ if need_pytorch3d: 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 2e5247f0..cc79a3dc 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 63873ad4..9cc442a1 100644 --- a/files/fit_textured_mesh.py +++ b/files/fit_textured_mesh.py @@ -31,7 +31,7 @@ try: 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 @@ if need_pytorch3d: 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 552ca9cf..2c26555c 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 a5b5d205..6bc1b72f 100644 --- a/files/fit_textured_volume.py +++ b/files/fit_textured_volume.py @@ -32,7 +32,7 @@ try: 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 @@ if need_pytorch3d: 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 572192f4..c2bc6578 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 63a7453a..820f1acd 100644 --- a/files/implicitron_config_system.py +++ b/files/implicitron_config_system.py @@ -35,7 +35,7 @@ try: 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 @@ if need_pytorch3d: 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 c964b6d7..c614f3f7 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 f2841b8b..c91d2db4 100644 --- a/files/implicitron_volumes.py +++ b/files/implicitron_volumes.py @@ -30,7 +30,7 @@ try: 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 @@ if need_pytorch3d: 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 3b4f3ef1..7a719ae9 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 ac3907e1..8056fb71 100644 --- a/files/render_colored_points.py +++ b/files/render_colored_points.py @@ -30,7 +30,7 @@ try: 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 @@ if need_pytorch3d: 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 5402c8c1..38184b5f 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 f0f87cf7..4073dbf4 100644 --- a/files/render_densepose.py +++ b/files/render_densepose.py @@ -34,7 +34,7 @@ try: 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 @@ if need_pytorch3d: 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 147b7c27..7a772935 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 b073cd78..1c95eccb 100644 --- a/files/render_textured_meshes.py +++ b/files/render_textured_meshes.py @@ -32,7 +32,7 @@ try: 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 @@ if need_pytorch3d: 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 a662f7d2..00991708 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 a662f7d2..00991708 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 b03c8437..f5ba2748 100644 --- a/index.html +++ b/index.html @@ -28,4 +28,4 @@ sample_sphere = sample_points_from_meshes(sphere_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 9c061485..6095c016 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 963fcc4f..6d494071 100644 --- a/tutorials/bundle_adjustment.html +++ b/tutorials/bundle_adjustment.html @@ -133,7 +133,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras 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([ @@ -141,14 +141,11 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras torch.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 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
In [ ]:
-
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/camera_visualization.py
+
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/camera_visualization.py
 from camera_visualization import plot_camera_scene
 
-!mkdir data
-!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/data/camera_graph.pth
+!mkdir data
+!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/data/camera_graph.pth
 
@@ -285,7 +282,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
def calc_camera_distance(cam_1, cam_2):
-    """
+    """
     Calculates the divergence of a batch of pairs of cameras cam_1, cam_2.
     The distance is composed of the cosine of the relative angle between 
     the rotation components of the camera extrinsics and the l2 distance
@@ -299,7 +296,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
     return R_distance + T_distance
 
 def get_relative_camera(cams, edges):
-    """
+    """
     For each pair of indices (i,j) in "edges" generate a camera
     that maps from the coordinates of the camera cams[i] to 
     the coordinates of the camera cams[j]
@@ -424,4 +421,4 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
 
-
\ 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 963fcc4f..6d494071 100644 --- a/tutorials/bundle_adjustment/index.html +++ b/tutorials/bundle_adjustment/index.html @@ -133,7 +133,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras 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([ @@ -141,14 +141,11 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras torch.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 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
In [ ]:
-
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/camera_visualization.py
+
!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/utils/camera_visualization.py
 from camera_visualization import plot_camera_scene
 
-!mkdir data
-!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/data/camera_graph.pth
+!mkdir data
+!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/docs/tutorials/data/camera_graph.pth
 
@@ -285,7 +282,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
def calc_camera_distance(cam_1, cam_2):
-    """
+    """
     Calculates the divergence of a batch of pairs of cameras cam_1, cam_2.
     The distance is composed of the cosine of the relative angle between 
     the rotation components of the camera extrinsics and the l2 distance
@@ -299,7 +296,7 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
     return R_distance + T_distance
 
 def get_relative_camera(cams, edges):
-    """
+    """
     For each pair of indices (i,j) in "edges" generate a camera
     that maps from the coordinates of the camera cams[i] to 
     the coordinates of the camera cams[j]
@@ -424,4 +421,4 @@ where $d(g_i, g_j)$ is a suitable metric that compares the extrinsics of cameras
 
-
\ 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 9f1d6a18..be032a89 100644 --- a/tutorials/camera_position_optimization_with_differentiable_rendering.html +++ b/tutorials/camera_position_optimization_with_differentiable_rendering.html @@ -127,7 +127,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([ @@ -135,14 +135,11 @@ torch.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 @@
In [ ]:
-
!mkdir -p data
-!wget -P data https://dl.fbaipublicfiles.com/pytorch3d/data/teapot/teapot.obj
+
!mkdir -p data
+!wget -P data https://dl.fbaipublicfiles.com/pytorch3d/data/teapot/teapot.obj
 
@@ -510,4 +507,4 @@
- \ 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 9f1d6a18..be032a89 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 @@ 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([ @@ -135,14 +135,11 @@ torch.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 @@
In [ ]:
-
!mkdir -p data
-!wget -P data https://dl.fbaipublicfiles.com/pytorch3d/data/teapot/teapot.obj
+
!mkdir -p data
+!wget -P data https://dl.fbaipublicfiles.com/pytorch3d/data/teapot/teapot.obj
 
@@ -510,4 +507,4 @@
- \ 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 acf16ae8..cccbfff1 100644 --- a/tutorials/dataloaders_ShapeNetCore_R2N2.html +++ b/tutorials/dataloaders_ShapeNetCore_R2N2.html @@ -126,7 +126,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([ @@ -134,14 +134,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -657,4 +654,4 @@ dataset. The R2N2 dataset also contains its own 24 renderings of each object and
- \ 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 acf16ae8..cccbfff1 100644 --- a/tutorials/dataloaders_ShapeNetCore_R2N2/index.html +++ b/tutorials/dataloaders_ShapeNetCore_R2N2/index.html @@ -126,7 +126,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([ @@ -134,14 +134,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -657,4 +654,4 @@ dataset. The R2N2 dataset also contains its own 24 renderings of each object and
- \ 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 4ecbc19f..a4d4f8c5 100644 --- a/tutorials/deform_source_mesh_to_target_mesh.html +++ b/tutorials/deform_source_mesh_to_target_mesh.html @@ -146,7 +146,7 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac 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([ @@ -154,14 +154,11 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac torch.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 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
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 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
# Load the dolphin mesh.
-trg_obj = os.path.join('dolphin.obj')
+trg_obj = 'dolphin.obj'
 
@@ -288,7 +285,7 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
-

Visualize the source and target meshes

+

2. Visualize the source and target meshes

@@ -482,7 +479,7 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac 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) @@ -497,4 +494,4 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac - \ 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 4ecbc19f..a4d4f8c5 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 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac 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([ @@ -154,14 +154,11 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac torch.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 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
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 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
# Load the dolphin mesh.
-trg_obj = os.path.join('dolphin.obj')
+trg_obj = 'dolphin.obj'
 
@@ -288,7 +285,7 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac
-

Visualize the source and target meshes

+

2. Visualize the source and target meshes

@@ -482,7 +479,7 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac 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) @@ -497,4 +494,4 @@ the predicted mesh is closer to the target mesh at each optimization step. To ac - \ 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 f0416bce..0d9a51ac 100644 --- a/tutorials/fit_simple_neural_radiance_field.html +++ b/tutorials/fit_simple_neural_radiance_field.html @@ -127,7 +127,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([ @@ -135,14 +135,11 @@ torch.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 @@
In [ ]:
-
!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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
             omega0 * (2.0 ** torch.arange(n_harmonic_functions)),
         )
     def forward(self, x):
-        """
+        """
         Args:
             x: tensor of shape [..., dim]
         Returns:
@@ -397,7 +394,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
 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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
 
def huber(x, y, scaling=0.1):
-    """
+    """
     A helper function for evaluating the smooth L1 (huber) loss
     between the rendered silhouettes and colors.
     """
@@ -648,7 +645,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
     return loss
 
 def sample_images_at_mc_locs(target_images, sampled_rays_xy):
-    """
+    """
     Given a set of Monte Carlo pixel locations `sampled_rays_xy`,
     this method samples the tensor `target_images` at the
     respective 2D locations.
@@ -681,7 +678,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
     target_image, target_silhouette,
     loss_history_color, loss_history_sil,
 ):
-    """
+    """
     This is a helper function for visualizing the
     intermediate results of the learning. 
     
@@ -955,4 +952,4 @@ described in the previous cell.

-
\ 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 f0416bce..0d9a51ac 100644 --- a/tutorials/fit_simple_neural_radiance_field/index.html +++ b/tutorials/fit_simple_neural_radiance_field/index.html @@ -127,7 +127,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([ @@ -135,14 +135,11 @@ torch.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 @@
In [ ]:
-
!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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
             omega0 * (2.0 ** torch.arange(n_harmonic_functions)),
         )
     def forward(self, x):
-        """
+        """
         Args:
             x: tensor of shape [..., dim]
         Returns:
@@ -397,7 +394,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
 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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
         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 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
 
def huber(x, y, scaling=0.1):
-    """
+    """
     A helper function for evaluating the smooth L1 (huber) loss
     between the rendered silhouettes and colors.
     """
@@ -648,7 +645,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
     return loss
 
 def sample_images_at_mc_locs(target_images, sampled_rays_xy):
-    """
+    """
     Given a set of Monte Carlo pixel locations `sampled_rays_xy`,
     this method samples the tensor `target_images` at the
     respective 2D locations.
@@ -681,7 +678,7 @@ It renders the cow mesh from the fit_textured_mesh.ipynb tutorial f
     target_image, target_silhouette,
     loss_history_color, loss_history_sil,
 ):
-    """
+    """
     This is a helper function for visualizing the
     intermediate results of the learning. 
     
@@ -955,4 +952,4 @@ described in the previous cell.

-
\ 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 77863f10..6b059525 100644 --- a/tutorials/fit_textured_mesh.html +++ b/tutorials/fit_textured_mesh.html @@ -125,7 +125,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([ @@ -133,14 +133,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -259,10 +256,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -886,4 +883,4 @@ If running locally, the data is already available at the correct path.

- \ 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 77863f10..6b059525 100644 --- a/tutorials/fit_textured_mesh/index.html +++ b/tutorials/fit_textured_mesh/index.html @@ -125,7 +125,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([ @@ -133,14 +133,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -259,10 +256,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -886,4 +883,4 @@ If running locally, the data is already available at the correct path.

- \ 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 50cd86f0..6ae4ff5d 100644 --- a/tutorials/fit_textured_volume.html +++ b/tutorials/fit_textured_volume.html @@ -118,7 +118,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([ @@ -126,14 +126,11 @@ torch.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 @@
In [ ]:
-
!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
 
@@ -547,4 +544,4 @@ pairs of target_images/rendered_images and targe
- \ 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 50cd86f0..6ae4ff5d 100644 --- a/tutorials/fit_textured_volume/index.html +++ b/tutorials/fit_textured_volume/index.html @@ -118,7 +118,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([ @@ -126,14 +126,11 @@ torch.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 @@
In [ ]:
-
!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
 
@@ -547,4 +544,4 @@ pairs of target_images/rendered_images and targe
- \ 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 e8e0bf52..ca7369fb 100644 --- a/tutorials/implicitron_config_system.html +++ b/tutorials/implicitron_config_system.html @@ -125,7 +125,7 @@ This tutorial provides detailed hands-on experience in using and modifying Impli 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([ @@ -133,14 +133,11 @@ This tutorial provides detailed hands-on experience in using and modifying Impli torch.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 @@ This tutorial provides detailed hands-on experience in using and modifying Impli
In [ ]:
-
!pip install omegaconf
+
!pip install omegaconf
 
@@ -876,4 +873,4 @@ instead of
- \ 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 e8e0bf52..ca7369fb 100644 --- a/tutorials/implicitron_config_system/index.html +++ b/tutorials/implicitron_config_system/index.html @@ -125,7 +125,7 @@ This tutorial provides detailed hands-on experience in using and modifying Impli 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([ @@ -133,14 +133,11 @@ This tutorial provides detailed hands-on experience in using and modifying Impli torch.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 @@ This tutorial provides detailed hands-on experience in using and modifying Impli
In [ ]:
-
!pip install omegaconf
+
!pip install omegaconf
 
@@ -876,4 +873,4 @@ instead of
- \ 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 6055d26e..536725a9 100644 --- a/tutorials/implicitron_volumes.html +++ b/tutorials/implicitron_volumes.html @@ -115,7 +115,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([ @@ -123,14 +123,11 @@ torch.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 @@
In [ ]:
-
!pip install omegaconf visdom
+
!pip install omegaconf visdom
 
@@ -231,10 +228,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -655,4 +652,4 @@ This is a grid of four rows of images, wrapped in to several large rows, i.e..
- \ 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 6055d26e..536725a9 100644 --- a/tutorials/implicitron_volumes/index.html +++ b/tutorials/implicitron_volumes/index.html @@ -115,7 +115,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([ @@ -123,14 +123,11 @@ torch.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 @@
In [ ]:
-
!pip install omegaconf visdom
+
!pip install omegaconf visdom
 
@@ -231,10 +228,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -655,4 +652,4 @@ This is a grid of four rows of images, wrapped in to several large rows, i.e..
- \ No newline at end of file + \ No newline at end of file diff --git a/tutorials/index.html b/tutorials/index.html index 233343c6..491ad02d 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 362e5e49..8b39c728 100644 --- a/tutorials/render_colored_points.html +++ b/tutorials/render_colored_points.html @@ -124,7 +124,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([ @@ -132,14 +132,11 @@ torch.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 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/PittsburghBridge
-!wget -P data/PittsburghBridge https://dl.fbaipublicfiles.com/pytorch3d/data/PittsburghBridge/pointcloud.npz
+
!mkdir -p data/PittsburghBridge
+!wget -P data/PittsburghBridge https://dl.fbaipublicfiles.com/pytorch3d/data/PittsburghBridge/pointcloud.npz
 
@@ -556,4 +553,4 @@ Sphere-based Representations.

- \ 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 362e5e49..8b39c728 100644 --- a/tutorials/render_colored_points/index.html +++ b/tutorials/render_colored_points/index.html @@ -124,7 +124,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([ @@ -132,14 +132,11 @@ torch.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 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/PittsburghBridge
-!wget -P data/PittsburghBridge https://dl.fbaipublicfiles.com/pytorch3d/data/PittsburghBridge/pointcloud.npz
+
!mkdir -p data/PittsburghBridge
+!wget -P data/PittsburghBridge https://dl.fbaipublicfiles.com/pytorch3d/data/PittsburghBridge/pointcloud.npz
 
@@ -556,4 +553,4 @@ Sphere-based Representations.

- \ 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 cdf2e21b..97aee4ec 100644 --- a/tutorials/render_densepose.html +++ b/tutorials/render_densepose.html @@ -127,7 +127,7 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

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([ @@ -135,14 +135,11 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

torch.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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

# 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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

# 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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

- \ 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 cdf2e21b..97aee4ec 100644 --- a/tutorials/render_densepose/index.html +++ b/tutorials/render_densepose/index.html @@ -127,7 +127,7 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

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([ @@ -135,14 +135,11 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

torch.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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

# 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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

# 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 @@ In this tutorial, we provide an example of using DensePose data in PyTorch3D.

- \ 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 32299145..0c11d320 100644 --- a/tutorials/render_textured_meshes.html +++ b/tutorials/render_textured_meshes.html @@ -126,7 +126,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([ @@ -134,14 +134,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -250,10 +247,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -766,4 +763,4 @@ The renderer and associated components can take batched inputs and rende
- \ 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 32299145..0c11d320 100644 --- a/tutorials/render_textured_meshes/index.html +++ b/tutorials/render_textured_meshes/index.html @@ -126,7 +126,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([ @@ -134,14 +134,11 @@ torch.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 @@
In [ ]:
-
!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/plot_image_grid.py
 from plot_image_grid import image_grid
 
@@ -250,10 +247,10 @@ If running locally, the data is already available at the correct path.

In [ ]:
-
!mkdir -p data/cow_mesh
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
-!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
+
!mkdir -p data/cow_mesh
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.obj
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow.mtl
+!wget -P data/cow_mesh https://dl.fbaipublicfiles.com/pytorch3d/data/cow_mesh/cow_texture.png
 
@@ -766,4 +763,4 @@ The renderer and associated components can take batched inputs and rende
- \ No newline at end of file + \ No newline at end of file diff --git a/users.html b/users.html index 3cb3a267..c8ebc695 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 3cb3a267..c8ebc695 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