pose encoder model

This commit is contained in:
2023-05-09 23:05:07 +00:00
parent 3f60403167
commit a8647951aa
5 changed files with 288 additions and 93 deletions
+3 -3
View File
@@ -32,14 +32,14 @@ class PoseRenderer(Module):
super().__init__()
colors = np.load('custom_data/pose_colors.npy')
self.textures = TexturesVertex(verts_features=torch.from_numpy(colors).to(device)[None, :, :])
self.cam = torch.tensor([5.0, 0.0, 0.0], device=device).cpu().numpy()
self.cam = torch.tensor([3.0, 0.0, 0.0], device=device).cpu().numpy()
def forward(self, verts: torch.Tensor, faces: torch.Tensor):
cameras, K = get_camera(self.cam, [480, 640], verts.get_device())
cameras, K = get_camera(self.cam, [512, 512], verts.get_device(), res_x=512, res_y=512)
raster_settings = RasterizationSettings(
image_size=(480, 640),
image_size=(512, 512),
blur_radius=0.0,
faces_per_pixel=1,
bin_size=0