Back to paper library
Paper notesarXiv 2017IEEE TAC 2019

AffectNet

Good News Only

Original paper

AffectNet: A Database for Facial Expression, Valence, and Arousal Computing in the Wild

Paper authors

Ali Mollahosseini · Behzad Hasani · Mohammad H. Mahoor

First submitted to arXiv
arXiv:1708.03985
Cite this paper · BibTeX

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

@misc{faceanalysisaffectnet2017,
  title = {{AffectNet: A Database for Facial Expression, Valence, and Arousal Computing in the Wild}},
  author = {Ali Mollahosseini and Behzad Hasani and Mohammad H. Mahoor},
  year = {2017},
  eprint = {1708.03985},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.03985}
}
On this page

Type words related to "disgust" into a search engine, and how many of the faces that come back actually show disgust? The AffectNet authors had people look at them one by one. Of the faces pulled up by disgust queries, only 2.7% were labeled disgust, while 33% were labeled happy.

That's how far off you get using query words alone as labels. FER2013's labels came from keywords, with people removing the images that were obviously wrong. Ali Mollahosseini, Behzad Hasani and Mohammad H. Mahoor of the University of Denver pulled over a million faces from the web in a similar way; the difference is that the labels come from human judgment, with about 450,000 of them labeled by people who looked at the face before assigning an expression. Besides an expression class, each face also gets two continuous values, valence and arousal.

Defining the Problem

Three ways to describe emotion

The paper first lays out three models for quantifying emotion.

Categorical models are the most common; you pick one from a list, such as Ekman's six basic expressions (happiness, sadness, surprise, fear, disgust, anger) plus neutral. Their limit is that a mixed emotion doesn't fit into one word, and intensity can't be expressed either. Some have defined compound expressions such as "happily surprised" or "sadly fearful," but the classes are still finite.

Dimensional models describe emotion with two continuous values, from the circumplex proposed by the psychologist James Russell in 1980. Valence is positive versus negative, how pleasant or unpleasant something (or a face) feels; arousal is the level of excitement, how agitated and keyed up versus calm and settled. Both range over [−1,1][-1,1].

Right half of original Figure 2: a circle with Unpleasant at the left end of the horizontal axis and Pleasant at the right end, Activated at the top of the vertical axis and Deactivated at the bottom. English emotion words are scattered around the circle: Excited, Delighted and Happy at the upper right; Pleased, Glad, Serene, Content, Satisfied and Relaxed at the lower right; Alarmed, Tense, Angry, Afraid, Annoyed, Distressed and Frustrated at the upper left; Miserable, Sad, Gloomy and Depressed at the lower left; and Bored, Droopy, Tired and Sleepy straight below. The four corners are also labeled Obstuctive, High Power/Control, Low Power/Control and Conductive. Near Happy on the right is a red x, the spot an annotator clicked.
Right half of original Figure 2, Mollahosseini et al., showing only the circumplex in the annotation software, from PDF page 6, arXiv license, scholarly quotation.

The horizontal axis is valence, more pleasant toward the right; the vertical axis is arousal, more excited toward the top. Happy sits on the right, slightly above center; angry and afraid are at the upper left, negative and agitated; sad and depressed are at the lower left, negative and low; bored and sleepy are at the bottom, neither positive nor negative, just short of energy. Within the same "happy," calm contentment and excited elation can be far apart on the chart, while a categorical model can give only one word.

The FACS model describes the action units (AUs) of facial muscles and says nothing about emotion directly. Some rules map AUs onto emotions; EMFACS, for instance, reads AU6 (cheek raiser) plus AU12 (lip corner puller) as happiness.

Not enough in-the-wild data

The expression data of the time fell roughly into three kinds.

  • Posed in the lab: JAFFE, CK+ and MultiPie have participants make expressions on instruction. The data is clean, but research shows that posed and spontaneous expressions differ in muscle combinations, intensity and timing.
  • Induced in the lab: DISFA and AM-FED have participants watch videos and record their natural reactions. The expressions are natural, but the number of people, head poses and settings are still limited.
  • In the wild: FER2013 has 35,887 images, but only 48×4848\times48 grayscale, with only 547 for disgust, and most landmark detectors fail at that resolution; FER-Wild, built by the same lab the year before, has 24,000 images; EmotioNet has a million images, but its AUs were labeled automatically by an algorithm, with only a tenth checked by people, and its expression classes are inferred from the AUs.

