NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Fine-Grained Visual Prompting

Lingfeng Yang, Yueze Wang, Xiang Li, Xinlong Wang, Jian Yang

Abstract

Vision-Language Models (VLMs) excel at global image understanding but often struggle with instance-level tasks requiring precise object localization. We present Fine-Grained Visual Prompting (FGVP), a framework that leverages precise segmentation masks and a "Blur Reverse Mask" technique to focus VLMs on specific targets without sacrificing global context. By mimicking the "Bokeh" effect common in professional photography, FGVP achieves state-of-the-art zero-shot performance on referring expression comprehension and part detection benchmarks, outperforming coarse prompting methods by significant margins.

Introduction

Vision-Language Models like CLIP have revolutionized how we bridge visual and textual data. However, they face a significant hurdle in instance-level tasks, such as identifying "the small red apple to the left of the basket." Traditional methods to guide a VLM's attention—known as "visual prompting"—typically involve drawing coarse boxes or circles around an object.

The FGVP pipeline: An input image is processed by a detector and SAM to create precise masks, which are then blurred and fed into a VLM.

These coarse methods introduce a trade-off: a bounding box often includes irrelevant background pixels (noise), while cropping the image to the object removes the spatial context necessary to understand relational descriptions like "on the left." FGVP addresses this by providing a precise yet context-aware highlighting mechanism.

Methodology

The FGVP framework shifts the paradigm from coarse geometric prompts to precise semantic masks. The process involves two primary stages:

1. Mask Generation

The researchers utilize the Segment Anything Model (SAM) to produce high-fidelity masks. They developed two distinct pipelines: one that refines existing box proposals from a standard detector, and a fully zero-shot version that uses grid-wise keypoints to prompt SAM without any prior object detection knowledge.

2. The Blur Reverse Mask (D4)

After evaluating various highlighting styles—including colorful overlays, outlines, and grayscaling—the authors identified Gaussian blurring of the background (the area outside the target mask) as the most effective technique. This "Blur Reverse Mask" effectively creates a digital Bokeh effect, keeping the target in sharp focus while maintaining the structural outlines of the surrounding environment.

Comparison of coarse prompting (boxes, circles) versus the proposed fine-grained masks and the Blur Reverse Mask (D4) technique.

Experimental Evaluation

FGVP was benchmarked against several rigorous datasets to test its versatility:

  • Referring Expression Comprehension: Evaluated on RefCOCO, RefCOCO+, and RefCOCOg, where models must identify objects based on complex natural language.
  • Object & Part Detection: Tested on COCO and PACO (Part and Attributes of Common Objects). PACO is particularly demanding, requiring the identification of minute components like a "mug handle."

Key Insights and Results

The "Bokeh" Advantage

The success of the Blur Reverse Mask is attributed to the training data of VLMs. Large-scale web datasets are rich in professional photography featuring shallow depth-of-field. Consequently, VLMs have developed a natural "prior" to focus on sharp regions within a blurred field. Unlike grayscaling, blurring preserves the spatial coherence of the scene, allowing the model to perceive the relative positions of objects without being distracted by their fine details.

Performance Gains

FGVP established new state-of-the-art (SOTA) benchmarks for zero-shot performance:

  • Accuracy Improvements: It surpassed previous leading methods (such as ReCLIP and RedCircle) by an average of 3.0% to 4.6% across RefCOCO benchmarks.
  • Precision in Detail: On the RefCOCO+ testA subset, FGVP achieved a maximum improvement of 12.5%. It also demonstrated superior performance in part detection on the PACO dataset, proving that fine-grained precision is essential for detailed visual reasoning.

Conclusion and Future Work

While FGVP offers significant accuracy gains, the use of SAM for mask generation introduces a computational bottleneck compared to simple box-drawing. Future research will focus on optimizing inference times for real-time applications and exploring "prompt coupling," where language prompts are architecturally linked to visual cues to further enhance the model's focus. Currently, FGVP stands as a powerful demonstration that how we "show" an object to a model is just as important as how we "describe" it.

Summary updated

BibTeX
@inproceedings{yang2023fine,
  author = {Lingfeng Yang and Yueze Wang and Xiang Li and Xinlong Wang and Jian Yang},
  title = {{Fine-Grained Visual Prompting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=l6R4Go3noz},
}
Figure