paper-with-me

홈 › Papers

BiFormer: Vision Transformer with Bi-Level Routing Attention

2023-03-15 · CVPR 2023 1 · Lei Zhu, Xinjiang Wang, Zhanghan Ke, Wayne Zhang, Rynson Lau

As the core building block of vision transformers, attention is a powerful tool to capture long-range dependency. However, such power comes at a cost: it incurs a huge computation burden and heavy memory footprint as pairwise token interaction across all spatial locations is computed. A series of works attempt to alleviate this problem by introducing handcrafted and content-agnostic sparsity into attention, such as restricting the attention operation to be inside local windows, axial stripes, or dilated windows. In contrast to these approaches, we propose a novel dynamic sparse attention via bi-level routing to enable a more flexible allocation of computations with content awareness. Specifically, for a query, irrelevant key-value pairs are first filtered out at a coarse region level, and then fine-grained token-to-token attention is applied in the union of remaining candidate regions (\ie, routed regions). We provide a simple yet effective implementation of the proposed bi-level routing attention, which utilizes the sparsity to save both computation and memory while involving only GPU-friendly dense matrix multiplications. Built with the proposed bi-level routing attention, a new general vision transformer, named BiFormer, is then presented. As BiFormer attends to a small subset of relevant tokens in a \textbf{query adaptive} manner without distraction from other irrelevant ones, it enjoys both good performance and high computational efficiency, especially in dense prediction tasks. Empirical results across several computer vision tasks such as image classification, object detection, and semantic segmentation verify the effectiveness of our design. Code is available at \url{https://github.com/rayleizhu/BiFormer}.

📄 PDF Abstract BibTeX arXiv:2303.08810

Code (3)

rayleizhu/biformer 공식 구현 pytorch
chenller/mmseg-extension pytorch
https://gitlab.com/birder/birder pytorch

Tasks

Computational EfficiencyGPUimage-classificationImage Classificationobject-detectionObject DetectionSemantic Segmentation

Similar Papers 제목 키워드 기반

DeBiFormer: Vision Transformer with Deformable Agent Bi-level Routing Attention

2024-10-11 · Nguyen Huu Bao Long, Chenyu Zhang, Yuzhi Shi, Tsubasa Hirakawa 외

Vision Transformers with various attention modules have demonstrated superior performance on vision tasks. While using sparsity-adaptive attention, such as in DAT, has yielded strong results in image classification, the …

image-classificationImage Classificationobject-detectionObject Detection+1

OBIFormer: A Fast Attentive Denoising Framework for Oracle Bone Inscriptions

2025-04-18 · Jinhao Li, Zijian Chen, Tingzhu Chen, Zhiji Liu 외

Oracle bone inscriptions (OBIs) are the earliest known form of Chinese characters and serve as a valuable resource for research in anthropology and archaeology. However, most excavated fragments are severely degraded due…

DenoisingSSIM

HYATT-Net is Grand: A Hybrid Attention Network for Performant Anatomical Landmark Detection

2024-12-09 · Xiaoqian Zhou, Zhen Huang, Heqin Zhu, Qingsong Yao 외

Anatomical landmark detection (ALD) from a medical image is crucial for a wide array of clinical applications. While existing methods achieve quite some success in ALD, they often struggle to balance global context with …

Anatomical Landmark DetectionAnatomyComputational Efficiency

BiFormer: Learning Bilateral Motion Estimation via Bilateral Transformer for 4K Video Frame Interpolation

2023-04-05 · CVPR 2023 6 · Junheum Park, Jintae Kim, Chang-Su Kim

A novel 4K video frame interpolator based on bilateral transformer (BiFormer) is proposed in this paper, which performs three steps: global motion estimation, local motion refinement, and frame synthesis. First, in globa…

4kMotion EstimationVideo Frame Interpolation

Pubic Symphysis-Fetal Head Segmentation Network Using BiFormer Attention Mechanism and Multipath Dilated Convolution

2024-10-14 · Pengzhou Cai, Lu Jiang, Yanxin Li, Xiaojuan Liu 외

Pubic symphysis-fetal head segmentation in transperineal ultrasound images plays a critical role for the assessment of fetal head descent and progression. Existing transformer segmentation methods based on sparse attenti…

DecoderImage SegmentationSegmentationSemantic Segmentation