In-the-wild data for the dimensional model was even scarcer. Aff-Wild was the only one at the time, five hundred-odd YouTube videos in which three annotators labeled valence and arousal frame by frame with a joystick, covering only 500 people.

The authors wanted a database that was large, had many people, was shot in the wild, and carried both categorical and dimensional annotations.

Solving the Problem

Where a million faces come from

The query strings start in English. Emotion words were combined with words for gender, age and ethnicity, such as joyful girl, blissful Spanish man, furious young lady and astonished senior, about 362 in all. Translating them directly into other languages worked poorly, because every language describes emotion its own way, so the authors instead had native speakers fluent in English write their own queries in Spanish, Portuguese, German, Arabic and Persian and check the search results by eye, ending up with 1,250 queries.

The queries went to Google, Bing and Yahoo. Baidu and Yandex were considered too, but either returned too few relevant faces or had no API for fetching URLs automatically. Exclusion terms such as drawing, cartoon, animation and birthday were added to the queries, and results from common stock-photo sites were filtered out, since the expressions there are mostly posed and carry watermarks. Neutral faces weren't queried separately; the results already had plenty.

This gathered about 1.8 million unique URLs. OpenCV detected the faces, and a regression local binary features method (trained on 300W) marked 66 landmarks, keeping over a million images with at least one face. The average face resolution is 425×425425\times425 with a standard deviation of 349×349349\times349, far larger than FER2013's 48×4848\times48. The authors also used Microsoft's face API to estimate attributes on 50,000 sampled images, finding 49% men, an average age of 33 and an average head pose close to frontal.

Twelve annotators

Annotation didn't use crowdsourcing. The authors' reasoning was that crowdsourced quality is uneven, and valence and arousal require a deep understanding of the two concepts. They hired 12 full-time and part-time annotators at the University of Denver and gave these 12 people 450,000 images. Limited by time and budget, each image has only one annotator.

Before starting, every annotator went through a full tutorial and three training sessions, each labeling 200 images and then reviewing the classes and values image by image. Annotators also marked occlusion, which counts whenever any part of the face can't be seen; glasses don't count as long as the eyes are clear and unshadowed.

There are 11 classes: neutral, happiness, sadness, surprise, fear, disgust, anger, contempt, plus three classes that aren't expressions.

  • None: there is an emotion, but not one of these eight, such as sleepy, bored, tired, confused, ashamed or focused. These images still get valence and arousal.
  • Uncertain: the annotator isn't sure.
  • Non-face: no face, a watermark on the face, a detection box that missed the face, a drawing or animation, or a severely distorted face.

Uncertain and Non-face get no valence or arousal. Annotation looks only at the type of expression, not its intensity.

Original Figure 3: twelve color face photos in three rows, each with the annotation in italics underneath and the query emotion used in the search in parentheses. The first row: Neutral (Angry), Happy (Happy), Sad (Angry), Surprise (Fear); the second row: Fear (Fear), Disgust (Disgust), Angry (Angry), Contempt (Happy); the third row: Non-face (Surprise), a house whose windows look like eyes, Uncertain (Sad), a pouting baby, and two None images, from a Fear query and a Happy query.
Original Figure 3, Mollahosseini et al., from PDF page 8, arXiv license, scholarly quotation.

The italics are the annotation, and the parentheses the query emotion used in the search. Faces found with "angry" were labeled neutral or sad; one found with "happy" was labeled contempt; the face-like house at the lower left was found with "surprise."

The annotation counts:

ClassImages
Happiness146,198
Neutral80,276
Sadness29,487
Anger28,130
Surprise16,288
Fear8,191
Disgust5,264
Contempt5,135
None35,322
Uncertain13,163
Non-face88,895

Compiled from Table 3 of the paper, 456,349 images in total.

Happiness outnumbers disgust nearly 28 to 1. Broken down by query emotion, 48.9% of the faces found with happy words were actually labeled happy; every other emotion's hit rate is under 20%, with anger at 12.2%, fear 4.0%, disgust 2.7% and contempt 2.4%. For queries of the other emotions, 27% to 33% of the faces were still labeled happy; overall, about 15% were neutral, and another 15% or so weren't usable faces at all. The authors' explanation is that people prefer to post smiling faces online.

