update actor5 and infer_folder_live

This commit is contained in:
liangsen committed 2022-05-10 10:47:54 +08:00
1 parent 854609dd0c
commit dac314c9a5
34 files changed
+2810 -658

No files matched your search

+4 -3
View File
@@ -191,8 +191,9 @@ class Audio2MeshModel(Base):
vert, ldmk2d, ldmk3d = self.get_vertices(data)
# add a dimensions
if batch_speech.dims == 1:
batch_speech = batch_speech.unsqueeze(0) # (B, nsegmt)
# if batch_speech.dims == 1:
print(f"batch_speech shape = {batch_speech}")
batch_speech = batch_speech[np.newaxis, :] # (B, nsegmt)
with torch.no_grad():
@@ -213,7 +214,7 @@ class Audio2MeshModel(Base):
print(f"testing pt shape = {batch_pdt_geo.shape}, gt shape = {vert.shape}")
self.save_reconstruct_with_gt(batch_pdt_geo, vert, batch_speech,
path_save=Path(self.opt.OUTPUT_DIR),
suffix=suffix,vis_landmarks=False)
suffix=suffix, vis_landmarks=False)
if save_npy: