Home Knowledge Base CrossViT

CrossViT is the dual-branch transformer that processes fine- and coarse-grained patch streams simultaneously and lets them exchange context via cross-attention — one branch sees small patches for texture while the other sees larger patches for layout, and bi-directional attention ensures both scales collaborate before classification.

What Is CrossViT?

Why CrossViT Matters

Branch Configurations

Balance Strategy:

Cross-Attn Frequency:

Hierarchical Merge:

How It Works / Technical Details

Step 1: Each branch computes standard multi-head attention within its patch scale, producing encoded tokens of matching spatial sizes.

Step 2: Cross-attention modules treat one branch as queries and the other as keys/values and vice versa, enabling mutual conditioning. The fused tokens then proceed through feed-forward layers and eventual concatenation.

Comparison / Alternatives

AspectCrossViTPyramid ViTSingle-scale ViT
ScalesDual fixedMulti-stageSingle
FusionCross-attentionConcatenation/FPNNone
Parameter CountModerateHigherLowest
ApplicationsFine+coarse tasksDetection, segmentationClassification

Tools & Platforms

CrossViT is the elegant multi-resolution duet that lets detail and layout sing together without forcing a single branch to be both wide and deep — it mixes fine texture with anchoring context for resilient visual recognition.

crossvitcomputer vision

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.