tried normalization, did not work
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user