i have face recognition problem in video

조회 수: 6 (최근 30일)
presty
presty 2013년 6월 11일
댓글: omar A.alghafoor 2021년 3월 17일
hello i am doin proj on face recognition in videos ..but i am facing problem when an unknown person comes it identifies as a known person from data base.

채택된 답변

Image Analyst
Image Analyst 2013년 6월 11일
Well, keep adding more features until it works. (Not sure if you have a question, but you didn't ask one.)
  댓글 수: 1
omar A.alghafoor
omar A.alghafoor 2021년 3월 17일
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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

presty
presty 2013년 6월 21일
i am facing problem in face tracking and recognition . can get code for these to system. i am working on camshift for tracking and curvelet transform for recognition using SVM.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by