arXiv:2507.08765cs.CVcs.AI2025-07被引 2

无需数据即可压缩SAM模型,速度超快且精度几乎不变。

Compress Any Segment Anything Model (SAM)

  • 提出Hyper-Compression算法,将高维参数压缩为低维标量。
  • 在COCO等3个数据集上实现5.17倍压缩率,性能损失小于1%。
  • 适合需要快速部署轻量级分割模型的开发者和工程师。

由于在零样本分割中表现出色,Segment Anything Model(SAM)及其变体已被广泛应用于医疗健康、智能制造等领域。因此,高效压缩SAM成为迫切需求。本文提出Birkhoff,一种全新的无数据压缩算法,适用于SAM及其变体。与量化、剪枝、蒸馏等方法不同,Birkhoff具备跨模型类型兼容性、部署敏捷性、原模型保真度和模型紧凑性。其核心是提出超压缩(Hyper-Compression)算法,通过寻找密集轨迹将高维参数向量映射为低维标量。同时设计专用线性层算子HyperLinear,融合解压缩与矩阵乘法,显著加速推理。在COCO、LVIS和SA-1B共18个SAM模型上的实验表明,Birkhoff在压缩时间、压缩比、压缩后性能和推理速度方面均表现稳定且优异。例如,对SAM2-B可实现5.17倍压缩比,性能下降不足1%,且无需微调数据;所有模型压缩均在60秒内完成。

原文摘要 · Abstract (English)

Due to the excellent performance in yielding high-quality, zero-shot segmentation, Segment Anything Model (SAM) and its variants have been widely applied in diverse scenarios such as healthcare and intelligent manufacturing. Therefore, effectively compressing SAMs has become an increasingly pressing practical need. In this study, we propose Birkhoff, a novel data-free compression algorithm for SAM and its variants. Unlike quantization, pruning, distillation, and other compression methods, Birkhoff embodies versatility across model types, agility in deployment, faithfulness to the original model, and compactness in model size. Specifically, Birkhoff introduces a novel compression algorithm: Hyper-Compression, whose core principle is to find a dense trajectory to turn a high-dimensional parameter vector into a low-dimensional scalar. Furthermore, Birkhoff designs a dedicated linear layer operator, HyperLinear, to fuse decompression and matrix multiplication to significantly accelerate inference of the compressed SAMs. Extensive experiments on 18 SAMs in the COCO, LVIS, and SA-1B datasets show that Birkhoff performs consistently and competitively in compression time, compression ratio, post-compression performance, and inference speed. For example, Birkhoff can achieve a compression ratio of 5.17x on SAM2-B, with less than 1% performance drop without using any fine-tuning data. Moreover, the compression is finished within 60 seconds for all models.

模型压缩分割模型无数据压缩SAM

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。