|
118 | 118 | "from pytorch3d.structures import Meshes\n",
|
119 | 119 | "from pytorch3d.renderer import (\n",
|
120 | 120 | " look_at_view_transform,\n",
|
121 |
| - " OpenGLPerspectiveCameras, \n", |
| 121 | + " FoVPerspectiveCameras, \n", |
122 | 122 | " PointLights, \n",
|
123 | 123 | " DirectionalLights, \n",
|
124 | 124 | " Materials, \n",
|
|
304 | 304 | "# broadcasting. So we can view the camera from the a distance of dist=2.7, and \n",
|
305 | 305 | "# then specify elevation and azimuth angles for each viewpoint as tensors. \n",
|
306 | 306 | "R, T = look_at_view_transform(dist=2.7, elev=elev, azim=azim)\n",
|
307 |
| - "cameras = OpenGLPerspectiveCameras(device=device, R=R, T=T)\n", |
| 307 | + "cameras = FoVPerspectiveCameras(device=device, R=R, T=T)\n", |
308 | 308 | "\n",
|
309 | 309 | "# We arbitrarily choose one particular view that will be used to visualize \n",
|
310 | 310 | "# results\n",
|
311 |
| - "camera = OpenGLPerspectiveCameras(device=device, R=R[None, 1, ...], \n", |
| 311 | + "camera = FoVPerspectiveCameras(device=device, R=R[None, 1, ...], \n", |
312 | 312 | " T=T[None, 1, ...]) \n",
|
313 | 313 | "\n",
|
314 | 314 | "# Define the settings for rasterization and shading. Here we set the output \n",
|
|
351 | 351 | "# Our multi-view cow dataset will be represented by these 2 lists of tensors,\n",
|
352 | 352 | "# each of length num_views.\n",
|
353 | 353 | "target_rgb = [target_images[i, ..., :3] for i in range(num_views)]\n",
|
354 |
| - "target_cameras = [OpenGLPerspectiveCameras(device=device, R=R[None, i, ...], \n", |
| 354 | + "target_cameras = [FoVPerspectiveCameras(device=device, R=R[None, i, ...], \n", |
355 | 355 | " T=T[None, i, ...]) for i in range(num_views)]"
|
356 | 356 | ]
|
357 | 357 | },
|
|
708 | 708 | " image_size=128, \n",
|
709 | 709 | " blur_radius=np.log(1. / 1e-4 - 1.)*sigma, \n",
|
710 | 710 | " faces_per_pixel=50, \n",
|
| 711 | + " perspective_correct=False, \n", |
711 | 712 | ")\n",
|
712 | 713 | "\n",
|
713 | 714 | "# Differentiable soft renderer using per vertex RGB colors for texture\n",
|
|
0 commit comments