Back to paper library
Paper notesarXiv 2015CVPR 2015

MPIIGaze

The Screen Looks Back

Original paper

Appearance-Based Gaze Estimation in the Wild

Paper authors

Xucong Zhang · Yusuke Sugano · Mario Fritz · Andreas Bulling

Publication
CVPR 2015Conference
First submitted to arXiv
arXiv:1504.02863
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{faceanalysismpiigaze2015,
  title = {{Appearance-Based Gaze Estimation in the Wild}},
  author = {Xucong Zhang and Yusuke Sugano and Mario Fritz and Andreas Bulling},
  year = {2015},
  eprint = {1504.02863},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1504.02863}
}
On this page

The camera at the top edge of your laptop screen is about half a meter from your eyes. Whether you're looking at a notification in the top-left corner of the screen or at the clock in the bottom-right, your gaze direction differs by thirty or forty degrees; the eye the camera captures is only a few dozen pixels wide.

To infer gaze direction from those few dozen pixels, commercial eye trackers shine infrared light, look for the glints on the cornea, and before use have you stare at a few points on the screen for calibration. The other route is called appearance-based estimation: hand the eye image directly to a learned function and let it output the gaze direction, with no infrared light and, ideally, no calibration either.

At the time, training data for appearance-based methods was almost all shot in labs. Participants sat still under fixed lighting and looked at points lighting up one after another on a screen. Take a model trained like that to a dorm room, a café or a room lit by a single desk lamp, and how big does the error get? Nobody had measured it, because there was no data like that.

This paper comes from the Max Planck Institute for Informatics in Saarbrücken, Germany, by Xucong Zhang, Yusuke Sugano, Mario Fritz and Andreas Bulling. The authors installed a background program on 15 people's laptops that, over three-plus months, asked the users every ten minutes to look at 20 points, collecting 213,659 photos; that's MPIIGaze. They then took three datasets and compared the gaze estimation methods of the time under one pipeline, the hardest setting being trained on lab data and tested on MPIIGaze. Last comes a small CNN with only two convolutional layers, with head pose as a second input; Cheng et al.'s survey of gaze estimation lists it as the first method to estimate gaze direction with a CNN.

Defining the Problem

Gaze Is a Direction

What gaze estimation outputs is the direction from the eye to the point of gaze. MPIIGaze writes it as a unit vector g=(x,y,z)\mathbf g=(x, y, z) in the camera coordinate system. That coordinate system has its origin at the lens, with the xx axis pointing to the right of the image, the yy axis pointing down, and the zz axis extending forward from the lens. If the eye is directly in front of the lens, a gaze looking straight into the lens has direction (0,0,−1)(0, 0, -1).

Three numbers with the constraint "length 1" leave only two degrees of freedom, so gaze is often rewritten as two angles: pitch (θ\theta) for up and down, yaw (ϕ\phi) for left and right. The conversion given on the MPIIGaze project page is

θ=arcsin⁡(−y),ϕ=atan2⁡(−x, −z)\theta = \arcsin(-y), \qquad \phi = \operatorname{atan2}(-x,\ -z)

And back from the angles to the vector:

g=(−cos⁡θsin⁡ϕ, −sin⁡θ, −cos⁡θcos⁡ϕ)\mathbf g = (-\cos\theta\sin\phi,\ -\sin\theta,\ -\cos\theta\cos\phi)

The minus signs in the formulas make the direction into the lens correspond exactly to (θ,ϕ)=(0,0)(\theta, \phi) = (0, 0). The yy axis points down, so looking down gives a positive yy and a negative θ\theta. A laptop's camera sits at the top edge of the screen, so gaze at the screen nearly always points downward, which is why most of MPIIGaze's pitch values are negative.

A diagram drawn for this note, in two panels side by side. The left panel is a top view: a camera on the left and an eye on the right, with a dashed line between them labeled to camera; a blue arrow from the eye tilts 15° toward the top of the panel, labeled φ = 15°, with a note that turning toward −x makes φ positive. The right panel is a side view of the same camera and eye: an orange arrow tilts 10° downward, labeled θ = −10°, with a note that looking down makes θ negative. Below are the vector-to-angles conversion θ = arcsin(−y), φ = atan2(−x, −z), the angles-to-vector conversion g = (−cos θ sin φ, −sin θ, −cos θ cos φ), and the example θ = −10°, φ = 15° giving g = (−0.255, 0.174, −0.951).
Drawn for this note from the conversion formulas on the MPIIGaze project page.

Plug in some numbers. The eye looks 10° down and turns 15° toward the −x-x side, that is, θ=−10°\theta = -10° and ϕ=15°\phi = 15°:

gx=−cos⁡10°sin⁡15°=−0.255gy=sin⁡10°=0.174gz=−cos⁡10°cos⁡15°=−0.951\begin{aligned} g_x &= -\cos 10°\sin 15° = -0.255\\ g_y &= \sin 10° = 0.174\\ g_z &= -\cos 10°\cos 15° = -0.951 \end{aligned}

gzg_z is −0.951-0.951, so most of the length still points toward the lens; gyg_y is positive, pointing down.

Angular Error

Once the model predicts g^\hat{\mathbf g}, the error is the angle between the two vectors:

e=arccos⁡g⋅g^∥g∥ ∥g^∥e = \arccos\frac{\mathbf g\cdot\hat{\mathbf g}}{\|\mathbf g\|\,\|\hat{\mathbf g}\|}

It's in degrees; averaging ee over every image in the test set gives the mean angular error reported in the paper.

Suppose the model guesses θ^=−8°\hat\theta = -8° and ϕ^=20°\hat\phi = 20°, which as a vector is (−0.339, 0.139, −0.931)(-0.339,\ 0.139,\ -0.931). Its dot product with g\mathbf g above is 0.9957, and the arccosine is 5.33°. The two angles are off by 2° and 5°; the square root of the sum of their squares is 5.39°, a bit larger than the true angle, because when pitch isn't 0, the arc that the same 5° of yaw difference traces on the sphere is multiplied by cos⁡θ\cos\theta. The farther the gaze is from straight ahead, the more the two calculations diverge; the mean angular errors the paper reports are all angles between vectors.

How big is 5°? With the screen 50 cm from the eyes, 1° corresponds to about 8.7 mm on the screen, so 5.33° is 4.7 cm.

Model-Based and Appearance-Based

Gaze estimation methods fall into two broad families.

Model-based methods first build a geometric eyeball model, then measure the model's parameters from the image. One kind relies on corneal reflections, using external light sources (usually near-infrared) to cast bright spots on the cornea and looking at where those spots sit relative to the pupil; early versions only worked with the head still, later ones handled head movement with multiple light sources or multiple cameras, and most commercial eye trackers belong to this kind. The other kind looks only at shape, inferring the eyeball's orientation from the pupil center or the iris edge in the image, with no external light source. EyeTab, which the paper compares against, belongs to the latter: it fits a disk of fixed diameter (the limbus) to the detected iris edge. Shape-based methods need to see the iris outline clearly, and the authors considered it an open question at the time whether they could hold up under low image quality and variable lighting.

Appearance-based methods build no eyeball model and learn the "eye image → gaze direction" mapping directly, which works even when the eye is tiny. The price is a large amount of training data. Early appearance-based methods assumed a fixed head or required everyone to first collect a batch of their own data, that is, personal calibration. Around 2014, work on person-independent estimation began: train one model on data from many people and use it directly on someone it has never seen. Among these, the learning-by-synthesis of Sugano et al. (the second author of this paper) took the 50 participants of UT Multiview, reconstructed the 3D shape of the eye region, synthesized eye images under all kinds of head poses, and trained a random forest. MPIIGaze's entire preprocessing follows that paper.

These person-independent methods also share the assumption that head pose is accurate, usually coming from a depth camera or other 3D input. How much the whole pipeline loses with an ordinary webcam and automatically detected landmarks, the authors say, nobody had evaluated before.

Data From the Lab

The table's columns are, in order, the number of participants, the number of gaze targets on the screen ("cont." means the target moves continuously or has no fixed position), the number of lighting conditions, and the number of images.

