Most modern vision models are pretrained using either supervised classification (like ImageNet) or contrastive learning (like CLIP). While highly effective for holistic image understanding—such as identifying that there is a "dog in a park"—these methods often overlook fine-grained, region-specific details.
Recent research has shown that generative pretraining via image captioning is a powerful alternative to contrastive learning. However, standard captioners still struggle with precise localization. Previous attempts to fix this usually involved complex architectural additions like Region Proposal Networks (RPNs) or Feature Pyramid Networks (FPNs), which are computationally expensive and difficult to scale.
This raises an intriguing question: Can we teach a model fine-grained localization using nothing but a simple natural language interface?
LocCa (Location-aware Captioner) is a novel visual pretraining paradigm designed to do exactly that. By integrating bounding box prediction and grounded captioning into a standard image captioning objective, LocCa teaches vision models to "see" specific regions without relying on specialized detection heads.
The LocCa Approach
LocCa utilizes a standard encoder-decoder architecture, pairing a Vision Transformer encoder with a Transformer decoder. The "secret sauce" lies in how the pretraining tasks are structured using a unified text interface.
Instead of adding complex detection modules, LocCa represents bounding box coordinates as sequences of integral numbers (e.g., [20, 480, 150, 200]). These coordinates are tokenized and treated just like regular words. The model uses task-specific prefixes to determine its objective:
Cap:Standard image captioning (describing the whole scene).ARef:(Automatic Referring Expression) Predicts bounding box coordinates based on a text description of a region.GCap:(Grounded Captioning) Jointly predicts both the bounding box and the description for a specific region.
Following recent trends in generative pretraining, the model also employs parallel prediction, sometimes predicting all caption tokens at once rather than sequentially. This forces the encoder to capture richer, more independent information in its visual tokens.
Training and Datasets
To train LocCa at scale, the researchers used a subset of the WebLI dataset, consisting of 1 billion image and alt-text pairs. Because raw web data lacks bounding box annotations, they utilized a pretrained OWL-ViT model to generate "pseudo-labels." This automated process detected objects and assigned them labels to create the massive ARef and GCap training corpus.
The model was then rigorously evaluated across a wide battery of benchmarks, including RefCOCO/+/g (referring expressions), COCO (detection and captioning), ADE20k (segmentation), and holistic tasks like ImageNet-1k, VQAv2, and GQA.
Key Insights and Results
One might expect that forcing a model to learn exact coordinates would hurt its ability to understand general scenes. Surprisingly, the paper finds the opposite: synergy, not sacrifice. The localization tasks provide a strong learning signal that helps the vision encoder extract richer, more detailed features, which ultimately benefits global tasks as well.
By treating coordinates as text, LocCa avoids the architectural bloat of traditional detectors. This simplicity makes the model easier to train and allows it to benefit from the same scaling laws that power Large Language Models. Furthermore, the prompt-based decoder offers incredible inference flexibility. You can ask for a general caption, provide a description and ask "Where is this?", or provide coordinates and ask "What is here?"
State-of-the-Art Localization
LocCa sets new records on localization benchmarks. On the RefCOCO val split, the LocCa-G model achieved an impressive 92.99% accuracy, significantly outperforming previous specialized models.
Beyond RefCOCO, LocCa demonstrated several other impressive capabilities:
- Superior Backbone: When used as the vision backbone for a larger multimodal model (PaLI-3), LocCa consistently outperformed the standard SigLIP backbone across diverse tasks, including VQA and document understanding (OCR).
- Zero-Shot Capabilities: Even without being explicitly trained as a traditional object detector, the "raw" LocCa model showed a surprising ability to detect multiple objects in an image zero-shot using the
GCap:prompt. - Downstream Gains: In semantic segmentation on ADE20k, LocCa outperformed standard captioning baselines by about 2 mIoU points, proving the encoder learned superior spatial features.
Limitations and Future Work
While LocCa represents a major step forward for natural language interfaces in vision, it has a few limitations. First, it lacks pixel-level precision out of the box. Because it was pretrained on bounding boxes rather than pixel-level masks, it doesn't have zero-shot segmentation capabilities (though it can be fine-tuned for it).
Second, the model's localization performance is currently bottlenecked by the quality of the OWL-ViT model used to generate the initial pseudo-labels. Finally, finding a decoding strategy that can output a high number of boxes and high-quality labels simultaneously—matching the speed and scale of a full object detector—remains an open challenge.
Future work will likely explore incorporating segmentation tasks directly into the pretraining phase to reach true "pixel-level" awareness, further solidifying natural language as the ultimate interface for visual understanding.
Summary updated