
crossvit_tiny_240
Image classification661 ops7M params
6 models, image classification. Fewest parameters first.
CrossViT is a vision transformer for image classification that processes an image at two patch sizes in parallel. The motivation is a trade-off in ViT: with a finer patch size the model can perform better, but FLOPs and memory consumption rise.
Each multi-scale encoder has two branches: a large, primary branch that uses coarse patches with more transformer encoders and wider embeddings, and a small, complementary branch that uses fine patches with fewer encoders and smaller embeddings. The branches exchange information through cross-attention, in which the CLS token of one branch serves as a query over the patch tokens of the other. Because only the CLS token is used in the query, the computation and memory needed to build the attention map are linear rather than quadratic.
In the paper, CrossViT-Ti, CrossViT-S and CrossViT-B set their large branches identical to the tiny, small and base models of DeiT. In the other names the final number is the total count of transformer encoders in the large branch. The models marked with a dagger replace the linear patch embedding with three convolutional layers. The paper reports that CrossViT improves DeiT-Ti, DeiT-S and DeiT-B by 1.2%, 1.2% and 0.4% points on ImageNet1K when those models are used as its primary branch. In timm the model names were changed to show the actual input resolution, so the 224 models are named 240 and the 384 models are named 408.
AI-written summary; not reviewed by a person. Corrections welcome.
Paper: CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification

Image classification661 ops7M params

Image classification577 ops8.6M params

Image classification661 ops26.9M params

Image classification837 ops44.3M params

Image classification837 ops44.6M params

Image classification661 ops105M params