arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.02109cs.CVcs.AI

HRSAM:高分辨率图像中的高效交互式分割

HRSAM: Efficient Interactive Segmentation in High-Resolution Images

Xiamen University(厦门大学)

You Huang, Wenbin Lai, Jiayi Ji, Liujuan Cao, Shengchuan Zhang, Rongrong Ji

AI总结:

本文提出轻量级模型HRSAM,通过视觉长度外推、Flexible Local Attention框架及Cycle-scan模块,在高分辨率交互式分割中以更低延迟超越SOTA。

摘要:

Segment Anything Model(SAM)推动了交互式分割的发展,但在高分辨率图像上受限于高昂的计算成本。这要求进行下采样以满足GPU约束,从而牺牲了高精度交互式分割所需的细粒度细节。为解决SAM的局限性,我们聚焦于视觉长度外推,并提出一个名为HRSAM的轻量级模型。该外推能力使在低分辨率上训练的HRSAM能够泛化到高分辨率。我们首先发现外推与注意力分数之间的联系,这促使我们将HRSAM建立在Swin注意力之上。随后,我们引入Flexible Local Attention(FLA)框架,利用CUDA优化的Efficient Memory Attention来加速HRSAM。在FLA中,我们实现了Flash Swin注意力,相比传统Swin注意力实现了超过35%的加速,并提出一种仅对KV进行填充的机制以增强外推能力。我们还开发了Cycle-scan模块,利用State Space模型高效扩展HRSAM的感受野。我们进一步在FLA中开发了HRSAM++,通过添加锚点图,以轻微的计算代价为外推提供多尺度数据增强和更大的感受野。实验表明,在标准训练下,HRSAM系列仅以38%的延迟超越了此前的SOTA。借助SAM蒸馏,外推能力使HRSAM系列在更低延迟下优于教师模型。进一步微调后,其性能显著超过此前的SOTA。

英文摘要:

The Segment Anything Model (SAM) has advanced interactive segmentation but is limited by the high computational cost on high-resolution images. This requires downsampling to meet GPU constraints, sacrificing the fine-grained details needed for high-precision interactive segmentation. To address SAM's limitations, we focus on visual length extrapolation and propose a lightweight model named HRSAM. The extrapolation enables HRSAM trained on low resolutions to generalize to high resolutions. We begin by finding the link between the extrapolation and attention scores, which leads us to base HRSAM on Swin attention. We then introduce the Flexible Local Attention (FLA) framework, using CUDA-optimized Efficient Memory Attention to accelerate HRSAM. Within FLA, we implement Flash Swin attention, achieving over a 35% speedup compared to traditional Swin attention, and propose a KV-only padding mechanism to enhance extrapolation. We also develop the Cycle-scan module that uses State Space models to efficiently expand HRSAM's receptive field. We further develop the HRSAM++ within FLA by adding an anchor map, providing multi-scale data augmentation for the extrapolation and a larger receptive field at slight computational cost. Experiments show that, under standard training, HRSAMs surpass the previous SOTA with only 38% of the latency. With SAM-distillation, the extrapolation enables HRSAMs to outperform the teacher model at lower latency. Further finetuning achieves performance significantly exceeding the previous SOTA.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