Back to paper library
Paper notesarXiv 2019ICCV 2019

Gaze360

Even the Back of the Head

Original paper

Gaze360: Physically Unconstrained Gaze Estimation in the Wild

Paper authors

Petr Kellnhofer · Adria Recasens · Simon Stent · Wojciech Matusik · Antonio Torralba

Publication
ICCV 2019Conference
First submitted to arXiv
arXiv:1910.10088
Cite this paper · BibTeX

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

@misc{faceanalysisgaze3602019,
  title = {{Gaze360: Physically Unconstrained Gaze Estimation in the Wild}},
  author = {Petr Kellnhofer and Adria Recasens and Simon Stent and Wojciech Matusik and Antonio Torralba},
  year = {2019},
  eprint = {1910.10088},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.10088}
}
On this page

Table 1 of the paper compares ten gaze datasets. Among the 3D datasets whose images you can actually get, the widest gaze range is EYEDIAP's 90°; the two that reach 180° never released their data. Gaze360 stretches the range to 360° and has to give an answer even for people with their backs to the camera.

A range that wide is meant for scenes far from any screen. A camera next to a supermarket shelf films a customer two meters away, turned sideways, glancing back and forth between the shampoo and the cola; a service robot moving through a lobby wants to know whether the person walking toward it is looking at it. Person and camera are anywhere from one or two meters to several meters apart, the face may be only half turned toward the camera, and sometimes the person has their back to it entirely.

Gaze datasets before this almost all assumed the face was turned toward a screen. MPIIGaze is faces half a meter in front of a laptop, GazeCapture faces shot by a phone's front camera; camera and gaze target are both right in front of the user, so the gaze range is naturally narrow. A person with their head turned 90° is nearly impossible to find in these training sets.

Gaze360 comes from MIT and the Toyota Research Institute, with Petr Kellnhofer and Adrià Recasens as joint first authors and Simon Stent, Wojciech Matusik and Antonio Torralba as the other three. Kellnhofer, Matusik and Torralba were also authors of GazeCapture in 2016, which crowdsourced 1,450 people through their phones. This time the authors went the other way, using a 360° panoramic camera and a moving board to record several people at once, indoors and outdoors, collecting 3D gaze data from 238 participants that covers a full 360° horizontally. The model takes 7 video frames and gathers cues from before and after with a bidirectional LSTM, and besides the gaze direction it also outputs a number saying how unsure it is.

Defining the Problem

Every Face Turned Toward a Screen

Below are a few datasets excerpted from Table 1 of the paper. Range is the horizontal angle the dataset's gaze covers.

DatasetPeopleRangeOutdoor
iTracker1,450~100°Partly
MPIIFaceGaze15~80°No
RT-GENE1575°No
EYEDIAP1690°No
Zhu200180°No
Gaze360238360°Yes

Excerpted from Table 1 of the paper. The iTracker row is GazeCapture, labeled with 2D screen coordinates; the rest are 3D gaze.

The authors split existing collection methods into two kinds. One is a fixed recording rig, where the positions of participant and target are measured precisely and well controlled, but there's little variation in lighting or motion blur; the rig is hard to move, records only one person at a time, and requires constantly checking that the participant really is looking at the target, slow and inflexible, which is why every 3D gaze dataset is indoors with few people. Zhu and Deng used a whole row of cameras to speed things up and add viewpoints, reaching 180°, but they were still stuck in the lab, and the data wasn't released either. The other kind is phone crowdsourcing, which makes it easy to push the number of people up, but camera and screen sit on the same device and the screen is small, so head pose and gaze are squeezed into a very narrow range.

RT-GENE is one of the few attempts to move toward natural scenes. It needs no target: participants wear eye-tracking glasses, head pose comes from a motion capture system, and finally a generative model "retouches" the glasses off the face. The setup is complex, and only 15 people were recorded.

The other problem is on the model side. With the head turned 90° to 135°, most of one eyeball is often still visible; turn further and neither eye can be seen. Existing methods mostly assume the person faces the camera and don't handle these cases. The authors want the model to always give a best guess while telling the user how reliable that guess is. A classification problem can use softmax probabilities as a proxy for confidence, but regression has no such thing; the size of the output is the prediction itself.

That leaves two questions. How do you label 3D gaze for a whole group of people at once, outdoors? And how does a regression model say "I'm not too sure about this one"?

Solving the Problem

A Panoramic Camera and a Moving Board

Original Figure 2: a curved outdoor panoramic photo. On the left half stands a row of participants, each with an orange arrow drawn over the head, all pointing to a researcher on the right who is bending over holding a white board; in the center of the frame is an overlaid black Ladybug5 panoramic camera, labeled 30 megapixel, 360° camera. Bottom left is a close-up of one participant's face with a yellow gaze arrow, labeled Dataset sample; bottom right is a close-up of the board, with a black-and-white AprilTag square on the upper half and a red Target cross below.
Original Figure 2, Kellnhofer et al., from PDF page 3, arXiv license, scholarly quotation.

In the middle of the site is a Ladybug5 panoramic camera on a tripod. It consists of five synchronized 5-megapixel camera units arranged in a ring, each with a 120° horizontal field of view, overlapping one another, plus an upward-facing unit on top that this paper doesn't use. Each frame is corrected for fisheye distortion and stored at 3382×40963382\times4096, and for a person standing a meter away, the face appears in full in at least one of the units. One camera, one tripod, one laptop and a power bank: the whole rig is portable.

Participants stand one to three meters around the camera (2.2 meters on average) and keep their eyes on the cross on the board the whole time. One face of the board has a large AprilTag printed on it, and the two faces beside it each carry a small cross; participants look at the cross on the face turned toward them. A researcher carrying the board first walks a large circle around the participants and the camera, with a radius of two to five meters, then passes between the camera and the participants, raising and lowering the board along the way to create up-and-down variation in gaze. The outer loop makes the gaze cover every horizontal direction, and the inner loop, close to the participants, is what produces larger pitch.

During recording, the researcher alternates between two commands. On "move," participants may naturally turn their heads and bodies to follow the board; on "freeze," the head stays fixed and only the eyes may move. Alternating the two is meant to capture every combination of head orientation and eye rotation.

For safety, participants mostly stay in place, since while their eyes follow the board they can't see obstacles at their feet.

Where Are the Eyes?

Each frame needs the 3D position of the participant's eyes, the 3D position of the cross, and the direction of the line between them.

The eye positions come from AlphaPose. In each camera unit's image, it detects every person's head keypoints and foot positions separately; if a person stands too close and their feet leave the frame, the feet are inferred from the hips using average standing body proportions. The Ladybug gives every pixel a 3D ray in the global coordinate system LL, so the directions to the feet and the eyes are known, and the only thing missing is the distance dd from the eyes to the camera.

The authors fill this gap using the ground. The camera's height above the ground, hh, is measured in advance, camera and participant stand on the same level surface, and the feet are always on the ground. The supplementary material writes out the trigonometry:

z=h⋅tan⁡ ⁣(π2−α),d=zcos⁡βz = h\cdot\tan\!\left(\frac{\pi}{2}-\alpha\right),\qquad d = \frac{z}{\cos\beta}

α\alpha is the angle by which the camera's ray to the feet dips below the horizontal, β\beta is the angle between the ray to the eyes and the horizontal, and zz is the horizontal distance from the feet to the camera.

A diagram drawn for this note, in two panels side by side. The left panel is a side view: a camera at height h stands on the ground, with a stick figure standing to the right; an orange line runs from the camera to the feet, at angle α to the horizontal dashed line; a blue line runs to the head, at angle β, with its length labeled d; the horizontal distance z is marked on the ground. Below it reads z = h · tan(90° − α) = 1.2 × tan 60° = 2.08 m and d = z / cos β = 2.08 / cos 10° = 2.11 m, with a note that h, α and β are this note's assumed example. The right panel is a top view: a black dot in the center stands for the Ladybug5, with two people, A and B, standing in different directions; each has a purple arrow pointing outward along the ray from the camera to the eyes, labeled E_z, and a green arrow pointing back to the camera, with a legend saying that looking at the camera gives g = (0, 0, −1); below it reads g = E · g_L / |g_L| (Eq. (1)), with E_x staying level and no roll.
Drawn for this note from Section 3.1 of the paper, equations (2) and (3) of the supplementary material and the official code; the values of h, α and β are this note's example.

Plug in some numbers. Suppose the camera is 1.2 meters off the ground, the ray to the participant's feet dips 30° below the horizontal, and the ray to the eyes rises 10° above it. The horizontal distance is z=1.2×tan⁡60°=2.08z = 1.2\times\tan60° = 2.08 meters, and the distance from the eyes to the camera is d=2.08/cos⁡10°=2.11d = 2.08/\cos10° = 2.11 meters; as a bonus, the eyes are 1.2+2.08×tan⁡10°=1.571.2 + 2.08\times\tan10° = 1.57 meters off the ground. This assumption restricts data collection to level ground, but there's no such restriction at test time.

The cross's position comes from the AprilTag. The tag is detected in each camera unit, the board's 3D pose is solved from the known camera calibration and tag size, and the position of the cross, pt\mathbf p_t, follows from the board's geometry. When holding the board, the researcher keeps the AprilTag facing the camera as much as possible to reduce pose estimation error.

