Fast SAM2 with Text-Driven Token Pruning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Mandal, Avilasha, Zhang, Chaoning, Puspitasari, Fachrina Dewi, Wang, Xudong, Zhang, Jiaquan, Qin, Caiyan, Wang, Guoqing, Yang, Yang, Shen, Heng Tao
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914219135336448
author Mandal, Avilasha
Zhang, Chaoning
Puspitasari, Fachrina Dewi
Wang, Xudong
Zhang, Jiaquan
Qin, Caiyan
Wang, Guoqing
Yang, Yang
Shen, Heng Tao
author_facet Mandal, Avilasha
Zhang, Chaoning
Puspitasari, Fachrina Dewi
Wang, Xudong
Zhang, Jiaquan
Qin, Caiyan
Wang, Guoqing
Yang, Yang
Shen, Heng Tao
contents Segment Anything Model 2 (SAM2), a vision foundation model has significantly advanced in prompt-driven video object segmentation, yet their practical deployment remains limited by the high computational and memory cost of processing dense visual tokens across time. The SAM2 pipelines typically propagate all visual tokens produced by the image encoder through downstream temporal reasoning modules, regardless of their relevance to the target object, resulting in reduced scalability due to quadratic memory attention overhead. In this work, we introduce a text-guided token pruning framework that improves inference efficiency by selectively reducing token density prior to temporal propagation, without modifying the underlying segmentation architecture. Operating after visual encoding and before memory based propagation, our method ranks tokens using a lightweight routing mechanism that integrates local visual context, semantic relevance derived from object-centric textual descriptions (either user-provided or automatically generated), and uncertainty cues that help preserve ambiguous or boundary critical regions. By retaining only the most informative tokens for downstream processing, the proposed approach reduces redundant computation while maintaining segmentation fidelity. Extensive experiments across multiple challenging video segmentation benchmarks demonstrate that post-encoder token pruning provides a practical and effective pathway to efficient, prompt-aware video segmentation, achieving up to 42.50 percent faster inference and 37.41 percent lower GPU memory usage compared to the unpruned baseline SAM2, while preserving competitive J and F performance. These results highlight the potential of early token selection to improve the scalability of transformer-based video segmentation systems for real-time and resource-constrained applications.
format Preprint
id arxiv_https___arxiv_org_abs_2512_21333
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Fast SAM2 with Text-Driven Token Pruning
Mandal, Avilasha
Zhang, Chaoning
Puspitasari, Fachrina Dewi
Wang, Xudong
Zhang, Jiaquan
Qin, Caiyan
Wang, Guoqing
Yang, Yang
Shen, Heng Tao
Computer Vision and Pattern Recognition
Segment Anything Model 2 (SAM2), a vision foundation model has significantly advanced in prompt-driven video object segmentation, yet their practical deployment remains limited by the high computational and memory cost of processing dense visual tokens across time. The SAM2 pipelines typically propagate all visual tokens produced by the image encoder through downstream temporal reasoning modules, regardless of their relevance to the target object, resulting in reduced scalability due to quadratic memory attention overhead. In this work, we introduce a text-guided token pruning framework that improves inference efficiency by selectively reducing token density prior to temporal propagation, without modifying the underlying segmentation architecture. Operating after visual encoding and before memory based propagation, our method ranks tokens using a lightweight routing mechanism that integrates local visual context, semantic relevance derived from object-centric textual descriptions (either user-provided or automatically generated), and uncertainty cues that help preserve ambiguous or boundary critical regions. By retaining only the most informative tokens for downstream processing, the proposed approach reduces redundant computation while maintaining segmentation fidelity. Extensive experiments across multiple challenging video segmentation benchmarks demonstrate that post-encoder token pruning provides a practical and effective pathway to efficient, prompt-aware video segmentation, achieving up to 42.50 percent faster inference and 37.41 percent lower GPU memory usage compared to the unpruned baseline SAM2, while preserving competitive J and F performance. These results highlight the potential of early token selection to improve the scalability of transformer-based video segmentation systems for real-time and resource-constrained applications.
title Fast SAM2 with Text-Driven Token Pruning
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2512.21333