All families

DaViT

6 models, image classification. Fewest parameters first.

DaViT, the Dual Attention Vision Transformer, is a vision backbone that captures global context while keeping computation efficient. Its trick is to run self-attention two ways: over spatial tokens, where the spatial dimension defines the token scope and channels are the features, and over channel tokens, where the channel dimension defines the token scope and the spatial dimension is the feature. Each channel token is an abstract representation of the entire image, so channel attention captures global interactions by taking all spatial positions into account. Spatial attention refines the local representations with fine-grained interactions across locations.

Read more

To keep the whole model linear in cost, tokens are grouped along the sequence direction for both kinds of attention: spatial window attention partitions the image into non-overlapping windows, and channel group attention divides the channels into groups. A dual attention block pairs one spatial window attention block with one channel group attention block, and the model alternates the two.

The network has four stages, each opened by a patch embedding layer implemented as a strided convolution, with dual attention blocks stacked inside each stage at fixed resolution. The captured timm members cover the tiny, small, base, large, huge and giant sizes; Tiny and Small both use base width C = 96 and differ in the third stage, with 3 or 9 blocks. Without extra data, DaViT-Tiny, DaViT-Small and DaViT-Base reach 82.8%, 84.2% and 84.6% top-1 on ImageNet-1K with 28.3M, 49.7M and 87.9M parameters. Scaled up with 1.5B weakly supervised image and text pairs, the giant model reaches 90.4% top-1 on ImageNet-1K.

AI-written summary; not reviewed by a person. Corrections welcome.

Paper: DaViT: Dual Attention Vision Transformers

Filter and sort these in the model list