We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I run this test code by kaolin,I suppose get a triangle,but get a completely black image:
import kaolin as kal import torch import numpy as np import cv2
face_verts = np.array([[-0.5, 0.5], [0.5, 0.5], [-0.5, -0.5]]) face_vertices_image = torch.from_numpy(face_verts)[None, None, :, :].float().cuda()
face_vertices_z = -torch.ones_like(face_vertices_image)[:, :, :, 0] face_normals_z = torch.ones_like(face_vertices_image)[:, :, :, 0]
face_attributes = [ torch.ones((1, 1, 3, 1), device='cuda') ]
height = 1024 width = 1024 image_features, soft_mask, face_idx = kal.render.mesh.dibr_rasterization( height, width, face_vertices_z, face_vertices_image, face_attributes, face_normals_z, )
mask = image_features[0].squeeze(0) cv2.imwrite("mask.png", (mask.detach().cpu() * 255).numpy().astype(np.uint8))
pass
The text was updated successfully, but these errors were encountered:
kaolin version:0.10.0 torch1.11.0+cu11.5
Sorry, something went wrong.
gpu:1080Ti
No branches or pull requests
I run this test code by kaolin,I suppose get a triangle,but get a completely black image:
import kaolin as kal
import torch
import numpy as np
import cv2
face_verts = np.array([[-0.5, 0.5], [0.5, 0.5], [-0.5, -0.5]])
face_vertices_image = torch.from_numpy(face_verts)[None, None, :, :].float().cuda()
face_vertices_z = -torch.ones_like(face_vertices_image)[:, :, :, 0]
face_normals_z = torch.ones_like(face_vertices_image)[:, :, :, 0]
face_attributes = [
torch.ones((1, 1, 3, 1), device='cuda')
]
height = 1024
width = 1024
image_features, soft_mask, face_idx = kal.render.mesh.dibr_rasterization(
height, width, face_vertices_z,
face_vertices_image, face_attributes, face_normals_z,
)
mask = image_features[0].squeeze(0)
cv2.imwrite("mask.png", (mask.detach().cpu() * 255).numpy().astype(np.uint8))
pass
The text was updated successfully, but these errors were encountered: