mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-15 11:50:35 +08:00
tutorial fixes from #336. Wheels with cuda10.1.
Summary: Add a document to explain how to run the tutorials. Fix API of TexturesVertex in fit_textured_mesh. Prepare cuda 10.1 wheels (not 10.2) for linux to be available on pypi - this matches what colab has. Change the tutorials to use these new wheels. Reviewed By: gkioxari Differential Revision: D23324479 fbshipit-source-id: 60e92a3f46a2d878f811b7703638f8d1dae143d9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
909dc83505
commit
32484500be
18
docs/tutorials/README.md
Normal file
18
docs/tutorials/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Tutorial notebooks
|
||||
|
||||
For current versions of the tutorials, which correspond to the latest release,
|
||||
please look at this directory at the `stable` tag, namely at
|
||||
https://github.com/facebookresearch/pytorch3d/tree/stable/docs/tutorials .
|
||||
|
||||
There are links at the project homepage for opening these directly in colab.
|
||||
|
||||
They install torch, torchvision and PyTorch3D from pip, which should work
|
||||
with the CUDA 10.1 inside a GPU colab notebook. If you need to install
|
||||
pytorch3d from source inside colab, you can use
|
||||
`!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'`
|
||||
instead.
|
||||
|
||||
The versions of these tutorials on the main branch may need to use the latest
|
||||
pytorch3d from the main branch. You may be able to install this from source
|
||||
with
|
||||
`!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'`.
|
||||
@@ -81,7 +81,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -68,7 +68,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -43,7 +43,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -82,7 +82,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -60,7 +60,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -781,7 +785,7 @@
|
||||
" new_src_mesh = src_mesh.offset_verts(deform_verts)\n",
|
||||
" \n",
|
||||
" # Add per vertex colors to texture the mesh\n",
|
||||
" new_src_mesh.textures = TexturesVertex(verts_rgb=sphere_verts_rgb) \n",
|
||||
" new_src_mesh.textures = TexturesVertex(verts_features=sphere_verts_rgb) \n",
|
||||
" \n",
|
||||
" # Losses to smooth /regularize the mesh shape\n",
|
||||
" loss = {k: torch.tensor(0.0, device=device) for k in losses}\n",
|
||||
|
||||
@@ -42,7 +42,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -65,7 +65,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install torch torchvision\n",
|
||||
"!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
"import sys\n",
|
||||
"if torch.__version__=='1.6.0+cu101' and sys.platform.startswith('linux'):\n",
|
||||
" !pip install pytorch3d\n",
|
||||
"else:\n",
|
||||
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user