MSPE: Multi-Scale Patch Embedding Prompts Vision Transformers to Any Resolution
Wenzhuo Liu, Fei Zhu, Shijie Ma, Cheng-Lin Liu
Abstract
Although Vision Transformers (ViTs) have recently advanced computer vision tasks significantly, an important real-world problem was overlooked: adapting to variable input resolutions. Typically, images are resized to a fixed resolution, such as 224x224, for efficiency during training and inference. However, uniform input size conflicts with real-world scenarios where images naturally vary in resolution. Modifying the preset resolution of a model may severely degrade the performance. In this work, we propose to enhance the model adaptability to resolution variation by optimizing the patch embedding. The proposed method, called Multi-Scale Patch Embedding (MSPE), substitutes the standard patch embedding with multiple variable-sized patch kernels and selects the best parameters for different resolutions, eliminating the need to resize the original image. Our method does not require high-cost training or modifications to other parts, making it easy to apply to most ViT models. Experiments in image classification, segmentation, and detection tasks demonstrate the effectiveness of MSPE, yielding superior performance on low-resolution inputs and performing comparably on high-resolution inputs with existing methods.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers4
- Cross-Scale Pansharpening via ScaleFormer and the PanScale BenchmarkKe Cao, Xuanhua He, Xueheng Li, Lingting Zhu et al.CVPR 2026 · 4 citations
- DeltaDorsal: Enhancing Hand Pose Estimation with Dorsal Features in Egocentric ViewsWilliam Huang, Siyou Pei, Leyi Zou, Eric J. Gonzalez et al.CHI 2026 · 1 citation
- LOREAL: Mitigating Low-Resolution Challenges in Vision-Language Models with Attribute-driven Prompt Self-DistillationXucong Wang, Pengkun Wang, Zhe Zhao, Liheng Yu et al.CVPR 2026
- One Patch Doesn't Fit All: Adaptive Patching for Native-Resolution Multimodal Large Language ModelsWenzhuo Liu, Weijie Yin, Fei Zhu, Shijie Ma et al.ICLR 2026
Builds on24
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
- CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh et al.ICCV 2019 · 5,843 citations
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan et al.ICCV 2021 · 4,909 citations
Related papers
- Faster Vision Transformers with Adaptive PatchesRohan Choudhury, JungEun Kim, Jinhyung Park, Eunho Yang et al.ICLR 2026 · 8 citations
- MPViT: Multi-Path Vision Transformer for Dense PredictionYoungwan Lee, Jonghee Kim, Jeffrey Willette, Sung Ju HwangCVPR 2022 · 339 citations
- FlexiViT: One Model for All Patch SizesLucas Beyer, Pavel Izmailov, Alexander Kolesnikov, Mathilde Caron et al.CVPR 2023
- ResFormer: Scaling ViTs with Multi-Resolution TrainingRui Tian, Zuxuan Wu, Qi Dai, Han Hu et al.CVPR 2023
- LaPE: Layer-adaptive Position Embedding for Vision Transformers with Independent Layer NormalizationRunyi Yu, Zhennan Wang, Yinhuai Wang, Kehan Li et al.ICCV 2023 · 13 citations
