pypi ultralytics 8.3.180
v8.3.180 - `ultralytics 8.3.180` new `inference_features` method for SAM models (#21708)

latest releases: 8.3.191, 8.3.190, 8.3.189...
15 days ago

๐ŸŒŸ Summary

SAM/SAM2 get a new feature-based inference path with standardized tensor outputs, smarter prompt scaling, and a cleaner API โ€” making segmentation faster to integrate and more consistent end-to-end. ๐Ÿš€

๐Ÿ“Š Key Changes

  • SAM/SAM2: Added inference_features API to run decoding directly from image features (no full image pass required) ๐Ÿง โšก
  • Unified outputs: masks and scores now return torch.Tensor (instead of numpy) for consistent PyTorch workflows ๐Ÿงฑ
  • Improved prompt handling: _prepare_prompts now takes src_shape and dst_shape for accurate scaling across pipelines ๐ŸŽฏ
  • Refactor & cleanup: SAM2 duplicate prompt_inference path removed; shared feature-based logic used for both models ๐Ÿงน
  • New utilities:
    • _inference_features internal helpers for SAM and SAM2
    • Public inference_features returning masks and xyxy boxes with scores ๐Ÿ“ฆ
  • Docs fixes and enhancements:
    • Corrected SAM predictor example labels format ๐Ÿ“
    • Added a Comet ML tutorial video for YOLO11 integration ๐ŸŽฅ
  • Downloader improvements: multi-threaded downloads show progress, clearer logs, and no curl dependency in VOC/VisDrone datasets ๐Ÿ“ฅ
  • CI/Infra: actions/checkout updated to v5; SBOM generation made more reliable via a dedicated venv ๐Ÿ› ๏ธ

๐ŸŽฏ Purpose & Impact

  • Faster pipelines and easier integration: Feature-level inference lets advanced users cache encoder outputs and run multiple prompt decodes without re-encoding images, reducing latency and compute costs ๐Ÿš„
  • More robust, less brittle code: Standardized tensor outputs simplify downstream processing, batching, and device management โœ…
  • Higher accuracy in prompt placement: Explicit source/destination shapes ensure prompts scale correctly, improving segmentation quality across varied image sizes ๐ŸŽฏ
  • Cleaner APIs for SAM/SAM2: Reduced duplication and consistent methods make it easier to build on top of SAM models and maintain custom workflows ๐Ÿงฉ
  • Better user experience: Clearer docs and examples reduce errors; improved download feedback and reliability save time and headaches โฑ๏ธ
  • Stronger CI and compliance posture: Updated actions and SBOM workflow enhance build reliability and security readiness ๐Ÿ”’

What's Changed

Full Changelog: v8.3.179...v8.3.180

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.