xmrt commited on
Commit
26a664d
1 Parent(s): 58992fb
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. main.py +14 -12
Dockerfile CHANGED
@@ -4,7 +4,7 @@ WORKDIR /code
4
  COPY ./requirements.txt /code/requirements.txt
5
 
6
  #RUN pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.ht
7
- RUN pip install torch==1.9.1 torchvision==0.10.1 -f https://download.pytorch.org/whl/cu111
8
  #https://download.pytorch.org/whl/torch_stable.ht
9
  RUN pip install --no-cache-dir --upgrade -U openmim
10
  RUN mim install --no-cache-dir --upgrade mmengine
 
4
  COPY ./requirements.txt /code/requirements.txt
5
 
6
  #RUN pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.ht
7
+ RUN pip install torch==1.9.1 torchvision==0.10.1 -f https://download.pytorch.org/whl/torch_stable.ht -extra-index-url https://download.pytorch.org/whl/cu111
8
  #https://download.pytorch.org/whl/torch_stable.ht
9
  RUN pip install --no-cache-dir --upgrade -U openmim
10
  RUN mim install --no-cache-dir --upgrade mmengine
main.py CHANGED
@@ -179,19 +179,21 @@ def pose2dhand(video, kpt_threshold):
179
 
180
  def run_UI():
181
  with gr.Blocks() as demo:
182
- with gr.Column():
183
  with gr.Tab("Upload video"):
184
- with gr.Row():
185
- with gr.Column():
186
- video_input = gr.Video(source="upload", type="filepath", height=612)
187
- # Insert slider with kpt_thr
188
- file_kpthr = gr.Slider(minimum=0.1, maximum=1, step=20, default=0.3, label='Keypoint threshold')
189
-
190
- submit_pose_file = gr.Button("Make 2d pose estimation")
191
- submit_pose3d_file = gr.Button("Make 3d pose estimation")
192
- submit_hand_file = gr.Button("Make 2d hand estimation")
193
- submit_detect_file = gr.Button("Detect and track objects")
194
- with gr.Column():
 
 
195
  video_output1 = gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True)
196
  video_output2 = gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)
197
  video_output3 = gr.PlayableVideo(height=512, label = "Estimate human hand poses", show_label=True)
 
179
 
180
  def run_UI():
181
  with gr.Blocks() as demo:
182
+ with gr.Column():
183
  with gr.Tab("Upload video"):
184
+ with gr.Column():
185
+ with gr.Row():
186
+ with gr.Column():
187
+ video_input = gr.Video(source="upload", type="filepath", height=612)
188
+ # Insert slider with kpt_thr
189
+ file_kpthr = gr.Slider(minimum=0.1, maximum=1, step=20, default=0.3, label='Keypoint threshold')
190
+
191
+ submit_pose_file = gr.Button("Make 2d pose estimation")
192
+ submit_pose3d_file = gr.Button("Make 3d pose estimation")
193
+ submit_hand_file = gr.Button("Make 2d hand estimation")
194
+ submit_detect_file = gr.Button("Detect and track objects")
195
+
196
+ with gr.Row():
197
  video_output1 = gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True)
198
  video_output2 = gr.PlayableVideo(height=512, label = "Estimate human 3d poses", show_label=True)
199
  video_output3 = gr.PlayableVideo(height=512, label = "Estimate human hand poses", show_label=True)