ChatPaper.aiChatPaper

Meno è Meglio: Attenzione Mirata per DETR Efficiente

Less is More: Focus Attention for Efficient DETR

July 24, 2023
Autori: Dehua Zheng, Wenhui Dong, Hailin Hu, Xinghao Chen, Yunhe Wang
cs.AI

Abstract

I modelli di tipo DETR hanno notevolmente migliorato le prestazioni dei rilevatori, superando persino i classici modelli convoluzionali. Tuttavia, il fatto che tutti i token vengano trattati in modo uguale senza distinzione comporta un carico computazionale ridondante nella tradizionale struttura dell'encoder. Le recenti strategie di sparsificazione sfruttano un sottoinsieme di token informativi per ridurre la complessità dell'attenzione, mantenendo le prestazioni attraverso l'encoder sparso. Tuttavia, questi metodi tendono a basarsi su statistiche del modello non affidabili. Inoltre, la semplice riduzione della popolazione di token compromette in larga misura le prestazioni di rilevamento, limitando l'applicazione di questi modelli sparsi. Proponiamo Focus-DETR, che concentra l'attenzione su token più informativi per un migliore compromesso tra efficienza computazionale e accuratezza del modello. Nello specifico, ricostruiamo l'encoder con un'attenzione duale, che include un meccanismo di punteggio dei token che considera sia la localizzazione che le informazioni semantiche delle categorie degli oggetti da mappe di caratteristiche multi-scala. Abbandoniamo efficientemente le query di sfondo e miglioriamo l'interazione semantica delle query di oggetti a grana fine basandoci sui punteggi. Rispetto ai migliori rilevatori sparsi di tipo DETR nelle stesse condizioni, il nostro Focus-DETR ottiene una complessità comparabile raggiungendo 50.4AP (+2.2) su COCO. Il codice è disponibile su https://github.com/huawei-noah/noah-research/tree/master/Focus-DETR e 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.
PDF70December 15, 2024