DatasetPeopleTargetsLightingImages
Columbia562115,880
Eyediap16cont.2video
UT Multiview50160164,000
MPIIGaze15cont.daily life213,659

Excerpted from Table 1 of the paper.

In UT Multiview, each person looks at 160 points under 8 head poses, and more are synthesized from the reconstructed 3D shape; Eyediap has two lighting conditions, but only some participants were recorded under the second. In the other datasets in the paper's table, each person was recorded within a single day; MPIIGaze collected for 45.7 days per person on average.

The authors split the problem into two tasks.

  1. Training and test look different. Training data can't cover every situation at test time, so how well does a model hold up against appearances it hasn't seen? Training on one dataset and testing on another measures exactly that.
  2. Training data can be collected in the target environment. With training and test from the same dataset, only with different people, how well can the model do?

The second can be expected to score better. The authors argue that the first is what person-independent estimation ultimately has to face, and that it's also the most important in practice.

So how many times larger does the error get when a model trained on lab data is put in front of a laptop? And how much can a CNN win back?

Solving the Problem

Every Ten Minutes, Twenty Points

Laptops were chosen for two reasons. A laptop is a personal device that usually stays with the same owner all day, and its front camera is fixed relative to the screen, with enough resolution. The authors also note that laptops are themselves a platform for gaze-based interaction.

Every 10 minutes the background program pops up and asks the user to look at 20 random positions on the screen in turn. Each position is a gray circle that gradually shrinks, with a white dot in the middle; just before the circle disappears, the user presses the space bar to confirm. This design forces users to actually be staring at the dot the moment they press the key. Beyond that there were no instructions at all: where to use it, how to sit, whether to turn the lights on, it was all up to the user.

The ground truth for each photo needs two things, where the point of gaze is and where the eye is, both in the camera coordinate system. The point of gaze starts out as a pixel position on the screen; the camera intrinsics are calibrated in advance, and the 3D position of the screen plane relative to the lens is found with a mirror-based calibration. The camera sits above the screen and can't see the screen below it, but put a mirror in front of it and it can see the screen in the reflection. That way every point on the screen can be converted to a 3D point in camera coordinates; subtract the eye's position, and you have the gaze vector.

The 15 participants ended up with 213,659 images, 34,745 from the most prolific and just over a thousand from the least. Recording leaned toward working hours but covered every time of day; the mean brightness of the face and the brightness difference between the left and right halves of the face are both widely spread, the latter roughly reflecting which side the light comes from. The authors also had 10,848 images manually annotated with facial landmarks, face boxes, two eye boxes and pupil positions, for use in other tasks.

From a Face to an Eye

The first half of the pipeline is standard face processing. Faces are detected with a SURF cascade, assuming only one face per frame and taking the largest box if several are detected; about 5% of the photos fail detection and are simply discarded. Facial landmarks are then found with the method of Baltrušaitis et al.

Head pose is computed with a six-point 3D face model, the six points being the four eye corners of the two eyes and the two mouth corners. With the landmarks' positions in the photo, the 3D coordinates of these six points and the camera intrinsics in hand, EPnP gives an initial rotation and translation, which nonlinear optimization then refines. The result is the head rotation r\mathbf r (from head coordinates to camera coordinates) and each eye's position t\mathbf t, taken as the midpoint of its two eye corners.

The 3D face model is a mean face shape. Before data collection, the authors measured the 3D positions of these six points for every participant with an external stereo camera and averaged them. They didn't use each person's own face shape, because the aim was to evaluate the whole pipeline as it could actually be used, with errors from landmark detection and the mean face shape propagating all the way down.

Data Normalization

The same eye looking in the same direction looks different in a photo depending on where the head is and which way it faces. Move the head a little to the left and the eye's position and perspective in the frame change; lean back and the eye gets smaller; tilt the head and the eye tilts with it. The eye has 6 degrees of freedom relative to the camera (3 translations, 3 rotations), and leaving all of them for the estimator to learn would take a frightening amount of data.

