From c42005b10f3a95eb7a49ff73c0296848140208d7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 7 Sep 2024 19:02:11 +0200 Subject: [PATCH 1/2] Add YOLOv10 TFLite CI test --- tests/test_yolo.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_yolo.py b/tests/test_yolo.py index f217b9e..0403441 100644 --- a/tests/test_yolo.py +++ b/tests/test_yolo.py @@ -42,6 +42,22 @@ 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( From 632e5d232eb20a970356c05dc17202790c52afd0 Mon Sep 17 00:00:00 2001 From: UltralyticsAssistant Date: Sat, 7 Sep 2024 17:02:40 +0000 Subject: [PATCH 2/2] Auto-format by https://ultralytics.com/actions --- tests/test_yolo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_yolo.py b/tests/test_yolo.py index 0403441..68df2d7 100644 --- a/tests/test_yolo.py +++ b/tests/test_yolo.py @@ -59,6 +59,7 @@ 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 + if __name__ == "__main__": pytest.main( [