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

要約

本論文では、SAM(Segment Anything Model)の画像解像度のばらつきの問題に取り組む。SAMはそのゼロショット汎化可能性で知られているが、画像サイズが変化するデータセットに直面すると性能劣化を示す。これまでのアプローチでは、画像を固定サイズにリサイズするか、構造の変更を採用する傾向があり、SAMの豊富な事前知識の保存を妨げている。また、このようなタスクに特化したチューニングは、モデルの完全な再トレーニングを必要とするため、コストがかかり、下流のタスクに展開するには受け入れがたい。本論文では、この問題を長さの外挿問題として再定式化する。トークン列の長さは、異なるサイズの画像に対して一貫したパッチサイズを維持しながら変化する。この目的のために、SAMの様々な画像解像度への適応性を高めつつ、構造変更の必要性をなくす、スケーラブル・バイアスモード・アテンションマスク(BA-SAM)を提案する。まず、トークン列の長さが変わってもアテンション層のドット積値の一貫した大きさを保証するために、新しいスケーリング係数を導入する。第二に、各トークンが近傍の情報を優先するバイアスモードの注意マスクを提示し、訓練されていない遠方情報の影響を緩和する。我々のBA-SAMは、ゼロショットと微調整の2つのシナリオで有効性を示す。DIS5K、DUTS、ISIC、COD10K、COCOを含む多様なデータセットでの広範な評価により、ゼロショット設定での性能劣化を大幅に緩和し、最小限の微調整で最先端の性能を達成する能力が明らかになった。さらに、一般化されたモデルとベンチマークを提案し、BA-SAMが4つのデータセット全てに同時に適用可能であることを示す。

要約(オリジナル)

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.

arxiv情報

著者 Yiran Song,Qianyu Zhou,Xiangtai Li,Deng-Ping Fan,Xuequan Lu,Lizhuang Ma
発行日 2024-01-04 15:34:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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