xmrt commited on
Commit
551301a
1 Parent(s): 02cf03c
Files changed (1) hide show
  1. main.py +5 -2
main.py CHANGED
@@ -55,6 +55,7 @@ def check_extension(video):
55
 
56
 
57
  def tracking(video, model, boxes=True):
 
58
  print("[INFO] Loading model...")
59
  # Load an official or custom model
60
 
@@ -66,6 +67,8 @@ def tracking(video, model, boxes=True):
66
  return annotated_frame
67
 
68
  def show_tracking(video_content):
 
 
69
  # https://docs.ultralytics.com/datasets/detect/coco/
70
  video = cv2.VideoCapture(video_content)
71
 
@@ -177,7 +180,7 @@ def run_UI():
177
  with gr.Column():
178
  video_input = gr.Video(source="upload", type="filepath", height=612)
179
  # Insert slider with kpt_thr
180
- file_kpthr = gr.Slider(minimum=1e3, maximum=1e6, step=1e3, default=1e3, label='Keypoint threshold')
181
 
182
  submit_pose_file = gr.Button("Make 2d pose estimation")
183
  submit_pose3d_file = gr.Button("Make 3d pose estimation")
@@ -191,7 +194,7 @@ def run_UI():
191
 
192
  with gr.Tab("Record video with webcam"):
193
 
194
- with gr.Column:
195
  with gr.Row():
196
  with gr.Column():
197
  webcam_input = gr.Video(source="webcam", height=612)
 
55
 
56
 
57
  def tracking(video, model, boxes=True):
58
+ print("[INFO] Is cuda available? ", torch.cuda.is_available())
59
  print("[INFO] Loading model...")
60
  # Load an official or custom model
61
 
 
67
  return annotated_frame
68
 
69
  def show_tracking(video_content):
70
+ print()
71
+
72
  # https://docs.ultralytics.com/datasets/detect/coco/
73
  video = cv2.VideoCapture(video_content)
74
 
 
180
  with gr.Column():
181
  video_input = gr.Video(source="upload", type="filepath", height=612)
182
  # Insert slider with kpt_thr
183
+ file_kpthr = gr.Slider(minimum=0.1, maximum=1, step=1e3, default=0.3, label='Keypoint threshold')
184
 
185
  submit_pose_file = gr.Button("Make 2d pose estimation")
186
  submit_pose3d_file = gr.Button("Make 3d pose estimation")
 
194
 
195
  with gr.Tab("Record video with webcam"):
196
 
197
+ with gr.Column():
198
  with gr.Row():
199
  with gr.Column():
200
  webcam_input = gr.Video(source="webcam", height=612)