Sugano et al.'s observation was that most of them can be removed with geometry. If the area around the eye is roughly a plane, then rotating the camera "virtually" or changing the distance between camera and eye is just a perspective warp of the photo, with no need to reshoot. The eye's position in the frame, its distance from the lens and the head's roll can all be removed this way; what's left are the 2 degrees of freedom of the head turning left-right and up-down relative to "the line from the lens to the eye," which turning the camera can't make up for and which are left for the estimator to handle. This preprocessing is called data normalization, and it takes two steps.

Rotation. Turn the camera to face the eye center er\mathbf e_r head-on, while making the camera's xx axis parallel to the xx axis of the head coordinate system. The three new axes are

zc=er∥er∥yc=zc×xh∥zc×xh∥xc=yc×zc\begin{aligned} \mathbf z_c &= \frac{\mathbf e_r}{\|\mathbf e_r\|}\\ \mathbf y_c &= \frac{\mathbf z_c \times \mathbf x_h}{\|\mathbf z_c \times \mathbf x_h\|}\\ \mathbf x_c &= \mathbf y_c \times \mathbf z_c \end{aligned}

xh\mathbf x_h is the direction of the head coordinate system's xx axis in camera coordinates. Stacking the three axes gives the rotation matrix R=[xc,yc,zc]⊤R = [\mathbf x_c, \mathbf y_c, \mathbf z_c]^\top. After the rotation, the eye lies on the new camera's optical axis; the new camera's xx axis follows the head, so the roll of a tilted head goes to zero as well.

Scaling. Then pull the eye along the optical axis to a fixed distance dnd_n:

S=diag⁡ ⁣(1, 1, dn∥er∥),M=SRS = \operatorname{diag}\!\left(1,\ 1,\ \frac{d_n}{\|\mathbf e_r\|}\right),\qquad M = SR
A diagram drawn for this note, with three top-view panels in the top row. The first, original camera: the camera faces straight ahead, with the eye off to the front right, labeled e_r = (60, 80, 500) mm, distance |e_r| = 510 mm. The second, rotation R: the camera turns toward the eye, with the z axis passing through the eye and the x axis along the head's x axis, so roll goes to zero. The third, scaling S: the camera backs off along the same line until the distance is 600 mm, S = diag(1, 1, 1.18), and the image is warped by W = C_n M C_r⁻¹. Bottom left is the normalized input, a 60 × 36 eye image, f = 960, d = 600 mm, grayscale plus histogram equalization, with a note that a gaze into the camera becomes (0, 0, −1) after multiplying by R, angles (0°, 0°), wherever the eye started. Bottom right compares the same gaze: multiplied by R alone its yaw is 15°, and multiplied by M = SR, scaling included, it becomes 12.8°; ETRA 2018 changed it so the gaze is multiplied by R only.
Drawn for this note from Section 4.2 of the paper; the normalization parameters are from the authors' journal version, and the eye position is this note's example.

Walk through it with some numbers. The eye is 6 cm to the right of the lens, 8 cm below and 50 cm in front, so er=(60,80,500)\mathbf e_r = (60, 80, 500) mm, at a distance of ∥er∥=509.9\|\mathbf e_r\| = 509.9 mm. Assume the head isn't turned, so xh=(1,0,0)\mathbf x_h = (1, 0, 0).

  • zc=er/509.9=(0.118, 0.157, 0.981)\mathbf z_c = \mathbf e_r / 509.9 = (0.118,\ 0.157,\ 0.981)
  • zc×xh=(0, 0.981, −0.157)\mathbf z_c \times \mathbf x_h = (0,\ 0.981,\ -0.157), normalized to yc=(0, 0.987, −0.158)\mathbf y_c = (0,\ 0.987,\ -0.158)
  • xc=yc×zc=(0.993, −0.019, −0.116)\mathbf x_c = \mathbf y_c \times \mathbf z_c = (0.993,\ -0.019,\ -0.116)

Rotate the eye's position with RR: R er=(0,0,509.9)R\,\mathbf e_r = (0, 0, 509.9), and the eye is now on the optical axis. With dnd_n set to 600 mm, the third diagonal element of SS is 600/509.9=1.177600/509.9 = 1.177, and Mer=(0,0,600)M\mathbf e_r = (0, 0, 600).

