少ないほど良い:効率的なDETRのためのフォーカスアテンション
Less is More: Focus Attention for Efficient DETR
July 24, 2023
著者: Dehua Zheng, Wenhui Dong, Hailin Hu, Xinghao Chen, Yunhe Wang
cs.AI
要旨
DETRに似たモデルは、検出器の性能を大幅に向上させ、従来の畳み込みモデルを凌駕する成果を上げています。しかし、従来のエンコーダ構造では、すべてのトークンが区別なく平等に扱われるため、冗長な計算負荷が生じます。最近のスパース化戦略では、情報量の多いトークンのサブセットを活用して注意機構の複雑さを軽減し、スパースエンコーダを通じて性能を維持しています。しかし、これらの手法は信頼性の低いモデル統計に依存する傾向があります。さらに、単にトークンの数を減らすことは、検出性能を大きく低下させ、これらのスパースモデルの応用を制限します。我々は、計算効率とモデル精度のバランスをより良くするために、より情報量の多いトークンに注意を集中させるFocus-DETRを提案します。具体的には、マルチスケールの特徴マップから得られるオブジェクトの位置情報とカテゴリ意味情報の両方を考慮したトークンスコアリングメカニズムを含むデュアルアテンションでエンコーダを再構築します。これにより、背景クエリを効率的に排除し、スコアに基づいて細粒度のオブジェクトクエリの意味的相互作用を強化します。同じ設定での最先端のスパースDETRに似た検出器と比較して、我々のFocus-DETRは同等の複雑さを維持しながら、COCOで50.4AP(+2.2)を達成します。コードはhttps://github.com/huawei-noah/noah-research/tree/master/Focus-DETR および https://gitee.com/mindspore/models/tree/master/research/cv/Focus-DETR で公開されています。
English
DETR-like models have significantly boosted the performance of detectors and
even outperformed classical convolutional models. However, all tokens are
treated equally without discrimination brings a redundant computational burden
in the traditional encoder structure. The recent sparsification strategies
exploit a subset of informative tokens to reduce attention complexity
maintaining performance through the sparse encoder. But these methods tend to
rely on unreliable model statistics. Moreover, simply reducing the token
population hinders the detection performance to a large extent, limiting the
application of these sparse models. We propose Focus-DETR, which focuses
attention on more informative tokens for a better trade-off between computation
efficiency and model accuracy. Specifically, we reconstruct the encoder with
dual attention, which includes a token scoring mechanism that considers both
localization and category semantic information of the objects from multi-scale
feature maps. We efficiently abandon the background queries and enhance the
semantic interaction of the fine-grained object queries based on the scores.
Compared with the state-of-the-art sparse DETR-like detectors under the same
setting, our Focus-DETR gets comparable complexity while achieving 50.4AP
(+2.2) on COCO. The code is available at
https://github.com/huawei-noah/noah-research/tree/master/Focus-DETR and
https://gitee.com/mindspore/models/tree/master/research/cv/Focus-DETR.