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
Dear author, I have trained a NeuS mesh and I want to use nvdiffrast to extract texture, but I can not figure out the pose transform from Neus to nvdiffrast. Can you help me to find the bug? Here is my code.
` image_paths = sorted(glob(os.path.join(source_path, 'image/*png')))
cameras = np.load(os.path.join(source_path, 'cameras_sphere.npz'))
training_cameras = {'camera_mat':[], 'world_mat':[]}
for i in range(len(image_paths)):
key0 = 'world_mat_%d' % i # inv right
key1 = 'scale_mat_%d' % i
world_mat = cameras[key0]
scale_mat = cameras[key1]
P = world_mat #@ scale_mat # no scale right
P = P[:3, :4]
intrinsics, pose = load_K_Rt_from_P(None, P)
training_cameras['camera_mat'].append(intrinsics)
training_cameras['world_mat'].append(pose)
I don't know the conventions used in NeuS, but for nvdiffrast all you need are standard OpenGL (or Direct3D) style modelview and projection matrices. Perhaps you can find more information from the NeuS side? They have at least one GitHub issue related to cameras and transformations here, perhaps that will help you forward.
Dear author, I have trained a NeuS mesh and I want to use nvdiffrast to extract texture, but I can not figure out the pose transform from Neus to nvdiffrast. Can you help me to find the bug? Here is my code.
` image_paths = sorted(glob(os.path.join(source_path, 'image/*png')))
cameras = np.load(os.path.join(source_path, 'cameras_sphere.npz'))
training_cameras = {'camera_mat':[], 'world_mat':[]}
for i in range(len(image_paths)):
key0 = 'world_mat_%d' % i # inv right
key1 = 'scale_mat_%d' % i
world_mat = cameras[key0]
scale_mat = cameras[key1]
P = world_mat #@ scale_mat # no scale right
P = P[:3, :4]
intrinsics, pose = load_K_Rt_from_P(None, P)
training_cameras['camera_mat'].append(intrinsics)
training_cameras['world_mat'].append(pose)
`
The text was updated successfully, but these errors were encountered: