From e9a26f263a4477d45e742a4513db37ff0feb2045 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Wed, 4 Nov 2020 03:59:15 -0800 Subject: [PATCH] Restrict import of ops from Pointclouds Summary: Move to a local import for calculating pointcloud normals, similar to _compute_face_areas_normals on Meshes. Reviewed By: theschnitz Differential Revision: D24695260 fbshipit-source-id: 9e1eb5d15017975b8c4f4175690cc3654f38d9a4 --- pytorch3d/ops/points_normals.py | 2 +- pytorch3d/structures/pointclouds.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch3d/ops/points_normals.py b/pytorch3d/ops/points_normals.py index 09a082e5..741465b3 100644 --- a/pytorch3d/ops/points_normals.py +++ b/pytorch3d/ops/points_normals.py @@ -20,7 +20,7 @@ def estimate_pointcloud_normals( Estimates the normals of a batch of `pointclouds`. The function uses `estimate_pointcloud_local_coord_frames` to estimate - the normals. Please refer to this function for more detailed information. + the normals. Please refer to that function for more detailed information. Args: **pointclouds**: Batch of 3-dimensional points of shape diff --git a/pytorch3d/structures/pointclouds.py b/pytorch3d/structures/pointclouds.py index 4b302b5e..97fb339d 100644 --- a/pytorch3d/structures/pointclouds.py +++ b/pytorch3d/structures/pointclouds.py @@ -2,7 +2,6 @@ import torch -from .. import ops from . import utils as struct_utils @@ -890,7 +889,7 @@ class Pointclouds(object): them to the internal tensors `self._normals_list` and `self._normals_padded` The function uses `ops.estimate_pointcloud_local_coord_frames` - to estimate the normals. Please refer to this function for more + to estimate the normals. Please refer to that function for more detailed information about the implemented algorithm. Args: @@ -908,6 +907,7 @@ class Pointclouds(object): [1] Tombari, Salti, Di Stefano: Unique Signatures of Histograms for Local Surface Description, ECCV 2010. """ + from .. import ops # estimate the normals normals_est = ops.estimate_pointcloud_normals(