Change8

v4.51.3-SAM-HQ-preview

📦 transformersView on GitHub →
5 features🔧 2 symbols

Summary

This release introduces a preview of SAM-HQ, an enhancement to the Segment Anything Model that provides higher quality segmentation masks with minimal additional parameters.

Migration Steps

  1. Install the preview version using: pip install git+https://github.com/huggingface/transformers@v4.51.3-SAM-HQ-preview

✨ New Features

  • Introduction of SAM-HQ (High-Quality Segment Anything Model) for improved mask prediction quality.
  • High-Quality Output Token injected into the mask decoder for fine-grained segmentation.
  • Global-local Feature Fusion combining early and final ViT features with mask-decoder features.
  • Support for predicting high-quality masks using 2D points and/or bounding boxes.
  • Ability to process custom segmentation maps alongside input images in the processor.

🔧 Affected Symbols

SamHQModelSamHQProcessor