progress false
Browse files- main_noweb.py +10 -8
main_noweb.py
CHANGED
@@ -107,6 +107,7 @@ def show_tracking(video_content):
|
|
107 |
def pose3d(video):
|
108 |
video = check_extension(video)
|
109 |
print(device)
|
|
|
110 |
|
111 |
|
112 |
# Define new unique folder
|
@@ -114,7 +115,7 @@ def pose3d(video):
|
|
114 |
vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
|
115 |
os.makedirs(vis_out_dir)
|
116 |
|
117 |
-
result_generator =
|
118 |
vis_out_dir = vis_out_dir,
|
119 |
thickness=4,
|
120 |
radius = 5,
|
@@ -196,10 +197,10 @@ with block:
|
|
196 |
# Insert slider with kpt_thr
|
197 |
file_kpthr = gr.Slider(0, 1, value=0.3, label='Keypoint threshold')
|
198 |
with gr.Row():
|
199 |
-
submit_pose_file = gr.Button("Make 2d pose estimation", variant="primary")
|
200 |
-
submit_pose3d_file = gr.Button("Make 3d pose estimation", variant="primary")
|
201 |
-
submit_hand_file = gr.Button("Make 2d hand estimation", variant="primary")
|
202 |
-
submit_detect_file = gr.Button("Detect and track objects", variant="primary")
|
203 |
|
204 |
with gr.Row():
|
205 |
video_output1 = gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True)
|
@@ -237,7 +238,7 @@ with block:
|
|
237 |
|
238 |
print(hello_world())""",
|
239 |
language="python",
|
240 |
-
interactive=
|
241 |
show_label=False,
|
242 |
)
|
243 |
|
@@ -265,7 +266,7 @@ with block:
|
|
265 |
|
266 |
if __name__ == "__main__":
|
267 |
block.queue(
|
268 |
-
concurrency_count=
|
269 |
max_size=25, # Maximum number of requests that the queue processes
|
270 |
api_open = False # When creating a Gradio demo, you may want to restrict all traffic to happen through the user interface as opposed to the programmatic API that is automatically created for your Gradio demo.
|
271 |
) # https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
@@ -275,4 +276,5 @@ if __name__ == "__main__":
|
|
275 |
auth=("novouser", "bstad2023")
|
276 |
)
|
277 |
|
278 |
-
|
|
|
|
107 |
def pose3d(video):
|
108 |
video = check_extension(video)
|
109 |
print(device)
|
110 |
+
temp_3d = human3d
|
111 |
|
112 |
|
113 |
# Define new unique folder
|
|
|
115 |
vis_out_dir = os.path.join("/".join(video.split("/")[:-1]), add_dir)
|
116 |
os.makedirs(vis_out_dir)
|
117 |
|
118 |
+
result_generator = temp_3d(video,
|
119 |
vis_out_dir = vis_out_dir,
|
120 |
thickness=4,
|
121 |
radius = 5,
|
|
|
197 |
# Insert slider with kpt_thr
|
198 |
file_kpthr = gr.Slider(0, 1, value=0.3, label='Keypoint threshold')
|
199 |
with gr.Row():
|
200 |
+
submit_pose_file = gr.Button("Make 2d pose estimation", variant="primary",show_progress=False)
|
201 |
+
submit_pose3d_file = gr.Button("Make 3d pose estimation", variant="primary",show_progress=False)
|
202 |
+
submit_hand_file = gr.Button("Make 2d hand estimation", variant="primary",show_progress=False)
|
203 |
+
submit_detect_file = gr.Button("Detect and track objects", variant="primary"show_progress=False)
|
204 |
|
205 |
with gr.Row():
|
206 |
video_output1 = gr.PlayableVideo(height=512, label = "Estimate human 2d poses", show_label=True)
|
|
|
238 |
|
239 |
print(hello_world())""",
|
240 |
language="python",
|
241 |
+
interactive=False,
|
242 |
show_label=False,
|
243 |
)
|
244 |
|
|
|
266 |
|
267 |
if __name__ == "__main__":
|
268 |
block.queue(
|
269 |
+
concurrency_count=40, # When you increase the concurrency_count parameter in queue(), max_threads() in launch() is automatically increased as well.
|
270 |
max_size=25, # Maximum number of requests that the queue processes
|
271 |
api_open = False # When creating a Gradio demo, you may want to restrict all traffic to happen through the user interface as opposed to the programmatic API that is automatically created for your Gradio demo.
|
272 |
) # https://www.gradio.app/guides/setting-up-a-demo-for-maximum-performance
|
|
|
276 |
auth=("novouser", "bstad2023")
|
277 |
)
|
278 |
|
279 |
+
# The total concurrency = number of processors * 10.
|
280 |
+
# 4vCPU 15 GB ram 40GV VRAM = 40?
|