mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
Followup D33970393 (auto typing)
Summary: D33970393 (e9fb6c27e3) ran an inference to add some typing. Remove some where it was a bit too confident. (Also fix some pyre errors in plotly_vis caused by new mismatch.)
Reviewed By: patricklabatut
Differential Revision: D34004689
fbshipit-source-id: 430182b0ff0b91be542a3120da6d6b1d2b247c59
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e9fb6c27e3
commit
47c0997227
@@ -166,7 +166,7 @@ def estimate_pointcloud_local_coord_frames(
|
||||
return curvatures, local_coord_frames
|
||||
|
||||
|
||||
def _disambiguate_vector_directions(pcl, knns, vecs: float) -> float:
|
||||
def _disambiguate_vector_directions(pcl, knns, vecs):
|
||||
"""
|
||||
Disambiguates normal directions according to [1].
|
||||
|
||||
@@ -180,7 +180,6 @@ def _disambiguate_vector_directions(pcl, knns, vecs: float) -> float:
|
||||
# each element of the neighborhood
|
||||
df = knns - pcl[:, :, None]
|
||||
# projection of the difference on the principal direction
|
||||
# pyre-fixme[16]: `float` has no attribute `__getitem__`.
|
||||
proj = (vecs[:, :, None] * df).sum(3)
|
||||
# check how many projections are positive
|
||||
n_pos = (proj > 0).type_as(knns).sum(2, keepdim=True)
|
||||
|
||||
@@ -400,7 +400,7 @@ def create_verts_index(verts_per_mesh, edges_per_mesh, device=None):
|
||||
return verts_idx
|
||||
|
||||
|
||||
def create_faces_index(faces_per_mesh: int, device=None):
|
||||
def create_faces_index(faces_per_mesh, device=None):
|
||||
"""
|
||||
Helper function to group the faces indices for each mesh. New faces are
|
||||
stacked at the end of the original faces tensor, so in order to have
|
||||
@@ -417,9 +417,7 @@ def create_faces_index(faces_per_mesh: int, device=None):
|
||||
"""
|
||||
# e.g. faces_per_mesh = [2, 5, 3]
|
||||
|
||||
# pyre-fixme[16]: `int` has no attribute `sum`.
|
||||
F = faces_per_mesh.sum() # e.g. 10
|
||||
# pyre-fixme[16]: `int` has no attribute `cumsum`.
|
||||
faces_per_mesh_cumsum = faces_per_mesh.cumsum(dim=0) # (N,) e.g. (2, 7, 10)
|
||||
|
||||
switch1_idx = faces_per_mesh_cumsum.clone()
|
||||
|
||||
Reference in New Issue
Block a user