From c9742d00b0a88acd8f2e406260deb7b033821485 Mon Sep 17 00:00:00 2001 From: Patrick Labatut Date: Tue, 17 Mar 2020 16:24:45 -0700 Subject: [PATCH] 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 --- docs/tutorials/bundle_adjustment.ipynb | 6 +++--- ...osition_optimization_with_differentiable_rendering.ipynb | 2 +- docs/tutorials/render_textured_meshes.ipynb | 2 +- docs/tutorials/utils/__init__.py | 2 +- .../{camera_visualisation.py => camera_visualization.py} | 0 pytorch3d/renderer/mesh/shader.py | 2 +- tests/test_blending.py | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) rename docs/tutorials/utils/{camera_visualisation.py => camera_visualization.py} (100%) diff --git a/docs/tutorials/bundle_adjustment.ipynb b/docs/tutorials/bundle_adjustment.ipynb index 6f647334..4125006b 100644 --- a/docs/tutorials/bundle_adjustment.ipynb +++ b/docs/tutorials/bundle_adjustment.ipynb @@ -157,8 +157,8 @@ }, "outputs": [], "source": [ - "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/camera_visualisation.py\n", - "from camera_visualisation import plot_camera_scene\n", + "!wget https://raw.githubusercontent.com/facebookresearch/pytorch3d/master/docs/tutorials/utils/camera_visualization.py\n", + "from camera_visualization import plot_camera_scene\n", "\n", "!mkdir data\n", "!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", "T_absolute_init = torch.randn(N, 3).float().cuda()\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", "log_R_absolute_init[0, :] = 0.\n", "T_absolute_init[0, :] = 0.\n", diff --git a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb index 64c846f3..5fe62153 100644 --- a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb +++ b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb @@ -424,7 +424,7 @@ "id": "dvTLnrWorQd2" }, "source": [ - "### Visualise the starting position and the reference position" + "### Visualize the starting position and the reference position" ] }, { diff --git a/docs/tutorials/render_textured_meshes.ipynb b/docs/tutorials/render_textured_meshes.ipynb index 552a2b64..6dca0582 100644 --- a/docs/tutorials/render_textured_meshes.ipynb +++ b/docs/tutorials/render_textured_meshes.ipynb @@ -545,7 +545,7 @@ "source": [ "## 6. Batched Rendering\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" ] }, diff --git a/docs/tutorials/utils/__init__.py b/docs/tutorials/utils/__init__.py index c15c125f..ffc23108 100644 --- a/docs/tutorials/utils/__init__.py +++ b/docs/tutorials/utils/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. -from .camera_visualisation import ( +from .camera_visualization import ( get_camera_wireframe, plot_camera_scene, plot_cameras, diff --git a/docs/tutorials/utils/camera_visualisation.py b/docs/tutorials/utils/camera_visualization.py similarity index 100% rename from docs/tutorials/utils/camera_visualisation.py rename to docs/tutorials/utils/camera_visualization.py diff --git a/pytorch3d/renderer/mesh/shader.py b/pytorch3d/renderer/mesh/shader.py index 97c99bec..c15178ae 100644 --- a/pytorch3d/renderer/mesh/shader.py +++ b/pytorch3d/renderer/mesh/shader.py @@ -330,7 +330,7 @@ class HardFlatShader(nn.Module): class SoftSilhouetteShader(nn.Module): """ 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]. diff --git a/tests/test_blending.py b/tests/test_blending.py index acd6b813..16d9939c 100644 --- a/tests/test_blending.py +++ b/tests/test_blending.py @@ -272,7 +272,7 @@ class TestBlending(unittest.TestCase): ) 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. N, S, K = 1, 8, 2 device = torch.device("cuda") @@ -421,7 +421,7 @@ class TestBlending(unittest.TestCase): return fn def test_blend_params(self): - """Test colour parameter of BlendParams(). + """Test color parameter of BlendParams(). Assert passed value overrides default value. """ bp_default = BlendParams()