Each Person's Own Coordinate System

With the eye position pe\mathbf p_e and the cross position pt\mathbf p_t, the gaze in global coordinates is gL=pt−pe\mathbf g_L = \mathbf p_t - \mathbf p_e. The problem is that this vector follows the global coordinate system: one person standing north of the camera and looking at it, and another standing south of it and looking at it, have gL\mathbf g_L pointing in exactly opposite directions, yet their faces look much the same in the photo, both frontal.

The authors give each person their own coordinate system E=[Ex,Ey,Ez]E = [\mathbf E_x, \mathbf E_y, \mathbf E_z], with its origin at the eyes, Ez\mathbf E_z pointing outward along the ray from the camera to the eyes, and Ex\mathbf E_x kept in the horizontal plane, with no roll. The gaze is transformed into this coordinate system (equation (1)):

g=E⋅gL∥gL∥\mathbf g = E\cdot\frac{\mathbf g_L}{\|\mathbf g_L\|}

This way, whichever direction a person stands in, a gaze at the camera is always g=(0,0,−1)\mathbf g = (0, 0, -1). Ez\mathbf E_z here follows the official code's definition; in issue #30 of the official repo, the author posted the code and explained that Ez\mathbf E_z is the direction from the camera to the eyes, and that EE depends only on the eyes' 3D position, a rotation about the xx and yy axes.

This is half of the same idea as MPIIGaze's data normalization. MPIIGaze virtually turns the camera toward the eye and warps the image along with it; Gaze360 only turns the label, and the image is just the head as cropped by AlphaPose, with no perspective warp and no straightening of the head's roll. When someone asked in issue #31 whether to normalize first at inference, the author's answer was to crop the head and feed it straight in: "We rely on the CNN to figure out the normalization."

The model outputs two angles in spherical coordinates. The official data-loading code writes them as

θ=atan2⁡(gx, −gz),ϕ=arcsin⁡gy\theta = \operatorname{atan2}(g_x,\ -g_z),\qquad \phi = \arcsin g_y

θ\theta is yaw and ϕ\phi is pitch; the other way around, g=(cos⁡ϕsin⁡θ, sin⁡ϕ, −cos⁡ϕcos⁡θ)\mathbf g = (\cos\phi\sin\theta,\ \sin\phi,\ -\cos\phi\cos\theta). The poles fall straight up and straight down, gaze directions that rarely occur.

The main text of the paper writes yaw as −arctan⁡(gx/gz)-\arctan(g_x/g_z); on the half where the gaze faces the camera (gz<0g_z<0), the two forms give the same angle. On the back side they don't. For a gaze with yaw 120° and pitch −10°, g=(0.853, −0.174, 0.492)\mathbf g = (0.853,\ -0.174,\ 0.492); the arctan⁡\arctan version gives −60°, and only atan2⁡\operatorname{atan2} can tell that it's 120°. And this dataset was built precisely for the back side.

Incidentally, in the dataset description EE's xx axis points left and its yy axis up, while MPIIGaze's camera coordinates have xx to the right and yy down; once converted, the two angle definitions actually agree: looking into the lens is (0°, 0°), and looking up gives a positive pitch. Not every preprocessing script is so lucky, though. When someone in issue #39 tried to reproduce the cross-dataset results on Columbia, the author posted their own preprocessing code, and its yaw sign was the opposite of what the person asking had written.

What the Data Looks Like

The final data covers 238 participants from 5 indoor locations (53 people) and 2 outdoor locations (185 people), in 9 recording sessions. Images with gaze labels number 129,000 for training, 17,000 for validation and 26,000 for testing. For privacy, the authors didn't separately survey participants' personal details; by visual estimate, age and ethnicity are widely spread, with 58% women and 42% men. The images are continuous short clips at 8 Hz; the authors say this is also the first gaze dataset to provide continuous clips with this kind of diversity.

After collection comes a round of cleanup. Frames where board detection failed are discarded; every person AlphaPose detects is tracked simply by head-box overlap and linked into identities. Identities that are on average less than 1.2 meters from the board are the researcher holding it and are removed; those more than 3.5 meters from the camera are mostly passersby or other team members and are removed too; finally, 6 frames are sampled evenly from each identity for visual inspection.

Original Figure 4: four oval Mollweide projection maps, with gaze yaw (−180° to 180°) on the horizontal axis and pitch (−90° to 90°) on the vertical axis, colored from dark blue to yellow by sample density (log scale). Top left is TabletGaze, top right is labeled MPIIGaze, and bottom left is iTracker; in all three the bright area is a small strip concentrated at the center and extending downward. Bottom right, Gaze360's bright area is a wide band spanning the whole map, brightest in the center and extending left and right to ±180°, fainter at the edges.
Original Figure 4, Kellnhofer et al., from PDF page 5, arXiv license, scholarly quotation.