How valence and arousal are labeled

The annotation software is simply the circumplex shown earlier. The annotator clicks inside the circle, and the software shows the corresponding valence (horizontal axis) and arousal (vertical axis); clicks are restricted to the unit circle, so every annotation can also be converted to polar coordinates, with radius 0≤r≤10\le r\le1 and angle 0≤θ<360∘0\le\theta<360^\circ. The tutorial also provided a reference circumplex marking the rough positions of more than 34 complex emotions, such as suspicious, insulted and impressed.

To cut down on slips, the software sets a reasonable range for each class. Happy's range is valence in (0,1](0,1] and arousal in [−0.2,0.5][-0.2,0.5]. If an annotator chooses happy but clicks at (0.6, 0.7)(0.6,\ 0.7), arousal exceeds the upper limit and the software pops up a warning; annotators who are confident can submit anyway, and these images are flagged for the authors to review.

Original Figure 4: a circular heat map made of small squares, with valence on the horizontal axis and arousal on the vertical, both from −1 to 1; the color bar on the right is a log scale from dark blue at 1 image to dark red at 10,000. The two reddest patches are one near the origin and another at valence 0.5 to 0.8, arousal 0 to 0.2; there is a yellow-green area at the upper left and the left; the lower left corner and the bottom are mostly dark blue, with some cells empty.
Original Figure 4, Mollahosseini et al., from PDF page 8, arXiv license, scholarly quotation.

This is the distribution of all annotations on the valence–arousal plane, colored by the number of images in each small cell on a log scale, with dark red at around ten thousand and dark blue in the single digits. The two densest patches are one at the origin, for the large number of neutral faces, and another in the middle right, positive and slightly excited, for happy. The lower left (negative and low) and the bottom (very low energy) are the sparsest. The class imbalance shows up in the continuous annotations just the same.

Two people, one face

To measure agreement between annotators, the authors had 36,000 images each labeled blind by two annotators, who knew neither the other's answer nor which word the image had been found with.

On classes, the two chose the same class for only 60.7% of the images. Agreement varies a lot by class. Non-face at 83.9% and happiness at 79.6% are the highest, neutral is only 50.8%, and None only 9.6%. The most common disagreement is between surprise and fear. When one annotator said surprise, the other said fear 14.0% of the time, and 15.3% the other way round; when one said disgust, the other said anger 13.1% of the time; when one said None, the other said neutral 22.6% of the time.

