use original cloth3d functions
This commit is contained in:
+4
-3
@@ -150,9 +150,9 @@ class DepthRenderer(nn.Module):
|
||||
|
||||
def forward(self, verts, faces, cam):
|
||||
R, T = look_at_view_transform(2.7, 0, 0)
|
||||
cameras = FoVPerspectiveCameras(device='cuda', R=R, T=T)
|
||||
# cameras = FoVPerspectiveCameras(device='cuda', R=R, T=T)
|
||||
ext = extrinsic(cam)
|
||||
cameras = PerspectiveCameras(device='cuda', R=ext[None, :, :3], T=ext[None, :, 3], focal_length=50)
|
||||
cameras = PerspectiveCameras(device='cuda', R=ext[None, :, :3], T=ext[None, :, 3])
|
||||
|
||||
raster_settings = RasterizationSettings(
|
||||
image_size=512,
|
||||
@@ -165,7 +165,8 @@ class DepthRenderer(nn.Module):
|
||||
cameras=cameras,
|
||||
raster_settings=raster_settings
|
||||
)
|
||||
depth = rasterizer(Meshes(verts[None,:,:], faces[None,:,:])).zbuf[0,:,:,0]
|
||||
output = rasterizer(Meshes(verts[None,:,:], faces[None,:,:]))
|
||||
depth = output.zbuf[0,:,:,0]
|
||||
|
||||
mask = depth != -1
|
||||
# dmin = depth.min()
|
||||
|
||||
Reference in New Issue
Block a user