diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index 68d9f9d1..283aafef 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -288,8 +288,10 @@ class Exporter: self.args.nms = False self.args.conf = self.args.conf or 0.25 # set conf default value for nms export if edgetpu: - if not LINUX: - raise SystemError("Edge TPU export only supported on Linux. See https://coral.ai/docs/edgetpu/compiler") + if ARM64 and not LINUX: + raise SystemError( + "Edge TPU export only supported on non-aarch64 Linux. See https://coral.ai/docs/edgetpu/compiler" + ) elif self.args.batch != 1: # see github.com/ultralytics/ultralytics/pull/13420 LOGGER.warning("WARNING ⚠️ Edge TPU export requires batch size 1, setting batch=1.") self.args.batch = 1 @@ -307,6 +309,9 @@ class Exporter: "WARNING ⚠️ INT8 export requires a missing 'data' arg for calibration. " f"Using default 'data={self.args.data}'." ) + if tfjs: + if ARM64 and LINUX: + raise SystemError("TensorFlow.js export not supported on ARM64 Linux") # Input im = torch.zeros(self.args.batch, 3, *self.imgsz).to(self.device) @@ -1128,9 +1133,6 @@ class Exporter: def export_tfjs(self, prefix=colorstr("TensorFlow.js:")): """YOLO TensorFlow.js export.""" check_requirements("tensorflowjs") - if ARM64: - # Fix error: `np.object` was a deprecated alias for the builtin `object` when exporting to TF.js on ARM64 - check_requirements("numpy==1.23.5") import tensorflow as tf import tensorflowjs as tfjs # noqa