xmrt commited on
Commit
8d4e075
1 Parent(s): a7307cb

added return in check extension

Browse files
Files changed (1) hide show
  1. main_noweb.py +4 -8
main_noweb.py CHANGED
@@ -29,8 +29,8 @@ else:
29
  os.system("nvidia-smi")
30
 
31
  print("[INFO]: Imported modules!")
32
- human = MMPoseInferencer("simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192") # simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192 dekr_hrnet-w32_8xb10-140e_coco-512x512
33
- hand = MMPoseInferencer("hand")
34
  #model3d = gr.State()
35
  # human3d = MMPoseInferencer(device=device,
36
  # pose3d="human3d",
@@ -75,6 +75,7 @@ def get_frames(video, fps=50, height=512, width=512):
75
  print("video rate is OK")
76
  #clip_resized = clip.resize(height=height)
77
  #clip.write_videofile(video, fps=clip.fps)
 
78
 
79
 
80
  def check_extension(video):
@@ -104,7 +105,6 @@ def pose3d(video, kpt_threshold):
104
  print("HUMAN 3d downloaded!!")
105
  # Define new unique folder
106
  add_dir = str(uuid.uuid4())
107
- vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
108
 
109
  os.makedirs(add_dir)
110
  print(check_fps(video))
@@ -139,12 +139,10 @@ def pose2d(video, kpt_threshold):
139
  print(check_fps(video))
140
  result_generator = human(video,
141
  vis_out_dir = add_dir,
142
- #return_vis=True,
143
  radius = 5,
144
  thickness=4,
145
  rebase_keypoint_height=True,
146
  kpt_thr=kpt_threshold,
147
- device=device,
148
  pred_out_dir = add_dir
149
  )
150
 
@@ -171,9 +169,7 @@ def pose2dhand(video, kpt_threshold):
171
  radius = 5,
172
  rebase_keypoint_height=True,
173
  kpt_thr=kpt_threshold,
174
- pred_out_dir = add_dir,
175
-
176
- device=device)
177
 
178
  result = [result for result in result_generator] #next(result_generator)
179
 
 
29
  os.system("nvidia-smi")
30
 
31
  print("[INFO]: Imported modules!")
32
+ human = MMPoseInferencer("human", device=device) # "simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192", simcc_mobilenetv2_wo-deconv-8xb64-210e_coco-256x192 dekr_hrnet-w32_8xb10-140e_coco-512x512
33
+ hand = MMPoseInferencer("hand", device=device)
34
  #model3d = gr.State()
35
  # human3d = MMPoseInferencer(device=device,
36
  # pose3d="human3d",
 
75
  print("video rate is OK")
76
  #clip_resized = clip.resize(height=height)
77
  #clip.write_videofile(video, fps=clip.fps)
78
+ return video
79
 
80
 
81
  def check_extension(video):
 
105
  print("HUMAN 3d downloaded!!")
106
  # Define new unique folder
107
  add_dir = str(uuid.uuid4())
 
108
 
109
  os.makedirs(add_dir)
110
  print(check_fps(video))
 
139
  print(check_fps(video))
140
  result_generator = human(video,
141
  vis_out_dir = add_dir,
 
142
  radius = 5,
143
  thickness=4,
144
  rebase_keypoint_height=True,
145
  kpt_thr=kpt_threshold,
 
146
  pred_out_dir = add_dir
147
  )
148
 
 
169
  radius = 5,
170
  rebase_keypoint_height=True,
171
  kpt_thr=kpt_threshold,
172
+ pred_out_dir = add_dir)
 
 
173
 
174
  result = [result for result in result_generator] #next(result_generator)
175