This figure flattens the whole unit sphere into an oval: the center is looking at the camera, and the left and right edges are yaw ±180°, back to the camera. The bright areas of the first three datasets are all crammed into a small patch in the center, trailing downward, mostly because the screen is below the camera. The top-right map is labeled MPIIGaze, but what the paper cites is MPIIFaceGaze, the full-face version of the same 15-person laptop data. Gaze360's bright area spans the entire horizontal direction.

On the back side, of course, the eyes can't be seen. The authors estimate that the limit of eye visibility is around yaw ±140° in some cases: the head turned 90° with one eye still visible, and that eye turned another 50° to the same side. Vertically, the range is limited by how high the board can be held. The left and right edges are sparser because when the board goes around behind a participant, it's often blocked by the participant themselves.

How accurate are the labels? The authors ran a control experiment. They recorded with the standard procedure while mounting an extra forward-facing test camera above the participant's right eye, and measured the gaze once more in the test camera with the same AprilTag procedure; a few more AprilTags stuck on the background aligned the two cameras' coordinates. Over two participants and three recordings, the two sets of labels differ by 2.9° on average.

Seven Frames In, Three Numbers Out

Original Figure 6: at the bottom are seven head crops of the same person, labeled t−3 to t+3; each goes up into a yellow Backbone block; above are two rows of green LSTM blocks, seven per row, with arrows pointing left and right between the blocks; at the top center is a blue Fully Connected Layer, outputting Gaze direction to the left and Quantile to the right.
Original Figure 6, Kellnhofer et al., from PDF page 5, arXiv license, scholarly quotation.

Gaze is a continuous signal: whether a person is fixating on a point or moving from one spot to another, the gaze in neighboring frames is related. An eye that's hard to see in one frame may be visible in the frame before or after. So the authors have the model take 7 frames at a time and predict the gaze of the middle one, with 3 frames on each side, covering about 0.75 seconds at 8 Hz. Walk through the shapes as the official code has them.

  1. The input is 7 head crops, each resized to 3×224×2243\times224\times224.
  2. Each frame passes separately through an ImageNet-pretrained ResNet-18. After average pooling it's 512-dimensional; the official code adds a 1000-dimensional fully connected layer with ReLU, then a 1000-to-256 fully connected layer, giving one 256-dimensional feature per frame.
  3. The seven 256-dimensional features form a sequence fed into a two-layer bidirectional LSTM, 256 dimensions per direction, outputting 7×5127\times512.
  4. Only the middle frame's (the 4th position's) 512-dimensional output is taken and passed through a fully connected layer, giving 3 numbers.
  5. The first two are yaw θ\theta and pitch ϕ\phi in spherical coordinates, and the third is the uncertainty σ\sigma. The official code squeezes yaw into (−π,π)(-\pi,\pi) with πtanh⁡(⋅)\pi\tanh(\cdot) and pitch into (−π2,π2)(-\tfrac{\pi}{2},\tfrac{\pi}{2}) with π2tanh⁡(⋅)\tfrac{\pi}{2}\tanh(\cdot), while σ\sigma is π⋅sigmoid(⋅)\pi\cdot\mathrm{sigmoid}(\cdot), always positive.

The bidirectional LSTM lets the middle frame see both past and future. In the first layer, the forward LSTM reads from t−3t-3 through tt and the backward LSTM reads from t+3t+3 back to tt; the hidden states from both sides are concatenated at position tt, and those are the 512 dimensions taken out in step 4. The design assumes the next 3 frames are available at inference, so a real-time system has to wait 3 frames, about 0.375 seconds.

Training uses Adam with a learning rate of 10−410^{-4}. The official code runs 80 epochs with batch size 80, uses RandomResizedCrop for random cropping during training (keeping 80% to 100% of the area, then resizing back to 224), and saves the best checkpoint by angular error on the validation set.

Two architectures serve as comparisons. Static is the same ResNet-18 with two output layers, looking at a single frame; TRN is a version of the Temporal Relation Network, which concatenates frame features within fixed time windows and then averages the predictions of the windows.

Letting Regression Say "Not Sure"

Uncertainty is learned with quantile regression. The τ\tau quantile of a random variable is the value below which a fraction τ\tau of the samples fall: a tenth of the samples lie below the 10% quantile, nine tenths below the 90% quantile. If the model can predict both the 10% and the 90% quantile for each image, the span between them is an interval where "the ground truth falls inside 80% of the time."

