tried normalization, did not work

This commit is contained in:
2023-01-06 11:19:34 +00:00
parent 51b6219021
commit 022c488180
5 changed files with 104 additions and 20 deletions
+3 -2
View File
@@ -184,8 +184,9 @@ class DepthRenderer(nn.Module):
raster_settings=raster_settings
)
output = rasterizer(Meshes(verts[None,:,:], faces[None,:,:]))
v2i = cameras.transform_points_screen(verts).cpu().numpy().astype(np.int32)[:,:2]
v2i = cameras.transform_points_screen(verts).round().to(torch.long)[:,:2]
depth = output.zbuf[0,:,:,0]
pix_to_face = output.pix_to_face[0,:,:,0]
mask = depth != -1
# dmin = depth.min()
@@ -198,4 +199,4 @@ class DepthRenderer(nn.Module):
# import plotly.express as ex
# ex.imshow(depth.cpu().numpy()).show()
return depth, mask, v2i, K, cameras
return depth, mask, v2i, K, cameras, pix_to_face