pypi ultralytics 8.4.12
v8.4.12 - `ultralytics 8.4.12` YOLOE-26 skip `set_classes` if text prompts already set (#23552)

9 hours ago

🌟 Summary (single-line synopsis)

Ultralytics v8.4.12 streamlines YOLOE-26 class/text-prompt handling to avoid redundant updates, while improving multispectral (grayscale) training reliability and multi-GPU auto-selection 🧠⚡️🖥️

📊 Key Changes (major updates)

  • YOLOE-26: Skip redundant set_classes() when prompts already match 🧠⚡️
    • Adds a guard in ultralytics/models/yolo/model.py to avoid re-running set_classes() if model.names already matches the requested classes.
    • Only regenerates text embeddings (get_text_pe(classes)) when a real class change is needed.
    • Ensures the predictor stays in sync by setting self.predictor.model.names = self.model.names.
  • More robust GPU auto-selection under multi-process starts 🎲🖥️
    • Adds a random tie-break when GPUs look equally idle, reducing the chance that multiple jobs pick the same GPU at launch (ultralytics/utils/autodevice.py).
  • Fix disk caching for grayscale/multispectral images 💾🖼️
    • Disk cache now respects the dataset’s OpenCV read mode (flags=self.cv2_flag), preventing cached .npy files from silently changing input format (ultralytics/data/base.py).
  • Fix AutoBatch for non-RGB inputs (grayscale/multispectral) 🧪⚙️
    • AutoBatch profiling now uses the model’s configured input channels (model.yaml["channels"]) instead of assuming 3-channel RGB (ultralytics/utils/autobatch.py).
  • Tests: better grayscale coverage + cleanup 🧪🧹
    • Adds CUDA training coverage for coco8-grayscale.yaml, uses cache="disk" in grayscale tests, and cleans up cached .npy files to prevent flaky test interactions.
  • Docs/examples updated to YOLO26 naming 📝🚀
    • Exporter and error-message examples now reference YOLO26 (recommended) instead of YOLO11 (e.g., yolo26n.onnx, yolo26n_openvino_model, etc.).
  • Confusion matrix plot fixes for classification 📉✅
    • Removes unintended “background” labeling behavior for classification confusion matrices and makes tick labeling more robust for large class counts (ultralytics/utils/metrics.py).
  • Minor tracker cleanup 🧩
    • Simplifies deque initialization in BoT-SORT tracker (ultralytics/trackers/bot_sort.py).
  • Docker dependency tweak 🐳
    • Swaps wandb for nvidia-ml-py in the Dockerfile to better support NVIDIA GPU querying/metrics in container builds.

🎯 Purpose & Impact (why it matters)

  • Faster, more stable YOLOE-26 inference loops 🚀
    If you repeatedly run predictions with the same text prompts/classes, v8.4.12 avoids unnecessary reconfiguration and embedding regeneration—improving performance and reducing potential side effects.
  • More reliable multi-job GPU usage 🖥️
    When launching multiple trainings/inference processes at once, GPU selection is less likely to “pile onto” the same device due to tie conditions.
  • Better support for grayscale/multispectral workflows 🖤🤍
    Training with cache="disk" and using AutoBatch on non-3-channel inputs is now more correct and consistent—reducing mismatches, mis-profiling, and possible crashes.
  • Clearer docs aligned with the recommended model 📘
    Updated examples reduce copy/paste confusion by pointing users to YOLO26, the latest stable and recommended Ultralytics model family.

What's Changed

Full Changelog: v8.4.11...v8.4.12

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.