Face Recognition Project in MATLAB using Transfer learning (with complete code)

Published: 18 September 2020
on channel: Knowledge Amplifier
14,174
129

Sorry for the spelling mistake in the name of Shahrukh Khan.
Check the complete Project explanation & implementation from scratch:
   • Complete Face Recognition Project Using MA...  
Note:
You need to create the database which contains 2 folders (total number of different classes you want to keep in your project , which is in this case 2 , one is my face , another is face of Shahrukh Khan)
Code to create database (take image & extract the face part using viola-jones algorithm and resize to 227 *227 , to train alexnet is given in the comment section)

Train Model:
clc
close all
g=alexnet;
layers=g.Layers;
layers(23)=fullyConnectedLayer(2);
layers(25)=classificationLayer;
allImages=imageDatastore('Dhamna','IncludeSubfolders',true, 'LabelSource','foldernames');
opts=trainingOptions('sgdm','InitialLearnRate',0.001,'MaxEpochs',20,'MiniBatchSize',64);
myNet=trainNetwork(allImages,layers,opts);
save myNet;

Testing Model:

clc;close;clear
c=webcam;
load myNet;
faceDetector=vision.CascadeObjectDetector;
while true
e=c.snapshot;
bboxes =step(faceDetector,e);
if(sum(sum(bboxes))~=0)
es=imcrop(e,bboxes(1,:));
es=imresize(es,[227 227]);
label=classify(myNet,es);
image(e);
title(char(label));
drawnow;
else
image(e);
title('No Face Detected');
end
end

Learn Digital Image Processing using MATLAB:
   • Digital Image Processing using MATLAB  

Learn Machine Learning & Data Science using MATLAB:
   • Data Science & Machine Learning using MATLAB  

#DigitalImageProcessing #MATLAB #ComputerVision #MachineLearning #DeepLearning #TransferLearning


On this page of the site you can watch the video online Face Recognition Project in MATLAB using Transfer learning (with complete code) with a duration of hours minute second in good quality, which was uploaded by the user Knowledge Amplifier 18 September 2020, share the link with friends and acquaintances, this video has already been watched 14,174 times on youtube and it was liked by 129 viewers. Enjoy your viewing!