Commit
·
eb383e3
1
Parent(s):
9fe3701
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def one_shot_talking(image_in,audio_in):
|
|
142 |
crop_src_image(image_in)
|
143 |
|
144 |
#Improve quality of input image
|
145 |
-
|
146 |
|
147 |
image_in_one_shot='/content/results/restored_imgs/image_pre.png'
|
148 |
|
@@ -152,10 +152,10 @@ def one_shot_talking(image_in,audio_in):
|
|
152 |
#Video Quality Improvement
|
153 |
|
154 |
#1. Extract the frames from the video file using PyVideoFramesExtractor
|
155 |
-
|
156 |
|
157 |
#2. Improve image quality using GFPGAN on each frames
|
158 |
-
|
159 |
|
160 |
#3. Merge all the frames to a one video using imageio
|
161 |
merge_frames()
|
|
|
142 |
crop_src_image(image_in)
|
143 |
|
144 |
#Improve quality of input image
|
145 |
+
python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan
|
146 |
|
147 |
image_in_one_shot='/content/results/restored_imgs/image_pre.png'
|
148 |
|
|
|
152 |
#Video Quality Improvement
|
153 |
|
154 |
#1. Extract the frames from the video file using PyVideoFramesExtractor
|
155 |
+
python /content/PyVideoFramesExtractor/extract.py --video=/content/train/image_pre_audio.mp4
|
156 |
|
157 |
#2. Improve image quality using GFPGAN on each frames
|
158 |
+
python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/extracted_frames/image_pre_audio_frames -o /content/video_results --bg_upsampler realesrgan
|
159 |
|
160 |
#3. Merge all the frames to a one video using imageio
|
161 |
merge_frames()
|