mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
Enable spelling linter for Markdown, reStructuredText and IPython notebooks
Summary: Enable spelling linter for Markdown, reStructuredText and IPython notebooks under `fbcode/vision/fair`. Apply suggested fixes. Reviewed By: ppwwyyxx Differential Revision: D20495298 fbshipit-source-id: 95310c7b51f9fa68ba2aa34ecc39a874da36a75c
This commit is contained in:
parent
3901dbe4de
commit
c9742d00b0
@ -157,8 +157,8 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/camera_visualisation.py\n",
|
"!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/camera_visualization.py\n",
|
||||||
"from camera_visualisation import plot_camera_scene\n",
|
"from camera_visualization import plot_camera_scene\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir data\n",
|
"!mkdir data\n",
|
||||||
"!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/data/camera_graph.pth"
|
"!wget -P data https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/data/camera_graph.pth"
|
||||||
@ -482,7 +482,7 @@
|
|||||||
"log_R_absolute_init = torch.randn(N, 3).float().cuda()\n",
|
"log_R_absolute_init = torch.randn(N, 3).float().cuda()\n",
|
||||||
"T_absolute_init = torch.randn(N, 3).float().cuda()\n",
|
"T_absolute_init = torch.randn(N, 3).float().cuda()\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# futhermore, we know that the first camera is a trivial one \n",
|
"# furthermore, we know that the first camera is a trivial one \n",
|
||||||
"# (see the description above)\n",
|
"# (see the description above)\n",
|
||||||
"log_R_absolute_init[0, :] = 0.\n",
|
"log_R_absolute_init[0, :] = 0.\n",
|
||||||
"T_absolute_init[0, :] = 0.\n",
|
"T_absolute_init[0, :] = 0.\n",
|
||||||
|
@ -424,7 +424,7 @@
|
|||||||
"id": "dvTLnrWorQd2"
|
"id": "dvTLnrWorQd2"
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"### Visualise the starting position and the reference position"
|
"### Visualize the starting position and the reference position"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -545,7 +545,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"## 6. Batched Rendering\n",
|
"## 6. Batched Rendering\n",
|
||||||
"\n",
|
"\n",
|
||||||
"One of the core design choices of the PyTorch3D API is to suport **batched inputs for all components**. \n",
|
"One of the core design choices of the PyTorch3D API is to support **batched inputs for all components**. \n",
|
||||||
"The renderer and associated components can take batched inputs and **render a batch of output images in one forward pass**. We will now use this feature to render the mesh from many different viewpoints.\n"
|
"The renderer and associated components can take batched inputs and **render a batch of output images in one forward pass**. We will now use this feature to render the mesh from many different viewpoints.\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
||||||
|
|
||||||
from .camera_visualisation import (
|
from .camera_visualization import (
|
||||||
get_camera_wireframe,
|
get_camera_wireframe,
|
||||||
plot_camera_scene,
|
plot_camera_scene,
|
||||||
plot_cameras,
|
plot_cameras,
|
||||||
|
@ -330,7 +330,7 @@ class HardFlatShader(nn.Module):
|
|||||||
class SoftSilhouetteShader(nn.Module):
|
class SoftSilhouetteShader(nn.Module):
|
||||||
"""
|
"""
|
||||||
Calculate the silhouette by blending the top K faces for each pixel based
|
Calculate the silhouette by blending the top K faces for each pixel based
|
||||||
on the 2d euclidean distance of the centre of the pixel to the mesh face.
|
on the 2d euclidean distance of the center of the pixel to the mesh face.
|
||||||
|
|
||||||
Use this shader for generating silhouettes similar to SoftRasterizer [0].
|
Use this shader for generating silhouettes similar to SoftRasterizer [0].
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ class TestBlending(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_softmax_rgb_blend(self):
|
def test_softmax_rgb_blend(self):
|
||||||
# Create dummy outputs of rasterization simulating a cube in the centre
|
# Create dummy outputs of rasterization simulating a cube in the center
|
||||||
# of the image with surrounding padded values.
|
# of the image with surrounding padded values.
|
||||||
N, S, K = 1, 8, 2
|
N, S, K = 1, 8, 2
|
||||||
device = torch.device("cuda")
|
device = torch.device("cuda")
|
||||||
@ -421,7 +421,7 @@ class TestBlending(unittest.TestCase):
|
|||||||
return fn
|
return fn
|
||||||
|
|
||||||
def test_blend_params(self):
|
def test_blend_params(self):
|
||||||
"""Test colour parameter of BlendParams().
|
"""Test color parameter of BlendParams().
|
||||||
Assert passed value overrides default value.
|
Assert passed value overrides default value.
|
||||||
"""
|
"""
|
||||||
bp_default = BlendParams()
|
bp_default = BlendParams()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user