Relative Uncertainty Learning for Facial Expression Recognition

Overview

Relative Uncertainty Learning for Facial Expression Recognition

The official implementation of the following paper at NeurIPS2021:
Title: Relative Uncertainty Learning for Facial Expression Recognition
Authors: Yuhang Zhang, Chengrui Wang, Weihong Deng
Institute: BUPT

Abstract

In facial expression recognition (FER), the uncertainties introduced by inherent noises like ambiguous facial expressions and inconsistent labels raise concerns about the credibility of recognition results. To quantify these uncertainties and achieve good performance under noisy data, we regard uncertainty as a relative concept and propose an innovative uncertainty learning method called Relative Uncertainty Learning (RUL). Rather than assuming Gaussian uncertainty distributions for all datasets, RUL builds an extra branch to learn uncertainty from the relative difficulty of samples by feature mixup. Specifically, we use uncertainties as weights to mix facial features and design an add-up loss to encourage uncertainty learning. It is easy to implement and adds little or no extra computation overhead. Extensive experiments show that RUL outperforms state-of-the-art FER uncertainty learning methods in both real-world and synthetic noisy FER datasets. Besides, RUL also works well on other datasets such as CIFAR and Tiny ImageNet.

Pipeline

Feature Visualization

The feature distribution figure shows that RUL encourages intra-class compactness and inter-class seperability of the learned features. (0:Surprise, 1:Fear, 2:Disgust, 3:Happy, 4:Sad, 5:Angry, 6:Neutral)

Train

Torch

We train RUL with Torch 1.8.0 and torchvision 0.9.0.

Dataset

Download RAF-DB, put it into the dataset folder, and make sure that it has the same structure as bellow:

- dataset/raf-basic/
         EmoLabel/
             list_patition_label.txt
         Image/aligned/
	     train_00001_aligned.jpg
             test_0001_aligned.jpg
             ...

Pretrained backbone model

Download the pretrained ResNet18 from this github repository, and then put it into the pretrained_model directory. We thank the authors for providing their pretrained ResNet model.

Train the RUL model

cd src
python main.py --raf_path '../dataset/raf-basic' --label_path '../dataset/raf-basic/EmoLabel/list_patition_label.txt' --pretrained_backbone_path '../pretrained_model/resnet18_msceleb.pth'

Accuracy

Acknowledgments

Our work is based on the following works, thanks for their code and pretrained model:

https://github.com/kaiwang960112/Self-Cure-Network

https://github.com/Ontheway361/dul-pytorch

https://github.com/amirhfarzaneh/dacl

Comments
  • Experiment details

    Experiment details

    Thanks for your excellent work! I have a question about the synthetic noisy experiment. As described in your article 【We run all experiments three times and compute the mean and standard variance of the results】 I wonder if you choose the best result of three experiments and then compute the mean and standard variance, or some other way?

    opened by zzzzzzyang 8
  • 关于Mixup

    关于Mixup

    您好!非常感谢提供这么好的不确定估计学习工作。我想请教您,RUL方法可以用于多标签分类么?如果想用类似的不确定性估计方式解决多标签分类问题,有什么建议么?另外,我看到文中采用不同label 图像的feature进行mixup,那如果是随机的img的feature 进行mixup操作,那么性能如何呢?

    期待您的答复。

    祝好!

    opened by myt889 5
  • pre-trained model link is invalid

    pre-trained model link is invalid

    Hello,Thank you so much for your excellent work,but I can't find it download ms-celeb pretrained model for weight initialization,because the pre-trained model provided by the author is not linked to Google Drive:https://drive.google.com/file/d/1H421M8mosIVt8KsEWQ1UuYMkQS8X1prf/view?usp=sharing

    I want to retrain the model, so I would like to ask you to re-upload the pre-trained model to Baidu NetDisk or Google Drive(resnet18_msceleb.pth),thank you very much.

    opened by wangle-wang 2
  • How to calculate the mean +/- standard deviation

    How to calculate the mean +/- standard deviation

    Thanks for your great work.

    I have a question and need your help. How to calculate the mean +/- standard deviation (like 80.43±0.72) in "Table 1: Test accuracy (%) on RAF-DB, FER2013 and AffectNet with synthetic noisy labels."? Is it to record the maximum accuracy in each experiment, and then calculate the mean and standard deviation of multiple experiments?

    Hope to hear from you soon. TQ

    opened by CNing715 2
  • About paper

    About paper

    As a emotion researcher, i have the similar thought on the DUL on CVPR2020. And I found your paper on list of NIPS,which makes me excited.

    However, I could not find your paper on arxiv... Can you tell me where I can find it?

    Also, I am a BYR, and a FER&FR researcher too. :)

    opened by PeiwenSun2000 1
  • Reproducing the results in different platform

    Reproducing the results in different platform

    Dear authors,

    thank you for sharing the codes of your nice work! However, when we tried the code, we found that the results are not very consistent on different platforms. Specifically, we made three trials (without any modification to the source code): [1] On a single GTX 1080Ti, the final accuracy is 88.85; [2] On a single RTX 3090, the final accuracy is 88.33; [3] On a single A40, the final accuracy is 88.62.

    We are curious why this phenomenon happens. Also, we wonder if the authors could provide some suggestions on reproducing the results. Thank you!

    opened by wwzjer 1