Agreement on valence and arousal first needs a way to measure it. Let θ^i\hat\theta_i be one annotation (or a model's prediction) and θi\theta_i the annotation it's compared against, over nn images. The paper uses four metrics (equations (1)–(5)).

RMSE is the square root of the mean squared error:

RMSE=1n∑i=1n(θ^i−θi)2\text{RMSE}=\sqrt{\frac1n\sum_{i=1}^{n}(\hat\theta_i-\theta_i)^2}

It's very sensitive to outliers and can't tell whether the two sets of values move together. Pearson's correlation coefficient, CC, covers that:

CC=cov(θ^,θ)σθ^ σθ\text{CC}=\frac{\mathrm{cov}(\hat\theta,\theta)}{\sigma_{\hat\theta}\,\sigma_\theta}

CC looks only at the linear relationship; shifting or scaling everything costs nothing. The concordance correlation coefficient (CCC) also counts differences in mean and variance:

ρc=2ρ σθ^σθσθ^2+σθ2+(μθ^−μθ)2\rho_c=\frac{2\rho\,\sigma_{\hat\theta}\sigma_\theta}{\sigma_{\hat\theta}^2+\sigma_\theta^2+(\mu_{\hat\theta}-\mu_\theta)^2}

ρ\rho is CC, σ2\sigma^2 the variance and μ\mu the mean. As an example, take a model that always outputs half the ground truth, θ^=0.5 θ\hat\theta=0.5\,\theta, with a ground-truth mean of 0. The two are perfectly linearly correlated, so CC is 1; but σθ^=0.5 σθ\sigma_{\hat\theta}=0.5\,\sigma_\theta, and substituting gives

ρc=2×0.5 σθ20.25 σθ2+σθ2=0.8\rho_c=\frac{2\times0.5\,\sigma_\theta^2}{0.25\,\sigma_\theta^2+\sigma_\theta^2}=0.8

That is 0.8 however large σθ\sigma_\theta is. If the model simply outputs the same constant for every image, σθ^=0\sigma_{\hat\theta}=0 and the CCC is 0.

Last comes SAGR, the fraction with matching signs:

SAGR=1n∑i=1nδ(sign(θ^i), sign(θi))\text{SAGR}=\frac1n\sum_{i=1}^{n}\delta\big(\mathrm{sign}(\hat\theta_i),\ \mathrm{sign}(\theta_i)\big)

δ\delta is 1 when the two signs are the same and 0 otherwise. The paper's example has a ground truth of +0.3+0.3; predictions of +0.7+0.7 and −0.1-0.1 are both off by 0.4 and have the same RMSE, but the first at least knows this is a positive emotion, while the second even gets the sign wrong.

The two annotators' results, split into "same," where the two chose the same class, and "all," covering all 36,000 images:

MetricSame VSame AAll VAll A
RMSE0.1900.2610.3400.362
CC0.9510.7660.8230.567
SAGR0.9060.7090.8150.667
CCC0.9510.7460.8210.551

Compiled from Table 5 of the paper; V is valence and A is arousal.

When the two chose the same class, valence CC reaches 0.951; once the classes differ, the values scatter too. On every metric valence agrees better than arousal, which the authors attribute to positive versus negative being easier to judge in a still photo than the level of excitement. Over all images, the RMSE is 0.340 and 0.362. The authors set these two numbers beside models' scores on other databases. The error between two people is larger than the error of the period's models on those databases, which the authors use to show how hard AffectNet is.

Splits

These 36,000 doubly annotated images are kept as the test set. Valence and arousal are taken at random from one of the two annotators; when the classes disagree and one of the answers equals the query emotion, that answer is used, which covers 29.5% of the disagreeing images, and for the rest one annotator's answer is picked at random. Working it out, about 27.7% of the test set's class labels were picked at random between two different answers.

The validation set takes 500 random images per class, perfectly balanced, for tuning hyperparameters. Everything else is the training set, severely imbalanced. The test set was drawn at random, so it's as imbalanced as the training set, with over 11,000 happy images.

Classification baselines and class imbalance

A bar chart drawn for this note: the number of images in each of the eight expression classes of AffectNet's public training set, from most to fewest: happiness 134,415, neutral 74,874, sadness 25,459, anger 24,882, surprise 14,090, fear 6,378, disgust 3,803, contempt 3,750; the two columns on the right are the validation set's 500 per class and the loss weights computed as inversely proportional to the training count, happiness 0.028, neutral 0.050, sadness 0.147, anger 0.151, surprise 0.266, fear 0.588, disgust 0.986, contempt 1.000. A note at the bottom says happiness is 35.8× contempt.
Drawn for this note from the per-class training and validation counts published on the official AffectNet website (500 validation images subtracted from each class).

Among the eight expression classes of the public training set, happiness has 134,415 images and the smallest, contempt, only 3,750, a ratio of nearly 36 to 1. Train on such data directly and the network soon learns that "guessing happy is rarely wrong."

The baseline network is AlexNet, five convolutional layers plus three fully connected layers. Faces are cropped and resized to 256×256256\times256 without alignment; during training, 224×224224\times224 patches are taken at random from the four corners and the center, with horizontal flips. Training runs 20 epochs with batch 256, a learning rate starting at 0.01 and multiplied by 0.1 every 10,000 iterations, and momentum 0.9.

For the class imbalance, the authors compared four training schemes.

  1. Imbalanced: the data as is.
  2. Down-Sampling: at most 15,000 images per class. Disgust, contempt and fear fall short of that number to begin with, so it's only semi-balanced. A rough count with the public numbers takes the training set from 287,651 images down to about 88,000, leaving seventy percent of the data unused.
  3. Up-Sampling: duplicate minority-class images until every class has as many as happiness.
  4. Weighted-Loss: weight each class in the cross-entropy.

The weighted loss uses Caffe's Infogain loss. Let the image's true class be ll, the network's outputs for the KK classes x1,…,xKx_1,\dots,x_K, and the softmax probabilities p^i=exi/∑jexj\hat p_i=e^{x_i}/\sum_j e^{x_j}. The loss is written as (equation (6) of the paper)

E=−∑i=1KHl,ilog⁡p^iE=-\sum_{i=1}^{K}H_{l,i}\log\hat p_i

HH is a K×KK\times K weight matrix, and with H=IH=I this is ordinary cross-entropy. Substituting the softmax and expanding (equation (8)),

E=log⁡(∑jexj)∑iHl,i−∑iHl,i xiE=\log\Big(\sum_j e^{x_j}\Big)\sum_i H_{l,i}-\sum_i H_{l,i}\,x_i

Differentiating with respect to xkx_k, the first term gives (∑iHl,i)p^k\big(\sum_i H_{l,i}\big)\hat p_k and the second gives Hl,kH_{l,k} (equation (9)):

∂E∂xk=(∑iHl,i)p^k−Hl,k\frac{\partial E}{\partial x_k}=\Big(\sum_i H_{l,i}\Big)\hat p_k-H_{l,k}

The authors use a diagonal matrix, where only Hl,lH_{l,l} is nonzero. The loss simplifies to E=−Hl,llog⁡p^lE=-H_{l,l}\log\hat p_l, and the gradient becomes

∂E∂xk=Hl,l (p^k−[ k=l ])\frac{\partial E}{\partial x_k}=H_{l,l}\,\big(\hat p_k-[\,k=l\,]\big)

[k=l][k=l] is 1 when kk is the correct class. The part in parentheses is just the ordinary cross-entropy gradient; the weight only scales the whole image's gradient up or down. Following the authors' description, the weight is inversely proportional to the class's training count, with the smallest class (disgust, in the paper's split) weighted 1:

Hl,l=fmin⁡flH_{l,l}=\frac{f_{\min}}{f_l}

flf_l is the number of training images in class ll. With the public counts, happiness's weight is about 3,750/134,415≈0.0283{,}750/134{,}415\approx0.028. For a happy face where the network gives happiness only 0.3 probability, the gradient on the happiness logit is 0.028×(0.3−1)≈−0.020.028\times(0.3-1)\approx-0.02; for a contempt face in the same situation, the gradient is −0.7-0.7. One contempt face that gets only 0.3 pushes the network about as hard as 36 happy faces that also get only 0.3.

Up-Sampling does the same thing in expectation. Copy the contempt images a few dozen times, and each epoch sees them a few dozen more times. The difference is that it keeps looking at the same three or four thousand faces, which the network can easily memorize.

There are two comparison baselines. One is a traditional method that takes HOG features (cell size 8) from the 256×256256\times256 face, keeps 95% of the variance with PCA to go from 36,864 dimensions down to 6,697, and then applies a linear SVM. The other is the expression recognition API of Microsoft Cognitive Services at the time, an off-the-shelf commercial system.

Dimensional baselines

Valence and arousal each get their own AlexNet, with the last fully connected layer replaced by a linear output of a single neuron and a Euclidean loss (equation (11)):

E=12N∑n=1N∥y^n−yn∥22E=\frac{1}{2N}\sum_{n=1}^{N}\big\|\hat y_n-y_n\big\|_2^2

The learning rate is fixed at 0.001, momentum 0.9, batch 256, training until the validation error stops dropping, about 16 epochs. The comparison baseline is HOG features plus support vector regression (SVR).

Discussion

On the test set, accuracy lies

The test set is as imbalanced as the training set, so the authors report every metric twice. Besides the raw numbers, they randomly undersample the test set so every class has the same count, repeat 200 times and average, calling this skew-normalized. In the table below, "Accuracy" is on the raw test set, and "Balanced" and "Bal. F1" are accuracy and F1 after undersampling.

MethodAccuracyBalancedBal. F1
Imbalanced0.720.540.52
Down-Sampling0.680.580.57
Up-Sampling0.680.570.55
Weighted-Loss0.640.630.62
HOG+SVM0.600.370.31
Microsoft API0.680.480.45

Compiled from Table 9 of the paper, eight expression classes. F1 is computed one-vs-rest per class and then averaged.

The highest raw accuracy, 0.72, belongs to Imbalanced, which does nothing about it; after balancing it drops to 0.54, the worst of the four AlexNets. Weighted-Loss has the lowest raw accuracy but the best balanced accuracy, 0.63, and the best F1, 0.62. On an imbalanced test set, a model that guesses happy gets rewarded by accuracy.

