FlexGaze: Weakly Supervised Gaze Estimation at Scale
FlexGaze is a family of 3D gaze estimators pretrained on about 3.24 million gaze labels generated automatically from in-the-wild images and then fine-tuned on public gaze datasets. They predict gaze direction from a head crop alone, without face detection, facial landmarks or head pose, and can handle profile and rear views. Cropping the input requires a head box and the camera intrinsics.
- Paper: https://arxiv.org/abs/2611.30012
- Code: https://github.com/ihp-lab/FlexGaze
- Project page: https://ihp-lab.github.io/FlexGaze/
- Generated gaze labels: https://huggingface.co/datasets/ZongjianLi/FlexGaze
Models
FlexGaze comes in two sizes:
| Model | Name part | Backbone | Parameters |
|---|---|---|---|
| FlexGaze-S | small |
ViT-S/16, DINOv3 | 21.8M |
| FlexGaze-B | base |
ViT-B/16, DINOv3 | 86.0M |
Besides the size, each model name gives the training seed (seed0, seed1 or seed2) and the
training stage:
8set: fine-tuned jointly on the eight gaze datasets listed under Training data.pretrain: pretrained on the generated gaze labels only.
ONNX
The ONNX models (opset 17, float32) are provided for easy deployment.
| File | Size |
|---|---|
onnx/flexgaze-v1-small-8set-seed0.onnx |
90 MB |
onnx/flexgaze-v1-small-8set-seed1.onnx |
90 MB |
onnx/flexgaze-v1-small-8set-seed2.onnx |
90 MB |
onnx/flexgaze-v1-base-8set-seed0.onnx |
347 MB |
onnx/flexgaze-v1-base-8set-seed1.onnx |
347 MB |
onnx/flexgaze-v1-base-8set-seed2.onnx |
347 MB |
| Name | Type | Shape | Content | |
|---|---|---|---|---|
| Input | image |
uint8 | [N, 3, 224, 224] |
RGB head crop, values 0-255 |
| Output | gaze_direction |
float32 | [N, 3] |
Unit 3D gaze direction |
| Output | kappa |
float32 | [N] |
Confidence (von Mises-Fisher concentration) |
Each model takes a head crop that is cut from the image with the camera intrinsics rather than
resized from the head box, and returns the gaze direction in the frame of that crop, which has to be
rotated back into the camera frame.
minimal-inference implements
both steps. Pixel normalization is built into the graphs, so the crop is passed as raw pixels.
Safetensors
The PyTorch weights of all 75 models in the paper, for custom use cases. Each model
folder holds model.safetensors and its config.json.
Training data
- Generated gaze labels: about 3.24 million labels generated automatically for the images of 17 public datasets: Open Images V7, IMDB-WIKI, GazeFollow, LAGENDA, ExpW, WIDER FACE, GAF 3.0, Flickr30k, VideoAttentionTarget, MPII Human Pose, FFHQ, FairFace, CelebA, HECO, MERL-RAV, LaPa and Menpo2D. The labels were generated with off-the-shelf models: YOLOv5m trained on CrowdHuman for head detection, PaGE for gaze targets, UniDepthV2 for metric depth and camera intrinsics, and 3DDFA-V3 for head pose.
- Gaze datasets: Gaze360, ETH-XGaze, GazeCapture, MPIIFaceGaze, EYEDIAP, RT-GENE, Columbia and GFIE.
License
The weights in this repository are released under the USC Research License; see LICENSE.
The backbones were initialized from DINOv3, so the weights are also subject to the
DINOv3 License. Users must also comply with the terms of each training dataset.
Citation
@article{li2026flexgaze,
title = {FlexGaze: Weakly Supervised Gaze Estimation at Scale},
author = {Li, Zongjian and Soleymani, Mohammad},
journal = {arXiv preprint arXiv:2611.30012},
year = {2026}
}
Model tree for ZongjianLi/FlexGaze
Base model
timm/vit_base_patch16_dinov3.lvd1689m