The photo itself is warped by W=CnMCr−1W = C_n M C_r^{-1}. CrC_r is the real camera's intrinsic matrix and CnC_n the virtual camera's. Reading right to left, Cr−1C_r^{-1} turns a pixel back into a ray of the real camera, MM rotates and scales the ray into normalized camera coordinates, and CnC_n projects it back to a new pixel. The paper says the distance, focal length and resolution all follow Sugano et al.'s settings, and the authors' journal version lists the numbers: dn=600d_n = 600 mm, focal length 960, output 60×3660\times36. Once the eye is cropped, it's converted to grayscale and histogram-equalized to suppress lighting differences. Assuming the two eye corners are 3 cm apart, at 600 mm with focal length 960 that's about 48 pixels, so the eye nearly fills the 60-pixel-wide frame.

This is done once for each eye, with er\mathbf e_r taken as the midpoint of that eye's two corners.

Head pose is transformed along with it. The normalized head rotation is Rn=MRrR_n = M R_r; roll is already zero, and the remaining horizontal and vertical angles are written as a 2D head angle vector h\mathbf h. The gaze ground truth is also multiplied by the same MM to bring it into the normalized space, then converted to two angles g\mathbf g.

Take one special gaze, the one looking straight into the lens. In the original camera it's −er/∥er∥-\mathbf e_r / \|\mathbf e_r\|; multiplied by RR, it becomes exactly what −zc-\mathbf z_c looks like in the new coordinates, which is (0,0,−1)(0, 0, -1), with both angles 0. Whether the eye was on the left or right of the frame, and however far from the lens, after normalization "looking at the lens" is always the same label. As long as different datasets use the same dnd_n, focal length and resolution, their normalized eye images can be mixed and compared, which is the prerequisite for the cross-dataset evaluation later.

The gaze is multiplied by MM, which means the scaling is multiplied in too. SS stretches only the zz axis, and for a direction vector that changes its angle. In the example above, a gaze with a yaw of 15° after rotation has its zz component multiplied by 1.177, and its yaw becomes 12.8°; if the eye were 750 mm away, SS would shrink the zz axis and 15° would become 18.5°. The same eye appearance gets a label that swings up and down with the distance between person and lens. Three years later, Zhang, Sugano and Bulling published "Revisiting Data Normalization" at ETRA 2018, changing the gaze to be multiplied by RR only, which improved performance by 9.5% to 32.7% across the authors' evaluation settings.

A LeNet, Plus Head Pose

Original Figure 6: the architecture of the multimodal CNN. On the far left is a grayscale eye image labeled 1@36x60; convolution then gives 20@32x56, max pooling 20@16x28, another convolution 50@12x24, and another pooling 50@6x12; next is a fully connected layer of 500 units, with h marked at the bottom of the layer to show that the head angle vector is attached there; the last layer regresses 2 output numbers.
Original Figure 6, Zhang et al., from PDF page 6, arXiv license, scholarly quotation.

The network is a LeNet, the architecture family used for handwritten digit recognition, implemented in Caffe. Walk through it along the shapes in the figure.

  1. The input is the normalized grayscale eye, 1×36×601\times36\times60.
  2. The first convolution layer has 20 kernels of 5×55\times5, with no padding, so height and width each lose 4, giving 20×32×5620\times32\times56.
  3. 2×22\times2 max pooling: 20×16×2820\times16\times28.
  4. The second convolution layer, 50 kernels of 5×55\times5: 50×12×2450\times12\times24.
  5. Pooling once more: 50×6×1250\times6\times12, 3,600 numbers when flattened.
  6. A fully connected layer with 500 units.
  7. The 2D head angle h\mathbf h is appended to these 500 numbers, making 502 dimensions, and a single linear regression layer outputs g^=(g^ϕ,g^θ)\hat{\mathbf g} = (\hat g_\phi, \hat g_\theta).

The loss is the sum of the squared errors of the two angles:

L=∑i[(g^ϕ,i−gϕ,i)2+(g^θ,i−gθ,i)2]\mathcal L = \sum_i \Big[\big(\hat g_{\phi,i} - g_{\phi,i}\big)^2 + \big(\hat g_{\theta,i} - g_{\theta,i}\big)^2\Big]

Count the parameters from these shapes. The two convolution layers together have fewer than 26,000 parameters, the fully connected layer has 3600×500+500=1,800,5003600\times500+500 = 1{,}800{,}500, and the final regression layer just over a thousand, about 1.83 million in total, 98.5% of them in that one fully connected layer.

Why is the head angle still needed? Normalization removes the head's position and roll, but which way the head is turned remains. The same eye appearance corresponds to different gazes when the head faces left and when it faces right. The ablation later shows the error rising clearly once h\mathbf h is removed.

Both eyes share one model. Following Sugano et al., the authors hold that in the person-independent setting the difference between left and right eyes doesn't matter: flip right-eye images horizontally, negate the yaw of h\mathbf h and g\mathbf g along with them, and they can be mixed with left eyes for training.

Baselines

All methods share the same face detection, landmarks, head pose and normalization; only the final estimator changes.

  • RF: Sugano et al.'s random forest, using the code the authors released. Training samples are first clustered by head angle, and each test sample goes to the nearest cluster; eyes are shrunk to 16×916\times9.
  • kNN: k-nearest-neighbor regression from the same code, also clustered by head angle first.
  • ALR: adaptive linear regression, originally designed for small amounts of personal data, which can't cope once there's a lot of data; following an earlier approximation, the authors pick only 5 training people for each test person and randomly sample part of their samples with similar head poses.
  • SVR: linear support vector regression on HOG plus LBP features.
  • EyeTab: the shape-based method mentioned above, using the code its authors released.

Discussion

How the Evaluation Is Split

The number of photos per participant varies by a factor of twenty-plus, so using all of them directly would let the few people with the most data dominate the results. The authors randomly sample 1,500 left eyes and 1,500 right eyes from each person; one participant didn't have enough photos and was oversampled with repeats up to 3,000. That makes 45,000 eye samples across 15 people. This list is released with the dataset as the Evaluation Subset. Most later papers reporting MPIIGaze results run leave-one-person-out cross-validation on this list: train on 14 people, test on the remaining 1, and average over 15 rounds.

For cross-dataset training, UT Multiview is chosen because its head angles and gaze angles cover the widest range. Besides MPIIGaze, Eyediap is also used for testing. Eyediap's head poses are the version provided with the dataset, obtained by fitting each person's own 3D face shape to depth images, whereas MPIIGaze's come from a mean face shape plus automatic landmarks; the floating-target sessions contain many extreme gazes that UT Multiview doesn't cover, so the authors use only the screen-target sessions.

From the Lab to the Laptop

Original Figure 7: a bar chart, with mean error (degrees) on the vertical axis from 0 to 20. The left group is MPIIGaze and the right group Eyediap, each with five bars, CNN, RF, kNN, ALR and SVR in order, from dark to light, each with an error bar. In both groups the darkest, CNN, is the shortest, about 14 on MPIIGaze and about 10.5 on Eyediap; the other four bars in the MPIIGaze group are all between 15 and 17, and those in the Eyediap group between 12 and 15.
Original Figure 7, Zhang et al., from PDF page 6, arXiv license, scholarly quotation.

This figure trains on UT Multiview and tests on MPIIGaze (left) and Eyediap (right). The bars are the error averaged over all people, and the error bars the standard deviation across people.

Two baselines first. A dumb predictor that always outputs the training set's mean gaze direction gets 34.2° on MPIIGaze and 42.4° on Eyediap. The shape-based EyeTab does even worse on MPIIGaze, 47.1°, and fails detection on 7% of the photos.

The CNN is the lowest on both, 13.9° on MPIIGaze and 10.5° on Eyediap. Compared with the runner-up, RF, that's a relative reduction of 10% and 12%, with a paired Wilcoxon test at p<0.05p<0.05. RF, kNN, ALR and SVR all fall between 15° and 17° on MPIIGaze.

