suppress errors in fbcode/vision - batch 2

Differential Revision: D29458533

fbshipit-source-id: d9ef216fdbb677e49371ad91ea5e9355146c1c52
This commit is contained in:
Pyre Bot Jr 2021-06-29 09:48:18 -07:00 committed by Facebook GitHub Bot
parent b8790474f1
commit 14f7fe4a65
7 changed files with 14 additions and 5 deletions

View File

@ -400,6 +400,7 @@ class _GLTFLoader:
None, None, :3 None, None, :3
] ]
texture = TexturesUV( texture = TexturesUV(
# pyre-fixme[61]: `map` may not be initialized here.
maps=[map], # alpha channel ignored maps=[map], # alpha channel ignored
faces_uvs=[faces_uvs], faces_uvs=[faces_uvs],
verts_uvs=[verts_uvs], verts_uvs=[verts_uvs],

View File

@ -177,7 +177,6 @@ def chamfer_distance(
) )
if is_x_heterogeneous: if is_x_heterogeneous:
# pyre-fixme[16]: `int` has no attribute `__setitem__`.
cham_norm_x[x_mask] = 0.0 cham_norm_x[x_mask] = 0.0
if is_y_heterogeneous: if is_y_heterogeneous:
cham_norm_y[y_mask] = 0.0 cham_norm_y[y_mask] = 0.0

View File

@ -124,6 +124,7 @@ def mesh_laplacian_smoothing(meshes, method: str = "uniform"):
elif method == "cot": elif method == "cot":
loss = L.mm(verts_packed) * norm_w - verts_packed loss = L.mm(verts_packed) * norm_w - verts_packed
elif method == "cotcurv": elif method == "cotcurv":
# pyre-fixme[61]: `norm_w` may not be initialized here.
loss = (L.mm(verts_packed) - L_sum * verts_packed) * norm_w loss = (L.mm(verts_packed) - L_sum * verts_packed) * norm_w
loss = loss.norm(dim=1) loss = loss.norm(dim=1)

View File

@ -463,7 +463,6 @@ def round_points_to_volumes(
# valid - binary indicators of votes that fall into the volume # valid - binary indicators of votes that fall into the volume
grid_sizes = grid_sizes.type_as(XYZ) grid_sizes = grid_sizes.type_as(XYZ)
# pyre-fixme[16]: `int` has no attribute `long`.
valid = ( valid = (
(0 <= X) (0 <= X)
* (X < grid_sizes_xyz[:, None, 0:1]) * (X < grid_sizes_xyz[:, None, 0:1])

View File

@ -137,10 +137,14 @@ def sample_points_from_meshes(
# return # return
# TODO(gkioxari) consider returning a Pointclouds instance [breaking] # TODO(gkioxari) consider returning a Pointclouds instance [breaking]
if return_normals and return_textures: if return_normals and return_textures:
# pyre-fixme[61]: `normals` may not be initialized here.
# pyre-fixme[61]: `textures` may not be initialized here.
return samples, normals, textures return samples, normals, textures
if return_normals: # return_textures is False if return_normals: # return_textures is False
# pyre-fixme[61]: `normals` may not be initialized here.
return samples, normals return samples, normals
if return_textures: # return_normals is False if return_textures: # return_normals is False
# pyre-fixme[61]: `textures` may not be initialized here.
return samples, textures return samples, textures
return samples return samples

View File

@ -427,7 +427,6 @@ def clip_faces(
# during rasterization anyway). # during rasterization anyway).
faces_delta_cum = faces_delta.cumsum(0) - faces_delta faces_delta_cum = faces_delta.cumsum(0) - faces_delta
delta = 1 + case4_unclipped.int() - case2_unclipped.int() delta = 1 + case4_unclipped.int() - case2_unclipped.int()
# pyre-ignore[16]
faces_unclipped_to_clipped_idx = delta.cumsum(0) - delta faces_unclipped_to_clipped_idx = delta.cumsum(0) - delta
########################################### ###########################################

View File

@ -248,7 +248,10 @@ def rasterize_meshes(
# original unclipped faces. This may involve converting barycentric # original unclipped faces. This may involve converting barycentric
# coordinates # coordinates
outputs = convert_clipped_rasterization_to_original_faces( outputs = convert_clipped_rasterization_to_original_faces(
pix_to_face, barycentric_coords, clipped_faces pix_to_face,
barycentric_coords,
# pyre-fixme[61]: `clipped_faces` may not be initialized here.
clipped_faces,
) )
pix_to_face, barycentric_coords = outputs pix_to_face, barycentric_coords = outputs
@ -612,7 +615,10 @@ def rasterize_meshes_python( # noqa: C901
# original unclipped faces. This may involve converting barycentric # original unclipped faces. This may involve converting barycentric
# coordinates # coordinates
(face_idxs, bary_coords,) = convert_clipped_rasterization_to_original_faces( (face_idxs, bary_coords,) = convert_clipped_rasterization_to_original_faces(
face_idxs, bary_coords, clipped_faces face_idxs,
bary_coords,
# pyre-fixme[61]: `clipped_faces` may not be initialized here.
clipped_faces,
) )
return face_idxs, zbuf, bary_coords, pix_dists return face_idxs, zbuf, bary_coords, pix_dists