By Ilke Cugu, Eren Sener, Emre Akbas.
MicroExpNet is an extremely small (under 1MB) and fast (1408 FPS on i7 CPU) TensorFlow convolutional neural network model for facial expression recognition (FER) from frontal face images. This repository contains the codes described in the paper "MicroExpNet: An Extremely Small and Fast Model For Expression Recognition From Frontal Face Images" (https://arxiv.org/abs/1711.07011).
Full list of items
- MicroExpNet.py: The original source code of the proposed FER model
- exampleUsage.py: A script to get prediction from a pre-trained MicroExpNet for an unlabeled image
- Models: Pre-trained MicroExpNet models for CK+ and Oulu-CASIA datasets.
- Candidates: Candidate networks build in search of a better FER model
If you use these models in your research, please cite:
@article{ccuugu2017microexpnet,
title={MicroExpNet: An Extremely Small and Fast Model For Expression Recognition From Frontal Face Images},
author={{\c{C}}u{\u{g}}u, {\.I}lke and {\c{S}}ener, Eren and Akba{\c{s}}, Emre},
journal={arXiv preprint arXiv:1711.07011},
year={2017}
}
MicroExpNet(x, y, teacherLogits, lr, nClasses, imgXdim, imgYdim, batchSize, keepProb, temperature, lambda_)
This is the class where the magic happens. Take a look at exampleUsage.py for a quick test drive.
Parameters
- x: Tensorflow placeholder for input images
- y: Tensorflow placeholder for one-hot labels (default: None -> unlabeled image testing)
- teacherLogits: Tensorflow placeholder for the logits of the teacher (default: None -> for standalone testing)
- lr: Learning rate (default: 1e-04)
- nClasses: Number of emotion classes (default: 8)
- imgXdim: Dimension of the image (default: 84)
- imgYdim: Dimension of the image (default: 84)
- batchSize: Batch size (default: 64)
- keepProb: Dropout (default: 1)
- temperature: The hyperparameter to soften the teacher's probability distributions (default: 8)
- lamba_: Weight of the soft targets (default: 0.5)
We provide pre-trained MicroExpNet models for both CK+ and Oulu-CASIA.
In addition, one can find sample pre-trained teacher models which are derived from the original Caffe implementation of ResNet50:
Labels of the both models
0: neutral, 1: anger, 2: contempt, 3: disgust, 4: fear, 5: happy, 6: sadness, 7: surprise