E-InMeMo: Enhanced Prompting for Visual In-Context Learning

Jiahao Zhang, Bowen Wang, Hong Liu, Liangzhi Li, Yuta Nakashima +1 more
4/25/2025
5 citations
cs.CV

Official code: Jackieam/E-InMeMo (4 stars, Python, last commit 2025-05-08).

Abstract

Large-scale models trained on extensive datasets have become the standard due to their strong generalizability across diverse tasks. In-context learning (ICL), widely used in natural language processing, leverages these models by providing task-specific prompts without modifying their parameters.

Show full abstract

This paradigm is increasingly being adapted for computer vision, where models receive an input-output image pair, known as an in-context pair, alongside a query image to illustrate the desired output. However, the success of visual ICL largely hinges on the quality of these prompts. To address this, we propose Enhanced Instruct Me More (E-InMeMo), a novel approach that incorporates learnable perturbations into in-context pairs to optimize prompting. Through extensive experiments on standard vision tasks, E-InMeMo demonstrates superior performance over existing state-of-the-art methods. Notably, it improves mIoU scores by 7.99 for foreground segmentation and by 17.04 for single object detection when compared to the baseline without learnable prompts. These results highlight E-InMeMo as a lightweight yet effective strategy for enhancing visual ICL. Code is publicly available at: https://github.com/Jackieam/E-InMeMo

View on arXivView PDF

Code Implementations(1)

Jackieam/E-InMeMoOfficial100%

[arXiv] E-InMeMo: Enhanced Prompting for Visual In-Context Learning

41PythonMay 8, 20251 years ago

Similar Papers

Cite this paper

@article{zhang2025einmemo,
  title  = {E-InMeMo: Enhanced Prompting for Visual In-Context Learning},
  author = {Jiahao Zhang and Bowen Wang and Hong Liu and Liangzhi Li and Yuta Nakashima and Hajime Nagahara},
  year   = {2025},
  eprint = {2504.18158},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.18158v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.18158.svg)](https://codeofpaper.com/paper/2504.18158)

Discussion