pypi ultralytics 8.3.182
v8.3.182 - `ultralytics 8.3.182` Enable type-checking with `py.typed` marker (#21698)

latest releases: 8.3.194, 8.3.193, 8.3.192...
17 days ago

🌟 Summary

Ultralytics 8.3.182 declares the package as “partially typed” for better IDE/type-checker support, plus key robustness and usability tweaks for SAM image sizing and mask plotting. 🧩✨

📊 Key Changes

  • Packaging: Added py.typed with a “partial” marker to enable static type checking tools (mypy/pyright) 🏷️
  • SAM reliability: Synced predictor image size with the model and updated internal embedding size calculations to match imgsz changes, preventing shape mismatches 🧠
  • Plotting flexibility: Annotator.masks now accepts NumPy masks and works without a GPU tensor for easier CPU rendering 🎨
  • Docs clarity: imgsz documented as int; clarified rect behavior and how resizing differs for YOLO vs RTDETR models 📚
  • Version bump to 8.3.182 ✅

Tip: You can now plot masks on CPU without providing a torch image tensor:

  • annotator.masks(np_masks, colors, im_gpu=None, alpha=0.5)

See the Ultralytics Docs for details: https://docs.ultralytics.com

🎯 Purpose & Impact

  • Better developer experience: richer IDE autocompletion, fewer type-related false positives, clearer signals that typing is partial 🛠️
  • More robust SAM workflows: avoids feature map mismatches after changing imgsz and stabilizes mask/prompt behavior across batches 🛡️
  • Easier CPU-only visualization: plot segmentation masks directly with NumPy arrays—no GPU tensor required 🚀
  • Clearer training setup: reduced confusion around imgsz and rect across YOLO and RTDETR, leading to more predictable training outcomes 🧭
  • Safe upgrade: no behavioral changes to core training/inference; improvements are non-breaking and quality-of-life focused ✅

What's Changed

  • Fix argument type for imgsz and update rect description in docs by @Y-T-G in #21737
  • Support flexible imgsz for SAM2 tracking by @Laughing-q in #21743
  • Add numpy masks support to Annotator.masks method by @Laughing-q in #21744
  • ultralytics 8.3.182 Enable type-checking with py.typed marker by @Y-T-G in #21698

Full Changelog: v8.3.181...v8.3.182

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.