fix template_verts

This commit is contained in:
Sen Liang committed 2022-03-17 15:26:32 +08:00
1 parent a3529ab815
commit e6f471eb64
3 files changed
+6 -8

No files matched your search

+6 -6
View File
@@ -48,16 +48,16 @@ class Audio2MeshARModel(Base):
path_deca_mean = self.opt.DATASET.path_mean_dict
self.mean_dict = np.load(path_deca_mean, allow_pickle=True).item()
print(f"mean_dict keys = {self.mean_dict.keys()}")
print(f"load mean deca coeff from > {path_deca_mean}, \nkeys = {self.mean_dict.keys()}")
if self.isTrain:
self.template_verts = self.get_template_vertices()
print(f"! get template_verts from zero expression + zero expression")
else:
self.template_verts = self.get_template_vertices(self.mean_dict)
print(f"! get template_verts from {path_deca_mean}")
debug(opt, f"template_verts shape = {self.template_verts.shape}")
debug(opt, f"mean_dict keys = {self.mean_dict.keys()}", verbose=True)
# if filter outlier
# if self.opt.LOSS.filter_outlier:
self.loss_func_wing = WingLoss(reduction="none") # return (B, )
@@ -264,7 +264,7 @@ class Audio2MeshARModel(Base):
batch_shape = torch.from_numpy(batch_shape).float().to(self.device)
else:
batch_shape = torch.zeros(1, 100).to(self.device)
verts, _, _ = self.netR.get_vertices(batch_shape, batch_exp, batch_pos) # 1 x 5023 x 3
verts = verts.unsqueeze(dim=0) # 1 x 1 x 5023 x 3
print(f"template verts reshape = {verts.shape}")