diff --git a/pyproject.toml b/pyproject.toml index e27da8d0f6..367f513f51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,6 +97,7 @@ export = [ "openvino>=2024.0.0", # OpenVINO export "tensorflow>=2.0.0,<=2.19.0", # TF bug https://github.com/ultralytics/ultralytics/issues/5161 "tensorflowjs>=2.0.0", # TF.js export, automatically installs tensorflow + "ydf<0.13.0; platform_machine != 'aarch64'", # ydf>=0.13 has protobuf gencode 6.x but tensorflow<=2.19 requires protobuf<6 "tensorstore>=0.1.63; platform_machine == 'aarch64' and python_version >= '3.9'", # for TF Raspberry Pi exports "h5py!=3.11.0; platform_machine == 'aarch64'", # fix h5py build issues due to missing aarch64 wheels in 3.11 release "setuptools<=81.0.0", # pin due to >=82.0.0 breaking tensorflow.js package diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index a5b859ea94..f3fef5725a 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license -__version__ = "8.4.24" +__version__ = "8.4.25" import importlib import os diff --git a/ultralytics/utils/benchmarks.py b/ultralytics/utils/benchmarks.py index fa038875fb..01e8bab95d 100644 --- a/ultralytics/utils/benchmarks.py +++ b/ultralytics/utils/benchmarks.py @@ -121,16 +121,12 @@ def benchmark( # Checks if format == "pb": assert model.task != "obb", "TensorFlow GraphDef not supported for OBB task" - elif format == "tfjs": - # tensorflowjs pulls in tensorflow-decision-forests which requires protobuf>=6, - # but tensorflow<=2.19 requires protobuf<6, causing an irreconcilable import error - assert False, "TF.js export disabled due to protobuf version conflict in tensorflowjs" elif format == "edgetpu": assert LINUX and not ARM64, "Edge TPU export only supported on non-aarch64 Linux" - elif format in {"coreml", "tfjs"}: - assert MACOS or (LINUX and not ARM64), ( - "CoreML and TF.js export only supported on macOS and non-aarch64 Linux" - ) + elif format == "tfjs": + assert not (LINUX and ARM64), "TF.js export not supported on ARM64 Linux" + elif format == "coreml": + assert MACOS or (LINUX and not ARM64), "CoreML export only supported on macOS and non-aarch64 Linux" if format == "coreml": assert not IS_PYTHON_3_13, "CoreML not supported on Python 3.13" if format in {"saved_model", "pb", "tflite", "edgetpu", "tfjs"}: