π Summary
The v8.2.73 release of Ultralytics introduces significant updates to the Segment Anything Model (SAM) architecture, including new support for SAM 2, which enhances real-time image segmentation capabilities and documentation improvements.
π Key Changes
- **Addition of SAM 2 Models**: Introduced new methods for building various SAM 2 models, including `build_sam2_t`, `build_sam2_s`, `build_sam2_b`, and `build_sam2_l`.
- **Enhanced Documentation**: Added comprehensive documentation for SAM and SAM 2 modules, including blocks, decoders, encoders, and memory attention modules.
- **Updated Predictors**: Integrated SAM2Predictor for advanced segmentation prediction, enhancing the overall prediction framework.
- **Expanded API References**: Updated the API references to include new SAM2 modules and their functionalities, ensuring better clarity and usability for developers.
π― Purpose & Impact
- **Improved Segmentation Capabilities**: The addition of SAM 2 models significantly enhances the real-time image segmentation capabilities, allowing users to leverage advanced features for more accurate and efficient segmentation tasks.
- **Comprehensive Documentation**: The improved and expanded documentation provides detailed references and examples for both SAM and SAM 2 models, making it easier for users to understand and implement the models in their projects.
- **Upgraded Prediction Framework**: The integration of SAM2Predictor ensures that the prediction framework is robust and capable of handling advanced segmentation tasks, benefiting users with more reliable and efficient predictions.
π§ Technical Details
- **Model Initialization**: Enhanced the initialization and building process for SAM and SAM 2 models, ensuring that the models are correctly configured with the specified architecture parameters.
- **Attention Mechanisms**: Improved attention mechanisms with the introduction of SAM2TwoWayAttentionBlock and SAM2TwoWayTransformer, providing more efficient attention computations in the models.
What's Changed
* `ultralytics 8.2.73` Meta SAM2 Refactor by Laughing-q in https://github.com/ultralytics/ultralytics/pull/14867
**Full Changelog**: https://github.com/ultralytics/ultralytics/compare/v8.2.72...v8.2.73