-
Notifications
You must be signed in to change notification settings - Fork 4
/
benchmark.m
119 lines (99 loc) · 2.59 KB
/
benchmark.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
declare_globals();
global T_c T_s T_a T_p beta iou pfa; global name save;
%% sandia national laboratory Ku-band image 1
% src = 'img/snl1.png';
% [~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
%
% declare_globals();
% pfa = 0.7;
% img = loadData(src);
% [tars] = partModelDetector(img);
%% sandia national laboratory Ku-band image 3
% src = 'img/snl3.png';
% [~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
%
% declare_globals();
% beta = 0.1;
% pfa = 0.8;
% img = loadData(src);
% [tars] = partModelDetector(img);
%% sandia national laboratory Ku-band image 2
src = 'img/snl2.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
img = loadData(src);
[tars] = partModelDetector(img);
%% terraSAR-X ship
src = 'img/boat1.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
img = loadData(src);
[tars] = partModelDetector(img);
%% SSDD (SAR Ship Detection Dataset)
src = 'img/000011.jpg';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
for beta = [0.2, 0.3, 0.4, 0.5, 5]
img = loadData(src);
[tars] = partModelDetector(img);
figure(gcf); text(size(img,1)/2 - 10, size(img,2)/2 + 100,...
['\beta = ', num2str(beta)], 'FontSize', 36, 'Color', 'w');
if save
name{3} = ['beta', num2str(beta)];
export_fig(gcf, strjoin(name, ''), '-transparent', '-r300', '-nocrop');
end
pause(0.5);
end
%% x five tanks
src = 'img/tank1.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
T_c = 8/pi;
beta = 0.5; %
pfa = 0.6;
img = loadData(src);
[tars] = partModelDetector(img);
%% x dongbei
src = 'img/x1.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
beta = 0.01; %
pfa = 0.8;
img = loadData(src);
[tars] = partModelDetector(img);
%% mstar 1
src = 'img/mstar1.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
T_s = 1.5;
beta = 0.1;
T_a = 4;
T_p = 3;
pfa = 0.7;
img = loadData(src);
[tars] = partModelDetector(img);
%% mstar2
src = 'img/mstar2.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
T_s = 3;
beta = 0.5;
pfa = 0.7;
img = loadData(src);
[tars] = partModelDetector(img);
%% mstar 10
src = 'img/mstar10.jpg';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
pfa = 0.8;
img = loadData(src);
[tars] = partModelDetector(img);
%% airplane
src = 'img/airplane2.png';
[~, name{2}, ~] = fileparts(src); name{2}(end+1) = '-';
declare_globals();
beta = 0.1;
pfa = 0.8;
iou = 0.1;
img = loadData(src);
[tars] = partModelDetector(img);