ChatPaper.aiChatPaper

TinySAM: Die Grenzen effizienter Segment-Anything-Modelle erweitern

TinySAM: Pushing the Envelope for Efficient Segment Anything Model

December 21, 2023
Autoren: Han Shu, Wenshuo Li, Yehui Tang, Yiman Zhang, Yihao Chen, Houqiang Li, Yunhe Wang, Xinghao Chen
cs.AI

Zusammenfassung

Kürzlich hat das Segment Anything Model (SAM) eine leistungsstarke Segmentierungsfähigkeit gezeigt und große Aufmerksamkeit in den Bereichen der Computer Vision auf sich gezogen. Zahlreiche Folgearbeiten haben verschiedene Anwendungen auf Basis des vortrainierten SAM entwickelt und beeindruckende Leistungen bei nachgelagerten Vision-Aufgaben erzielt. Allerdings besteht SAM aus schwergewichtigen Architekturen und erfordert massive Rechenkapazität, was die weitere Anwendung von SAM auf rechenbeschränkten Edge-Geräten behindert. Aus diesem Grund schlagen wir in diesem Artikel ein Framework vor, um ein kleines Segment Anything Model (TinySAM) zu erhalten, das die starke Zero-Shot-Leistung beibehält. Zunächst schlagen wir eine Full-Stage-Wissensdistillationsmethode mit einer Online-Hard-Prompt-Sampling-Strategie vor, um ein leichtgewichtiges Studentenmodell zu destillieren. Wir passen auch die Post-Training-Quantisierung an die promptbare Segmentierungsaufgabe an und reduzieren weiter die Rechenkosten. Darüber hinaus wird eine hierarchische Segmenting-Everything-Strategie vorgeschlagen, um die Everything-Inferenz um das Zweifache zu beschleunigen, bei nahezu keinem Leistungsverlust. Mit all diesen vorgeschlagenen Methoden führt unser TinySAM zu einer Reduzierung der Rechenleistung um Größenordnungen und setzt neue Maßstäbe für die effiziente Segment Anything-Aufgabe. Umfangreiche Experimente zu verschiedenen Zero-Shot-Transfer-Aufgaben demonstrieren die signifikant vorteilhafte Leistung unseres TinySAM im Vergleich zu Gegenstückmethoden. Vortrainierte Modelle und Codes werden unter https://github.com/xinghaochen/TinySAM und https://gitee.com/mindspore/models/tree/master/research/cv/TinySAM verfügbar sein.
English
Recently segment anything model (SAM) has shown powerful segmentation capability and has drawn great attention in computer vision fields. Massive following works have developed various applications based on the pretrained SAM and achieved impressive performance on downstream vision tasks. However, SAM consists of heavy architectures and requires massive computational capacity, which hinders the further application of SAM on computation constrained edge devices. To this end, in this paper we propose a framework to obtain a tiny segment anything model (TinySAM) while maintaining the strong zero-shot performance. We first propose a full-stage knowledge distillation method with online hard prompt sampling strategy to distill a lightweight student model. We also adapt the post-training quantization to the promptable segmentation task and further reduce the computational cost. Moreover, a hierarchical segmenting everything strategy is proposed to accelerate the everything inference by 2times with almost no performance degradation. With all these proposed methods, our TinySAM leads to orders of magnitude computational reduction and pushes the envelope for efficient segment anything task. Extensive experiments on various zero-shot transfer tasks demonstrate the significantly advantageous performance of our TinySAM against counterpart methods. Pre-trained models and codes will be available at https://github.com/xinghaochen/TinySAM and https://gitee.com/mindspore/models/tree/master/research/cv/TinySAM.
PDF151December 15, 2024