Learning Visual Prompts for Guiding the Attention of Vision Transformers

Razieh Rezaei, Masoud Jalili Sabet, Jindong Gu, Daniel Rueckert, Philip Torr +1 more
6/5/2024
cs.CV

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Visual prompting infuses visual information into the input image to adapt models toward specific predictions and tasks. Recently, manually crafted markers such as red circles are shown to guide the model to attend to a target region on the image. However, these markers only work on models trained with data containing those markers. Moreover, finding these prompts requires guesswork or prior knowledge of the domain on which the model is trained. This work circumvents manual design constraints by proposing to learn the visual prompts for guiding the attention of vision transformers. The learned visual prompt, added to any input image would redirect the attention of the pre-trained vision transformer to its spatial location on the image. Specifically, the prompt is learned in a self-supervised manner without requiring annotations and without fine-tuning the vision transformer. Our experiments demonstrate the effectiveness of the proposed optimization-based visual prompting strategy across various pre-trained vision encoders.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{rezaei2024learning,
  title  = {Learning Visual Prompts for Guiding the Attention of Vision Transformers},
  author = {Razieh Rezaei and Masoud Jalili Sabet and Jindong Gu and Daniel Rueckert and Philip Torr and Ashkan Khakzar},
  year   = {2024},
  eprint = {2406.03303},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.03303v1}
}

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/2406.03303.svg)](https://codeofpaper.com/paper/2406.03303)

Discussion