Spaces:
Runtime error
Runtime error
Commit
·
9ab5dcd
1
Parent(s):
89772af
Update inference.py
Browse files- inference.py +13 -11
inference.py
CHANGED
@@ -338,17 +338,19 @@ def do_associative_tracking(raw_detections, image_meter_width, image_meter_heigh
|
|
338 |
|
339 |
low_dets = []
|
340 |
high_dets = []
|
341 |
-
|
342 |
-
for
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
|
|
|
|
352 |
|
353 |
print("Preprocess done")
|
354 |
|
|
|
338 |
|
339 |
low_dets = []
|
340 |
high_dets = []
|
341 |
+
with tqdm(total=len(raw_detections), desc="Running tracking", ncols=0, disable=not verbose) as pbar:
|
342 |
+
for batch in raw_detections:
|
343 |
+
for frame in batch:
|
344 |
+
low_frame = []
|
345 |
+
high_frame = []
|
346 |
+
for bbox in frame:
|
347 |
+
if bbox[4] > conf_thresh:
|
348 |
+
high_frame.append(bbox)
|
349 |
+
else:
|
350 |
+
low_frame.append(bbox)
|
351 |
+
low_dets.append(low_frame)
|
352 |
+
high_dets.append(high_frame)
|
353 |
+
pbar.update(1)
|
354 |
|
355 |
print("Preprocess done")
|
356 |
|