FacialExpressionClassification

所属分类:人工智能/神经网络/深度学习
开发工具:matlab
文件大小:5462KB
下载次数:47
上传日期:2017-05-08 10:24:05
上 传 者`Jerry
说明:  1. 使用matlab自带的人脸识别工具(Viola-Jones算法)找出人脸的位置,并裁剪出人脸区域。 2. 使用Gabor滤波器识别出人脸的局部特征及纹理。 3. 训练一个SVM进行表情分类。 4. 交叉验证得到表情分类正确率为83.3 。 操作说明和系统描述请见ReadMe.
(1. Using matlab with face detection tool (Viola-Jones algorithm) to find the location of a human face, and cut out the face region. 2. Use Gabor filter to identify the face local feature and texture. 3. Adopt SVM to train a facial expression classifier. 4. Use cross-validation to exam the classification accuracy: 83.3 . )

文件列表:
buildDetector.m (1767, 2016-06-08)
croptest (0, 2017-04-18)
croptest\subject11.centerlight.bmp (17462, 2017-04-18)
croptest\subject11.centerlight.bmp.bmp (5174, 2017-04-18)
croptest\subject11.happy.bmp (17462, 2017-04-18)
croptest\subject11.happy.bmp.bmp (5174, 2017-04-18)
croptest\subject11.sad.bmp (17462, 2017-04-18)
croptest\subject11.sad.bmp.bmp (5174, 2017-04-18)
croptest\subject11.sleepy.bmp (17462, 2017-04-18)
croptest\subject11.sleepy.bmp.bmp (5174, 2017-04-18)
croptest\subject11.surprised.bmp (17462, 2017-04-18)
croptest\subject11.surprised.bmp.bmp (5174, 2017-04-18)
croptest\subject12.centerlight.bmp (17462, 2017-04-18)
croptest\subject12.centerlight.bmp.bmp (5174, 2017-04-18)
croptest\subject12.happy.bmp (17462, 2017-04-18)
croptest\subject12.happy.bmp.bmp (5174, 2017-04-18)
croptest\subject12.sad.bmp (17462, 2017-04-18)
croptest\subject12.sad.bmp.bmp (5174, 2017-04-18)
croptest\subject12.sleepy.bmp (17462, 2017-04-18)
croptest\subject12.sleepy.bmp.bmp (5174, 2017-04-18)
croptest\subject12.surprised.bmp (17462, 2017-04-18)
croptest\subject12.surprised.bmp.bmp (5174, 2017-04-18)
croptest\subject13.centerlight.bmp (17462, 2017-04-18)
croptest\subject13.centerlight.bmp.bmp (5174, 2017-04-18)
croptest\subject13.happy.bmp (17462, 2017-04-18)
croptest\subject13.happy.bmp.bmp (5174, 2017-04-18)
croptest\subject13.sad.bmp (17462, 2017-04-18)
croptest\subject13.sad.bmp.bmp (5174, 2017-04-18)
croptest\subject13.sleepy.bmp (17462, 2017-04-18)
croptest\subject13.sleepy.bmp.bmp (5174, 2017-04-18)
croptest\subject13.surprised.bmp (17462, 2017-04-18)
croptest\subject13.surprised.bmp.bmp (5174, 2017-04-18)
croptest\subject14.centerlight.bmp (17462, 2017-04-18)
croptest\subject14.centerlight.bmp.bmp (5174, 2017-04-18)
croptest\subject14.happy.bmp (17462, 2017-04-18)
croptest\subject14.happy.bmp.bmp (5174, 2017-04-18)
croptest\subject14.sad.bmp (17462, 2017-04-18)
croptest\subject14.sad.bmp.bmp (5174, 2017-04-18)
croptest\subject14.sleepy.bmp (17462, 2017-04-18)
croptest\subject14.sleepy.bmp.bmp (5174, 2017-04-18)
... ...

################################################################################### All rights reserved by Yi Feng & Zhaoyu Zhu. Email: 1228309199@qq.com & 1175539038@qq.com ################################################################################### To run the whole project: 1. Run imageCrop.m to crop the facial area from the original pictures in the database. 2. Run getFeature.m to get feature faces via gabor filter. 3. Run Main.m to train a SVM to classify the expressions. #################################################################################### DATABASE We choose Yale face database as our project dataset. The Yale face database is one of the most popular facial databases for face recognition. It contains 15 subjects and each has 11 images with different illumination conditions and facial expression. We chose 4 images related to expression (neural, happy, sad and surprised) of the 15 subjects as our database and use cross validation method to get the accuracy of the system. SYSTEM DESCRIPTION As mentioned in introduction section, a FER system has three parts: face detection, feature extraction and expression classification. In face detection part, the face area will be detected and cropped from the original image. Feature extraction is the most important module in FER system. We decided to use Gabor filter to extract feature and use PCA method to reduce dimensions. Then we chose the support vector machine (SVM) as the expression classifier. Image Crop In the images of the database, the background pixels are big disturbance of getting the face feature so we need to detect the face part and crop the pure expression images from the input images. We use the MATLAB inbuilt function vision.CascadeObjectDetector which is based on Viola-Jones Algorithm to detect the location of face part. Then we use MATLAB function imcrop to crop the face from the original image. In image processing, a Gabor filter, named after Dennis Gabor, is a linear filter used for edge detection. Frequency and orientation representations of Gabor filters are similar to those of the human visual system, and they have been found to be particularly appropriate for texture representation and discrimination. [1] Here is the equation of Gabor filter, which is a Gaussian kernel function modulated by a sinusoidal plane wave. Obviously, the image of 1st row 6th column in figure 3 shows better local details of lips and eyes, so we choose this one as our best sample feature image and use its parameters (f = 1, = 3pi/4) to process other training and testing samples. Dimension Reduction using PCA Principal Component Analysis (PCA) technique is an effective method to reduce the dimension of a matrix without losing much information. This method compute the covariance matrix of the input matrix and get the eigenvalues and corresponding principal components of the covariance matrix. Then we can remove some principal components which contain a little information. The other principle components which are related to the leading eigenvalues form a transformation matrix to transfer the high dimension feature matrix to a much lower dimension matrix. The new matrix contains the most important features of the original matrix. [3] In our system, the dimension of the input data sample is 4096. After using PCA method, the dimension of new sample is 40. SVM classifier Support Vector Machine (SVM) is a strong tool for classification problems but a simple SVM can only handle binary (two-classes) classification tasks.[4] In order to deal with multiclass classification tasks, we need to modify the SVM using one-against-one method. This method constructs SVM machines for each pair of the classes. In our system, there are four different classes resulting in 4*(4-1)/2=6 SVM machines. In every SVM machine, the corresponding classes data sample will be used for training to classify the corresponding two classes. After training the 6 SVM machines, a voting strategy is applied to classify the test data samples. All the 6 SVM machines will be applied to the test data and the class which gets the most votes is the result of this multiclass SVM classifier. Then we use the RBF kernel function to find a Euclidean space which can linearly separate the classes. The penalty coefficient C and gamma are decided by grid search approach. In this contour map, the highest accuracy area is surrounded by the 86 contour line and the smallest C should be used to avoid overfitting problem. Therefore, we choose C=8 and gamma=0.0078 as the SVM parameters.

近期下载者

相关文件


收藏者