From 7fa333f63240cf92068991f81fd20b4faea5c15d Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Tue, 23 Nov 2021 11:29:49 -0800 Subject: [PATCH] Fix some Transform3D -> Transform3d Summary: Fix some typos in comments. Reviewed By: patricklabatut Differential Revision: D32596645 fbshipit-source-id: 09b6d8c49f4f0301b80df626c6f9a2d5b5d9b1a7 --- pytorch3d/renderer/cameras.py | 6 +++--- pytorch3d/structures/volumes.py | 4 ++-- pytorch3d/transforms/transform3d.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pytorch3d/renderer/cameras.py b/pytorch3d/renderer/cameras.py index a50b82a1..28dc1369 100644 --- a/pytorch3d/renderer/cameras.py +++ b/pytorch3d/renderer/cameras.py @@ -227,7 +227,7 @@ class CamerasBase(TensorProperties): eps: If eps!=None, the argument is used to clamp the divisor in the homogeneous normalization of the points transformed to the ndc space. Please see - `transforms.Transform3D.transform_points` for details. + `transforms.Transform3d.transform_points` for details. For `CamerasBase.transform_points`, setting `eps > 0` stabilizes gradients since it leads to avoiding division @@ -283,7 +283,7 @@ class CamerasBase(TensorProperties): eps: If eps!=None, the argument is used to clamp the divisor in the homogeneous normalization of the points transformed to the ndc space. Please see - `transforms.Transform3D.transform_points` for details. + `transforms.Transform3d.transform_points` for details. For `CamerasBase.transform_points`, setting `eps > 0` stabilizes gradients since it leads to avoiding division @@ -313,7 +313,7 @@ class CamerasBase(TensorProperties): eps: If eps!=None, the argument is used to clamp the divisor in the homogeneous normalization of the points transformed to the ndc space. Please see - `transforms.Transform3D.transform_points` for details. + `transforms.Transform3d.transform_points` for details. For `CamerasBase.transform_points`, setting `eps > 0` stabilizes gradients since it leads to avoiding division diff --git a/pytorch3d/structures/volumes.py b/pytorch3d/structures/volumes.py index 2b798820..151a3d44 100644 --- a/pytorch3d/structures/volumes.py +++ b/pytorch3d/structures/volumes.py @@ -124,7 +124,7 @@ class Volumes: appropriate `world_coordinates` argument. Internally, the mapping between `x_local` and `x_world` is represented - as a `Transform3D` object `Volumes._local_to_world_transform`. + as a `Transform3d` object `Volumes._local_to_world_transform`. Users can access the relevant transformations with the `Volumes.get_world_to_local_coords_transform()` and `Volumes.get_local_to_world_coords_transform()` @@ -260,7 +260,7 @@ class Volumes: ) -> Transform3d: """ Converts the `voxel_size` and `volume_translation` constructor arguments - to the internal `Transform3D` object `local_to_world_transform`. + to the internal `Transform3d` object `local_to_world_transform`. """ volume_size_zyx = self.get_grid_sizes().float() volume_size_xyz = volume_size_zyx[:, [2, 1, 0]] diff --git a/pytorch3d/transforms/transform3d.py b/pytorch3d/transforms/transform3d.py index 4718780f..a8bdf938 100644 --- a/pytorch3d/transforms/transform3d.py +++ b/pytorch3d/transforms/transform3d.py @@ -32,7 +32,7 @@ class Transform3d: BROADCASTING Transform3d objects supports broadcasting. Suppose that t1 and tN are - Transform3D objects with len(t1) == 1 and len(tN) == N respectively. Then we + Transform3d objects with len(t1) == 1 and len(tN) == N respectively. Then we can broadcast transforms like this: .. code-block:: python @@ -248,7 +248,7 @@ class Transform3d: def inverse(self, invert_composed: bool = False): """ - Returns a new Transform3D object that represents an inverse of the + Returns a new Transform3d object that represents an inverse of the current transformation. Args: @@ -262,7 +262,7 @@ class Transform3d: independently without composing them. Returns: - A new Transform3D object containing the inverse of the original + A new Transform3d object containing the inverse of the original transformation. """