ultralytics 8.1.27 batched tracking fixes (#8842)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
3555785167
commit
2ea6b2b889
5 changed files with 38 additions and 31 deletions
|
|
@ -301,7 +301,7 @@ def test_predict_callback_and_setup():
|
|||
|
||||
def on_predict_batch_end(predictor):
|
||||
"""Callback function that handles operations at the end of a prediction batch."""
|
||||
path, im0s, _, _ = predictor.batch
|
||||
path, im0s, _ = predictor.batch
|
||||
im0s = im0s if isinstance(im0s, list) else [im0s]
|
||||
bs = [predictor.dataset.bs for _ in range(len(path))]
|
||||
predictor.results = zip(predictor.results, im0s, bs) # results is List[batch_size]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue