REN: Fast and Efficient Region Encodings from Patch-Based Image Encoders
Savya Khosla, Sethuraman TV, Barnett Lee, Alexander Schwing, Derek Hoiem
TL;DR
REN tackles the inefficiency of patch-based ViT representations by producing region-level tokens with point prompts and cross-attention, eliminating dependence on costly segmentation masks during inference. It trains with a self-supervised objective combining contrastive learning ($L_{cont}$) and feature-space alignment ($L_{feat}$) using SAM-derived region IDs, enabling robust, content-aware region tokens that generalize across encoders. REN achieves substantial efficiency gains (e.g., $60\times$ faster token generation and $35\times$ less memory) and competitive or superior performance on semantic segmentation, retrieval, and visual query localization, including state-of-the-art results on Ego4D VQ2D. By supporting transfer to multiple encoders (e.g., DINO, DINOv2, OpenCLIP) without retraining and providing practical prompting and aggregation strategies, REN offers a scalable route to region-based image representations. Code and models are available at the authors' GitHub repository.
Abstract
We introduce the Region Encoder Network (REN), a fast and effective model for generating region-based image representations using point prompts. Recent methods combine class-agnostic segmenters (e.g., SAM) with patch-based image encoders (e.g., DINO) to produce compact and effective region representations, but they suffer from high computational cost due to the segmentation step. REN bypasses this bottleneck using a lightweight module that directly generates region tokens, enabling 60x faster token generation with 35x less memory, while also improving token quality. It uses a few cross-attention blocks that take point prompts as queries and features from a patch-based image encoder as keys and values to produce region tokens that correspond to the prompted objects. We train REN with three popular encoders-DINO, DINOv2, and OpenCLIP-and show that it can be extended to other encoders without dedicated training. We evaluate REN on semantic segmentation and retrieval tasks, where it consistently outperforms the original encoders in both performance and compactness, and matches or exceeds SAM-based region methods while being significantly faster. Notably, REN achieves state-of-the-art results on the challenging Ego4D VQ2D benchmark and outperforms proprietary LMMs on Visual Haystacks' single-needle challenge. Code and models are available at: https://github.com/savya08/REN.
