Cleanup argument handling in Model class (#4614)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Stapf <42514241+Wiqzard@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-08-28 23:12:32 +02:00 committed by GitHub
parent 53b4f8c713
commit 7e99804263
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 93 deletions

View file

@ -182,9 +182,11 @@ def test_export_openvino():
def test_export_coreml():
if not WINDOWS: # RuntimeError: BlobWriter not loaded with coremltools 7.0 on windows
f = YOLO(MODEL).export(format='coreml', nms=True)
if MACOS:
YOLO(f)(SOURCE) # model prediction only supported on macOS
f = YOLO(MODEL).export(format='coreml')
YOLO(f)(SOURCE) # model prediction only supported on macOS for nms=False models
else:
YOLO(MODEL).export(format='coreml', nms=True)
def test_export_tflite(enabled=False):