🌟 Summary
Ultralytics v8.4.68 is mainly a training-quality and reliability release, led by a major improvement for semantic segmentation: you can now use class weighting to better handle imbalanced datasets 🎯🧠
📊 Key Changes
-
Semantic segmentation now supports class weights via
cls_pw🖼️⚖️ -
Default semantic training behavior stays the same 🔒
- If
cls_pwis not set, or is0, Ultralytics keeps the previous behavior. - Existing Cityscapes-specific weighting is still used automatically when appropriate.
- This means current training pipelines should continue working without surprises.
- If
-
Better weighting logic for segmentation 🧮➡️🧠
- Semantic segmentation now uses a weighting approach based on class pixel frequency that is more suitable for dense pixel-level tasks than the method used in detection.
- This helps avoid overly extreme weighting while still giving rare classes more importance.
-
More robust handling of missing or unreadable labels/masks 🛠️
- The new class-counting logic safely handles cases where labels or masks are missing or unreadable.
- Instead of breaking training, it can fall back more gracefully.
-
Detection classification loss can now apply class weights too 📦
- The release also refactors class counting and weighting into reusable trainer helpers.
- Detection training now applies computed class weights directly in the classification loss.
-
Several production stability fixes 🚑
- PR #24840 by @glenn-jocher fixes four real-world issues:
- crash from empty prediction batches
- corrupt cached AMP asset loading
- truncated downloads
- invalid non-mapping YAML files
- These changes improve day-to-day reliability for training and inference.
- PR #24840 by @glenn-jocher fixes four real-world issues:
-
Safer model loading on older PyTorch versions 🔐
- PR #24830 by @glenn-jocher makes restricted loading fall back cleanly on
torch<2.5instead of erroring out. - Helpful for older toolchains and export workflows.
- PR #24830 by @glenn-jocher makes restricted loading fall back cleanly on
-
Security fix for similarity search UI 🛡️
- PR #24828 escapes user query input properly to prevent a high-severity browser injection issue.
-
Docs and platform updates 📚
- Added Windows on Snapdragon QNN benchmarks for YOLO26n across all six tasks, showing strong NPU speedups 🚀
- Updated Ultralytics Platform GPU pricing docs 💳
- Large cleanup of broken links, page titles, URLs, and navigation for smoother docs browsing.
🎯 Purpose & Impact
-
Better semantic segmentation on imbalanced datasets 🌍
- If your dataset has rare classes like small road signs, defects, or medical regions, the model can now pay more attention to them during training.
- This may improve results where minority classes were previously overlooked.
-
Safer upgrade path ✅
- Because default behavior is preserved unless you use
cls_pw, most users can upgrade without changing existing results.
- Because default behavior is preserved unless you use
-
More control for advanced users 🎛️
- Researchers and practitioners training custom semantic datasets now get a useful tuning option that was missing before.
-
Improved robustness in production 🏭
- Fewer crashes from bad files, corrupt caches, malformed YAML, or odd input batches means smoother automation and more reliable pipelines.
-
Broader hardware confidence 💻
- The new Windows on Snapdragon benchmark documentation helps users evaluate YOLO26 deployment on modern ARM laptops and NPU hardware.
-
Better security and compatibility 🔒
- Safer web templates and graceful fallback behavior on older PyTorch versions reduce friction for both developers and deployers.
Overall, v8.4.68 is a practical quality release with its biggest win being more capable and customizable semantic segmentation training, plus several important fixes that make Ultralytics more stable and dependable in real-world use 🚀
What's Changed
- Skip restricted model loading on torch<2.5 by @glenn-jocher in #24830
- Fix docs broken link checks by @glenn-jocher in #24836
- docs: add Windows on Snapdragon benchmarks by @ShuaiLYU in #24834
- Update Platform GPU pricing by @glenn-jocher in #24838
- Fix ClearML project paths by @MUKILAN0608 in #24827
- Escape similarity search query by @orbisai0security in #24828
- Add https://youtu.be/zF2T17ppKIE to docs by @RizwanMunawar in #24837
- Fix four production Sentry issues: predict batch, corrupt AMP cache, truncated downloads, non-mapping YAML by @glenn-jocher in #24840
- Fix docs metadata and URL issues by @glenn-jocher in #24839
- Semantic segmentation class weights by @Y-T-G in #24843
New Contributors
- @orbisai0security made their first contribution in #24828
- @MUKILAN0608 made their first contribution in #24827
Full Changelog: v8.4.67...v8.4.68