Gaze360 has the network output f(I)=(θ,ϕ,σ)f(I) = (\theta, \phi, \sigma), treating θ−σ\theta - \sigma as the 10% quantile and θ+σ\theta + \sigma as the 90% quantile, and likewise for ϕ\phi. For yaw, equations (2) and (3) of the paper are

q^τ={θgt−(θ−σ),τ≤0.5θgt−(θ+σ),τ>0.5\hat q_\tau = \begin{cases} \theta_{gt} - (\theta - \sigma), & \tau \le 0.5\\ \theta_{gt} - (\theta + \sigma), & \tau > 0.5 \end{cases} Lτ(θ,σ,θgt)=max⁡(τ q^τ, −(1−τ) q^τ)L_\tau(\theta, \sigma, \theta_{gt}) = \max\big(\tau\,\hat q_\tau,\ -(1-\tau)\,\hat q_\tau\big)

q^τ\hat q_\tau is the ground truth minus the predicted quantile, and LτL_\tau is called the pinball loss, shaped like a lopsided V. Take τ=0.1\tau = 0.1: when the ground truth is above the lower bound, each degree of difference costs 0.1; when the ground truth falls below the lower bound, each degree costs 0.9. The lower bound would rather sit a little low than end up above the ground truth, and it settles where only a tenth of the ground truths fall below it. The upper bound at τ=0.9\tau = 0.9 is exactly the reverse. ϕ\phi uses the same formula, and the losses over the two angles and two quantiles are averaged.

A diagram drawn for this note, in two parts. At the top is a number line from 0° to 40°, with a blue dot marking θ = 20° and an orange triangle marking θ_gt = 30°; below it are two intervals: the gray σ = 5° interval runs from 15° to 25° and doesn't contain 30°, with loss 1.5 + 4.5 = 6.0; the green σ = 15° interval runs from 5° to 35° and contains 30°, with loss 2.5 + 0.5 = 3.0. Below is a line chart of the loss against σ: from σ = 0° to 10° it falls from 10 to 2 with slope −0.8, marked truth outside the interval; beyond 10° it climbs with slope +0.2, marked truth inside the interval; the minimum is at σ = 10°.
Drawn for this note from equations (2) and (3) of the paper; the sample values are this note's example.

Work it out for one sample. The ground truth is θgt=30°\theta_{gt} = 30° and the model predicts θ=20°\theta = 20°.

  • σ=5°\sigma = 5°: the interval is 15° to 25°, and the ground truth is outside it. For the lower bound, q^0.1=30−15=15\hat q_{0.1} = 30-15 = 15, a loss of 0.1×15=1.50.1\times15 = 1.5; for the upper bound, q^0.9=30−25=5\hat q_{0.9} = 30-25 = 5, a loss of 0.9×5=4.50.9\times5 = 4.5; 6.0 in total.
  • σ=10°\sigma = 10°: the upper bound just touches the ground truth; the lower bound's loss is 0.1×20=2.00.1\times20 = 2.0 and the upper bound's 0, 2.0 in total.
  • σ=15°\sigma = 15°: the interval is 5° to 35°, containing the ground truth. The lower bound's loss is 0.1×25=2.50.1\times25 = 2.5; for the upper bound, q^0.9=−5\hat q_{0.9} = -5, a loss of 0.1×5=0.50.1\times5 = 0.5; 3.0 in total.

Written as a function of σ\sigma, the total is 10−0.8σ10-0.8\sigma for σ≤10\sigma\le10 and 0.2σ0.2\sigma for σ≥10\sigma\ge10. For this one sample alone, it's smallest when σ\sigma equals the prediction error, 10°.

One sample only goes so far; σ\sigma means something only over many samples. Look at the slopes of the two segments above. When the ground truth falls outside the interval, each extra degree of σ\sigma lowers the loss by 0.8; when it falls inside, each extra degree of σ\sigma raises the loss by 0.2. For a large batch of similar-looking images, gradient descent pushes σ\sigma to where the two forces cancel. Write PinP_{\text{in}} for the fraction of ground truths inside the interval and PoutP_{\text{out}} for the fraction outside:

0.2 Pin=0.8 Pout,Pin+Pout=10.2\,P_{\text{in}} = 0.8\,P_{\text{out}},\qquad P_{\text{in}} + P_{\text{out}} = 1

Solving gives Pout=0.2P_{\text{out}} = 0.2: 80% of the ground truths fall within [θ−σ, θ+σ][\theta-\sigma,\ \theta+\sigma], exactly the 80% interval the paper is after.

θ\theta itself can be worked out from the formula too. When the ground truth is inside the interval, the lower-bound term's gradient with respect to θ\theta is −0.1-0.1 and the upper-bound term's is +0.1+0.1, summing to 0; θ\theta is pushed only when the ground truth leaves the interval, with a force of 1 per degree. So θ\theta learns the midpoint of the two quantiles, which is the median when the error distribution is symmetric. The paper calls it the expected gaze direction.

Two simplifications are made here. First, the paper assumes the error is isotropic in spherical coordinates, with the same quantile width for θ\theta and ϕ\phi; the official code really does output just one σ\sigma, used for both angles, so the "cone" is actually a square in the (θ,ϕ)(\theta,\phi) plane. The authors themselves note that at large pitch the distortion near the poles breaks this assumption, but that it's a reasonable approximation for most gaze directions. Sharing one σ\sigma also means the 80% above is computed over both angles together. If yaw errors are generally larger than pitch errors, the fraction of yaw inside the interval will be below 80% and that of pitch above it; the fraction with both angles inside the square at once will also be below 80%. Second, σ\sigma is the half-width for a single angle, a different quantity from the angular error of the two angles combined, which matters when reading a figure later on.

Moving to a New Scene

However diverse Gaze360 is, moving to another scene still leaves a gap. The authors propose a self-supervised domain adaptation method that fine-tunes on labeled Gaze360 images mixed with unlabeled images from the new scene.

The first tool is a discriminator: a single fully connected layer that takes the backbone's features and guesses whether the image comes from Gaze360 or the new scene. The gaze network tries to fool it with a label-flipped cross-entropy LDL_D, making the features of the two sides indistinguishable. The discriminator itself is trained with ordinary cross-entropy, and the two take turns updating at every iteration.

The second tool is left-right symmetry. Flip an unlabeled image horizontally, and the same person's gaze yaw should exactly change sign. The model predicts once on the original and once on the flipped image, mirrors the flipped prediction back as the target for the original, and computes another pinball loss, written LSL_S. Used alone, this term can be driven to zero by putting every prediction on the line of symmetry (yaw 0°), so it can only serve as a regularizer.

The total loss is

L=α Lτ+LD+β LSL = \alpha\,L_\tau + L_D + \beta\,L_S

The paper uses α=60\alpha = 60 and β=3\beta = 3.

The code for this method was never released. In July 2020, someone asked in issue #8; Recasens replied the next day that it wasn't in the repo and couldn't be made available "at least in the short term," and that they would see about the future. The repo was formally archived in September 2026, with the first line of the README changed to "no longer maintained," and that code never showed up (a rather long short term).

Discussion

On Gaze360

Errors on the test set are reported for three ranges. All is the whole test set; Front is gaze within 90° of the direction to the camera, the half of the sphere where gaze points toward the camera; Facing is within 20°. Units are degrees.

ModelAllFrontFacing
Mean59.040.519.0
Deep HP49.330.722.7
MSE Static15.813.713.4
MSE TRN14.311.811.8
MSE LSTM14.112.111.6
Pinball Static15.613.413.2
Pinball TRN14.111.711.6
Pinball LSTM13.511.411.1

Excerpted from Table 2 of the paper; Pinball LSTM is Gaze360.

Mean is a predictor that always outputs the training set's mean gaze. Deep HP is Ruiz et al.'s head pose estimator, Hopenet, treating the head's orientation as the gaze.

Head pose alone does nearly 10° better than guessing the mean overall, but on the Facing subset it's 22.7°, worse than the mean's 19.0°. The paper says only that head pose isn't enough to predict gaze in this data; one possible reason (this note's speculation) is the freeze command during collection: with the head fixed and only the eyes moving, head orientation and gaze can be far apart to begin with.

Switch to models that can see the eyes, and the error drops at once to 13° to 16°. Going from the single-frame Static to the 7-frame LSTM, the pinball version drops from 15.6° to 13.5° on the whole test set and from 13.4° to 11.4° on Front; TRN and LSTM are very close. Switching the same architecture from MSE to pinball loss takes LSTM from 14.1° to 13.5°, while Static and TRN differ by only 0.2°. The main gain from pinball loss is the uncertainty; the gaze itself only gets slightly better along the way.

The quality of the uncertainty is measured with Spearman rank correlation. Rank the test images once by predicted σ\sigma and once by actual error; identical rankings give 1, unrelated ones 0. The comparisons use two other estimates, either randomly dropping neurons in the MSE model's last layer and running 5 forward passes, taking the variance of the outputs (Dropout); or randomly cropping the same image 5 times and taking the variance of the 5 predictions (random crops).

EstimateStaticTRNLSTM
Dropout0.240.310.31
Random crops0.370.390.37
Pinball0.420.460.45

Compiled from Table 2 of the paper, Spearman rank correlation.

Pinball is highest on all three architectures and needs only one forward pass, where Dropout and random crops both need 5. A correlation of around 0.45 is a clear relationship in the ranking, but still some way from "look at σ\sigma and you know which image will be wrong." The highest in the table is Pinball TRN's 0.46; Gaze360 goes with LSTM, which the authors justify by its slightly lower error and how easily it adapts to other frame counts.

After Turning Around

Original Figure 8: a line chart with gaze yaw (0° to 200°) on the horizontal axis and error (degrees, 0 to 30) on the vertical axis. Three solid lines, Static (blue), TRN (red) and LSTM (green), rise slowly from 11° to 13° near yaw 0° to 15° to 16° at 100°, then climb faster to about 30° at 180°; Static is highest at most positions. Three dashed lines are the corresponding predicted uncertainty: Static's dashed line rises from about 9° to about 25°, and TRN's and LSTM's from about 5° to 15° to 19°.
Original Figure 8, Kellnhofer et al., from PDF page 7, arXiv license, scholarly quotation.

The horizontal axis is the absolute value of gaze yaw, with 0° looking at the camera and 180° facing away. Solid lines are actual errors, dashed lines the model's predicted σ\sigma.

LSTM is about 11° facing the camera, still around 15° near 100°, and beyond that climbs all the way to about 30° at 180°. The authors say that as the head turns between 90° and 150°, the model transitions smoothly from "looking at the eyes" to "looking at the head," giving a head-pose-style best guess when facing away, with the predicted uncertainty rising along with it.

The dashed lines stay below the solid lines the whole way. σ\sigma is the quantile half-width for a single angle, while the solid lines are the mean angle between vectors for both angles combined; the two measure different things, so this figure can't tell whether the model is overconfident. That takes individual samples, and among the failure cases the authors show, there are ones with a small σ\sigma and a prediction far off.

Static's dashed line is worth a comparison too. It's already 9° facing the camera, well above LSTM's 5°, yet its actual error is only 2° higher. The single-frame model is more conservative about itself.

The authors also acknowledge that Gaze360's facing errors are larger than those reported on high-resolution datasets, because of the long distance, small faces and blurry images; the cross-dataset experiments in the next section are meant to show that these difficulties make models trained on it transfer better.

Cross-Dataset

These experiments use Pinball Static, the single-frame model, trained on each of four 3D datasets and tested on the others. Columbia is high-resolution, close-up faces; MPIIFaceGaze is laptop webcams; RT-GENE is lower-resolution faces with the glasses retouched out. Columbia and MPIIFaceGaze have no official splits, so all their samples are used for training and no same-dataset error is reported.

Train \ TestColumbiaMPIIRT-GENEG360
Columbia-12.332.857.9
MPII12.4-26.557.8
RT-GENE24.218.9-56.6
G3609.012.123.4-
G360 + DA8.19.921.9-

Compiled from Table 3 of the paper, mean angular error (degrees). MPII is MPIIFaceGaze, G360 is Gaze360, and DA is the domain adaptation from the previous section.

Three things stand out in this table.

  1. The model trained on Gaze360 is best on all three test sets. The margins vary: 9.0° against 12.4° on Columbia, 23.4° against 26.5° on RT-GENE; on MPIIFaceGaze, 12.1° against the Columbia-trained 12.3°, only 0.2° apart.
  2. The other direction is a disaster. Models trained on the other datasets all land around 57° on Gaze360, not far from the 59.0° of always guessing the mean in Table 2 (Table 3 doesn't say which subset this column uses). Models that have never seen profiles or the back of the head do about as well as random guessing here.
  3. Domain adaptation pushes it lower still. Without any labels from the target dataset, Columbia drops from 9.0° to 8.1° and MPIIFaceGaze from 12.1° to 9.9°.

In the RT-GENE column, every model is above 20°. The authors explain in the supplementary material that RT-GENE uses a generative model to retouch the eye-tracking glasses off the face, leaving visible artifacts in many frames, something models trained on other datasets have never seen.

This table isn't easy to reproduce. In 2022, someone in issue #39 used the official LSTM weights with the same image copied 7 times to test Gaze360 → Columbia and got 10.8°, against the paper's 9.0°; the author said it had been too long to pin down the difference and attached a preprocessing script with the caveat "I do not guarantee this is the final correct version of the code," and only after switching to cropped Columbia images did the person asking get back to a normal value. In issue #47 the same year, someone asked whether MPIIFaceGaze testing used normalized or original images; the author's answer was that they couldn't be 100% sure, but using the original images made more sense.

In the Supermarket

The authors built a supermarket shelf in the lab and asked participants to look at different products and report which one they were looking at. With a camera beside the shelf filming participants from the side, the model identified the product being looked at 51% of the time; with a phone camera embedded in the shelf itself, where participants' faces are closer to frontal, that rose to 68%. Products on the bottom shelf were missed most often, since the eyes are almost completely hidden when a person looks down. Stack the predictions into a heat map, and you have a map of where customers' attention goes.

Code, Data and What Came After

The official repo released the LSTM model's training and evaluation code, split files and weights, under a license limited to research use that forbids commercial use, extending even to models trained on the dataset. Testing the official weights on the whole test set, the community reproduced the paper's 13.5° several times in issue #28; the person who asked first measured 12.8°, was told they had probably run the validation set, and got 13.5° on rechecking.

There are a few traps before you put it to use.

  • No single-frame model. The Static weights used for the cross-dataset evaluation were never released. With only one photo, one community workaround is to copy the same image 7 times and feed it to the LSTM.
  • The conversion formula is missing a minus sign. When someone in issue #28 asked how to convert the model output back to a 3D vector, the author replied with (sin⁡θcos⁡ϕ, sin⁡ϕ, cos⁡θcos⁡ϕ)(\sin\theta\cos\phi,\ \sin\phi,\ \cos\theta\cos\phi), missing the minus sign on zz. Copy it as is, and "looking at the camera," with yaw and pitch both 0, becomes (0,0,1)(0, 0, 1), facing away from the camera. Go by the −cos⁡ϕcos⁡θ-\cos\phi\cos\theta in the official evaluation code.
  • The ±180° seam. The official code computes the pinball loss directly on the yaw values. With a ground truth of 179° and a prediction of −179°, the real difference is 2°, but the loss treats it as 358°. In 2020, Mishra and Lin, doing 360° gaze estimation on Gaze360, pointed out that back-facing gaze makes yaw discontinuous, producing very large losses near the seam, and switched to representing the angle with two values, sin and cos. That paper's code is on GitHub under ashesh-0, the very user who taught everyone in the official repo to copy the image 7 times.
  • The face box isn't always the same person. The dataset comes with face boxes and eye boxes detected by dlib, for methods that want to crop faces or eyes. In 2025, DHECA-SuperGaze from the University of Zagreb found that some face boxes frame other people in the image and don't match the gaze labels; after correcting them, every model using these boxes improved. Gaze360's own model takes the AlphaPose head crops and isn't affected.
  • Downloading. The data requires registration on the official website; in 2022 the authors posted a notice in the repo that registration emails might get lost and that accounts can't reset their own passwords, and in August 2024 someone reported that the wget command from the website dropped the connection at around 1 GB, with no reply.

The preprocessing accompanying Cheng et al.'s gaze survey removes every image without a detected face, on the grounds that images showing only the back of the head aren't suitable for appearance-based methods; in that evaluation table, updated in April 2024, the Gaze360 architecture gets 11.04° on Gaze360 and around 4.1° on both MPIIGaze and MPIIFaceGaze, making it one of the better full-face methods in the table.

Conclusion

With one panoramic camera and a board carried around in circles, Gaze360 labels 3D gaze for several people at once, indoors and outdoors, collecting 238 people over a full 360° horizontally, with labels 2.9° off from a head-mounted test camera. The model takes 7 frames of head images and gathers cues from before and after with a bidirectional LSTM, and the pinball loss lets it give an extra uncertainty σ\sigma in the same forward pass.

On the whole test set it's 13.5°, 2.1° lower than single-frame; the rank correlation between σ\sigma and actual error is about 0.45, higher than Dropout and random crops, with a single forward pass. In the cross-dataset table, the Gaze360-trained model is best on all three test sets, while models trained on other datasets all land around 57° on Gaze360. That table rests on a single-frame model that was never released, and the domain adaptation code never appeared either, so that half can only be taken as the paper reports it.

When using the official LSTM weights, remember first that σ\sigma is the 10%-to-90% half-width shared by both angles; before using it as a fixed threshold, measure the coverage of yaw and pitch separately on your own data. Yaw needs atan2⁡\operatorname{atan2} to tell the back side apart, and converting back to a 3D vector should follow the evaluation code's −cos⁡ϕcos⁡θ-\cos\phi\cos\theta; the loss at the ±180° seam isn't handled in the official code.

The signature feature of this dataset is the back of the head. In 2020, Mishra and Lin did 360° gaze estimation on it, splitting yaw into sin and cos to deal with the seam; the preprocessing accompanying Cheng et al.'s survey, on the other hand, deleted every image without a detectable face, on the grounds that images showing only the back aren't suitable for appearance-based methods, and [22.03] L2CS-Net: From Head to Eye follows that preprocessing, keeping only ±90° for testing. In those two pipelines, the stretch where people face away from the camera isn't on the exam at all.