-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.m
57 lines (52 loc) · 1.33 KB
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% Version : 7.0
% Date : 2015-05-03
% Tested on MATLAB 2013a
% Author : Omid Sakhi
% http://www.facedetectioncode.com
clear all;
close all;
clc;
if ~exist('./data')
mkdir('./data');
end
if ~exist('main.m')
fprintf ('You must navigate to the folder which contains main.m\n');
fprintf ('Use dir command to make sure you are in the correct folder.\n');
fprintf ('Use cd command to navigate to the folder.\n');
return;
end
if ~exist('./data/gabor.mat','file')
run ('include/createGabor.m');
end
if ~exist('./data/net.mat','file')
run ('include/menuCreateNetwork.m');
end
if ~exist('./data/imgdb.mat','file')
run ('include/menuLoadImages.m');
end
while (1==1)
choice=menu('Face Detection',...
'Create Database',...
'Create Netwoek',...
'Train Network',...
'Test on Photos',...
'Exit');
if (choice ==1)
run ('include/menuLoadImages.m');
end
if (choice == 2)
run ('include/menuCreateNetwork.m');
end
if (choice == 3)
run ('include/menuTrainNetwork.m');
end
if (choice == 4)
run ('include/menuScanImage.m');
end
if (choice == 5)
clear all;
clc;
close all;
return;
end
end