Commit 124bb5e3 authored by Jeremy Reizenstein's avatar Jeremy Reizenstein Committed by Facebook GitHub Bot
Browse files

spelling

Summary: Collection of spelling things, mostly in docs / tutorials.

Reviewed By: gkioxari

Differential Revision: D26101323

fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
parent c2e62a50
......@@ -77,7 +77,7 @@ class Volumes(object):
World coordinates:
- These define the locations of the centers of the volume cells
in the world coordinates.
- They are specifiied with the following mapping that converts
- They are specified with the following mapping that converts
points `x_local` in the local coordinates to points `x_world`
in the world coordinates:
```
......
......@@ -511,7 +511,7 @@ def quaternion_to_axis_angle(quaternions):
def rotation_6d_to_matrix(d6: torch.Tensor) -> torch.Tensor:
"""
Converts 6D rotation representation by Zhou et al. [1] to rotation matrix
using Gram--Schmidt orthogonalisation per Section B of [1].
using Gram--Schmidt orthogonalization per Section B of [1].
Args:
d6: 6D rotation representation, of size (*, 6)
......
......@@ -190,7 +190,7 @@ class Transform3d:
def compose(self, *others):
"""
Return a new Transform3d with the tranforms to compose stored as
Return a new Transform3d with the transforms to compose stored as
an internal list.
Args:
......@@ -254,7 +254,7 @@ class Transform3d:
independently without composing them.
Returns:
A new Transform3D object contaning the inverse of the original
A new Transform3D object containing the inverse of the original
transformation.
"""
......@@ -302,7 +302,7 @@ class Transform3d:
Args:
points: Tensor of shape (P, 3) or (N, P, 3)
eps: If eps!=None, the argument is used to clamp the
last coordinate before peforming the final division.
last coordinate before performing the final division.
The clamping corresponds to:
last_coord := (last_coord.sign() + (last_coord==0)) *
torch.clamp(last_coord.abs(), eps),
......@@ -681,7 +681,7 @@ def _broadcast_bmm(a, b):
b: torch tensor of shape (N, K, K)
Returns:
a and b broadcast multipled. The output batch dimension is max(N, M).
a and b broadcast multiplied. The output batch dimension is max(N, M).
To broadcast transforms across a batch dimension if M != N then
expect that either M = 1 or N = 1. The tensor with batch dimension 1 is
......
......@@ -567,7 +567,7 @@ def _add_pointcloud_trace(
pointclouds: Pointclouds object to render. It can be batched.
trace_name: name to label the trace with.
subplot_idx: identifies the subplot, with 0 being the top left.
ncols: the number of sublpots per row.
ncols: the number of subplots per row.
max_points_per_pointcloud: the number of points to render, which are randomly sampled.
marker_size: the size of the rendered points
"""
......@@ -648,7 +648,7 @@ def _add_camera_trace(
cameras: the Cameras object to render. It can be batched.
trace_name: name to label the trace with.
subplot_idx: identifies the subplot, with 0 being the top left.
ncols: the number of sublpots per row.
ncols: the number of subplots per row.
camera_scale: the size of the wireframe used to render the Cameras object.
"""
cam_wires = get_camera_wireframe(camera_scale).to(cameras.device)
......
......@@ -328,7 +328,9 @@ class TestMeshObjIO(TestCaseMixin, unittest.TestCase):
with self.assertRaises(ValueError) as err:
load_obj(obj_file)
self.assertTrue("Face vertices can ony have 3 properties" in str(err.exception))
self.assertTrue(
"Face vertices can only have 3 properties" in str(err.exception)
)
def test_load_obj_error_invalid_vertex_indices(self):
obj_file = "\n".join(
......@@ -631,7 +633,7 @@ class TestMeshObjIO(TestCaseMixin, unittest.TestCase):
self.assertTrue(aux.normals is None)
self.assertTrue(aux.verts_uvs is None)
def test_load_obj_mlt_no_image(self):
def test_load_obj_mtl_no_image(self):
obj_filename = "obj_mtl_no_image/model.obj"
filename = os.path.join(DATA_DIR, obj_filename)
R = 8
......
......@@ -317,7 +317,7 @@ class TestMeshPlyIO(TestCaseMixin, unittest.TestCase):
file.close()
self.assertLess(lengths[False], lengths[True], "ascii should be longer")
def test_heterogenous_property(self):
def test_heterogeneous_property(self):
ply_file_ascii = "\n".join(
[
"ply",
......@@ -670,7 +670,7 @@ class TestMeshPlyIO(TestCaseMixin, unittest.TestCase):
with self.assertRaisesRegex(ValueError, msg):
_load_ply_raw(StringIO("\n".join(lines2)))
# Heterogenous cases
# Heterogeneous cases
lines2 = lines.copy()
lines2.insert(4, "property double y")
......
......@@ -155,7 +155,7 @@ class TestICP(TestCaseMixin, unittest.TestCase):
self.assertClose(s_init, s, atol=atol)
self.assertClose(Xt_init, Xt, atol=atol)
def test_heterogenous_inputs(self, batch_size=10):
def test_heterogeneous_inputs(self, batch_size=10):
"""
Tests whether we get the same result when running ICP on
a set of randomly-sized Pointclouds and on their padded versions.
......
......@@ -230,9 +230,9 @@ class TestPointsToVolumes(TestCaseMixin, unittest.TestCase):
def test_from_point_cloud(self, interp_mode="trilinear"):
"""
Generates a volume from a random point cloud sampled from faces
of a 3D cube. Since each side of the cube is homogenously colored with
of a 3D cube. Since each side of the cube is homogeneously colored with
a different color, this should result in a volume with a
predefined homogenous color of the cells along its borders
predefined homogeneous color of the cells along its borders
and black interior. The test is run for both cube and non-cube shaped
volumes.
"""
......
......@@ -511,7 +511,7 @@ class TestRasterizePoints(TestCaseMixin, unittest.TestCase):
)
# Note that the order is only deterministic here for CUDA if all points
# fit in one chunk. This will the the case for this small example, but
# to properly exercise coordianted writes among multiple chunks we need
# to properly exercise coordinated writes among multiple chunks we need
# to use a bigger test case.
bin_points_expected[0, 0, 1, :2] = torch.tensor([0, 3])
bin_points_expected[0, 1, 0, 0] = torch.tensor([2])
......
......@@ -62,7 +62,7 @@ verts0 = torch.tensor(
)
faces0 = torch.tensor([[1, 0, 2], [4, 3, 5]], dtype=torch.int64)
# Points for a simple pointcloud. Get the vertices from a
# Points for a simple point cloud. Get the vertices from a
# torus and apply rotations such that the points are no longer
# symmerical in X/Y.
torus_mesh = torus(r=0.25, R=1.0, sides=5, rings=2 * 5)
......@@ -771,7 +771,7 @@ class TestRasterizeRectangleImagesPointclouds(TestCaseMixin, unittest.TestCase):
def test_render_pointcloud(self):
"""
Test a textured poincloud is rendered correctly in a non square image.
Test a textured point cloud is rendered correctly in a non square image.
"""
device = torch.device("cuda:0")
pointclouds = Pointclouds(
......
......@@ -16,7 +16,7 @@ class TestRaymarching(TestCaseMixin, unittest.TestCase):
n_rays=10, n_pts_per_ray=9, device="cuda", dtype=torch.float32
):
"""
Generate a batch of ray points with features, densities, and z-coodinates
Generate a batch of ray points with features, densities, and z-coordinates
such that their EmissionAbsorption renderring results in
feature renders `features_gt`, depth renders `depths_gt`,
and opacity renders `opacities_gt`.
......
......@@ -1052,7 +1052,7 @@ class TestRenderMeshes(TestCaseMixin, unittest.TestCase):
images[0, ...].sum().backward()
fragments = rasterizer(mesh, raster_settings=raster_settings)
# Some of the bary coordinates are outisde the
# Some of the bary coordinates are outside the
# [0, 1] range as expected because the blur is > 0
self.assertTrue(fragments.bary_coords.ge(1.0).any())
self.assertIsNotNone(atlas.grad)
......
......@@ -531,7 +531,7 @@ class TestRenderVolumes(TestCaseMixin, unittest.TestCase):
# get the EA raymarcher
raymarcher = EmissionAbsorptionRaymarcher()
# intialize the renderer
# initialize the renderer
renderer = VolumeRenderer(
raysampler=raysampler,
raymarcher=raymarcher,
......@@ -574,8 +574,8 @@ class TestRenderVolumes(TestCaseMixin, unittest.TestCase):
def test_rotating_cube_volume_render(self):
"""
Generates 4 renders of 4 sides of a volume representing a 3D cube.
Since each side of the cube is homogenously colored with
a different color, this should result in 4 images of homogenous color
Since each side of the cube is homogeneously colored with
a different color, this should result in 4 images of homogeneous color
with the depth of each pixel equal to a constant.
"""
......
......@@ -148,8 +148,8 @@ class TestSO3(TestCaseMixin, unittest.TestCase):
`so3_exponential_map(so3_log_map(so3_exponential_map(log_rot)))
== so3_exponential_map(log_rot)`
for a randomly generated batch of rotation matrix logarithms `log_rot`.
Unlike `test_so3_log_to_exp_to_log`, this test allows to check the
correctness of converting `log_rot` which contains values > math.pi.
Unlike `test_so3_log_to_exp_to_log`, this test checks the
correctness of converting a `log_rot` which contains values > math.pi.
"""
log_rot = 2.0 * TestSO3.init_log_rot(batch_size=batch_size)
# check also the singular cases where rot. angle = {0, pi, 2pi, 3pi}
......
......@@ -28,7 +28,7 @@ class TutorialHome extends React.Component {
</header>
<p>
Here you can learn about the structure and applications of
Pytorch3D from examples which are in the form of ipython
PyTorch3D from examples which are in the form of ipython
notebooks.
</p>
<h3> Run interactively </h3>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment