BA-SAM: Scalable Bias-Mode Attention Mask for Segment Anything Model

要約

このペーパーでは、Segment Anything Model (SAM) の画像解像度の変動に関する課題に取り組みます。
SAM はゼロショット汎化性で知られていますが、さまざまな画像サイズのデータ​​セットに直面するとパフォーマンスが低下します。
これまでのアプローチでは、画像を固定サイズに変更するか、構造の変更を採用する傾向があり、SAM の豊富な事前知識の保存を妨げていました。
さらに、このようなタスク固有の調整にはモデルの完全な再トレーニングが必要ですが、これはコストが高くつき、下流タスクでの展開には受け入れられません。
この論文では、この問題を長さの外挿問題として再定式化します。この問題では、さまざまなサイズの画像に対して一貫したパッチ サイズを維持しながら、トークン シーケンスの長さが変化します。
この目的を達成するために、構造変更の必要性を排除しながら、さまざまな画像解像度に対する SAM の適応性を強化するために、スケーラブル バイアス モード アテンション マスク (BA-SAM) を提案します。
まず、トークン シーケンスの長さが変化したときにアテンション レイヤーの内積値の一貫した大きさを確保するために、新しいスケーリング係数を導入します。
次に、各トークンが近隣の情報を優先し、トレーニングされていない遠くの情報の影響を軽減できるようにするバイアス モード アテンション マスクを提示します。
当社の BA-SAM は、ゼロショットと微調整という 2 つのシナリオで有効性を実証します。
DIS5K、DUTS、ISIC、COD10K、COCO などのさまざまなデータセットに対する広範な評価により、ゼロショット設定でのパフォーマンス低下を大幅に軽減し、最小限の微調整で最先端のパフォーマンスを達成できることが明らかになりました。
さらに、一般化されたモデルとベンチマークを提案し、4 つのデータセットすべてにわたる BA-SAM の一般化可能性を同時に示します。
コードは https://github.com/zongzi13545329/BA-SAM で入手できます。

要約(オリジナル)

In this paper, we address the challenge of image resolution variation for the Segment Anything Model (SAM). SAM, known for its zero-shot generalizability, exhibits a performance degradation when faced with datasets with varying image sizes. Previous approaches tend to resize the image to a fixed size or adopt structure modifications, hindering the preservation of SAM’s rich prior knowledge. Besides, such task-specific tuning necessitates a complete retraining of the model, which is cost-expensive and unacceptable for deployment in the downstream tasks. In this paper, we reformulate this issue as a length extrapolation problem, where token sequence length varies while maintaining a consistent patch size for images of different sizes. To this end, we propose Scalable Bias-Mode Attention Mask (BA-SAM) to enhance SAM’s adaptability to varying image resolutions while eliminating the need for structure modifications. Firstly, we introduce a new scaling factor to ensure consistent magnitude in the attention layer’s dot product values when the token sequence length changes. Secondly, we present a bias-mode attention mask that allows each token to prioritize neighboring information, mitigating the impact of untrained distant information. Our BA-SAM demonstrates efficacy in two scenarios: zero-shot and fine-tuning. Extensive evaluation on diverse datasets, including DIS5K, DUTS, ISIC, COD10K, and COCO, reveals its ability to significantly mitigate performance degradation in the zero-shot setting and achieve state-of-the-art performance with minimal fine-tuning. Furthermore, we propose a generalized model and benchmark, showcasing BA-SAM’s generalizability across all four datasets simultaneously. Code is available at https://github.com/zongzi13545329/BA-SAM

arxiv情報

著者 Yiran Song,Qianyu Zhou,Xiangtai Li,Deng-Ping Fan,Xuequan Lu,Lizhuang Ma
発行日 2024-03-20 02:03:52+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV パーマリンク