In the world of computer vision, "gaze following" has traditionally been treated as a geometry problem. If you show an AI a picture of a person, it can usually point to the $(x, y)$ coordinates on the screen where that person is looking. But knowing a pixel location is a bit like knowing the GPS coordinates of a restaurant without knowing if it’s a pizzeria or a hardware store—the "where" is useful, but the "what" is what actually matters for understanding human intent.
A new paper from researchers at the Idiap Research Institute and EPFL, titled "Toward Semantic Gaze Target Detection," aims to bridge this gap. They move beyond simple localization to "Semantic Gaze Following," where the model simultaneously predicts where a person is looking and identifies the object of their attention.
TL;DR
The researchers introduce a novel transformer-based architecture that predicts both the 2D location and the semantic category (e.g., "cell phone," "cow," "dog") of a person's gaze target. By framing recognition as a visual-text alignment task, their model achieves state-of-the-art localization results while remaining significantly more efficient than multi-stage baselines.
The Problem with Two-Step Approaches
Standard gaze-following models output a heatmap or a single point. To make this useful in the real world—say, for a social robot trying to assist a human—you would typically need a second, separate object detector to figure out what is at those coordinates.
This "two-step" approach is clunky and computationally expensive. It often fails because standard object detectors are trained on bounding boxes, while gaze targets are frequently "stuff" (like the sky or a wall) or parts of objects that don't fit neatly into a box. Furthermore, if a heatmap is multimodal (meaning the person might be looking at one of two things), a simple post-processing step might pick the wrong one. The authors argue that localization and recognition should be learned together.
A Promptable Architecture
The team designed a "promptable" architecture inspired by modern segmentation models.
Here is how the system breaks down:
- Image Encoder: The entire scene is processed once to create a set of "image tokens."
- Gaze Encoder: For every person in the image, the model takes a crop of their head and their bounding box coordinates. This acts as a prompt.
- Gaze Decoder: A lightweight transformer cross-attends the person-specific prompt with the scene tokens. This allows the model to filter the scene based on where that specific person is likely looking.
- Dual Output: The decoder produces two things: a Gaze Heatmap for localization, and a Gaze Label Embedding, which is a vector representing the meaning of the target.
- Visual-Text Alignment: Instead of a simple classification list, they align the label embedding with text embeddings from a frozen CLIP model. This allows the system to potentially recognize objects it wasn't explicitly trained on (open-vocabulary).
New Benchmarks for a New Task
Since no standard dataset existed for this combined task, the authors got creative:
- GazeFollow (Pseudo-annotated): They took the classic GazeFollow dataset and ran an automated pseudo-annotation pipeline using open-world segmenters to assign labels to existing gaze points.
- GazeHOI: They introduced a new benchmark by repurposing five Human-Object Interaction (HOI) datasets. They filtered these for "looking" interactions and manually verified the head-object pairs, resulting in a high-quality dataset of roughly 58,000 instances.
Key Insights and Results
- Semantic Feedback Loops: Interestingly, the authors found that training the model to recognize what an object is actually improves its ability to find where it is. The semantic labels provide a learning signal that helps the model refine its spatial heatmaps.
- The "Not Gaze" Token: The model includes a learnable "null" token. This allows the decoder to assign importance to background regions that nobody is looking at, preventing the model from being forced to find a target in every corner of the image.
- Efficiency via Late Fusion: By encoding the scene once and prompting it with different people later, this model is much faster for images containing multiple people. Compared to a strong two-stage baseline, their end-to-end model achieved competitive recognition scores with 40% fewer parameters.
- New SOTA: The model set a new state-of-the-art for localization on the GazeFollow benchmark, achieving an Average Distance of 0.108.
Limitations and Future Work
The authors identify a few key hurdles for the future. Currently, the model predicts one primary label. However, gaze is often ambiguous—if you are cutting a cake, you are looking at both the "knife" and the "cake." The current architecture isn't fully equipped for this multi-label reality. Additionally, while their datasets are a strong start, scaling up the data will be key to reaching human-level semantic understanding.
Summary updated