π Summary
ultralytics 8.3.190 delivers a faster, torchvision-free NMS pipeline powered by a new PyTorch-native implementation optimized for YOLO11, plus stability and UX upgrades across CoreML, progress bars, macOS handling, and reproducibility. π
π Key Changes
-
Autobackend torch-native NMS (most important)
- Introduces a new NMS module
ultralytics/utils/nms.py
with:TorchNMS.nms
(exact-match, optimized NMS) andTorchNMS.fast_nms
(vectorized FastNMS)non_max_suppression
refactored here; rotated NMS supported viafast_nms
+batch_probiou
- Removes hard dependency on
torchvision.ops.nms
for prediction-time use - YOLO11-optimized, works on CPU and GPU, improves post-processing latency β‘
- Updated imports across the codebase (
predict
,val
, examples) tofrom ultralytics.utils import nms
- OBB flows and exporter now use
TorchNMS.fast_nms
withbatch_probiou
for rotated boxes
- Introduces a new NMS module
-
AutoBackend API cleanup
- Renamed parameter
weights=
tomodel=
for consistency and to avoid duplicate memory usage (@glenn-jocher) - Unified handling for in-memory
torch.nn.Module
and.pt
loading; gradients disabled by default for safer, faster inference - Adds clear CoreML logging and a version gate
- Renamed parameter
-
CoreML stability
- Enforces
coremltools>=8.0
for CoreML inference to prevent runtime issues; shows a helpful message before loading
- Enforces
-
Performance and stability
- Reintroduces platform-safe in-place ops (
sigmoid_()
,clamp_()
) for non-macOS 14 systems to boost speed - Adds
MACOS14
/NOT_MACOS14
flags to handle Apple MPS quirks safely - Faster internet checks using DNS lookups, improving startup reliability
- Reintroduces platform-safe in-place ops (
-
Import-time and CI improvements
- Scopes heavy imports (requests/psutil) to runtime, reducing import overhead and avoiding circular deps, including Ultralytics HUB utils
- CI workflows now run for PRs targeting any branch, not just main
-
Geometric ops robustness
- Refactors core ops to better handle both HW and HWC shapes, clarifies padding logic, and reduces redundant indexing
-
Reproducibility
- Trainer saves
git_commit
in checkpoints; newutils.get_git_commit()
with caching
- Trainer saves
-
UX and docs
- TQDM progress bar now shows ETA, stable rate, cleaner units, and improved final-state display β³
- Dataset/scripts/docs switch to
subprocess.run(...)
for safer command execution - Tutorial notebook updated for latest versions and simpler dataset download APIs
π― Purpose & Impact
-
Faster, leaner inference πββοΈπ¨
- PyTorch-native NMS reduces reliance on
torchvision
, speeds up post-processing, and lowers latency, especially helpful in deployment and environments wheretorchvision
is heavy or unavailable.
- PyTorch-native NMS reduces reliance on
-
Better platform reliability π‘οΈ
- macOS 14 handling prevents MPS-related crashes with in-place ops.
- CoreML gating avoids version pitfalls and smooths model execution on Apple devices.
-
Improved developer experience π©βπ»
- Cleaner
AutoBackend(model=...)
API, unified PyTorch paths, and no-grad defaults reduce boilerplate and risks. - Progress bar is more informative with ETA and better formatting.
- Cleaner
-
Stronger reproducibility and CI coverage π¦
- Git commit embedded in checkpoints makes experiments traceable.
- CI runs for all PR branches, speeding up feedback across workflows.
-
Faster startup and βjust worksβ behavior βοΈ
- Scoped imports and DNS-based connectivity checks improve responsiveness and robustness.
Quick usage examples:
- Use the new NMS utilities:
from ultralytics.utils import nms # preds: [B, C+4(+M), N] out = nms.non_max_suppression(preds, conf_thres=0.25, iou_thres=0.45)
- Updated AutoBackend parameter:
from ultralytics.nn.autobackend import AutoBackend model = AutoBackend(model="yolo11n.pt", device="cuda")
- Ensure CoreML tools are up-to-date:
pip install -U "coremltools>=8.0"
What's Changed
- Add
coremltools>=8.0
check to Autobackend by @glenn-jocher in #21861 - Update
TQDM
progress bar to display remaining time by @Laughing-q in #21868 - Notebook updates by @glenn-jocher in #21870
- Fix prediction logging info for
obb
by @Laughing-q in #21871 - Scope
requests
imports by @glenn-jocher in #21876 - Target CI to all PR branches by @glenn-jocher in #21879
- Eliminate duplicate ops indexing by @glenn-jocher in #21877
MACOS14
check by @glenn-jocher in #21883- Rename Autobackend()
weights
tomodel
by @glenn-jocher in #21881 - Reintroduce inplace
.clamp_()
and.sigmoid_()
ops by @glenn-jocher in #21878 - Add git commit hash to checkpoints by @Bovey0809 in #21836
- Standardize docs build
subprocess
calls by @glenn-jocher in #21887 - Use
subprocess.run()
for improved dataset autodownloads by @glenn-jocher in #21888 - Faster online check using DNS resolution by @glenn-jocher in #21886
ultralytics 8.3.190
Autobackendtorch
-native NMS by @glenn-jocher in #21862
New Contributors
- @Bovey0809 made their first contribution in #21836
Full Changelog: v8.3.189...v8.3.190