mirror of
				https://github.com/facebookresearch/pytorch3d.git
				synced 2025-11-04 18:02:14 +08:00 
			
		
		
		
	suppress errors in fbcode/vision - batch 2
				
					
				
			Differential Revision: D29458533 fbshipit-source-id: d9ef216fdbb677e49371ad91ea5e9355146c1c52
This commit is contained in:
		
							parent
							
								
									b8790474f1
								
							
						
					
					
						commit
						14f7fe4a65
					
				@ -400,6 +400,7 @@ class _GLTFLoader:
 | 
			
		||||
                    None, None, :3
 | 
			
		||||
                ]
 | 
			
		||||
            texture = TexturesUV(
 | 
			
		||||
                # pyre-fixme[61]: `map` may not be initialized here.
 | 
			
		||||
                maps=[map],  # alpha channel ignored
 | 
			
		||||
                faces_uvs=[faces_uvs],
 | 
			
		||||
                verts_uvs=[verts_uvs],
 | 
			
		||||
 | 
			
		||||
@ -177,7 +177,6 @@ def chamfer_distance(
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        if is_x_heterogeneous:
 | 
			
		||||
            # pyre-fixme[16]: `int` has no attribute `__setitem__`.
 | 
			
		||||
            cham_norm_x[x_mask] = 0.0
 | 
			
		||||
        if is_y_heterogeneous:
 | 
			
		||||
            cham_norm_y[y_mask] = 0.0
 | 
			
		||||
 | 
			
		||||
@ -124,6 +124,7 @@ def mesh_laplacian_smoothing(meshes, method: str = "uniform"):
 | 
			
		||||
    elif method == "cot":
 | 
			
		||||
        loss = L.mm(verts_packed) * norm_w - verts_packed
 | 
			
		||||
    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 = loss.norm(dim=1)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -463,7 +463,6 @@ def round_points_to_volumes(
 | 
			
		||||
 | 
			
		||||
    # valid - binary indicators of votes that fall into the volume
 | 
			
		||||
    grid_sizes = grid_sizes.type_as(XYZ)
 | 
			
		||||
    # pyre-fixme[16]: `int` has no attribute `long`.
 | 
			
		||||
    valid = (
 | 
			
		||||
        (0 <= X)
 | 
			
		||||
        * (X < grid_sizes_xyz[:, None, 0:1])
 | 
			
		||||
 | 
			
		||||
@ -137,10 +137,14 @@ def sample_points_from_meshes(
 | 
			
		||||
    # return
 | 
			
		||||
    # TODO(gkioxari) consider returning a Pointclouds instance [breaking]
 | 
			
		||||
    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
 | 
			
		||||
    if return_normals:  # return_textures is False
 | 
			
		||||
        # pyre-fixme[61]: `normals` may not be initialized here.
 | 
			
		||||
        return samples, normals
 | 
			
		||||
    if return_textures:  # return_normals is False
 | 
			
		||||
        # pyre-fixme[61]: `textures` may not be initialized here.
 | 
			
		||||
        return samples, textures
 | 
			
		||||
    return samples
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -427,7 +427,6 @@ def clip_faces(
 | 
			
		||||
    # during rasterization anyway).
 | 
			
		||||
    faces_delta_cum = faces_delta.cumsum(0) - faces_delta
 | 
			
		||||
    delta = 1 + case4_unclipped.int() - case2_unclipped.int()
 | 
			
		||||
    # pyre-ignore[16]
 | 
			
		||||
    faces_unclipped_to_clipped_idx = delta.cumsum(0) - delta
 | 
			
		||||
 | 
			
		||||
    ###########################################
 | 
			
		||||
 | 
			
		||||
@ -248,7 +248,10 @@ def rasterize_meshes(
 | 
			
		||||
        # original unclipped faces.  This may involve converting barycentric
 | 
			
		||||
        # coordinates
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
@ -612,7 +615,10 @@ def rasterize_meshes_python(  # noqa: C901
 | 
			
		||||
        # original unclipped faces.  This may involve converting barycentric
 | 
			
		||||
        # coordinates
 | 
			
		||||
        (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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user