
mobilevitv2 (semantic segmentation)
Image classification298 ops13.3M params
MobileViT's mobile backbone with linear-cost separable self-attention, here topped by a DeepLabV3 segmentation head.
Segmentation · 298 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
MobileViTV2 is the second version of MobileViT, built by replacing the multi-headed self-attention in MobileViT with separable self-attention. The paper behind it, Separable Self-attention for Mobile Vision Transformers by Sachin Mehta and Mohammad Rastegari, goes after latency: the main efficiency bottleneck in MobileViT is the multi-headed self-attention, which costs quadratic time in the number of tokens. The replacement has linear complexity and uses element-wise operations for computing self-attention, making it a good choice for resource-constrained devices. With about three million parameters, MobileViTV2 achieves a top-1 accuracy of 75.6% on the ImageNet dataset, outperforming MobileViT by about 1% while running 3.2× faster on a mobile device.
The captured member is the semantic segmentation variant, which adds a DeepLabV3 head to the backbone. Despite the name, MobileViTV2 is more like a CNN than a Transformer model: it does not work on sequence data but on batches of images, there are no embeddings, and the backbone outputs a feature map.
Key idea. Separable self-attention with linear complexity in the token count, replacing MobileViT's multi-headed self-attention so the model runs faster on mobile devices.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.