tuansunday05 commited on
Commit
754ada9
1 Parent(s): e8b15e8

Update detect_strongsort.py

Browse files
Files changed (1) hide show
  1. detect_strongsort.py +2 -1
detect_strongsort.py CHANGED
@@ -185,12 +185,13 @@ def run_strongsort(
185
  with dt[1]:
186
  visualize = increment_path(save_dir / Path(path).stem, mkdir=True) if visualize else False
187
  pred = model(im, augment=augment, visualize=visualize)
188
- pred = pred[0][1]
189
  t3 = time_sync()
190
  sdt[1] += t3 - t2
191
 
192
  # Apply NMS
193
  with dt[2]:
 
194
  pred = non_max_suppression(pred, conf_thres, iou_thres, classes, agnostic_nms, max_det=max_det)
195
  sdt[2] += time_sync() - t3
196
 
 
185
  with dt[1]:
186
  visualize = increment_path(save_dir / Path(path).stem, mkdir=True) if visualize else False
187
  pred = model(im, augment=augment, visualize=visualize)
188
+ # pred = pred[0][1]
189
  t3 = time_sync()
190
  sdt[1] += t3 - t2
191
 
192
  # Apply NMS
193
  with dt[2]:
194
+ pred = pred[0][1] if isinstance(pred[0], list) else pred[0] # single model or ensemble
195
  pred = non_max_suppression(pred, conf_thres, iou_thres, classes, agnostic_nms, max_det=max_det)
196
  sdt[2] += time_sync() - t3
197