The GKR Post Processing Plug-in for CERT

CERT
4_2 

Post Processing Unit (GKR plug-in)

test video or rea-ltime camera Input

1. Pose Correction 
(Prediction)

2. Logistic Mapping Whitening

3 Conditional Kalman Filter

neutral face calibration images

1. Pose Correction (Training)

2,3. Subject-independent pre-trained parameters 
(Matlab, next delivery)

Configuration Tags  <gkr  />    <logistic />       <temporal/>

4.2

4.2

Offline

Online

The entire unit is enclosed in the GKR Post Processing plug-in <gkrplugin/>. Each subcomponent can be individually turned on/off by using/comment out the corresponding tag in the configuration file. 

	1.	Pose Correction Unit
We noticed that our AU detector is vulnerable to pose change. The Gaussian Kernel Regression algorithm is applied to learn the model of error due to pose change. Since different AUs cause different pose errors, we create a model for each AU.

Since the pose induced error is person dependent. Our algorithm is designed to work in two phases: training and predicting. In the training phase (cmdline arg : -gt <outputfile>), the model parameters are learnt from the calibration video when the subject holds a neutral face. Then in the prediction phase (cmdline arg: -gc <inputfile>) , the trained model is used to correct errors induced by pose changes.

	2.	The Logistic Mapping / Whitening
At this step, we normalize the AU response from real numeric range to probabilistic plausible [0, 1] range to facilitate further processing. We use a simple logistic mapping function f(x) = 1/ (1 + exp(a*x + b)) to do so. The mapping function parameters (a, b) are learnt from empirical data using standard logistic regression for each AU.

	3.	The Conditional Kalman filter
To take advantage of temporal dynamics, we apply a simple conditional Kalman filter. In the model, the actual ground truth AU displays are treated as hidden states while the base CERT outputs are the observations. The training part was done in MATLAB while the C++ code implements the prediction part. 
The Kalman filter provides estimates of not only actual AU output but also the confidence of the output (will be displayed in next release).  Naturally as expected, when the base CERT outputs fluctuates, or even failed to find a face (NaN), the confidence will decrease (i.e. variance increases). This helps fill in the gap when the subject accidentally turns his head out of detection range. But if the face is lost for too long (say 1 second), the confidence will be too low and we then consider that the subject has left the scene.