ultralytics 8.0.54 TFLite export improvements and fixes (#1447)

Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-03-16 15:42:44 +01:00
committed by GitHub
parent 30fc4b537f
commit 701fba4770
30 changed files with 198 additions and 166 deletions

View File

@ -17,7 +17,7 @@ def on_predict_batch_end(predictor):
im0s = im0s if isinstance(im0s, list) else [im0s]
predictor.results = zip(predictor.results, im0s)
model = YOLO(f"yolov8n.pt")
model = YOLO(f'yolov8n.pt')
model.add_callback("on_predict_batch_end", on_predict_batch_end)
for (result, frame) in model.track/predict():
pass

View File

@ -59,8 +59,8 @@ Use a trained YOLOv8n model to run predictions on images.
!!! example ""
```bash
yolo detect predict model=yolov8n.pt source="https://ultralytics.com/images/bus.jpg" # predict with official model
yolo detect predict model=path/to/best.pt source="https://ultralytics.com/images/bus.jpg" # predict with custom model
yolo detect predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' # predict with official model
yolo detect predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg' # predict with custom model
```
## Export

View File

@ -6,7 +6,7 @@ The simplest way of simply using YOLOv8 directly in a Python environment.
```python
from ultralytics import YOLO
model = YOLO("yolov8n.pt") # pass any model type
model = YOLO('yolov8n.pt') # pass any model type
model.train(epochs=5)
```
@ -14,8 +14,8 @@ The simplest way of simply using YOLOv8 directly in a Python environment.
```python
from ultralytics import YOLO
model = YOLO("yolov8n.yaml")
model.train(data="coco128.yaml", epochs=5)
model = YOLO('yolov8n.yaml')
model.train(data='coco128.yaml', epochs=5)
```
=== "Resume"
@ -31,8 +31,8 @@ The simplest way of simply using YOLOv8 directly in a Python environment.
```python
from ultralytics import YOLO
model = YOLO("yolov8n.yaml")
model.train(data="coco128.yaml", epochs=5)
model = YOLO('yolov8n.yaml')
model.train(data='coco128.yaml', epochs=5)
model.val() # It'll automatically evaluate the data you trained.
```
@ -44,7 +44,7 @@ The simplest way of simply using YOLOv8 directly in a Python environment.
# It'll use the data yaml file in model.pt if you don't set data.
model.val()
# or you can set the data you want to val
model.val(data="coco128.yaml")
model.val(data='coco128.yaml')
```
!!! example "Predict"