The biggest gaps are in the minority classes. Contempt's F1 is 0.08 for Imbalanced and 0.27 for Weighted-Loss, reaching 0.59 after balancing. Up-Sampling also does poorly on contempt and disgust; the paper says these two classes were duplicated nearly 20 times, so the network overfit those images and couldn't recognize the classes on the test set.

The cost is visible too. In Weighted-Loss's confusion matrix, only 72.8% of happiness is classified correctly, with 12.2% predicted as contempt; neutral is only 53.3%, with about a tenth each predicted as contempt and anger. The authors explain that these two classes have weights so small that mistakes barely cost anything, and suggest that setting the weights by the number of samples in each mini-batch, or in a data-driven way, might work better.

Microsoft's API does very well on neutral and happiness, with accuracies of 0.94 and 0.85, but only 0.25, 0.27 and 0.04 on fear, disgust and contempt. Its balanced accuracy of 0.48 loses to all four AlexNets.

58% on the validation set

The validation set, with 500 per class, is already balanced and needs no undersampling, so its accuracy equals the mean recall over the eight classes:

MethodVal. accuracy
Imbalanced0.40
Down-Sampling0.50
Up-Sampling0.47
Weighted-Loss0.58
HOG+SVM0.30
Microsoft API0.37

Compiled from Table 15 in the appendix of the paper.

Imbalanced's 0.72 on the test set falls to 0.40 on the validation set. The validation numbers are generally lower than the balanced test numbers; one possible reason is the different label source, since the test set's classes went through two annotators and the validation set's through only one (this note's guess).

This table sits in the appendix. In SCN's 2020 comparison table on AffectNet, the baselines listed are Upsample 47.00 and Weighted loss 58.00, exactly this column.

Valence and arousal

MetricCNN VCNN ASVR VSVR A
RMSE0.3940.4020.4940.400
CC0.6020.5390.4290.360
SAGR0.7280.6700.6190.748
CCC0.5410.4500.3400.199

Compiled from Table 10 of the paper, test set.

On valence, the CNN wins all four metrics. Arousal is more interesting. SVR's RMSE is 0.400, tying the CNN's 0.402, and its SAGR of 0.748 is even higher than the CNN's; but its CC is only 0.360 and its CCC only 0.199. Look only at RMSE and SAGR and you'd think the two models are about even; CC and CCC show that SVR's predictions correlate only weakly with the true arousal. That's why all four metrics are reported together.

The test set is exactly those 36,000 doubly annotated images. The CNN's RMSE against one of the annotators is 0.394 and 0.402, and the RMSE between the two annotators is 0.340 and 0.362, so the model's error is only a little larger than the disagreement between people.

Original Figure 7: two heat maps side by side, titled RMSE Valence on the left and RMSE Arousal on the right, both with valence on the horizontal axis and arousal on the vertical, from −1 to 1, with yellower meaning larger error. The left map is mostly blue in the middle, with a yellow-orange strip at the far left (valence −1 to −0.7) peaking at about 1.2, and a few yellowish cells at the lower right. The right map is also bluish in the middle, with a yellow-orange row at the very bottom (arousal −0.8 to −1, valence near 0) peaking at about 0.9.
Original Figure 7, Mollahosseini et al., from PDF page 12, arXiv license, scholarly quotation.

These two maps place the test images into cells by their annotated valence and arousal, colored by each cell's RMSE. Error is smallest in the middle and grows toward the edges. Valence error is largest at the far left, where the strength of negative emotions is hard to estimate; arousal error is largest at the bottom, for very low, listless faces. The authors single out two zones as the hardest, low valence with medium arousal and low arousal with medium valence, corresponding to contempt, boredom and sleepiness. Compared with the distribution map earlier, these are also where annotations are sparsest.

How people use it now

Only the training and validation sets were released publicly. The per-class counts listed on the official website add up to 420,299 images, 36,050 fewer than Table 3 of the paper, roughly that batch of doubly annotated test images. In 2024, the same lab's AffectNet+ paper calls these multiply annotated images "a private set" in a table caption.

So AffectNet's evaluation convention became using the validation set as the test set, in two variants:

  • AffectNet-8: eight expression classes, 287,651 training images, tested on the validation set's 4,000.
  • AffectNet-7: contempt removed, 283,901 training images, 3,500 for testing.

