Skip to content

Commit 1509cdb

Browse files
authored
fix bug for path loading in windows/linux
bug from yzhou359#11 (comment)
1 parent 5ba9815 commit 1509cdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/approaches/train_audio2landmark.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ def __train_pass__(self, au_emb=None, centerize_face=False, no_y_rotation=False,
240240
# print(frame_t_shape[i, 0])
241241
fake_fls_np = fake_fls_np.reshape((-1, 68 * 3))
242242

243-
filename = 'pred_fls_{}_{}.txt'.format(video_name.split('\\')[-1], key)
243+
filename = 'pred_fls_{}_{}.txt'.format(video_name.split('\\')[-1].split('/')[-1], key)
244244
np.savetxt(os.path.join(self.opt_parser.output_folder, filename), fake_fls_np, fmt='%.6f')
245245

246246
# ''' Visualize result in landmarks '''
247247
if(vis_fls):
248248
from util.vis import Vis
249-
Vis(fls=fake_fls_np, filename=video_name.split('/')[-1], fps=62.5,
250-
audio_filenam='examples/'+video_name.split('/')[-1]+'.wav')
249+
Vis(fls=fake_fls_np, filename=video_name.split('\\')[-1].split('/')[-1], fps=62.5,
250+
audio_filenam=os.path.join('examples', video_name.split('\\')[-1].split('/')[-1]+'.wav'))
251251

252252

253253
def __close_face_lip__(self, fl):

0 commit comments

Comments
 (0)