Owner
null
Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI

EmotionUI Software for Multimodalty 2D+3D Facial Expression Recognition (FER) UI. demo screenshot (with RealSense) required packages Python >= 3.6 num

Yang Jiao 2 Dec 23, 2021
Web service for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation based on OpenFace 2.0

OpenGaze: Web Service for OpenFace Facial Behaviour Analysis Toolkit Overview OpenFace is a fantastic tool intended for computer vision and machine le

Sayom Shakib 4 Nov 3, 2022
OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.

OpenFace 2.2.0: a facial behavior analysis toolkit Over the past few years, there has been an increased interest in automatic facial behavior analysis

Tadas Baltrusaitis 5.8k Dec 31, 2022
Py-FEAT: Python Facial Expression Analysis Toolbox

Py-FEAT is a suite for facial expressions (FEX) research written in Python. This package includes tools to detect faces, extract emotional facial expressions (e.g., happiness, sadness, anger), facial muscle movements (e.g., action units), and facial landmarks, from videos and images of faces, as well as methods to preprocess, analyze, and visualize FEX data.

Computational Social Affective Neuroscience Laboratory 147 Jan 6, 2023
Facial detection, landmark tracking and expression transfer library for Windows, Linux and Mac

Welcome to the CSIRO Face Analysis SDK. Documentation for the SDK can be found in doc/documentation.html. All code in this SDK is provided according t

Luiz Carlos Vieira 7 Jul 16, 2020
Facial Expression Detection In The Realtime

The human's facial expressions is very important to detect thier emotions and sentiment. It can be very efficient to use to make our computers make interviews. Furthermore, we have robots now can detect the human's emotions and based on thats take an action .etc. So, It will be better to provide a tool or model for this.

Adel El-Nabarawy 4 Mar 1, 2022
Facial expression detector

A tensorflow convolutional neural network model to detect facial expressions.

Carlos Tardón Rubio 5 Apr 20, 2022
Automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azure

fwhr-calc-website This project is to automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azur

SoohyunPark 1 Feb 7, 2022
Face Detection & Age Gender & Expression & Recognition

Face Detection & Age Gender & Expression & Recognition

Sajjad Ayobi 188 Dec 28, 2022
Official implementation for ICDAR 2021 paper "Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformer"

Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformer Description Convert offline handwritten mathematical expressi

Wenqi Zhao 87 Dec 27, 2022
Realtime micro-expression recognition using OpenCV and PyTorch

Micro-expression Recognition Realtime micro-expression recognition from scratch using OpenCV and PyTorch Try it out with a webcam or video using the e

Irfan 35 Dec 5, 2022
Keeping it safe - AI Based COVID-19 Tracker using Deep Learning and facial recognition

Keeping it safe - AI Based COVID-19 Tracker using Deep Learning and facial recognition

Vansh Wassan 15 Jun 17, 2021
Relative Positional Encoding for Transformers with Linear Complexity

Stochastic Positional Encoding (SPE) This is the source code repository for the ICML 2021 paper Relative Positional Encoding for Transformers with Lin

Antoine Liutkus 48 Nov 16, 2022
Fast and robust certifiable relative pose estimation

Fast and Robust Relative Pose Estimation for Calibrated Cameras This repository contains the code for the relative pose estimation between two central

null 42 Dec 6, 2022
Relative Human dataset, CVPR 2022

Relative Human (RH) contains multi-person in-the-wild RGB images with rich human annotations, including: Depth layers (DLs): relative depth relationsh

Yu Sun 112 Dec 2, 2022
The world's simplest facial recognition api for Python and the command line

Face Recognition You can also read a translated version of this file in Chinese 简体中文版 or in Korean 한국어 or in Japanese 日本語. Recognize and manipulate fa

Adam Geitgey 46.9k Jan 3, 2023
A facial recognition doorbell system using a Raspberry Pi

Facial Recognition Doorbell This project expands on the person-detecting doorbell system to allow it to identify faces, and announce names accordingly

rydercalmdown 22 Apr 15, 2022
Method for facial emotion recognition compitition of Xunfei and Datawhale .

人脸情绪识别挑战赛-第3名-W03KFgNOc-源代码、模型以及说明文档 队名:W03KFgNOc 排名:3 正确率: 0.75564 队员:yyMoming,xkwang,RichardoMu。 比赛链接:人脸情绪识别挑战赛 文章地址:link emotion 该项目分别训练八个模型并生成csv文

null 6 Oct 17, 2022
Testing the Facial Emotion Recognition (FER) algorithm on animations

PegHeads-Tutorial-3 Testing the Facial Emotion Recognition (FER) algorithm on animations

PegHeads Inc 2 Jan 3, 2022