Skip to content
idiapPublic

About

EyeVLM is a benchmark for evaluating how well vision-language models (VLMs) understand human gaze, covering gaze following (where a person is looking) and social gaze prediction (looking at head, looking at each other, shared attention)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EyeVLM: Benchmarking Gaze Following and Social Gaze Prediction in Vision Language Models

Code for "Eyes on VLM: Benchmarking Gaze Following and Social Gaze Prediction in Vision Language Models" (NeurIPS 2026, Evaluations and Datasets Track), by Hengfei Wang*, Anshul Gupta*, Pierre Vuillecard and Jean-Marc Odobez (* equal contribution).

Paper: arXiv:2605.19859 · Code: github.com/idiap/EyeVLM · Data: EyeVLM-Data (DOI 10.34777/v1rg-4m54).

EyeVLM evaluates vision-language models (VLMs) on two gaze understanding tasks through a shared visual question answering interface:

  • Gaze following (GFo): given a person's head box, predict whether their gaze target is inside the frame and where it is.
  • Social gaze prediction (SG): given two head boxes, predict looking-at-each-other (LAEO), looking-at-head (LAH) and shared attention (SA).

The repository covers zero-shot prompting (four prompting strategies, open and closed models), LoRA fine-tuning of Qwen3-VL with task-specific QA pairs, and the evaluation protocol.

Installation

One conda environment, eyevlm, for training, vLLM inference and evaluation (Python 3.11, torch 2.10 + CUDA 12.8, transformers 5.0, peft 0.18, vLLM 0.19; the versions of the paper runs):

git clone https://github.com/idiap/EyeVLM.git && cd EyeVLM
conda env create -f environment/eyevlm.yml                    # everything except vLLM
conda activate eyevlm
pip install --no-deps -r environment/requirements-vllm.txt    # vLLM 0.19.0 (its other dependencies are in eyevlm.yml)
pip install --no-deps -e .                                    # this repository (LLaMA-Factory fork with the gaze hooks)

vLLM 0.19.0 declares transformers<5, but the paper ran it with transformers 5.0.0 (needed by the training code), so it is installed without dependency resolution; pip check reports this known conflict (and version notes of gradio, which only the unused web UI needs). Newer vLLM releases require transformers ≥ 5.5 and torch ≥ 2.11, which the LLaMA-Factory version of this repository does not support.

Data

1. Raw datasets (images). Download them from the original sources. The paper uses the GazeFollow annotations extended by Chong et al. and the frames of each dataset; EyeVLM does not redistribute images.

