ptgaze ETH-XGaze model (resnet18)
Appearance-based gaze estimation model used by the eth-xgaze mode of ptgaze. It takes a normalized full-face image and predicts the gaze direction as pitch and yaw angles in the normalized space, following the ETH-XGaze protocol (Zhang et al., ECCV 2020).
Model details
- Architecture: timm
resnet18with a 2-unit output head - Input: 3x224x224 normalized face image (RGB channel order, ImageNet mean/std normalization)
- Output: gaze (pitch, yaw) in the normalized camera space
- Training code: hysts/pl_gaze_estimation
- Format: safetensors, converted from the original
.pthcheckpoint withptgaze-convert(tensor-identical). The file metadata recordsmode: ETH-XGazeandmodel: resnet18.
The input normalization must match the conventions the training labels were generated with. See the notes on data normalization in the demo README.
Accuracy
Mean angle error of 4.878 degrees on a held-out validation split of 10 subjects (single run; from the training repo results).
Usage
pip install ptgaze
ptgaze --mode eth-xgaze
The demo downloads this file automatically. To inspect the weights directly:
from safetensors.torch import load_file
state_dict = load_file("model.safetensors")
Training data
This model was trained from the raw ETH-XGaze dataset. It is not one of the baseline models provided by the dataset authors; it was trained independently, for research purposes, with hysts/pl_gaze_estimation.
ETH-XGaze is distributed by ETH Zurich under a custom research agreement. Among other things, the agreement restricts the dataset to non-commercial research use, prohibits training models on it for commercial use, and prohibits redistributing the dataset and the models provided by the authors.
The agreement binds the dataset recipient; it does not automatically extend to users of these weights. However, the legal status of model weights trained on datasets with restrictive terms is not settled. If you intend to use this model commercially, assess that risk yourself.
License
MIT, the same license as the ptgaze code (see the LICENSE file in this repository). The license covers the rights the author holds in these weights; see the Training data section above for the terms of the dataset they were trained on.
Citation
If you use this model, please cite the dataset paper:
Zhang, Xucong, Seonwook Park, Thabo Beeler, Derek Bradley, Siyu Tang, and Otmar Hilliges. "ETH-XGaze: A Large Scale Dataset for Gaze Estimation under Extreme Head Pose and Gaze Variation." In European Conference on Computer Vision (ECCV), 2020. arXiv:2007.15837