diff --git a/docs/en_US/tutorials/wav2lip.md b/docs/en_US/tutorials/wav2lip.md index de2b77ad79f385f79eaf6ceb4abd453e11681175..78400944b7c5a6cb029848f33ac13f937f7968ed 100644 --- a/docs/en_US/tutorials/wav2lip.md +++ b/docs/en_US/tutorials/wav2lip.md @@ -11,7 +11,7 @@ Runing the following command to complete the lip-syning task. The output is the ``` cd applications -python tools/wav2lip.py --face ../../imgs/mona7s.mp4 --audio ../../imgs/guangquan.m4a --outfile pp_guangquan_mona7s.mp4 +python tools/wav2lip.py --face ../docs/imgs/mona7s.mp4 --audio ../docs/imgs/guangquan.m4a --outfile pp_guangquan_mona7s.mp4 ``` **params:** @@ -36,7 +36,7 @@ Place the LRS2 filelists(train, val, test) `.txt` files in the `filelists/` fold - For single GPU: ``` export CUDA_VISIBLE_DEVICES=0 -python tools/main.py --confit-file configs/wav2lip.yaml +python tools/main.py --config-file configs/wav2lip.yaml ``` - For multiple GPUs: diff --git a/docs/zh_CN/tutorials/wav2lip.md b/docs/zh_CN/tutorials/wav2lip.md index deee5ef802693c0e5e8f39701f5ca3f7cf714e56..c85e491b17e5a2b62275459aa64360e4f15789b3 100644 --- a/docs/zh_CN/tutorials/wav2lip.md +++ b/docs/zh_CN/tutorials/wav2lip.md @@ -13,10 +13,10 @@ Wav2Lip实现的是视频人物根据输入音频生成与语音同步的人物 ``` cd applications -python tools/wav2lip.py --face ../../imgs/mona7s.mp4 --audio ../../imgs/guangquan.m4a --outfile pp_guangquan_mona7s.mp4 +python tools/wav2lip.py --face ../docs/imgs/mona7s.mp4 --audio ../docs/imgs/guangquan.m4a --outfile pp_guangquan_mona7s.mp4 ``` **参数说明:** -- face: 原始视频,视频中都人物都唇形将根据音频进行唇形合成,以和音频同步 +- face: 视频或图片,视频或图片中的人物唇形将根据音频进行唇形合成,以和音频同步 - audio: 驱动唇形合成的音频,视频中的人物将根据此音频进行唇形合成 ### 2.2 训练 @@ -38,7 +38,7 @@ preprocessed_root (lrs2_preprocessed) - GPU单卡训练: ``` export CUDA_VISIBLE_DEVICES=0 -python tools/main.py --confit-file configs/wav2lip.yaml +python tools/main.py --config-file configs/wav2lip.yaml ``` - GPU多卡训练: 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,