🌟 Summary
FastSAM gets a reliable mask-resizing fix and a cleaner, built-in CLIP integration for prompt-based segmentation—improving accuracy, stability, and ease of use. 🚀🖼️
📊 Key Changes
- 🧩 FastSAM mask upsampling fix
- Masks are now converted to float before upsampling and then thresholded back to byte: ensures accurate, error-free resizing during prompts.
- 🤖 Built-in CLIP integration
- Replaced external CLIP dependency with the internal
ultralytics.nn.text_model.CLIP
, standardizing image/text feature extraction and similarity scoring.
- Replaced external CLIP dependency with the internal
- 🔧 Version bump
- Updated package version to
8.3.219
.
- Updated package version to
Reference: See the current PR FastSAM masks .float() upsampling fix (PR #22460) by @Y-T-G.
🎯 Purpose & Impact
- ✅ More accurate segmentation prompts
- Prevents artifacts and type-related errors during mask resizing, yielding cleaner, more reliable masks in FastSAM workflows.
- 🛡️ Improved robustness and compatibility
- Reduces issues across different PyTorch versions and image sizes by using correct tensor types and thresholding.
- 🧱 Simpler, more reliable text prompts
- Built-in CLIP removes ad-hoc installs and runtime imports, improving setup speed, offline usability, and consistency across environments.
- 💼 No action needed for most users
- Existing FastSAM usage benefits automatically; prompt-based segmentation should be more stable out of the box.
What's Changed
Full Changelog: v8.3.218...v8.3.219