pypi ultralytics 8.4.93
v8.4.93 - Enable dynamic shapes and NMS for Alibaba MNN export (#22348)

6 hours ago

🌟 Summary

Ultralytics v8.4.93 expands Alibaba MNN export capabilities, improves training and inference reliability, and adds major dataset, cloud-storage, and integration documentation updates. πŸš€

πŸ“Š Key Changes

  • Alibaba MNN exports now support dynamic shapes and embedded NMS 🎯

    • dynamic=True enables variable image dimensions for MNN models.
    • nms=True is supported for detect and pose models with static shapes.
    • Unsupported combinations now fail clearly:
      • Dynamic shapes with NMS
      • NMS for segmentation and OBB models
    • Empty NMS outputs are handled safely only when the exported metadata confirms NMS is enabled.
    • Real MNN 3.5.0 inference was validated with YOLO11 detection, pose, and OBB workflows.
  • Improved model tracking and vision workflows πŸ‘οΈ

    • Fixed native ReID crashes in BoT-SORT when users provide detections directly without feature tensors.
    • Polygon-based ObjectCounter now determines IN/OUT direction from object motion rather than region shape, improving counting in square and wide regions.
    • YOLOE visual prompts now work with PyTorch tensor inputs.
    • embed=[] no longer causes prediction to fail.
  • More reliable training, benchmarking, and export behavior πŸ› οΈ

    • Semantic segmentation loss remains finite when an entire batch contains ignore pixels.
    • Legacy benchmark(half=True) and benchmark(int8=True) flags now correctly map to quantized benchmarking instead of silently using FP32.
    • Invalid configuration values such as nbs=0, max_det=0, mask_ratio=0, or negative seeds are rejected early with clear errors.
    • TorchScript optimization now reports a helpful message when XNNPACK is unavailable.
    • CPU torch.compile gracefully falls back to eager execution when no C++ compiler is available.
    • CoreML exports use a safer NumPy compatibility limit to avoid NumPy 2.4 crashes.
    • Axelera exports reject image sizes below the backend’s 64-pixel minimum.
  • Improved segmentation and conversion utilities ⚑

    • segment2box is significantly faster while preserving its output.
    • process_mask(upsample=True) now upsamples before cropping, preventing mask pixels from leaking outside bounding boxes.
    • Segment-mask conversion now creates missing output directories and handles Windows grayscale image shapes correctly.
    • Deprecated crop_fraction usage now emits a warning instead of stopping classification transforms.
  • Expanded pose evaluation customization 🧍

    • Pose datasets can define custom kpt_oks_sigmas values in their YAML files.
    • Values are validated against the configured number of keypoints and must be positive.
  • Ultralytics Platform cloud-storage integrations documented ☁️

    • Added guides for connecting Google Cloud Storage, Amazon S3, and Azure Blob Storage.
    • Platform can index images and YOLO labels in place without copying the source data.
    • Documentation covers read-only credentials, dataset creation, revision pinning, import limits, retries, and current limitations.
    • These integrations require a Pro or Enterprise plan.
  • Documentation and deployment updates πŸ“š

    • Added documentation for Apple Core AI and its future .aimodel workflow. Core AI export is not yet available; Core ML remains the supported Apple deployment path.
    • Dataset guides now document using .txt image lists for train, validation, and test splits.
    • Segmentation dataset documentation was refreshed with corrected split counts, class information, download sizes, and clearer usage guidance.
    • Rust inference examples now use ultralytics-inference 0.0.27.
    • Python Docker images now use Python 3.13 on Debian Trixie.
    • Environment variables accept common truthy values such as 1, yes, on, y, and t.

🎯 Purpose & Impact

  • Broader deployment support: MNN users can target applications that need variable input sizes or built-in post-processing, while clear restrictions prevent unsupported exports from failing later.
  • Fewer runtime crashes: Tracking, segmentation training, tensor-based YOLOE inference, compilation, and export workflows now handle common edge cases more safely.
  • More trustworthy results: Fixes to mask cropping, object-counting direction, semantic loss, and benchmark precision ensure outputs and metrics better reflect user settings.
  • Faster development cycles: The optimized segment2box implementation and improved small-dataset documentation make testing and experimentation more efficient.
  • Simpler cloud workflows: Platform users can train on existing cloud datasets without manually downloading and re-uploading large collections.
  • Clearer configuration errors: Invalid arguments are detected at the configuration layer with actionable messages instead of obscure deep runtime tracebacks.
  • Apple deployment guidance is clearer: Users can continue using supported Core ML exports today while understanding that Core AI support is planned for a future release. πŸš€

What's Changed

New Contributors

Full Changelog: v8.4.92...v8.4.93

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.