use new colors for pose

This commit is contained in:
2023-06-08 10:54:34 +00:00
parent fdc876025a
commit 882ddf5578
3 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -102,8 +102,8 @@ class Dataset(Dataset):
# 'body_out': body_out,
# 'render': render,
# 'render_out': render_out,
'mask': mask,
'mask_out': mask_out,
'mask': mask,
'mask_out': mask_out,
}
if self.cache is not None:
+6 -3
View File
@@ -30,9 +30,12 @@ from pytorch3d.structures import Meshes
class PoseRenderer(Module):
def __init__(self, device='cuda') -> None:
super().__init__()
colors = np.load('custom_data/pose_colors.npy')
# colors = np.load('custom_data/body_colors_interpolated.npy').astype(np.float32) / 255.0
# colors = np.load('custom_data/pose_colors.npy')
colors_ = np.load('custom_data/body_colors_interpolated.npy').astype(np.float32) / 255.0
color_order = np.load('custom_data/color_ordered_indices.npy')
colors = np.zeros_like(colors_)
colors[color_order] = colors_[np.arange(27578)]
self.textures = TexturesVertex(verts_features=torch.from_numpy(colors).to(device)[None, :, :])
self.cam = torch.tensor([3.0, 0.0, 0.0], device=device).cpu().numpy()