The same model scores 3.4° worse on MPIIGaze than on Eyediap. Neither is the training set, and the authors attribute the gap to the difficulty of everyday environments themselves; the different sources of head pose are also a difference in conditions between the two. On a screen half a meter away, 13.9° is about 12 cm.

The authors' reading is that UT Multiview synthesizes all kinds of head poses through 3D reconstruction, but the variation in the eyes' own appearance is limited and there's only one lighting condition; this is a fundamental limit of learning-by-synthesis, to be addressed from both the data side and the method side.

Training on Its Own Data

Original Figure 8: a bar chart, with mean error (degrees) on the vertical axis from 0 to 12. Six bars, in order CNN, RF, kNN, ALR, SVR and Pupil Pos., each with an error bar. CNN is the shortest, about 6.3; RF is about 6.7, kNN about 7.2, ALR about 7.9, SVR about 6.6, and Pupil Pos. the tallest, about 8.7.
Original Figure 8, Zhang et al., from PDF page 7, arXiv license, scholarly quotation.

Now switch to leave-one-person-out cross-validation within MPIIGaze. EyeTab did too badly in the previous experiment, so here the pupil positions it detects are used as kNN features instead, which is the Pupil Pos. bar on the far right.

Every appearance-based method does far better than in the cross-dataset setting. The CNN gets 6.3°, still the lowest, though its lead has narrowed. Second place goes to SVR, which came last in the cross-dataset setting. The pupil-position method beats EyeTab itself but is worse than every appearance-based method. The authors conclude that appearance-based methods depend heavily on training data close to the target environment.

The dumb predictor here gets 13.9°. The gaze distribution within the dataset is itself a strong prior: laptop users' gaze is concentrated in the small patch of the screen, so guessing the mean isn't far off. The two 13.9° figures are a coincidence, but side by side they say a lot. The CNN trained on UT Multiview, once put in front of a laptop, is exactly as accurate as a predictor that knows MPIIGaze's gaze distribution and always guesses the mean.

The authors also break the results down by lighting. For the model trained on UT Multiview, the error climbs to nearly 20° as the face gets brighter or when light comes from one side; the model trained within MPIIGaze stays at roughly 6° to 7° under all kinds of lighting. On this basis the authors stress that the training data itself has to cover enough variation in lighting and appearance.

Taking the CNN Apart

Original Figure 10: a bar chart, with mean error (degrees) on the vertical axis from 0 to 12, in four groups. The first group, UT, has four bars: CNN about 5.9, RF about 6.5, Clustered CNN about 6.5 and Eye image CNN about 8.5. The second group, UT subset, has CNN about 4.5 and RF about 4.8. The third group, MPIIGaze (person-specific), has CNN about 3.3 and RF about 4.5. The fourth group, UT subset (person-specific), has CNN about 1.1 and RF about 2.3.
Original Figure 10, Zhang et al., from PDF page 8, arXiv license, scholarly quotation.

The last set of experiments sets out to settle whether each design choice in the CNN is useful, and how much harder MPIIGaze really is than lab data. The figure has four groups, from left to right.

UT. Three-fold cross-validation on UT Multiview, the same setup Sugano et al. originally used. The CNN gets 5.9° and RF about 6.5°. Sugano et al.'s random forest improves with "clustering by head pose," but moving the same clustering to the CNN (Clustered CNN) actually raises the error to about RF's level. Removing the head angle input and feeding only the eye image (Eye image CNN) raises it to around 8.5°, the worst in this group.

UT subset. The 5.9° within UT Multiview and the 6.3° within MPIIGaze look similar, but the two differ in difficulty, since UT Multiview's head and gaze ranges are much wider. The authors pick a subset of UT Multiview whose head and gaze distribution matches MPIIGaze's, 3,000 images per person, again with three-fold cross-validation, and the CNN gets about 4.5°. With matched ranges, the lab data comes in nearly 2° below MPIIGaze, a gap the authors attribute to the appearance variation of everyday environments and to eye alignment errors from automatic landmarks.

