github ultralytics/ultralytics v8.3.235
v8.3.235 - `ultralytics 8.3.235` Remove `torch 2.8.0` pin for Sony IMX export (#22874)

4 hours ago

🌟 Summary

Ultralytics v8.3.235 makes IMX500 exports more powerful (now with YOLO11 instance segmentation), modernizes export backends (CoreML, ExecuTorch, ONNX/Torch), and improves logging and Jetson stability—while lifting an older PyTorch pin so you can safely use newer versions. 🚀


📊 Key Changes

  • 🧠 Sony IMX500: Full YOLO11 instance segmentation support

    • IMX export now supports segment in addition to detect, pose, and classify.
    • New segment_forward path and segmentation handling in ultralytics.utils.export.imx.
    • IMX constraints extended in Exporter.__call__ to accept segmentation models and enforce int8=True and nms=True for segment too.
    • IMX NMS wrapper and autobackend updated to handle segmentation outputs (masks + protos).
  • 📝 IMX500 docs & deployment examples upgraded

    • IMX docs now clearly list Object Detection, Pose Estimation, Classification, and Instance Segmentation as supported tasks.
    • Added Python + CLI examples for YOLO11 instance segmentation IMX export and inference.
    • Added sample IMX export folder structure for yolo11n-seg_imx_model.
    • New end‑to‑end Raspberry Pi AI Camera instance segmentation deployment example using Aitrios application modules.
  • 🔄 IMX export robustness & dependency updates

    • IMX export:
      • Now requires PyTorch ≥ 2.9.0 and Python ≥ 3.9, and is blocked on ARM64 (not supported).
      • Switched from sony-custom-layers to edge-mdt-cl for custom layers/NMS.
      • Updated converter/tooling requirements to imx500-converter[pt]>=3.17.3, edge-mdt-cl<1.1.0, edge-mdt-tpc>=1.2.0, model-compression-toolkit>=2.4.1, pydantic<=2.11.7.
      • IMX export now runs ONNX export inside a new onnx_export_patch() context to work around PyTorch 2.9+ ONNX export issues.
    • IMX inference (autobackend):
      • Uses edge-mdt-cl NMS ops and onnxruntime-extensions.
      • Updated handling of segmentation outputs in the ONNX/IMX path.
  • 🔁 CoreML & ExecuTorch export/inference modernized

    • CoreML
      • Minimum coremltools version raised from >=8.0 to >=9.0.
      • Enforced numpy>=1.14.5,<=2.3.5 for CoreML to avoid breakage with newer numpy prereleases.
      • Changes applied consistently in:
        • pyproject.toml export extras
        • export_coreml in the exporter
        • CoreML autobackend loading.
    • ExecuTorch
      • ExecuTorch version bumped from 1.0.0 to 1.0.1 for both export and inference paths.
      • Still checks setuptools<71.0.0 to avoid known compatibility issues.
  • 🧪 IMX export test re-enabled and tightened

    • test_export_imx now:
      • Requires Torch ≥ 2.9.0.
      • Requires Python ≥ 3.9.
      • Skips on Windows, macOS, and ARM64.
    • Uses a configurable MODEL constant instead of hard‑coded yolov8n.pt.
  • 🐍 Python export Docker image: PyTorch pin removed (current PR focus)

    • Removed Docker‑level hack that forced torch<=2.8.0 in pyproject.toml.
    • Export Docker image now respects standard PyTorch constraints, allowing Torch 2.9.0+, which IMX now depends on.
    • Still explicitly installs numpy==1.26.4 for Sony IMX export stability.
    • New onnx_export_patch() helper ensures ONNX export behaves correctly with Torch 2.9+ by temporarily disabling Dynamo during export.
  • 🚀 Jetson JetPack 6 Docker: safer ONNX version

    • Dockerfile-jetson-jetpack6 now patches pyproject.toml to enforce onnx>=1.12.0,<1.20.0.
    • Prevents known TFLite export issues with onnx 1.20.0 on Jetson JetPack 6.
  • 📈 ClearML & Neptune logging made future‑proof

    • ClearML and Neptune callbacks now:
      • Dynamically collect plots from trainer.plots and trainer.validator.plots.
      • Skip any plot whose filename contains "batch" (debug/per‑batch images).
    • No longer rely on a hardcoded list like results.png, confusion_matrix.png, etc.—so new/custom plots are automatically logged.
  • 🔧 Dependency installation behavior hardened

    • attempt_install no longer passes --prerelease=allow to uv pip install.
    • Reduces the chance of accidentally pulling in unstable prerelease packages into export/inference environments.
  • 📚 New reference docs entries

    • Added API docs for:
      • ultralytics.utils.export.imx.segment_forward
      • ultralytics.utils.patches.onnx_export_patch
  • 🔖 Version bump

    • __version__ updated from 8.3.234 to 8.3.235.

🎯 Purpose & Impact

  • Better Sony IMX500 support out of the box

    • You can now run YOLO11 instance segmentation end‑to‑end on IMX500 (export and inference), including Raspberry Pi AI Camera deployments.
    • Updated docs and examples make IMX workflows clearer and easier to reproduce.
  • ⚙️ Modern, stable export backends

    • CoreML, ExecuTorch, and IMX paths are aligned with newer, supported tool versions and safe numpy ranges.
    • Reduces unexpected breakage from upstream changes while keeping you on supported, actively maintained stacks.
  • 🧪 More reliable ONNX & Torch 2.9+ workflows

    • Removing the Torch <=2.8.0 pin in the export Docker while adding onnx_export_patch() means:
      • You can benefit from newer PyTorch (including 2.9+).
      • IMX and ONNX exports remain stable despite PyTorch’s Dynamo changes.
  • 🛡️ Safer Jetson deployments

    • Pinning onnx <1.20.0 for JetPack 6 avoids known TFLite export bugs.
    • Improves reliability for YOLO exports on NVIDIA Jetson devices.
  • 📊 Richer experiment tracking with minimal maintenance

    • ClearML and Neptune now automatically log all relevant plots produced by training and validation.
    • New plot types will appear in your dashboards without any callback updates.
  • 🧱 More predictable environments

    • Avoiding prerelease installs with uv decreases surprise breakages.
    • Tight, explicit version constraints across CoreML, ExecuTorch, IMX, and ONNX yield more reproducible pipelines across machines and CI.

What's Changed

Full Changelog: v8.3.234...v8.3.235

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.