(Worked out by this note from the website's counts. AffectNet-7 matches the numbers listed in the DAN paper; for AffectNet-8's training set, DAN gives 287,568, 83 fewer.)

With 500 validation images per class, accuracy is the mean recall, which is why SCN writes "the mean class accuracy on the validation set." The training set's imbalance didn't change, and later methods used the same kind of countermeasures. SCN has an oversampled version, and DAN upsamples minority classes and downsamples majority classes during training. The numbers climbed from 58%. SCN reached 60.23% on AffectNet-8, and DAN in 2021 reached 62.09%, with 65.69% on AffectNet-7.

Is one annotator reliable?

With two annotators choosing the same class only 60.7% of the time, how reliable are the single-annotator training labels? In 2021, Kim and Wallraven of Korea University relabeled part of AffectNet following the FERPlus approach. They picked 100 images that looked easy to confuse from each of the eight classes, 800 in all, and had 13 people each relabel the class, valence and arousal.

Of the 10,400 votes, 83.25% differed from the original label, and overall they drifted toward neutral and happy; many faces originally labeled contempt were relabeled happy or neutral. Between participants, the valence correlation was 0.865 and arousal only 0.468; as with AffectNet's own two-annotator agreement, valence is far easier to judge. These 800 images are deliberately chosen hard cases, so the 83% can't be used to estimate the error rate of the whole dataset; what it shows is that on hard-to-judge faces, one person's answer is easily overturned by a group of others.

Getting the data

AffectNet is for research use only. After AffectNet+ came out, the official website switched to releasing AffectNet as part of AffectNet+; to apply, a PI, lab manager or professor has to sign a license agreement and then submit a form.

The data version has changed too. In April 2023, a user of HSEmotion reported in EmotiEffLib issue #33 that, with the official weights, accuracy on a validation set they had downloaded a week earlier was 1 to 3 percentage points below the README, and suspected the validation set differed from the authors' version; the author, Savchenko, first reminded them to convert the input to RGB, then said AffectNet's format had changed a bit and someone had rewritten the code to read the March 2021 version. In August 2026, Challenge-condition-FER-dataset issue #52 reported that what's officially provided is now AffectNet+, with a directory structure and file names different from the old version, so the pose subset lists this repo provides (head yaw of 30° and of 45° or more) no longer map back, and reproducing them requires the old version. Since it was posted, the thread hasn't received a single reply.

AffectNet+ is the extended version posted to arXiv in October 2024. It uses an ensemble of binary classifiers, plus a method that estimates emotion from AUs, to compute a soft emotion label for every image, that is, a confidence value for each class; it then splits the images into Easy, Challenging and Difficult subsets by how well the soft label agrees with the original label, and adds attributes such as age, gender, ethnicity and head pose.

Conclusion

AffectNet pulled over a million faces from three search engines with 1,250 multilingual queries and had 12 trained annotators look at about 450,000 of them, labeling each with both an expression class and valence and arousal. With the labels assigned by people who had looked at the face, the bias of the query words became measurable. Of the faces pulled up by disgust words, only 2.7% were actually labeled disgust.

The cost is in how many people label each image. Each image has only one annotator; when two annotators labeled 36,000 images blind, they chose the same class only 60.7% of the time, valence and arousal RMSE were 0.34 and 0.36, and the CNN baseline's error is only a little larger than that disagreement. The classes are severely imbalanced too. On the raw test set the highest accuracy goes to the AlexNet that does nothing about it (0.72), which drops to 0.54 after balancing, while the weighted loss leads at 0.63.

Before comparing numbers on it, line up a few things. The paper's 36,000 doubly annotated test images were never released, so everyone takes the 500-per-class validation set as the exam, and the data for picking epochs has to be split off the training set; AffectNet-7 and AffectNet-8 differ by contempt and can't share a column. In August 2026 someone reported that what you get by applying is now AffectNet+, with directories and file names changed, so subset lists published with older papers no longer map back.

That validation table in the appendix later became the starting line for comparisons. The AlexNet with weighted loss scored 58%, SCN in 2020 reached 60.23% with oversampling, and DAN in 2021 reached 62.09% with up- and downsampling, about 4 percentage points in four years. Every one of them is still fighting the same imbalance, and the authors' explanation back then was that people prefer to post smiling faces online.