未验证 提交 ffba0863 编写于 作者: L lijianshe02 提交者: GitHub

fix wav2lip bugs (#175)

上级 b4f06601
......@@ -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 训练
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册