Spaces:
Running
Running
Commit
·
ed7eb3f
1
Parent(s):
2ee3801
add video examples
Browse files- app.py +3 -3
- input_videos/kun_test_5sec.mp4 +0 -0
- videopose_PSTMO.py +3 -1
app.py
CHANGED
@@ -6,14 +6,14 @@ import os
|
|
6 |
def Video2MC(video, progress = gr.Progress(track_tqdm=True)):
|
7 |
|
8 |
progress(1.0, desc="Step 0: Starting")
|
9 |
-
output_path = gr_video2mc(video, progress)
|
10 |
|
11 |
-
return output_path, output_path
|
12 |
|
13 |
|
14 |
iface = gr.Interface(fn=Video2MC,
|
15 |
inputs=gr.Video(),
|
16 |
-
outputs=["file", "text"],
|
17 |
examples=[os.path.join(os.path.dirname(__file__),
|
18 |
"input_videos/kun_test_5sec.mp4")],
|
19 |
)
|
|
|
6 |
def Video2MC(video, progress = gr.Progress(track_tqdm=True)):
|
7 |
|
8 |
progress(1.0, desc="Step 0: Starting")
|
9 |
+
output_path, output_video = gr_video2mc(video, progress)
|
10 |
|
11 |
+
return output_path, output_path, output_video
|
12 |
|
13 |
|
14 |
iface = gr.Interface(fn=Video2MC,
|
15 |
inputs=gr.Video(),
|
16 |
+
outputs=["file", "text", gr.Video()],
|
17 |
examples=[os.path.join(os.path.dirname(__file__),
|
18 |
"input_videos/kun_test_5sec.mp4")],
|
19 |
)
|
input_videos/kun_test_5sec.mp4
ADDED
Binary file (542 kB). View file
|
|
videopose_PSTMO.py
CHANGED
@@ -210,7 +210,9 @@ def gr_video2mc(video_path, progress):
|
|
210 |
FPS_mine_imator = 30
|
211 |
output_dir_dict = inference_video(video_path, 'alpha_pose', progress)
|
212 |
Hk.hpe2keyframes(output_dir_dict['npy'], FPS_mine_imator, f"output_miframes/{output_dir_dict['video_name']}.miframes")
|
213 |
-
|
|
|
|
|
214 |
|
215 |
|
216 |
if __name__ == '__main__':
|
|
|
210 |
FPS_mine_imator = 30
|
211 |
output_dir_dict = inference_video(video_path, 'alpha_pose', progress)
|
212 |
Hk.hpe2keyframes(output_dir_dict['npy'], FPS_mine_imator, f"output_miframes/{output_dir_dict['video_name']}.miframes")
|
213 |
+
path1 = os.path.abspath(f"output_miframes/{output_dir_dict['video_name']}.miframes")
|
214 |
+
path2 = os.path.abspath(f"output_videos/{output_dir_dict['video_name']}.mp4")
|
215 |
+
return path1, path2
|
216 |
|
217 |
|
218 |
if __name__ == '__main__':
|