|
@@ -215,6 +215,22 @@ def test_export_mnn():
|
|
YOLO(file)(SOURCE, imgsz=32) # exported model inference
|
|
YOLO(file)(SOURCE, imgsz=32) # exported model inference
|
|
|
|
|
|
|
|
|
|
|
|
+@pytest.mark.slow
|
|
|
|
+@pytest.mark.parametrize(
|
|
|
|
+ "task, int8, half, batch",
|
|
|
|
+ [ # generate all combinations except for exclusion cases
|
|
|
|
+ (task, int8, half, batch)
|
|
|
|
+ for task, int8, half, batch in product(TASKS, [True, False], [True, False], [1, 2])
|
|
|
|
+ if not (int8 and half)
|
|
|
|
+ ],
|
|
|
|
+)
|
|
|
|
+def test_export_mnn_matrix(task, int8, half, batch):
|
|
|
|
+ """Test YOLO export to MNN format considering various export configurations."""
|
|
|
|
+ file = YOLO(TASK2MODEL[task]).export(format="mnn", imgsz=32, int8=int8, half=half, batch=batch)
|
|
|
|
+ YOLO(file)([SOURCE] * batch, imgsz=32) # exported model inference
|
|
|
|
+ Path(file).unlink() # cleanup
|
|
|
|
+
|
|
|
|
+
|
|
@pytest.mark.slow
|
|
@pytest.mark.slow
|
|
def test_export_ncnn():
|
|
def test_export_ncnn():
|
|
"""Test YOLO export to NCNN format."""
|
|
"""Test YOLO export to NCNN format."""
|