Editor's Note: Popular File 2013
This program is the clone of 'Face Detection System' in MATLAB
but instead of Neural Networks, It is based on Support Vector Machine (SVM)
Face Detection System (Neural Network)
http://www.mathworks.com/matlabcentral/fileexchange/11073-face-detection-system
1- copy all files and directories to the MATLAB's work folder
* In order to run the program you must have Image Processing and Neural Networks Toolboxes
2- find the file named "main.m"
3- Double click on this file or type "main" in the command window
4- a menu will be shown . click on "Create SVM" and wait until the program is done with the training.
5- click on "Test on Photos". A dialog box will be appeared. Select a .jpg photo
6- Wait until the program detects some faces
For more information please visit the website. Thank you.
http://www.facedetectioncode.com
Omid Sakhi (2021). Face Detection using Support Vector Machine (SVM) (https://www.mathworks.com/matlabcentral/fileexchange/29834-face-detection-using-support-vector-machine-svm), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
svmtrain(P',T','Kernel_Function','linear','Polyorder',2,'quadprog_opts',options);
how to solve this error?
please mail the solution krizchaudhary@gmail.com
svmtrain(P',T','Kernel_Function','linear','Polyorder',2,'quadprog_opts',options); ?
svmclassify(net,P'); ?
please share?
i don' t know where (svmtrain.m, svmclassify.m ) is.
못찾겠다 꾀꼬리...
索引超出矩阵维度,出错svmclassify(line 109) sample(:,c) = svmStruct.ScaleData.scaleFactor(c)*...;出错imscan(line 54)Cell.net(y,x) = svmclassify(net,im2vec(imcut)');出错main(line 43)im_out = imscan(net,im);Thx.
Omid would like to change the dimension of the face and non face instead of 27x18. What variables do I need to change? many thanks
Very Nice Work SIR
when i click on "TEST on Photos"
Error using images.internal.imageDisplayParsePVPairs (line 71)
The parameter, notruesize, is not recognized by imageDisplayParsePVPairs
Error in images.internal.imageDisplayParseInputs (line 69)
[common_args,specific_args] = images.internal.imageDisplayParsePVPairs(varargin{:});
Error in imshow (line 222)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error in main (line 45)
figure;imshow(im_out,'notruesize');
Hi omid
I am facing following error
" Error using imshow>preParseInputs (line 429)
The syntax IMSHOW(...,'notruesize') has been removed. Use the IMSHOW(...,'InitialMagnification','fit')
syntax instead.
Error in imshow (line 214)
varargin_translated = preParseInputs(varargin{:});
Error in main (line 45)
figure;imshow(im_out,'notruesize');"
please help
Hi omid
I am facing following error
" Error using imshow>preParseInputs (line 429)
The syntax IMSHOW(...,'notruesize') has been removed. Use the IMSHOW(...,'InitialMagnification','fit')
syntax instead.
Error in imshow (line 214)
varargin_translated = preParseInputs(varargin{:});
Error in main (line 45)
figure;imshow(im_out,'notruesize');"
please help urgently
Hi omid
I am facing following error
" Error using imshow>preParseInputs (line 429)
The syntax IMSHOW(...,'notruesize') has been removed. Use the IMSHOW(...,'InitialMagnification','fit')
syntax instead.
Error in imshow (line 214)
varargin_translated = preParseInputs(varargin{:});
Error in main (line 45)
figure;imshow(im_out,'notruesize');"
please help urgently
سلام
آقا امید در انتهای اجرای برنامه خطای زیر وجود دارد
Error using imshow>preParseInputs (line 430)
The syntax IMSHOW(...,'notruesize') has been removed. Use the
IMSHOW(...,'InitialMagnification','fit') syntax instead.
Error in imshow (line 215)
varargin_translated = preParseInputs(varargin{:});
Error in main (line 45)
figure;imshow(im_out,'notruesize');
چطوری باید حلش کرد؟
با تشکر
provide this service very very nice
and again this system provide to notes continous
Great code! Quick question, can we train the code to detect more faces, by adding more sample faces in the face folder? I would like to have the code detect the face when the person only shows one side of his/her face. Thank you
Great code! Quick question, can we train the code to detect more faces, by adding more sample faces in the face folder? I would like to have the code detect the face when the person only shows one side of his/her face.
Thank you
Thanks a lot for the code...It's showing some error in svmtrain function. Can you please check? I have the bioinformatic tool box. It's showing error in parameter passing to svmtrain().
Thanks anyway I am studying svm now, may be able to solve this problem later.
Thanks.
great job, but i not very understand with the imscan.m file code (first section, second section and third section). Is there any pdf file or source that can provide so that i can more understand about the coding? thanks.
After the face_folder and non_face_folder variables modified to the right directory, programme works well, thanks for sharing.
Hello Omid, Thank's a lot for this work, it's perfect, but i have a problem on it, when i want to change the database, i want to use the X2MVTS database, it don't work, do you have any idea why ?!
PS: your script work only for 27x18 images ?!!
Thx again
Hey Steve! Thank you for your comment. Unfortunately svmclassify and svmtrain functions are part of the Bioinformatic toolbox. So if you do not have that toolbox, there is no way to run this program. Sorry ...
Hi Omid, thank you for taking the time to upload your code. However, I am unable to get it working... When I click the 'Create SVM' button I get the following error...
??? Undefined function or method 'svmtrain' for input arguments of type 'struct'.
Error in ==> trainnet at 18
net =
svmtrain(P',T','Kernel_Function','linear','Polyorder',2,'quadprog_opts',options);
Error in ==> main at 32
net = trainnet(IMGDB);
(fyi, I am using matlab ver 7.10.0)
Thank you in advance, I would like to try out your code if you can help me get it working
Great stuff! However when it comes to place the rectangles over the faces I get the following error:
??? Undefined function or variable 'Threshold'.
Error in ==> imscan at 74
xy_ = Cell.net > Threshold;
(as the 'Threshold' variable is not defined anywhere). What should it be set to?