Dataset Used for Download
GazeFollow (extended annotations) gaze following: training, Tables 1, 2, 4, 7–10, 12 gazefollow_extended.zip
VideoAttentionTarget (VAT) gaze following and social gaze videoattentiontarget.zip
ChildPlay gaze following and social gaze Idiap ChildPlay-gaze (extract the frames with the dataset's extract-clips-from-videos.py)
VSGaze annotations social gaze labels (LAH, LAEO, SA); only needed to rebuild the QA files Idiap VSGaze

Place them under data/raw/ (gazefollow_extended/, videoattentiontarget/images/, childplay/images/, annotations/), or set their locations in configs/site.env and run bash scripts/setup_site.sh, which links them. The in-context examples of the PrInContext-CoT prompts are frames of the training sets of these datasets; they are not distributed here and are read from data/raw/ (prompts/inContext.json, prompts/social_incontext_examples/).

2. EyeVLM-Data (www.idiap.ch/en/dataset/eyevlm-data) holds the data built for the paper (annotations only, no images; CC-BY-NC-4.0). The "Get data" link of that page leads to the Zenodo record (10.34777/v1rg-4m54), which holds one archive, EyeVLM-Data.tar.gz (36.5 MB, MD5 6ae794e01deed2b4b4a3e0f1683ee17b). Extract it to data/EyeVLM-Data/ (or set EYEVLM_DATA_DIR in configs/site.env), then run bash scripts/setup_site.sh, which links the QA files to data/*.json, where the experiments read them:

data/EyeVLM-Data/
├── README.md, croissant.json      dataset card and Croissant metadata
├── VQA/                           the 31 question-answer JSON files of the paper, dataset_info.json,
│   │                              release_manifest.json (row counts and SHA-256 of every file)
│   └── 1k_subsets/                row indices of the Table 4 1K subsets
└── Balanced-Subset/               balanced social gaze subsets of VideoAttentionTarget and ChildPlay
                                   ({vat,childplay}_{train,val,test}_{lah,laeo,coatt}_sampled.parquet, coatt = SA; MD5SUMS)

The MTGS-DINO-static predictions (MTGS rows of Tables 3 and 4, configs/experiments/mtgs_baseline.yaml) are not part of EyeVLM-Data: get the prediction pickle from the official MTGS repository (idiap/MTGS) and save it as data/mtgs_predictions/mtgs_dino_static_predictions.pkl (MTGS_PREDICTIONS_DIR) to run that baseline.

We provide the generated question-answer files, so the experiments need no QA generation step. Users can also generate them from the source annotations with the scripts in qa_generation/, all 31 files in one command:

bash scripts/generate_qa_data.sh    # writes outputs/qa_data/ (OUT=<dir>, SEED=<int>); needs the raw datasets above

The regenerated files match the released ones in rows, images, labels and answers; only the randomly drawn question wording differs. Training does not depend on it (questions are re-drawn at training time), but the evaluation of the fine-tuned models uses the stored questions, so use the released files to reproduce the paper's numbers exactly. Image paths inside the QA files are relative to data/, and data/dataset_info.json registers every file. data/README.md describes each file and its generator, and data/data_manifest.json lists each file with its row count and SHA-256.

3. Base models. The jobs run offline; download the base models once into HF_HOME:

for m in Qwen/Qwen3-VL-8B-Instruct Qwen/Qwen3-VL-2B-Instruct Qwen/Qwen3-VL-4B-Instruct Qwen/Qwen3-VL-32B-Instruct \
         Qwen/Qwen3-8B OpenGVLab/InternVL3_5-38B-HF; do huggingface-cli download "$m"; done

Site configuration

configs/site.env holds everything that depends on the machine: SLURM partition, account, QOS and GPU type names, conda environments, the Hugging Face cache, and the data and checkpoint locations. run.py and the scripts read it; edit it once, then check the setup:

bash scripts/setup_site.sh          # links data/ and saves/, reports missing data, models, environments, GPU types
bash scripts/smoke_test.sh          # dry run of every experiment (MODE=submit runs one job of each kind on 16 samples)

Checkpoints

The experiment files read the fine-tuned models from saves/. Put the checkpoints there, or set EYEVLM_SAVES_DIR in configs/site.env to where they are and run bash scripts/setup_site.sh, which links saves/ to it:

saves/Qwen/<model>/lora/<config>/       LoRA adapter of configs/train/<config>.yaml (intermediate steps in checkpoint-<step>/)
saves/Qwen/<model>/merged/<config>/     the same adapter merged into its base model

<model> is the base model name (Qwen3-VL-8B-Instruct, Qwen3-VL-4B-Instruct or Qwen3-VL-2B-Instruct) and <config> the name of the training config in configs/train/. The runs use them in two ways:

  • merged models, loaded as the model: the FTspec GazeFollow models (2B, 4B, 8B), AllD/GFo and AllD/GFo+SG (gaze following);
  • adapters, loaded on another model: the FTspec stage-2 adapters (VAT and ChildPlay gaze following, and social gaze at checkpoint-500) on the merged FTspec GazeFollow 8B model; the AllD/GFo+SG social gaze adapter (checkpoint-5000) and the data-scale adapters (Table 10) on Qwen/Qwen3-VL-8B-Instruct.

configs/experiments/training.yaml writes them at these paths: the train_* runs write the adapters, the merge_* runs the merged models.

python run.py configs/experiments/training.yaml train_gf_qwen8b --submit   # saves/Qwen/Qwen3-VL-8B-Instruct/lora/qwen3vl8b_ftspec_gazefollow
python run.py configs/experiments/training.yaml merge_gf_qwen8b --submit   # saves/Qwen/Qwen3-VL-8B-Instruct/merged/qwen3vl8b_ftspec_gazefollow

The header of configs/experiments/finetuned.yaml lists the checkpoint each evaluation run reads, and bash scripts/setup_site.sh reports the missing ones.

Quick start

Every experiment of the paper is a YAML file in configs/experiments/, and run.py runs it. Without an option it is a dry run that prints the full configuration and the job script; --submit submits one SLURM job per run and --local runs it on the current GPU machine. --list shows the runs of a file, and --smoke 16 runs any of them on 16 samples (outputs in outputs/smoke/). Each run writes its predictions, metrics and resolved configuration to outputs/<experiment>/<run>/. First, check the setup (data, base models, environments):

bash scripts/setup_site.sh

Zero-shot evaluation. Each run makes vLLM predictions with a system prompt (step infer), then computes the metrics (step eval). Qwen3-VL-8B with PrInContext-CoT on GazeFollow, and with PrBase on VAT LAH:

python run.py configs/experiments/zero_shot_benchmark.yaml --list                  # 1. the runs
python run.py configs/experiments/zero_shot_benchmark.yaml gf_qwen8b_gazefollow    # 2. dry run: check the config
python run.py configs/experiments/zero_shot_benchmark.yaml gf_qwen8b_gazefollow --submit   # 3. predict + evaluate
python run.py configs/experiments/zero_shot_benchmark.yaml sg_qwen8b_vat_lah --submit
cat outputs/zero_shot_benchmark/gf_qwen8b_gazefollow/metrics.json                  # 4. Avg L2, Min L2, angular error

Fine-tuning, saving and evaluation. The FTspec GazeFollow model: train a LoRA adapter, merge it into the base model, then evaluate the merged model (see Checkpoints for the saves/ layout).

# 1. train: LLaMA-Factory LoRA with configs/train/<config>.yaml; the adapter is saved to saves/Qwen/<model>/lora/<config>
python run.py configs/experiments/training.yaml train_gf_qwen8b --submit
# 2. merge the adapter into Qwen3-VL-8B-Instruct: saves/Qwen/<model>/merged/<config>
python run.py configs/experiments/training.yaml merge_gf_qwen8b --submit
# 3. evaluate on GazeFollow test (base tokenizer config, vLLM predictions, metrics)
python run.py configs/experiments/finetuned.yaml gf_qwen8b_ftspec_gazefollow --submit
cat outputs/finetuned/gf_qwen8b_ftspec_gazefollow/metrics.json

The FTspec stage-2 models start from the merged GazeFollow model: after step 2, train_ftspec_vat (and _childplay, _vat_sg, _childplay_sg) trains them, and finetuned.yaml evaluates them (vatcp_qwen8b_ftspec_vat, sg_qwen8b_ftspec_vat_test, ...). Wait for each job to finish before submitting the next step. configs/experiments/README.md describes the file format and the options (--steps, --set, --smoke).

The paper's main metrics are Avg L2 (dist_to_avg), Min L2 (min_dist) and angular error (ang_err) for gaze following, AP / F1 for in/out, and F1 per task for social gaze.

Reproducing the paper

REPRODUCE.md gives the commands of every experiment. Summary:

Task Experiment file (configs/experiments/) or script Paper tables
Zero-shot Qwen3-VL-8B with the four prompting strategies, gaze following and social gaze zero_shot_prompts.yaml Tab. 1
Zero-shot open VLMs (Qwen3-VL-8B / 32B, InternVL3.5-38B), gaze following and social gaze zero_shot_benchmark.yaml Tab. 1 (PrInContext-CoT gaze following), 2, 3, 4, 6, 13
API models (GPT-5.4, Gemini 3.1 Pro) on the 1K subsets api_models.yaml; other models on the same subsets: evaluation/evaluate_1k_subset.py on their full test predictions Tab. 4
LoRA fine-tuning and merging of the adapters training.yaml (settings in configs/train/) Tab. 2–4, 6, 7, 9, 10
Evaluation of the fine-tuned models finetuned.yaml Tab. 2–4, 6, 7, 9
Social gaze test set statistics (pair counts) pytest tests/test_paper_data_manifest.py Tab. 5
Sampled decoding of the fine-tuned GazeFollow model (N samples at temperature 0.7), Best- and Average-of-N sampling.yaml Tab. 8
Fine-tuning on the first N GazeFollow training samples data_scale.yaml Tab. 10
Text-only (blind) social gaze baselines blind_baselines.yaml Tab. 11
Zero-shot gaze target localization as a grid cell (2×2 to 32×32) grid.yaml Tab. 12
MTGS-DINO-static social gaze baseline: post-processing of its predictions on the social gaze test sets mtgs_baseline.yaml Tab. 3, 4

Run the tests with pytest tests/.

Citation

@inproceedings{wang2026eyevlm,
  title     = {Eyes on {VLM}: Benchmarking Gaze Following and Social Gaze Prediction in Vision Language Models},
  author    = {Wang, Hengfei and Gupta, Anshul and Vuillecard, Pierre and Odobez, Jean-Marc},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS), Evaluations and Datasets Track},
  year      = {2026},
  url       = {https://arxiv.org/abs/2605.19859}
}

Acknowledgements

The code is built on LLaMA-Factory, and inference uses vLLM. The specialist baselines in the paper were re-evaluated with the official Gaze-LLE and MTGS code.

License

This code is released by the Idiap Research Institute under the GPL-3.0-only license; see LICENSES/GPL-3.0-only.txt. The files that come from LLaMA-Factory (most of src/llamafactory/, and the inference scripts derived from its vllm_infer.py) keep their Apache-2.0 license, and two of them also contain MIT-licensed code. Each file states its copyright and license in an SPDX header or in REUSE.toml (REUSE layout; check with reuse lint).

GazeFollow, VideoAttentionTarget, ChildPlay and VSGaze remain under their own licenses and are not distributed with this repository: obtain them from their providers (see Data). EyeVLM-Data, the annotations built for the paper, is released separately under CC-BY-NC-4.0. See THIRD_PARTY/third_party.md for the licenses of the third-party code, dependencies, models and data.

About

EyeVLM is a benchmark for evaluating how well vision-language models (VLMs) understand human gaze, covering gaze following (where a person is looking) and social gaze prediction (looking at head, looking at each other, shared attention)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages