@@ -726,15 +726,17 @@ def __init__(
726
726
for each face
727
727
verts_uvs: (N, V, 2) tensor giving the uv coordinates per vertex
728
728
(a FloatTensor with values between 0 and 1).
729
- maps_ids: Used if there are to be multiple maps per face. This can be either a list of map_ids [(F,)]
729
+ maps_ids: Used if there are to be multiple maps per face.
730
+ This can be either a list of map_ids [(F,)]
730
731
or a long tensor of shape (N, F) giving the id of the texture map
731
732
for each face. If maps_ids is present, the maps has an extra dimension M
732
733
(so maps_padded is (N, M, H, W, C) and maps_list has elements of
733
734
shape (M, H, W, C)).
734
735
Specifically, the color
735
- of a vertex V is given by an average of maps_padded[i, maps_ids[i, f], u, v, :]
736
+ of a vertex V is given by an average of
737
+ maps_padded[i, maps_ids[i, f], u, v, :]
736
738
over u and v integers adjacent to
737
- _verts_uvs_padded[i, _faces_uvs_padded[i, f, 0], :] .
739
+ _verts_uvs_padded[i, _faces_uvs_padded[i, f, 0], :] .
738
740
align_corners: If true, the extreme values 0 and 1 for verts_uvs
739
741
indicate the centers of the edge pixels in the maps.
740
742
padding_mode: padding mode for outside grid values
@@ -1237,7 +1239,8 @@ def sample_textures(self, fragments, **kwargs) -> torch.Tensor:
1237
1239
texels = texels .reshape (N , K , C , H_out , W_out ).permute (0 , 3 , 4 , 1 , 2 )
1238
1240
return texels
1239
1241
else :
1240
- # We have maps_ids_padded: (N, F), textures_map: (N, M, Hi, Wi, C),fragmenmts.pix_to_face: (N, Ho, Wo, K)
1242
+ # We have maps_ids_padded: (N, F), textures_map: (N, M, Hi, Wi, C),
1243
+ # fragments.pix_to_face: (N, Ho, Wo, K)
1241
1244
# Get pixel_to_map_ids: (N, K, Ho, Wo) by indexing pix_to_face into maps_ids
1242
1245
N , M , H_in , W_in , C = texture_maps .shape # 3 for RGB
1243
1246
@@ -1827,7 +1830,7 @@ def sample_textures(self, fragments, faces_packed=None) -> torch.Tensor:
1827
1830
representation) which overlap the pixel.
1828
1831
1829
1832
Returns:
1830
- texels: An texture per pixel of shape (N, H, W, K, C).
1833
+ texels: A texture per pixel of shape (N, H, W, K, C).
1831
1834
There will be one C dimensional value for each element in
1832
1835
fragments.pix_to_face.
1833
1836
"""
0 commit comments