oskarastrom commited on
Commit
fa2b33e
·
1 Parent(s): 3986029

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +3 -3
inference.py CHANGED
@@ -356,10 +356,10 @@ def do_associative_tracking(inference, image_shapes, width, height, image_meter_
356
 
357
  # Run tracking
358
  with tqdm(total=len(low_preds), desc="Running tracking", ncols=0, disable=not verbose) as pbar:
359
- for i in range(len(low_preds)):
360
  if gp: gp(i / len(low_preds), pbar.__str__())
361
- low_boxes = low_preds[i]
362
- high_boxes = high_preds[i]
363
  boxes = (low_boxes, high_boxes)
364
  if len(low_boxes) + len(high_boxes) > 0:
365
  tracker.update(boxes)
 
356
 
357
  # Run tracking
358
  with tqdm(total=len(low_preds), desc="Running tracking", ncols=0, disable=not verbose) as pbar:
359
+ for i, key in enumerate(sorted(low_preds.keys())):
360
  if gp: gp(i / len(low_preds), pbar.__str__())
361
+ low_boxes = low_preds[key]
362
+ high_boxes = high_preds[key]
363
  boxes = (low_boxes, high_boxes)
364
  if len(low_boxes) + len(high_boxes) > 0:
365
  tracker.update(boxes)