mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
remove skimage import from most tutorials
Summary: Several tutorials were importing skimage and not using it (and it is not an official dependency of PyTorch3D). Also several had a bad call to plt.grid. Reviewed By: nikhilaravi Differential Revision: D28185822 fbshipit-source-id: adabfd0d4d339e1081c26b7b28f5e3953b492f2e
This commit is contained in:
parent
6fa66f5534
commit
d17b121d9d
@ -520,7 +520,6 @@
|
||||
" plt.figure()\n",
|
||||
" plt.imshow(image[..., :3])\n",
|
||||
" plt.title(\"iter: %d, loss: %0.2f\" % (i, loss.data))\n",
|
||||
" plt.grid(\"off\")\n",
|
||||
" plt.axis(\"off\")\n",
|
||||
" \n",
|
||||
"writer.close()"
|
||||
|
@ -97,7 +97,6 @@
|
||||
"import os\n",
|
||||
"import torch\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from skimage.io import imread\n",
|
||||
"\n",
|
||||
"from pytorch3d.utils import ico_sphere\n",
|
||||
"import numpy as np\n",
|
||||
@ -464,7 +463,6 @@
|
||||
" plt.subplot(1, 2, 2)\n",
|
||||
" plt.imshow(target_image.cpu().detach().numpy())\n",
|
||||
" plt.title(title)\n",
|
||||
" plt.grid(\"off\")\n",
|
||||
" plt.axis(\"off\")\n",
|
||||
"\n",
|
||||
"# Plot losses as a function of optimization iteration\n",
|
||||
|
@ -76,7 +76,6 @@
|
||||
"import torch\n",
|
||||
"import torch.nn.functional as F\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from skimage.io import imread\n",
|
||||
"\n",
|
||||
"# Util function for loading point clouds|\n",
|
||||
"import numpy as np\n",
|
||||
@ -202,7 +201,6 @@
|
||||
"images = renderer(point_cloud)\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\")\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -229,7 +227,6 @@
|
||||
"\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\")\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -277,7 +274,6 @@
|
||||
"images = renderer(point_cloud)\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\")\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -303,7 +299,6 @@
|
||||
"images = renderer(point_cloud)\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\")\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -336,7 +331,6 @@
|
||||
" bg_col=torch.tensor([0.0, 1.0, 0.0, 1.0], dtype=torch.float32, device=device))\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\")\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
|
@ -102,7 +102,6 @@
|
||||
"import os\n",
|
||||
"import torch\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from skimage.io import imread\n",
|
||||
"\n",
|
||||
"# Util function for loading meshes\n",
|
||||
"from pytorch3d.io import load_objs_as_meshes, load_obj\n",
|
||||
@ -283,7 +282,6 @@
|
||||
"plt.figure(figsize=(7,7))\n",
|
||||
"texture_image=mesh.textures.maps_padded()\n",
|
||||
"plt.imshow(texture_image.squeeze().cpu().numpy())\n",
|
||||
"plt.grid(\"off\");\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -302,7 +300,6 @@
|
||||
"source": [
|
||||
"plt.figure(figsize=(7,7))\n",
|
||||
"texturesuv_image_matplotlib(mesh.textures, subsample=None)\n",
|
||||
"plt.grid(\"off\");\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -405,7 +402,6 @@
|
||||
"images = renderer(mesh)\n",
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\");\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -456,7 +452,6 @@
|
||||
"source": [
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\");\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
@ -520,7 +515,6 @@
|
||||
"source": [
|
||||
"plt.figure(figsize=(10, 10))\n",
|
||||
"plt.imshow(images[0, ..., :3].cpu().numpy())\n",
|
||||
"plt.grid(\"off\");\n",
|
||||
"plt.axis(\"off\");"
|
||||
]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user