All models

GazeTR

GazeTR-Hybrid estimates gaze yaw and pitch from a face image with ResNet-18 features and a transformer.

Pose · 319 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (31 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Task
Pose
Parameters
11.4M
Operations
319
Framework
PyTorch
Recurrent
No
Published
ICPR 2022
Cited by
180 (as of 27 October 2026)
Authors
Yihua Cheng, Feng Lu
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m17039
Graph hash
22fd705a89f4dd26edb74ba6d423edd14fba3f5c2b880472280b950790eb84ae
Skeleton hash
05a5113f878c2d24eca2e8b983d86ad1627bcece74e36dcf64f138a8fa86e5d4
Architecture hash
828e101e3d5d8c1ce2b61c6a29fc9be5e1712afc6e427248af11466ccfa27f79
Diagram SHA-256
e6bcac75e4f537eeb0b2124547204019122e79df00c4a1f02c9e0506a207a79a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

GazeTR estimates where a person is looking from a face image, using a transformer. The paper starts from the observation that the performance of transformers in gaze estimation was still unexplored. It compares two forms: a pure transformer that follows ViT, and a hybrid that keeps convolutional layers and combines CNNs with transformers.

This model is GazeTR-Hybrid, the form whose code the authors provide. It uses the convolutional layers of ResNet-18 for feature extraction. Those layers produce 7 × 7 × 512 feature maps, which an extra 1 × 1 convolutional layer scales to 7 × 7 × 32. The feature maps go into a 6-layer transformer with 8-head self-attention. The input is a 224 × 224 × 3 face image and the output is a 2D vector with the yaw and pitch of gaze. The paper's reason for keeping the CNN is that gaze estimation is a regression task, and gaze is hard to predict from a local patch such as half of an eye image.

The paper reports that the hybrid outperforms the pure transformer in all evaluation datasets with fewer parameters. On MPIIFaceGaze it lists an angular error of 4.00 degrees for GazeTR-Hybrid against 4.74 degrees for GazeTR-Pure. Both forms were pre-trained on ETH-XGaze.

Key idea. The paper compares a pure transformer with a CNN-transformer hybrid for gaze estimation and finds that the hybrid outperforms the pure transformer in all evaluation datasets with fewer parameters.

  • GazeTR
  • GazeTR-Hybrid
  • gaze estimation
  • gaze estimation using transformer
  • hybrid transformer
  • eye gaze
  • appearance-based gaze estimation
  • gaze direction

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{cheng2021gazeestimationusingtransformer,
      title={Gaze Estimation using Transformer}, 
      author={Yihua Cheng and Feng Lu},
      year={2021},
      eprint={2105.14424},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2105.14424}, 
}