Skip to content

v0.0.57 - `ultralytics-inference 0.0.57` Add tiled inference for large images and small objects (#627)

Choose a tag to compare

@github-actions github-actions released this 09 Nov 13:44
· 5 commits to main since this release
73e65b7

🌟 Summary

Ultralytics Inference 0.0.57 adds tiled inference for large images and improves prediction consistency, visualization, and reliability across platforms.

📊 Key Changes

  • 🧩 Tiled inference: Use --tile in the CLI or with_tile(...) in Rust to process images, video, or webcam frames as overlapping windows, then merge the results back into the original image. Supported tasks include detection, segmentation, depth, classification, pose, and oriented boxes.
  • 🎯 Better tile merging: Windows overlap by 20%; duplicate detections are removed, and partial boxes near tile edges are handled to reduce missed or repeated objects. Dynamic-batch models can process multiple tiles together.
  • 📉 Updated NMS default: The IoU threshold now defaults to 0.5 instead of 0.7, matching Ultralytics prediction defaults and helping reduce duplicate detections.
  • 🎨 Model-specific class colors: When model metadata includes class colors, native and browser visualizations use them; otherwise, they fall back to the Ultralytics palette. Mask opacity and label colors were also aligned across renderers.
  • 📹 Smoother, cleaner prediction runs: Webcam inference keeps the latest frame rather than building a queue of stale frames. Closing the viewer or pressing Ctrl+C now stops prediction cleanly, helping saved videos and frames finish correctly.
  • 🪟 Platform and dependency improvements: Windows webcam selection and path handling were improved, Windows ARM64 was added to CI, and dependency updates address JPEG 2000 decoding issues and Windows ARM build requirements. Postprocessing also removes unsafe reads without a measured slowdown.

🎯 Purpose & Impact

  • 🔎 Tiling is especially useful for large images and small objects, which can be hard to detect when a whole image is resized to the model’s usual input size. It has been checked against Ultralytics Python across CPU, GPU, and NPU inference backends.
  • 🧰 The lower default IoU, clearer model colors, and better shutdown behavior make results more consistent and prediction sessions easier to use.
  • ⚖️ Tiling runs inference on multiple image windows, so it can take more processing time than a single full-image prediction. Enable it when detail matters; it is off by default.

What's Changed

  • Update hayro-jpeg2000 to 0.5 by @onuralpszr in #607
  • Let publish reruns finish a release or crates.io publish that failed partway by @glenn-jocher in #608
  • Fix code block formatting in README files to use proper syntax highlighting by @onuralpszr in #609
  • Use native-tls for ureq so Windows ARM64 builds without clang by @onuralpszr in #610
  • Use platform path separators for the runs save directory by @onuralpszr in #612
  • Print plain Windows paths instead of verbatim paths for local sources by @onuralpszr in #611
  • Add windows-11-arm runner to the CI test matrix by @onuralpszr in #613
  • Restrict npm publish to main by @onuralpszr in #614
  • Stop prediction when the viewer window is closed or Q or Esc is pressed by @onuralpszr in #617
  • Open Windows webcams by device name since dshow does not accept an index by @onuralpszr in #616
  • Match glob sources case-insensitively on Windows like Python by @onuralpszr in #615
  • Keep only the latest webcam frame for inference by @onuralpszr in #618
  • Draw class colors from model colors metadata and align annotation colors with Ultralytics by @glenn-jocher in #620
  • Default NMS IoU to 0.5 to match Ultralytics predict by @glenn-jocher in #619
  • Remove all unsafe code from postprocessing by @onuralpszr in #622
  • Share one Results fixture across the results tests by @onuralpszr in #623
  • build(deps): Bump ureq from 3.5.0 to 3.5.1 by @dependabot[bot] in #625
  • build(deps): Bump zip from 9.1.3 to 9.4.0 by @dependabot[bot] in #624
  • Stop the CLI cleanly on Ctrl+C so saved videos and frames finish writing by @onuralpszr in #626
  • ultralytics-inference 0.0.57 Add tiled inference for large images and small objects by @onuralpszr in #627

Full Changelog: v0.0.56...v0.0.57