ygangang commited on
Commit
52e114d
·
1 Parent(s): 7b1bf28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -13,8 +13,8 @@ os.system("wget -c https://cloud.tsinghua.edu.cn/f/da8d61d012014b12a9e4/?dl=1 -O
13
 
14
 
15
 
16
- title = "# Thin-Plate Spline Motion Model for Image Animation"
17
- DESCRIPTION = '''### Gradio demo for <b>Thin-Plate Spline Motion Model for Image Animation</b>, CVPR 2022. <a href='https://arxiv.org/abs/2203.14367'>[Paper]</a><a href='https://github.com/yoyo-nb/Thin-Plate-Spline-Motion-Model'>[Github Code]</a>
18
 
19
  <img id="overview" alt="overview" src="https://github.com/yoyo-nb/Thin-Plate-Spline-Motion-Model/raw/main/assets/vox.gif" />
20
  '''
@@ -62,14 +62,14 @@ def main():
62
  gr.Markdown(DESCRIPTION)
63
 
64
  with gr.Box():
65
- gr.Markdown('''## Step 1 (Provide Input Face Image)
66
- - Drop an image containing a face to the **Input Image**.
67
- - If there are multiple faces in the image, use Edit button in the upper right corner and crop the input image beforehand.
68
  ''')
69
  with gr.Row():
70
  with gr.Column():
71
  with gr.Row():
72
- input_image = gr.Image(label='Input Image',
73
  type="pil")
74
 
75
  with gr.Row():
@@ -79,13 +79,13 @@ def main():
79
  for path in paths])
80
 
81
  with gr.Box():
82
- gr.Markdown('''## Step 2 (Select Driving Video)
83
- - Select **Style Driving Video for the face image animation**.
84
  ''')
85
  with gr.Row():
86
  with gr.Column():
87
  with gr.Row():
88
- driving_video = gr.Video(label='Driving Video',
89
  format="mp4")
90
 
91
  with gr.Row():
@@ -95,16 +95,16 @@ def main():
95
  for path in paths])
96
 
97
  with gr.Box():
98
- gr.Markdown('''## Step 3 (Generate Animated Image based on the Video)
99
- - Hit the **Generate** button. (Note: As it runs on the CPU, it takes ~ 3 minutes to generate final results.)
100
  ''')
101
  with gr.Row():
102
  with gr.Column():
103
  with gr.Row():
104
- generate_button = gr.Button('Generate')
105
 
106
  with gr.Column():
107
- result = gr.Video(type="file", label="Output")
108
  gr.Markdown(FOOTER)
109
  generate_button.click(fn=inference,
110
  inputs=[
 
13
 
14
 
15
 
16
+ title = "# 图片动画"
17
+ DESCRIPTION = '''### 图片动画的Gradio实现</b>, CVPR 2022. <a href='https://arxiv.org/abs/2203.14367'>[Paper]</a><a href='https://github.com/yoyo-nb/Thin-Plate-Spline-Motion-Model'>[Github Code]</a>
18
 
19
  <img id="overview" alt="overview" src="https://github.com/yoyo-nb/Thin-Plate-Spline-Motion-Model/raw/main/assets/vox.gif" />
20
  '''
 
62
  gr.Markdown(DESCRIPTION)
63
 
64
  with gr.Box():
65
+ gr.Markdown('''## 1 (上传人脸图片)
66
+ - 拖一张含人脸的图片到 **输入图片**.
67
+ - 如果图片中有多张人脸, 使用右上角的编辑按钮裁剪图片.
68
  ''')
69
  with gr.Row():
70
  with gr.Column():
71
  with gr.Row():
72
+ input_image = gr.Image(label='输入图片',
73
  type="pil")
74
 
75
  with gr.Row():
 
79
  for path in paths])
80
 
81
  with gr.Box():
82
+ gr.Markdown('''## 2 (选择动态视频)
83
+ - **为人脸图片选择目标视频**.
84
  ''')
85
  with gr.Row():
86
  with gr.Column():
87
  with gr.Row():
88
+ driving_video = gr.Video(label='目标视频',
89
  format="mp4")
90
 
91
  with gr.Row():
 
95
  for path in paths])
96
 
97
  with gr.Box():
98
+ gr.Markdown('''## 3 (基于视频生成动态图片)
99
+ - 点击 **开始** 按钮. (注意: 由于是在CPU上运行, 生成最终结果需要花费大约3分钟.)
100
  ''')
101
  with gr.Row():
102
  with gr.Column():
103
  with gr.Row():
104
+ generate_button = gr.Button('开始')
105
 
106
  with gr.Column():
107
+ result = gr.Video(type="file", label="输出")
108
  gr.Markdown(FOOTER)
109
  generate_button.click(fn=inference,
110
  inputs=[