pypi ultralytics 8.3.241
v8.3.241 - `ultralytics 8.3.241` ORT CoreML execution provider when `device="mps"` (#22984)

6 hours ago

🌟 Summary

v8.3.241 boosts ONNX Runtime performance on macOS by preferring CoreML on Apple hardware, stabilizes ExecuTorch exports, and expands hardware/image support for Rockchip and 2‑channel data — plus a round of documentation and tooling polish. 🍏🚀


📊 Key Changes

  • Mac ONNX Runtime: Prefer CoreML on Apple hardware (@glenn-jocher)

    • On macOS with device="mps", Ultralytics now prefers CoreMLExecutionProvider over CPU for ONNX Runtime.
    • New provider selection logic: CUDA > CoreML (MPS) > CPU, with clearer logging of which provider is actually used.
    • IO binding is now only used when it’s supported (CUDA), avoiding issues with CoreML.
  • ExecuTorch export reliability improvements (@glenn-jocher, @onuralpszr)

    • export_executorch() now pins numpy<=2.3.5 to avoid known coremltools failures with newer NumPy.
    • Removed a redundant import torch in the ExecuTorch export path for a cleaner exporter.
  • New hardware support: Rockchip RV1126B (@venjye, @glenn-jocher)

    • Added "rv1126b" to supported Rockchip chips in code.
    • Updated the Rockchip RKNN docs to explicitly mention RV1126B as supported.
  • Better image handling: 2‑channel images in Annotator (@kenanking)

    • ultralytics.utils.plotting.Annotator now correctly handles 2‑channel numpy images by converting them to 3‑channel before drawing and saving.
  • TF/SavedModel & TensorRT backend cleanups (@glenn-jocher)

    • TensorFlow SavedModel loading simplified to always use tf.saved_model.load for this path.
    • TensorRT engine parsing refactored for clearer handling of dynamic shapes and data types across TRT <10 and TRT ≥10.
  • SAM 3 docs: correct save usage (@dingjie-ai)

    • SAM3SemanticPredictor examples now set save=True through the overrides dict at initialization, not per call.
  • Sony IMX500 & solutions docs polish (@glenn-jocher)

    • Cleaned and re-indented the YOLOSegment example for the Sony IMX500 integration docs.
    • Improved wording and types in various docs macros (auto-annotation, solutions args, tracking/visualization args, validation args).
  • Docs site & authorship updates (@glenn-jocher, @RizwanMunawar, @onuralpszr)

    • Updated Streamlit live inference guide with a new YouTube demo video.
    • Bumped the docs chat widget to ultralytics/llm@v0.1.8 for a better in-docs chat experience.
    • Updated mkdocs-ultralytics-plugin dev dependency to >=0.2.4.
    • Fixed and enriched GitHub authors mapping (add @dingjie-ai, @jshakes, and improve @0xSynapse avatar URL).

🎯 Purpose & Impact

  • Faster inference on macOS with ONNX Runtime 🍏⚡

    • Users running ONNX models on Mac with device="mps" now automatically benefit from Apple Neural Engine / GPU acceleration via CoreML when available.
    • Real-world speedup example: ~20.3 ms → ~9.0 ms per inference vs CPU provider, nearly a 2× improvement.
    • CUDA behavior and fallbacks remain unchanged; only macOS/MPS selection is improved and more robust.
  • More reliable ExecuTorch exports 📦🧩

    • The NumPy pin greatly reduces “mysterious” ExecuTorch/CoreML export failures caused by incompatible NumPy versions.
    • Users targeting ExecuTorch (e.g., mobile/embedded) should see more stable export runs without needing to manually juggle NumPy versions.
  • Broader deployment options on edge devices 🧱🚀

    • Adding RV1126B ensures users can export Ultralytics models directly for that chip without custom patches.
    • Updated docs make it clearer which Rockchip devices are expected to work out of the box.
  • Smoother visualization for non-standard data 🌈🖼️

    • 2‑channel image workflows (e.g., spectral or custom sensor data) can now be annotated and saved without errors, aligning with existing 1‑channel, 3‑channel, and multispectral support.
  • Cleaner and more predictable backends 🧠🔧

    • Refined TensorRT and TF SavedModel handling makes backend behavior more consistent across versions and shapes.
    • IO binding is now used only where it’s supported (CUDA), avoiding subtle bugs with CoreML.
  • Clearer documentation & better tooling experience 📚✨

    • SAM 3 examples now match real behavior, reducing confusion around where save=True should be configured.
    • IMX500 example, solution/validation/tracking argument docs, and auto-annotation docs are easier to read and more accurate.
    • The docs chat widget and authors list improvements enhance the support and community experience without affecting core training/inference code.

Overall, v8.3.241 is a backend and compatibility–focused release: faster ONNX Runtime on macOS, more dependable exports, better edge-device coverage, and smoother visualization for specialized image formats — with documentation and tooling kept in sync. 🎛️🚀

What's Changed

New Contributors

Full Changelog: v8.3.240...v8.3.241

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.