mirror of
				https://github.com/facebookresearch/pytorch3d.git
				synced 2025-11-04 18:02:14 +08:00 
			
		
		
		
	suppress errors in vision/fair/pytorch3d
				
					
				
			Differential Revision: D41897914 fbshipit-source-id: 675f4ad6938bc12d295bbb63a69e3ff98b319a9a
This commit is contained in:
		
							parent
							
								
									a4a29b013b
								
							
						
					
					
						commit
						de3a474d2b
					
				@ -88,7 +88,6 @@ class _PointFaceDistance(Function):
 | 
			
		||||
        return grad_points, None, grad_tris, None, None, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_PointFaceDistance` has no attribute `apply`.
 | 
			
		||||
point_face_distance = _PointFaceDistance.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -151,7 +150,6 @@ class _FacePointDistance(Function):
 | 
			
		||||
        return grad_points, None, grad_tris, None, None, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_FacePointDistance` has no attribute `apply`.
 | 
			
		||||
face_point_distance = _FacePointDistance.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -202,7 +200,6 @@ class _PointEdgeDistance(Function):
 | 
			
		||||
        return grad_points, None, grad_segms, None, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_PointEdgeDistance` has no attribute `apply`.
 | 
			
		||||
point_edge_distance = _PointEdgeDistance.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -253,7 +250,6 @@ class _EdgePointDistance(Function):
 | 
			
		||||
        return grad_points, None, grad_segms, None, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_EdgePointDistance` has no attribute `apply`.
 | 
			
		||||
