New Release: Ultralytics v8.3.181

Title: Ultralytics v8.3.181 — Faster FP16 for SAM/SAM2, YOLOE precision/stability, and more

Summary
Ultralytics v8.3.181 delivers safer, faster mixed-precision (FP16) for SAM/SAM2 and improved dtype/device consistency across YOLOE. It also brings reliability fixes to validation exports, source loading (CSV), single-class training, and upgrades to Streamlit Live Inference. Ideal for users looking for speed on modern GPUs and more predictable precision behavior across pipelines.

What’s new in v8.3.181

  • Safer, faster FP16 support for SAM and SAM2
  • Improved dtype/device consistency and half-precision propagation for YOLOE
  • Unified and accurate validation exports across detect, OBB, pose, and segment
  • CSV source support for inference and improved Streamlit Live Inference compatibility
  • Single-class training reliability restored

New Features

  • SAM FP16 support and unified dtype handling (priority)

    • PR: #21735 by @Laughing-q
    • Enables half-precision inference for SAM with consistent dtype handling across blocks, encoders, decoders, utils, and prediction paths.
    • Predictor normalizes before casting; dtype now respects args.half. Unified torch_dtype for prompts/masks/buffers.
  • SAM2 robustness without high_res_features

    • PR: #21726 by @Laughing-q
    • Decoder gracefully falls back when high-res features are absent; supports tensor or dict feature inputs.

Improvements

  • YOLOE device/half propagation and stability

    • PR: #21670 by @RizwanMunawar
    • Predict now forwards device/half flags; prompt tensors follow model precision; simplified softmax casting for consistency.
  • Validation export consistency across tasks

    • PR: #21719 by @Y-T-G
    • New scale_preds unifies scaling to original image sizes for detect, OBB, pose, and segment before saving JSON/TXT.
  • Streamlit Live Inference improvements

    • PR: #21553 by @RizwanMunawar
    • Accepts .pt, .onnx, .torchscript, .mlpackage, .engine, and OpenVINO formats; respects full user-provided paths.
  • YOLOE docs enhancements

    • PR: #21728 by @picsalex
    • Clearer fine-tuning, linear probing, and export examples; minor classification docs fix.

Bug Fixes

  • YOLOE visual prompt predictor switching

    • PR: #21731 by @Y-T-G
    • Predictor instance correctly switches after initialization when using visual prompts.
  • Single-class training compatibility

    • PR: #21725 by @Y-T-G
    • Restores classes with single_cls by constraining max class index to 0 without mutating labels.
  • CSV source support for inference

    • PR: #21729 by @Y-T-G
    • Dataloaders now accept .csv lists with whitespace-safe parsing.

Purpose & Impact

  • Faster inference on modern GPUs
    • FP16 for SAM reduces memory and can speed up inference on compatible hardware.
  • Greater numerical stability
    • Consistent dtype/device handling across SAM/SAM2 and YOLOE reduces precision mismatches and surprise casts.
  • More robust segmentation and visual prompting workflows
    • SAM2 runs even without high-res features; YOLOE reliably respects device/half and switches predictors properly.
  • Accurate validation exports
    • Outputs now consistently reflect original image sizes across tasks.
  • Easier deployment and input management
    • CSV sources work out of the box; Live Inference handles multiple model formats seamlessly.
  • Smoother single-class training
    • Eliminates spurious “class exceeds count” errors.

What’s Changed (PRs and Authors)

Getting Started

  • Upgrade: pip install -U ultralytics
  • Try FP16 with SAM/SAM2 or YOLOE:
    • CLI: yolo predict model=sam_b.pt source=path/to/images half=True
    • Python:
      from ultralytics import YOLO
      model = YOLO(“sam_b.pt”)
      results = model.predict(“image.jpg”, half=True)
  • Validate with consistent exports:
    • yolo val model=yolo11n.pt data=coco8.yaml save_json=True save_txt=True

Feedback Welcome
We’d love your feedback on FP16 behavior, validation exports, CSV sources, and Live Inference. Share issues, suggestions, or benchmarks in GitHub Discussions or open an Issue if you hit a bug. Your input helps the YOLO community and Ultralytics team keep improving.

Links

Thanks to all contributors and users who tested and shared feedback—this release is shaped by the community. Enjoy v8.3.181!