Pro-process to increase the face recognition rate

Hi, I am doing the final year project for face recognition based attendance system.
I tried to increase the brightness of the photo and it did help me to improve the recognition rate a bit, so i wonder anyone can tell me what pre-process technique can be use to increase the recognition rate?
Thank :)

 Accepted Answer

There are lots of things that could improve recognition such as looking straight into the camera, having eyes open and mouth closed and in a neutral position, having proper illumination (no shadows, same exposure as in database, etc.), etc. See this for lots more ideas: http://www.visionbib.com/bibliography/contentspeople.html#Face%20Recognition,%20Detection,%20Tracking,%20Gesture%20Recognition,%20Fingerprints,%20Biometrics

6 Comments

hmm... ya i know, that one is the process while taking picture. So based on what you say, is there any way to rotate the face to a fixed position?
You could try to identify the Orientation angle for each image using regionprops(), then use imrotate() to rotate it by (90-angle) so that each image is vertical.
hmm.. then which region of the face is suitable to pick? to check the orientation?
Why do you have multiple regions? Doesn't the person have just one face? You might need to improve your face detection code so that you get just one blob. If you have two, like face and chest, then you might need to figure out how to get just the face region.
ok i just using the face pic that i detected, but before using the regionprops(), i need to use im2bw() 1st right? after that, if i run the regionprops(), it return me many angle, so which angle should i pick? sorry im still a beginner to use matlab haha
Hi Mathworks team .
I am having two problems distinguishing faces using (face recognition convolutional neural network)
First: How to detect the intruder.
Second: The facial recognition overlaps between one person and another in the system.
The first test on grayscale images was good recognition, but on realtime of web camera the results are incorrect, knowing that I use a camera that has accuracy: 1024x570
note : all imge are grayscale .
Where is the defect in the code?
this my code for training dataset:
clc
clearvars
close all
%% variables
trainingNumFiles = 0.8;
rng(1)
faceData = imageDatastore('AutoCapturedFaces','IncludeSubfolders',true,'LabelSource','foldernames');
% Resize the images to the input size of the net
faceData.ReadFcn = @(loc)imresize(imread(loc),[227,227]);
% read one image to get pixel size
img = readimage(faceData,1);
% splitting the testing and training data
[trainFaceData,testFaceData] = splitEachLabel(faceData, ...
trainingNumFiles,'randomize');
%% defining CNN parameters
% defining layers
layers = [imageInputLayer([size(img,1) size(img,2) 1])
%middle layers
convolution2dLayer(5,3,'Padding', 2, 'Stride',3)
reluLayer
maxPooling2dLayer(3,'Stride',3)
%final layers
fullyConnectedLayer(8)
softmaxLayer
classificationLayer()];
% options to train the network
options = trainingOptions('sgdm', ...
'MiniBatchSize', 40, ...
'InitialLearnRate', 1e-4, ...
'MaxEpochs', 25, ...
'LearnRateSchedule', 'piecewise', ...
'LearnRateDropFactor', 0.875, ...
'LearnRateDropPeriod', 12, ...
'VerboseFrequency', 5);
% training the network
convnet = trainNetwork(trainFaceData,layers,options);
%% classifying
YTest = classify(convnet,testFaceData);
TTest = testFaceData.Labels;
%% Calculate the accuracy.
accuracy = sum(YTest == TTest)/numel(TTest)
save convnet
accuracy =
0.9375
https://www.mathworks.com/matlabcentral/answers/774947-face-recognition-convolutional-neural-network?s_tid=prof_contriblnk

Sign in to comment.

More Answers (1)

i used pca algo to match test data with database. but the images with tilted faces are not getting recognized. is the algo a problem? help

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!