You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed when running a render with multiple textures and faces_per_pixel > 1 that I was getting the result. I traced the issue to this line. pix_to_face has shape (N, image_size, image_size, faces_per_pixel) you can check your docs to confirm this. However the view call here orders it to (N, faces_per_pixel, image_size, image_size) which ends up mis-indexing lower down.
One obvious way to fix this is to change .view to .view(N, H_out, W_out, K).permute(0, 3, 1, 2). I have tested this and confirmed it gives appropriate results.
The text was updated successfully, but these errors were encountered:
pytorch3d/pytorch3d/renderer/mesh/textures.py
Line 1251 in e17ed5c
I noticed when running a render with multiple textures and faces_per_pixel > 1 that I was getting the result. I traced the issue to this line.
pix_to_face
has shape(N, image_size, image_size, faces_per_pixel)
you can check your docs to confirm this. However theview
call here orders it to(N, faces_per_pixel, image_size, image_size)
which ends up mis-indexing lower down.One obvious way to fix this is to change
.view
to.view(N, H_out, W_out, K).permute(0, 3, 1, 2)
. I have tested this and confirmed it gives appropriate results.The text was updated successfully, but these errors were encountered: