ultralytics 8.0.91 tracker fix and docs comments (#2343)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-05-01 22:20:05 +02:00 committed by GitHub
parent 44c7c3514d
commit 3fd317edfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 585 additions and 258 deletions

View file

@ -1,3 +1,7 @@
---
comments: true
---
## Callbacks
Ultralytics framework supports callbacks as entry points in strategic stages of train, val, export, and predict modes.
@ -13,7 +17,7 @@ In this example, we want to return the original frame with each result object. H
```python
def on_predict_batch_end(predictor):
# Retrieve the batch data
_, _, im0s, _, _ = predictor.batch
_, im0s, _, _ = predictor.batch
# Ensure that im0s is a list
im0s = im0s if isinstance(im0s, list) else [im0s]