edge_point_distance = _EdgePointDistance.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -132,7 +132,6 @@ def ball_query(
 | 
			
		||||
    if lengths2 is None:
 | 
			
		||||
        lengths2 = torch.full((N,), P2, dtype=torch.int64, device=p1.device)
 | 
			
		||||
 | 
			
		||||
    # pyre-fixme[16]: `_ball_query` has no attribute `apply`.
 | 
			
		||||
    dists, idx = _ball_query.apply(p1, p2, lengths1, lengths2, K, radius)
 | 
			
		||||
 | 
			
		||||
    # Gather the neighbors if needed
 | 
			
		||||
 | 
			
		||||
@ -171,5 +171,4 @@ class GatherScatter(Function):
 | 
			
		||||
        return grad_input, grad_edges, grad_directed
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `GatherScatter` has no attribute `apply`.
 | 
			
		||||
gather_scatter = GatherScatter.apply
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,6 @@ def interpolate_face_attributes(
 | 
			
		||||
    pix_to_face = pix_to_face.view(-1)
 | 
			
		||||
    barycentric_coords = barycentric_coords.view(N * H * W * K, 3)
 | 
			
		||||
    args = (pix_to_face, barycentric_coords, face_attributes)
 | 
			
		||||
    # pyre-fixme[16]: `_InterpFaceAttrs` has no attribute `apply`.
 | 
			
		||||
    out = _InterpFaceAttrs.apply(*args)
 | 
			
		||||
    out = out.view(N, H, W, K, -1)
 | 
			
		||||
    return out
 | 
			
		||||
 | 
			
		||||
@ -161,7 +161,6 @@ def box3d_overlap(
 | 
			
		||||
    _check_nonzero(boxes1, eps)
 | 
			
		||||
    _check_nonzero(boxes2, eps)
 | 
			
		||||
 | 
			
		||||
    # pyre-fixme[16]: `_box3d_overlap` has no attribute `apply`.
 | 
			
		||||
    vol, iou = _box3d_overlap.apply(boxes1, boxes2)
 | 
			
		||||
 | 
			
		||||
    return vol, iou
 | 
			
		||||
 | 
			
		||||
@ -184,7 +184,6 @@ def knn_points(
 | 
			
		||||
    if lengths2 is None:
 | 
			
		||||
        lengths2 = torch.full((p1.shape[0],), P2, dtype=torch.int64, device=p1.device)
 | 
			
		||||
 | 
			
		||||
    # pyre-fixme[16]: `_knn_points` has no attribute `apply`.
 | 
			
		||||
    p1_dists, p1_idx = _knn_points.apply(
 | 
			
		||||
        p1, p2, lengths1, lengths2, K, version, norm, return_sorted
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
@ -278,7 +278,6 @@ def marching_cubes(
 | 
			
		||||
    for i in range(len(vol_batch)):
 | 
			
		||||
        vol = vol_batch[i]
 | 
			
		||||
        thresh = ((vol.max() + vol.min()) / 2).item() if isolevel is None else isolevel
 | 
			
		||||
        # pyre-fixme[16]: `_marching_cubes` has no attribute `apply`.
 | 
			
		||||
        verts, faces, ids = _marching_cubes.apply(vol, thresh)
 | 
			
		||||
        if len(faces) > 0 and len(verts) > 0:
 | 
			
		||||
            # Convert from world coordinates ([0, D-1], [0, H-1], [0, W-1]) to
 | 
			
		||||
 | 
			
		||||
@ -63,5 +63,4 @@ class _MeshFaceAreasNormals(Function):
 | 
			
		||||
        return grad_verts, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_MeshFaceAreasNormals` has no attribute `apply`.
 | 
			
		||||
mesh_face_areas_normals = _MeshFaceAreasNormals.apply
 | 
			
		||||
 | 
			
		||||
@ -91,7 +91,6 @@ def packed_to_padded(
 | 
			
		||||
        inputs = inputs.unsqueeze(1)
 | 
			
		||||
    else:
 | 
			
		||||
        inputs = inputs.reshape(input_shape[0], -1)
 | 
			
		||||
    # pyre-ignore [16]
 | 
			
		||||
    inputs_padded = _PackedToPadded.apply(inputs, first_idxs, max_size)
 | 
			
		||||
    # if flat is True, reshape output to (N, max_size) from (N, max_size, 1)
 | 
			
		||||
    # else reshape output to (N, max_size, ...)
 | 
			
		||||
@ -188,7 +187,6 @@ def padded_to_packed(
 | 
			
		||||
        inputs = inputs.unsqueeze(2)
 | 
			
		||||
    else:
 | 
			
		||||
        inputs = inputs.reshape(*input_shape[:2], -1)
 | 
			
		||||
    # pyre-ignore [16]
 | 
			
		||||
    inputs_packed = _PaddedToPacked.apply(inputs, first_idxs, num_inputs)
 | 
			
		||||
    # if input is flat, reshape output to (F,) from (F, 1)
 | 
			
		||||
    # else reshape output to (F, ...)
 | 
			
		||||
 | 
			
		||||
@ -183,7 +183,6 @@ class _points_to_volumes_function(Function):
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_points_to_volumes_function` has no attribute `apply`.
 | 
			
		||||
_points_to_volumes = _points_to_volumes_function.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -108,7 +108,6 @@ class _SigmoidAlphaBlend(torch.autograd.Function):
 | 
			
		||||
        return grad_dists, None, None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pyre-fixme[16]: `_SigmoidAlphaBlend` has no attribute `apply`.
 | 
			
		||||
_sigmoid_alpha = _SigmoidAlphaBlend.apply
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -90,7 +90,6 @@ def alpha_composite(pointsidx, alphas, pt_clds) -> torch.Tensor:
 | 
			
		||||
        Combined features: Tensor of shape (N, C, image_size, image_size)
 | 
			
		||||
            giving the accumulated features at each point.
 | 
			
		||||
    """
 | 
			
		||||
    # pyre-fixme[16]: `_CompositeAlphaPoints` has no attribute `apply`.
 | 
			
		||||
    return _CompositeAlphaPoints.apply(pt_clds, alphas, pointsidx)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -169,7 +168,6 @@ def norm_weighted_sum(pointsidx, alphas, pt_clds) -> torch.Tensor:
 | 
			
		||||
        Combined features: Tensor of shape (N, C, image_size, image_size)
 | 
			
		||||
            giving the accumulated features at each point.
 | 
			
		||||
    """
 | 
			
		||||
    # pyre-fixme[16]: `_CompositeNormWeightedSumPoints` has no attribute `apply`.
 | 
			
		||||
    return _CompositeNormWeightedSumPoints.apply(pt_clds, alphas, pointsidx)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -241,5 +239,4 @@ def weighted_sum(pointsidx, alphas, pt_clds) -> torch.Tensor:
 | 
			
		||||
        Combined features: Tensor of shape (N, C, image_size, image_size)
 | 
			
		||||
            giving the accumulated features at each point.
 | 
			
		||||
    """
 | 
			
		||||
    # pyre-fixme[16]: `_CompositeWeightedSumPoints` has no attribute `apply`.
 | 
			
		||||
    return _CompositeWeightedSumPoints.apply(pt_clds, alphas, pointsidx)
 | 
			
		||||
 | 
			
		||||
@ -220,7 +220,6 @@ def rasterize_meshes(
 | 
			
		||||
    if max_faces_per_bin is None:
 | 
			
		||||
        max_faces_per_bin = int(max(10000, meshes._F / 5))
 | 
			
		||||
 | 
			
		||||
    # pyre-fixme[16]: `_RasterizeFaceVerts` has no attribute `apply`.
 | 
			
		||||
    pix_to_face, zbuf, barycentric_coords, dists = _RasterizeFaceVerts.apply(
 | 
			
		||||
        face_verts,
 | 
			
		||||
        mesh_to_face_first_idx,
 | 
			
		||||
 | 
			
		||||
@ -628,7 +628,6 @@ class Renderer(torch.nn.Module):
 | 
			
		||||
                    max_depth / focal_lengths.min().item(),
 | 
			
		||||
                )
 | 
			
		||||
            )
 | 
			
		||||
        # pyre-fixme[16]: `_Render` has no attribute `apply`.
 | 
			
		||||
        ret_res = _Render.apply(
 | 
			
		||||
            vert_pos,
 | 
			
		||||
            vert_col,
 | 
			
		||||
 | 
			
		||||
@ -128,7 +128,6 @@ def rasterize_points(
 | 
			
		||||
 | 
			
		||||
    # Function.apply cannot take keyword args, so we handle defaults in this
 | 
			
		||||
    # wrapper and call apply with positional args only
 | 
			
		||||
    # pyre-fixme[16]: `_RasterizePoints` has no attribute `apply`.
 | 
			
		||||
    return _RasterizePoints.apply(
 | 
			
		||||
        points_packed,
 | 
			
		||||
        cloud_to_packed_first_idx,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user