test batch function
Browse files- main_noweb.py +4 -4
main_noweb.py
CHANGED
@@ -151,11 +151,11 @@ def pose2d(video, kpt_threshold):
|
|
151 |
|
152 |
return "".join(out_file), "".join(kpoints)
|
153 |
|
154 |
-
def
|
155 |
kpoints=[]
|
156 |
outvids=[]
|
157 |
for v, t in zip(video, kpt_threshold):
|
158 |
-
vname, kname =
|
159 |
outvids.append(vname)
|
160 |
kpoints.append(kname)
|
161 |
return kpoints, outvids
|
@@ -307,12 +307,12 @@ def UI():
|
|
307 |
|
308 |
|
309 |
# From file
|
310 |
-
submit_pose_file.click(fn=
|
311 |
inputs= [video_input, file_kpthr],
|
312 |
outputs = [video_output1, jsonoutput],
|
313 |
queue=True)
|
314 |
|
315 |
-
submit_pose3d_file.click(fn=
|
316 |
inputs= [video_input, file_kpthr],
|
317 |
outputs = [video_output2, jsonoutput],
|
318 |
queue=True)
|
|
|
151 |
|
152 |
return "".join(out_file), "".join(kpoints)
|
153 |
|
154 |
+
def pose3dbatch(video, kpt_threshold):
|
155 |
kpoints=[]
|
156 |
outvids=[]
|
157 |
for v, t in zip(video, kpt_threshold):
|
158 |
+
vname, kname = pose3d(v, t)
|
159 |
outvids.append(vname)
|
160 |
kpoints.append(kname)
|
161 |
return kpoints, outvids
|
|
|
307 |
|
308 |
|
309 |
# From file
|
310 |
+
submit_pose_file.click(fn=pose2d,
|
311 |
inputs= [video_input, file_kpthr],
|
312 |
outputs = [video_output1, jsonoutput],
|
313 |
queue=True)
|
314 |
|
315 |
+
submit_pose3d_file.click(fn=pose3dbatch,
|
316 |
inputs= [video_input, file_kpthr],
|
317 |
outputs = [video_output2, jsonoutput],
|
318 |
queue=True)
|