CoreML export: updated nms flag for end2end models (#16058)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/16071/head
Francesco Mattioli 6 months ago committed by GitHub
parent b00f4afefa
commit 6f5c3c8cea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      ultralytics/engine/exporter.py

@ -610,6 +610,9 @@ class Exporter:
f = self.file.with_suffix(".mlmodel" if mlmodel else ".mlpackage")
if f.is_dir():
shutil.rmtree(f)
if self.args.nms and getattr(self.model, "end2end", False):
LOGGER.warning(f"{prefix} WARNING ⚠ 'nms=True' is not available for end2end models. Forcing 'nms=False'.")
self.args.nms = False
bias = [0.0, 0.0, 0.0]
scale = 1 / 255

Loading…
Cancel
Save