Spaces:
Build error
Build error
mayuema commited on
Commit ·
4748ebe
1
Parent(s): f4c8778
add mmpose
Browse files- inference_mmpose.py +5 -4
inference_mmpose.py
CHANGED
|
@@ -16,6 +16,11 @@ def get_frames(video_in):
|
|
| 16 |
start_frame = 0 # 起始帧数
|
| 17 |
end_frame = 50 # 结束帧数
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
#check fps
|
| 21 |
if clip.fps > 30:
|
|
@@ -68,10 +73,6 @@ def create_video(frames, fps, type):
|
|
| 68 |
|
| 69 |
return type + "_result.mp4"
|
| 70 |
|
| 71 |
-
def convertG2V(imported_gif):
|
| 72 |
-
clip = VideoFileClip(imported_gif.name)
|
| 73 |
-
clip.write_videofile("my_gif_video.mp4")
|
| 74 |
-
return "my_gif_video.mp4"
|
| 75 |
|
| 76 |
def infer_skeleton(mmpose, video_in):
|
| 77 |
|
|
|
|
| 16 |
start_frame = 0 # 起始帧数
|
| 17 |
end_frame = 50 # 结束帧数
|
| 18 |
|
| 19 |
+
if not os.path.exists('./raw_frames'):
|
| 20 |
+
os.makedirs('./raw_frames')
|
| 21 |
+
|
| 22 |
+
if not os.path.exists('./mmpose_frames'):
|
| 23 |
+
os.makedirs('./mmpose_frames')
|
| 24 |
|
| 25 |
#check fps
|
| 26 |
if clip.fps > 30:
|
|
|
|
| 73 |
|
| 74 |
return type + "_result.mp4"
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
def infer_skeleton(mmpose, video_in):
|
| 78 |
|