Towards Visual Query Segmentation in the Wild
Organizations: Department of Computer Science and Engineering, University of North Texas
Abstract
In this paper, we introduce visual query segmentation (VQS), a new paradigm of visual query localization (VQL) that aims to segment all pixel-level occurrences of an object of interest in an untrimmed video, given an external visual query. Compared to existing VQL locating only the last appearance of a target using bounding boxes, VQS enables more comprehensive (i.e., all object occurrences) and precise (i.e., pixel-level masks) localization, making it more practical for real-world scenarios. To foster research on this task, we present VQS-4K, a large-scale benchmark dedicated to VQS. Specifically, VQS-4K contains 4,111 videos with more than 1.3 million frames and covers a diverse set of 222 object categories. Each video is paired with a visual query defined by a frame outside the search video and its target mask, and annotated with spatial-temporal masklets corresponding to the queried target. To ensure high quality, all videos in VQS-4K are manually labeled with meticulous inspection and iterative refinement. To the best of our knowledge, VQS-4K is the first benchmark specifically designed for VQS. Furthermore, to stimulate future research, we present a simple yet effective method, named VQ-SAM, which extends SAM 2 by leveraging target-specific and background distractor cues from the video to progressively evolve the memory through a novel multi-stage framework with an adaptive memory generation (AMG) module for VQS, significantly improving the performance. In our extensive experiments on VQS-4K, VQ-SAM achieves promising results and surpasses all existing approaches, demonstrating its effectiveness. With the proposed VQS-4K and VQ-SAM, we expect to go beyond the current VQL paradigm and inspire more future research and practical applications on VQS. Our benchmark, code, and results will be made publicly available.
Figures & tables
| Benchmark | Task | Videos | Object classes | Avg. vid. length | Avg. res. length | Total frames | Anno. frames | Mean occur. | Loc. aim | Refer. target | Object anno. |
| YT-VOS [ 32 ] | VOS | 3,252 | 94 | 3.6 sec | n/a | 0.11M | 110K | n/a | n/a | IV | mask |
| LVOS [ 10 ] | VOS | 220 | 27 | 95.4 sec | n/a | 0.13M | 130K | n/a | n/a | IV | mask |
| MOSE [ 6 ] | VOS | 2,149 | 36 | 12.3 sec | n/a | 0.16M | 160K | n/a | n/a | IV | mask |
| VQ2D [ 9 ] | VQL | 5,823 | 135 | 366.0 sec | 2.7 sec | 12.0M | 266K | 1 | LO | OV | box |
| VQS-4K (ours) | VQS | 4,111 | 222 | 52.9 sec | 9.0 sec | 1.3M | 222K | 2.9 | AO | OV | mask |
| Videos | Avg. Vid. length | Avg. res. length | Total frames | Mean occur. | |
| VQS-4K | 822 | 53.3 sec | 6.9 sec | 264K | 2.7 |
| VQS-4K | 3,289 | 52.8 sec | 9.5 sec | 1.04M | 3.0 |
| Methods | stAP | stAP 50 | stAP 75 | tAP | tAP 50 | tAP 75 | Rec | Succ |
| Cutie-b [CVPR’24] [ 3 ] | 18.5 | 16.5 | 8.2 | 21.0 | 16.9 | 9.2 | 38.4 | 32.3 |
| OASIS [ICCV’25] [ 24 ] | 15.8 | 13.6 | 6.7 | 21.3 | 17.4 | 9.5 | 34.3 | 29.4 |
| LOMM [ICCV’25] [ 14 ] | 12.5 | 10.2 | 5.0 | 12.7 | 7.9 | 4.3 | 26.1 | 25.8 |
| SAM 2 [ICLR’25] [ 25 ] | 12.9 | 10.6 | 5.2 | 13.0 | 8.3 | 4.6 | 26.7 | 26.3 |
| SAM2.1++ [CVPR’25] [ 28 ] | 12.5 | 10.2 | 5.1 | 14.6 | 10.0 | 5.5 | 28.8 | 25.8 |
| SAM2Long [ICCV’25] [ 7 ] | 18.6 | 16.5 | 8.2 | 24.4 | 20.6 | 11.2 | 38.6 | 32.5 |
| VQS-4K -Small | VQS-4K -Medium | VQS-4K -Large | ||||||||||
| Methods | stAP | tAP | Rec | Succ | stAP | tAP | Rec | Succ | stAP | tAP | Rec | Succ |
| Cutie-b [CVPR’24] [ 3 ] | 13.3 | 17.2 | 29.9 | 25.5 | 19.0 | 21.4 | 39.6 | 33.8 | 25.6 | 26.1 | 45.4 | 39.8 |
| OASIS [ICCV’25] [ 24 ] | 11.4 | 17.4 | 26.7 | 23.2 | 16.2 | 21.7 | 35.4 | 30.7 | 21.9 | 26.5 | 40.5 | 36.2 |
| LOMM [ICCV’25] [ 14 ] | 9.0 | 10.4 | 20.4 | 20.3 | 12.8 | 13.0 | 26.9 | 27.0 | 17.3 | 15.8 | 30.8 | 31.8 |
| SAM 2 [ICLR’25] [ 25 ] | 9.3 | 10.6 | 20.8 | 20.7 | 13.2 | 13.3 | 27.6 | 27.5 | 17.9 | 16.2 | 31.6 | 32.4 |
| SAM2.1++ [CVPR’25] [ 28 ] | 9.1 | 11.9 | 22.5 | 20.3 | 12.8 | 14.9 | 29.7 | 27.0 | 17.3 | 18.1 | 34.0 | 31.8 |
| Methods | stAP | tAP | Rec | Succ |
| VQLoC [ICCV’25] [ 11 ] | 23.7 | 32.3 | 45.1 | 55.9 |
| PRVQL [ICCV’25] [ 8 ] | 28.1 | 36.8 | 45.7 | 59.4 |
| RELOCATE [CVPR’25] [ 12 ] | 35.2 | 42.9 | 50.6 | 60.1 |
| REN DINOv2] [NeurIPS’25] [ 13 ] | 39.7 | 51.6 | 49.3 | 61.2 |
| VQ-SAM (ours) | 41.8 | 56.0 | 53.8 | 64.2 |
| stAP | tAP | Rec | Succ | |||
| ❶ | 0.5 | 0.5 | 24.2 | 27.0 | 40.4 | 39.0 |
| ❷ | 0.5 | 1.0 | 26.0 | 29.6 | 43.6 | 42.1 |
| ❸ | 1.0 | 0.5 | 24.5 | 27.4 | 41.2 | 39.9 |
| ❹ | 1.0 | 1.0 | 25.3 | 28.7 | 42.2 | 40.8 |
Video Object Segmentation
Video object segmentation assigns pixel-level masks to objects across frames while preserving their identities through motion, occlusion, and change.
See all 114 papers