diff --git a/docs/zh_CN/tutorials/wav2lip.md b/docs/zh_CN/tutorials/wav2lip.md index deee5ef802693c0e5e8f39701f5ca3f7cf714e56..c83fddc1cb5f2d8b16de026713227175586331ef 100644 --- a/docs/zh_CN/tutorials/wav2lip.md +++ b/docs/zh_CN/tutorials/wav2lip.md @@ -16,7 +16,7 @@ cd applications python tools/wav2lip.py --face ../../imgs/mona7s.mp4 --audio ../../imgs/guangquan.m4a --outfile pp_guangquan_mona7s.mp4 ``` **参数说明:** -- face: 原始视频,视频中都人物都唇形将根据音频进行唇形合成,以和音频同步 +- face: 视频或图片,视频或图片中的人物唇形将根据音频进行唇形合成,以和音频同步 - audio: 驱动唇形合成的音频,视频中的人物将根据此音频进行唇形合成 ### 2.2 训练 diff --git a/ppgan/datasets/wav2lip_dataset.py b/ppgan/datasets/wav2lip_dataset.py index fde1fb675de7070537320d02724ca6240960132f..981a4fd5618c08d39a0c36466f814efa88e22948 100644 --- a/ppgan/datasets/wav2lip_dataset.py +++ b/ppgan/datasets/wav2lip_dataset.py @@ -34,7 +34,10 @@ def get_image_list(data_root, split): for line in f: line = line.strip() if ' ' in line: line = line.split()[0] - filelist.append(os.path.join(data_root, line)) + video_path = os.path.join(data_root, line) + assert os.path.exists(video_path), '{} is not found'.format( + video_path) + filelist.append(video_path) return filelist @@ -179,14 +182,6 @@ class Wav2LipDataset(paddle.io.Dataset): mel = np.transpose(mel) mel = np.expand_dims(mel, 0) indiv_mels = np.expand_dims(indiv_mels, 1) - #np.random.seed(200) - #x = np.random.rand(*x.shape).astype('float32') - #np.random.seed(200) - #mel = np.random.rand(*mel.shape) - #np.random.seed(200) - #indiv_mels = np.random.rand(*indiv_mels.shape) - #np.random.seed(200) - #y = np.random.rand(*y.shape) return { 'x': x,