Sapphire-356 commited on
Commit
ffcc1a7
·
1 Parent(s): 9e88ca0

fix bug: mkdir output_*

Browse files
Files changed (1) hide show
  1. videopose_PSTMO.py +11 -1
videopose_PSTMO.py CHANGED
@@ -153,7 +153,7 @@ def main(args):
153
  output_dir_dict['npy'] = npy_filename
154
  np.save(npy_filename, prediction, allow_pickle=True)
155
 
156
- anim_output = {'Ours': prediction}
157
  input_keypoints = image_coordinates(input_keypoints[..., :2], w=1000, h=1002)
158
 
159
  ckpt, time3 = ckpt_time(time2)
@@ -201,6 +201,16 @@ def inference_video(video_path, detector_2d):
201
 
202
 
203
  def gr_video2mc(video_path):
 
 
 
 
 
 
 
 
 
 
204
  FPS_mine_imator = 30
205
  output_dir_dict = inference_video(video_path, 'alpha_pose')
206
  Hk.hpe2keyframes(output_dir_dict['npy'], FPS_mine_imator, f"output_miframes/{output_dir_dict['video_name']}.miframes")
 
153
  output_dir_dict['npy'] = npy_filename
154
  np.save(npy_filename, prediction, allow_pickle=True)
155
 
156
+ anim_output = {'Skeleton': prediction}
157
  input_keypoints = image_coordinates(input_keypoints[..., :2], w=1000, h=1002)
158
 
159
  ckpt, time3 = ckpt_time(time2)
 
201
 
202
 
203
  def gr_video2mc(video_path):
204
+
205
+ if not os.path.exists('output_3Dpose_npy'):
206
+ os.makedirs('output_3Dpose_npy')
207
+ if not os.path.exists('output_alphapose'):
208
+ os.makedirs('output_alphapose')
209
+ if not os.path.exists('output_miframes'):
210
+ os.makedirs('output_miframes')
211
+ if not os.path.exists('output_videos'):
212
+ os.makedirs('output_videos')
213
+
214
  FPS_mine_imator = 30
215
  output_dir_dict = inference_video(video_path, 'alpha_pose')
216
  Hk.hpe2keyframes(output_dir_dict['npy'], FPS_mine_imator, f"output_miframes/{output_dir_dict['video_name']}.miframes")