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

fix some wav2lip docs errors (#177)

* fix wav2lip bugs (#175)

* fix wav2lip docs error (#176)
上级 9f36b055
......@@ -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:
......
......@@ -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多卡训练:
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册