Transformers have recently gained attention in the computer vision domain due to their ability to model long-range dependencies. However, the self-attention mechanism, which is the core part of the Transformer model, usually suffers from quadratic computational complexity with respect to the number of tokens. Many architectures attempt to reduce model complexity by limiting the self-attention mechanism to local regions or by redesigning the tokenization process. In this paper, we propose DAE-Former, a novel method that seeks to provide an alternative perspective by efficiently designing the self-attention mechanism. More specifically, we reformulate the self-attention mechanism to capture both spatial and channel relations across the whole feature dimension while staying computationally efficient. Furthermore, we redesign the skip connection path by including the cross-attention module to ensure the feature reusability and enhance the localization power. Our method outperforms state-of-the-art methods on multi-organ cardiac and skin lesion segmentation datasets without requiring pre-training weights. The code is publicly available at https://github.com/mindflow-institue/DAEFormer.
翻译:最近,由于能够模拟远距离依赖性,在计算机视野领域,变异器最近引起了人们的关注。然而,作为变异器模型核心部分的自留机制,通常在象征性数量方面有四重计算的复杂性。许多结构试图通过将自留机制限制在本地区域或通过重新设计象征性化过程来降低模型的复杂性。我们在本文件中建议DAE-Former,这是一种新颖的方法,它寻求通过高效设计自留机制提供另一种视角。更具体地说,我们重新配置自留机制,以便在保持计算效率的同时捕捉整个功能层面的空间和频道关系。此外,我们重新设计跳过连接路径,将交叉注意模块包括在内,以确保特性的可重复性并加强本地化能力。我们的方法比多机型心脏和皮肤红外分解数据集的先进方法要强,而不需要培训前的重量。该代码公布在 https://github.com/mindfrrent-instime/DAEFORmer。