oskarastrom commited on
Commit
9ab5dcd
·
1 Parent(s): 89772af

Update inference.py

Browse files
Files changed (1) hide show
  1. 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
- for batch in raw_detections:
342
- for frame in batch:
343
- low_frame = []
344
- high_frame = []
345
- for bbox in frame:
346
- if bbox[4] > conf_thresh:
347
- high_frame.append(bbox)
348
- else:
349
- low_frame.append(bbox)
350
- low_dets.append(low_frame)
351
- high_dets.append(high_frame)
 
 
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