DualToken-ViT: Positionsbewusster effizienter Vision Transformer mit Dual-Token-Fusion
DualToken-ViT: Position-aware Efficient Vision Transformer with Dual Token Fusion
September 21, 2023
Autoren: Zhenzhen Chu, Jiayu Chen, Cen Chen, Chengyu Wang, Ziheng Wu, Jun Huang, Weining Qian
cs.AI
Zusammenfassung
Vision Transformer (ViTs) auf Basis von Self-Attention haben sich als äußerst wettbewerbsfähige Architektur in der Computer Vision etabliert. Im Gegensatz zu Convolutional Neural Networks (CNNs) ermöglichen ViTs den globalen Informationsaustausch. Mit der Entwicklung verschiedener ViT-Strukturen werden ViTs zunehmend vorteilhaft für viele Vision-Aufgaben. Allerdings führt die quadratische Komplexität der Self-Attention dazu, dass ViTs rechenintensiv sind, und ihr Mangel an induktiven Verzerrungen wie Lokalität und Translationsäquivarianz erfordert im Vergleich zu CNNs größere Modellgrößen, um visuelle Merkmale effektiv zu erlernen. In diesem Artikel schlagen wir ein leichtgewichtiges und effizientes Vision-Transformer-Modell namens DualToken-ViT vor, das die Vorteile von CNNs und ViTs nutzt. DualToken-ViT fusioniert effektiv den Token mit lokalen Informationen, die durch eine convolution-basierte Struktur gewonnen werden, und den Token mit globalen Informationen, die durch eine self-attention-basierte Struktur erzielt werden, um eine effiziente Aufmerksamkeitsstruktur zu erreichen. Darüber hinaus verwenden wir position-sensitive globale Token in allen Phasen, um die globalen Informationen zu bereichern, was die Wirkung von DualToken-ViT weiter verstärkt. Position-sensitive globale Token enthalten auch die Positionsinformationen des Bildes, was unser Modell besser für Vision-Aufgaben geeignet macht. Wir haben umfangreiche Experimente zu Bildklassifizierung, Objekterkennung und semantischer Segmentierung durchgeführt, um die Effektivität von DualToken-ViT zu demonstrieren. Auf dem ImageNet-1K-Datensatz erreichen unsere Modelle unterschiedlicher Größen Genauigkeiten von 75,4 % und 79,4 % mit nur 0,5G und 1,0G FLOPs, und unser Modell mit 1,0G FLOPs übertrifft LightViT-T, das globale Token verwendet, um 0,7 %.
English
Self-attention-based vision transformers (ViTs) have emerged as a highly
competitive architecture in computer vision. Unlike convolutional neural
networks (CNNs), ViTs are capable of global information sharing. With the
development of various structures of ViTs, ViTs are increasingly advantageous
for many vision tasks. However, the quadratic complexity of self-attention
renders ViTs computationally intensive, and their lack of inductive biases of
locality and translation equivariance demands larger model sizes compared to
CNNs to effectively learn visual features. In this paper, we propose a
light-weight and efficient vision transformer model called DualToken-ViT that
leverages the advantages of CNNs and ViTs. DualToken-ViT effectively fuses the
token with local information obtained by convolution-based structure and the
token with global information obtained by self-attention-based structure to
achieve an efficient attention structure. In addition, we use position-aware
global tokens throughout all stages to enrich the global information, which
further strengthening the effect of DualToken-ViT. Position-aware global tokens
also contain the position information of the image, which makes our model
better for vision tasks. We conducted extensive experiments on image
classification, object detection and semantic segmentation tasks to demonstrate
the effectiveness of DualToken-ViT. On the ImageNet-1K dataset, our models of
different scales achieve accuracies of 75.4% and 79.4% with only 0.5G and 1.0G
FLOPs, respectively, and our model with 1.0G FLOPs outperforms LightViT-T using
global tokens by 0.7%.