Person-specific. The rightmost two groups no longer switch people: each person trains and tests on their own data. For MPIIGaze, the last quarter of each person's data is the test set and the rest is for training, and the CNN gets about 3.3°; for the UT subset, 500 test images and 2,500 training images per person give about 1.1°. These two numbers represent the ceiling achievable with personal calibration.

Lining up the CNN's results on MPIIGaze:

  1. Trained in the lab, cross-dataset: 13.9°
  2. Within MPIIGaze, on an unseen person: 6.3°
  3. Each person on their own data: about 3.3°

Each step down, the training data gets a little closer to the person being tested.

What Came After

Two years later, the authors extended this paper into a journal version, posted on arXiv in 2017 and published in TPAMI in 2019. The 45,000 eye samples used for evaluation come from 37,667 faces, and the authors manually re-annotated the landmarks of all these faces (MPIIGaze+); the network was switched to the 13 convolution layers of VGG-16 and called GazeNet. The cross-dataset error on MPIIGaze dropped from 13.9° to 10.8°; with the same model cropping eyes using the manually annotated landmarks, it dropped to 9.8°, from which the journal version concludes that face detection and landmark alignment remain a main source of error in practice. Within the dataset, GazeNet gets 5.5°, 13% better than the runner-up, and that runner-up is this paper's LeNet, which the authors simply call MnistNet in the journal version (refreshingly honest naming).

The dataset was also updated once along with the journal version. In January 2018, a user found in issue #1 of hysts/pytorch_mpiigaze that the new version's original images and normalized data didn't match and that some annotation values were corrupted; after they emailed the authors, a fixed version was uploaded on January 24.

The leave-one-person-out result in this repo's README is 6.52° for LeNet, less than 0.3° from the paper's 6.3°; switching to ResNet-preact-8 gives 5.73°. In issue #43 from 2021, someone computed the gaze range of the Evaluation Subset: the 0.5% to 99.5% quantiles of pitch fall between −19.1° and 1.6°, and yaw is around ±18°. The journal version gives the pitch range as −1.5° to 20°, exactly the opposite sign; comparing against the journal version's own distribution plot, hysts concluded that the sign had been written backward. Before comparing MPIIGaze numbers with another dataset, check that both define the sign of "looking down" the same way.

Cheng et al.'s 2021 survey, in a version updated in April 2024, reimplemented this LeNet and got 6.27° on MPIIGaze, consistent with the paper's 6.3°. In the same table, later methods mostly fall between 4° and 5°, the lowest being AFF-Net at 3.69°.

Conclusion

MPIIGaze put the first number on how much worse a gaze model trained on lab data gets in front of an everyday laptop. 15 people, three-plus months, 213,659 photos, with every method sharing the same detection, alignment and data normalization, and only the final estimator changing.

Trained on UT Multiview and tested on MPIIGaze, even the best performer, the CNN, is at 13.9°, as accurate as a predictor that only ever guesses MPIIGaze's mean gaze; within MPIIGaze on an unseen person it's 6.3°, and on one's own data about 3.3°. The only difference between the three numbers is how close the training data is to the person being tested.

To make your numbers line up with the literature, normalize with 600 mm, focal length 960, 60×3660\times36, grayscale plus histogram equalization, and when re-normalizing yourself, multiply the gaze labels by the rotation RR only. Evaluate with leave-one-person-out cross-validation on the Evaluation Subset, and clip the dot product to [−1,1][-1, 1] before taking the arccosine; the project page's Q&A mentions that this is one of the common causes of NaN in reported errors. Before comparing with another dataset, double-check that both agree on the sign of "looking down."

This paper leaves three things behind:

  1. A gaze dataset collected in everyday environments, together with the 3,000-per-person Evaluation Subset; later papers reporting MPIIGaze mostly follow this list.
  2. A data normalization procedure that lets eye images from different datasets be mixed and compared; the step that multiplies the scaling into the gaze was fixed three years later by the same group of authors at ETRA 2018.
  3. A LeNet with head angles attached. The journal version two years later switched to the VGG-16-based GazeNet, which got down to 5.5° within the dataset, 13% better than the runner-up, and that runner-up was this LeNet, called MnistNet in the journal version.