xmrt commited on
Commit
ae92d0e
·
1 Parent(s): 435673b

make directory

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -80,7 +80,7 @@ def show_tracking(video_content):
80
  def pose3d(video):
81
  add_dir = str(uuid.uuid4())
82
  #vidname = video.split("/")[-1]
83
- vis_out_dir = "/".join(["/".join(video.split("/")[:-1]), add_dir])
84
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
85
  os.makedirs(vis_out_dir)
86
 
@@ -104,7 +104,7 @@ def pose3d(video):
104
 
105
  def pose2d(video):
106
  add_dir = str(uuid.uuid4())
107
- vis_out_dir = os.path.join(["/".join(video.split("/")[:-1]), add_dir])
108
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
109
  os.makedirs(vis_out_dir)
110
 
@@ -127,7 +127,7 @@ def pose2d(video):
127
 
128
  def pose2dhand(video):
129
  add_dir = str(uuid.uuid4())
130
- vis_out_dir = "/".join(["/".join(video.split("/")[:-1]), add_dir])
131
  os.makedirs(vis_out_dir)
132
 
133
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
@@ -143,7 +143,6 @@ def pose2dhand(video):
143
 
144
  result = [result for result in result_generator] #next(result_generator)
145
 
146
- out_file = glob.glob(os.path.join(vis_out_dir, "*"))
147
  out_file = glob.glob(os.path.join(vis_out_dir, "*.mp4")) + glob.glob(os.path.join(vis_out_dir, "*.webm"))
148
  print("[INFO]: CURRENT OUT FILE NAME: ", out_file)
149
 
@@ -159,7 +158,7 @@ if __name__ == "__main__":
159
  with gr.Column():
160
  video_input = gr.Video(source="upload", type="filepath", height=512)
161
  # Insert slider with kpt_thr
162
- file_kpthr = gr.Slider(0, 1, value=0.3)
163
 
164
  submit_pose_file = gr.Button("Make 2d pose estimation")
165
  submit_pose3d_file = gr.Button("Make 3d pose estimation")
@@ -176,7 +175,8 @@ if __name__ == "__main__":
176
  with gr.Column():
177
  webcam_input = gr.Video(source="webcam", height=512)
178
 
179
- web_kpthr = gr.Slider(0, 1, value=0.3)
 
180
 
181
  submit_pose_web = gr.Button("Make 2d pose estimation")
182
  submit_pose3d_web = gr.Button("Make 3d pose estimation")
 
80
  def pose3d(video):
81
  add_dir = str(uuid.uuid4())
82
  #vidname = video.split("/")[-1]
83
+ vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
84
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
85
  os.makedirs(vis_out_dir)
86
 
 
104
 
105
  def pose2d(video):
106
  add_dir = str(uuid.uuid4())
107
+ vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
108
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
109
  os.makedirs(vis_out_dir)
110
 
 
127
 
128
  def pose2dhand(video):
129
  add_dir = str(uuid.uuid4())
130
+ vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
131
  os.makedirs(vis_out_dir)
132
 
133
  print("[INFO]: CURRENT OUT DIR: ", vis_out_dir)
 
143
 
144
  result = [result for result in result_generator] #next(result_generator)
145
 
 
146
  out_file = glob.glob(os.path.join(vis_out_dir, "*.mp4")) + glob.glob(os.path.join(vis_out_dir, "*.webm"))
147
  print("[INFO]: CURRENT OUT FILE NAME: ", out_file)
148
 
 
158
  with gr.Column():
159
  video_input = gr.Video(source="upload", type="filepath", height=512)
160
  # Insert slider with kpt_thr
161
+ file_kpthr = gr.Slider(0, 1, value=1, label="Keypoint threshold",step=5, info='1')
162
 
163
  submit_pose_file = gr.Button("Make 2d pose estimation")
164
  submit_pose3d_file = gr.Button("Make 3d pose estimation")
 
175
  with gr.Column():
176
  webcam_input = gr.Video(source="webcam", height=512)
177
 
178
+ web_kpthr = gr.Slider(0, 1, value=1, label="Keypoint threshold",step=5, info='1')
179
+
180
 
181
  submit_pose_web = gr.Button("Make 2d pose estimation")
182
  submit_pose3d_web = gr.Button("Make 3d pose estimation")