Skip to content

Commit

Permalink
Add YOLOv10 TFLite CI test (#25)
Browse files Browse the repository at this point in the history
* Add YOLOv10 TFLite CI test

* Auto-format by https://ultralytics.com/actions

---------

Co-authored-by: UltralyticsAssistant <[email protected]>
  • Loading branch information
glenn-jocher and UltralyticsAssistant authored Sep 7, 2024
1 parent 942d5c3 commit e2015d1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ def test_yolov10_export_onnx_matrix(self, request, task, dynamic, int8, half, ba
)
YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32) # exported model inference

@pytest.mark.parametrize(
"task, dynamic, int8, half, batch",
product(["yolov10n"], [False], [False], [False], [1, 2]),
)
def test_yolov10_export_onnx_matrix(self, request, task, dynamic, int8, half, batch):
"""Exports YOLOv10 models to TFLite and tests inference with varying configurations."""
file = YOLO(task).export(
format="tflite",
imgsz=32,
dynamic=dynamic,
int8=int8,
half=half,
batch=batch,
simplify=True,
)
YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32) # exported model inference


if __name__ == "__main__":
pytest.main(
Expand Down

0 comments on commit e2015d1

Please sign in to comment.