pypi ultralytics 8.3.193
v8.3.193 - `ultralytics 8.3.193` Preload `torchvision` for long-sequence inference (#21926)

5 hours ago

🌟 Summary

Ultralytics 8.3.193 boosts long-video and large-batch inference performance by auto-enabling TorchVision NMS, streamlines checkpoint loading with a single API, and delivers cleaner, more informative progress bars and logging. πŸš€

πŸ“Š Key Changes

  • Long-sequence inference optimization (PR #21926) ⚑
    • Detects long sequences (streams, screenshots, >1000 images, or any video) and preloads torchvision to trigger TorchVision-based NMS automatically.
    • Keeps warnings targeted: only warns when not in stream mode.
  • Unified checkpoint loading API (PR #21933) πŸ”„
    • Replaces attempt_load_one_weight/attempt_load_weights with a single load_checkpoint function across the codebase.
    • Docs updated to reference ultralytics.nn.tasks.load_checkpoint.
    • Minimal example:
      from ultralytics.nn.tasks import load_checkpoint
      model, ckpt = load_checkpoint("yolo11n.pt", device="cpu", fuse=False)
  • TQDM progress bar improvements (PRs #21944, #21934, #21932) πŸ“ˆ
    • Faster, simpler formatting via f-strings, smarter/smoother rate calculations.
    • Human-friendly rate scaling by default (K/M/G for all units), plus β€œG” tier for very high rates.
    • Cleaner completion display for byte downloads (e.g., β€œ12.3 MB” instead of β€œ12.3/12.3 MB”).
    • Note: output strings changed; update any scripts that parse exact progress text.
  • Clearer save paths (PR #21931) πŸ—‚οΈ
    • get_save_dir() now returns absolute paths for unambiguous run locations in logs.
  • Stable exports via dependency pin (PR #21941) πŸ”’
    • Pins onnxslim==0.1.65 for ONNX and TF SavedModel exports to avoid unexpected breakages.
  • Robust PyTorch version handling (PR #21921) 🧰
    • Normalizes TORCH_VERSION usage to prevent issues with non-string version objects and align all version checks/logging.
  • Better segmentation validation (PR #21503) πŸ§ͺ
    • Corrects mask preparation for overlap_mask=True and simplifies IoU computation for more accurate, efficient val results.
  • Dataset and docs fixes (PRs #21939, #21942, #21929, #21930) πŸ“š
    • Fixes autosplit import in xView.yaml (ultralytics.data.split.autosplit).
    • Clarifies recommended dataset folder structure in docs.
    • Updates docs CI to target Python 3.9; improves a label error message to mention negative coordinates.

🎯 Purpose & Impact

  • Faster, more reliable inference on long videos/large image sets with automatic TorchVision NMS preloadβ€”no user action required. 🎬⚑
  • Simpler model loading for developers via a single load_checkpoint entry point; fewer APIs to remember. 🧠
  • Cleaner, more readable progress bars and absolute save paths improve day-to-day usability and logs across CLI and Ultralytics HUB. 🧭
  • More stable export workflows thanks to dependency pinning; fewer surprise failures in ONNX/TF pipelines. πŸ“¦
  • Improved compatibility and diagnostics across PyTorch versions; fewer version-related edge cases. πŸ›‘οΈ
  • More accurate segmentation validation and smoother dataset setup with fixed imports and clarified docs. βœ…

Tip: If any tooling relies on exact progress bar strings, review and adjust parsers due to the new TQDM formatting. ✍️

What's Changed

New Contributors

Full Changelog: v8.3.192...v8.3.193

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.