-
Notifications
You must be signed in to change notification settings - Fork 0
/
fcnTestModelZoo.m
53 lines (47 loc) · 2.03 KB
/
fcnTestModelZoo.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
function fcnTestModelZoo()
% Test the FCN models imported from Caffe ModelZoo into MatConvNet
models = {'fcn32s', ...
'fcn16s', ...
'fcn8s', ...
'fcn8s-tvg-voc12', ...
'fcn8s-tvg-voc11'} ;
gpus = [] ;
for i = 1:numel(models)
model = models{i} ;
switch model
case {'fcn32s', 'fcn16s', 'fcn8s'}
info{i} =fcnTest('modelPath', sprintf('matconvnet/data/models/pascal-%s-dag.mat',model), ...
'modelFamily', 'ModelZoo', ...
'expDir', sprintf('data/modelzoo/%s', model), ...
'dataDir', 'data/voc11', ...
'vocEdition', '11', ...
'vocAdditionalSegmentations', true, ...
'vocAdditionalSegmentationsMergeMode', 2, ...
'gpus', gpus) ;
case {'fcn8s-tvg-voc12'}
info{i} = fcnTest('modelPath', 'matconvnet/data/models/pascal-fcn8s-tvg-dag.mat', ...
'modelFamily', 'TVG', ...
'expDir', 'data/modelzoo/fcn-tvg-voc12', ...
'dataDir', 'data/voc12', ...
'vocEdition', '12', ...
'vocAdditionalSegmentations', true, ...
'vocAdditionalSegmentationsMergeMode', 3, ...
'gpus', gpus) ;
case {'fcn8s-tvg-voc11'}
info{i} = fcnTest('modelPath', 'matconvnet/data/models/pascal-fcn8s-tvg-dag.mat', ...
'modelFamily', 'TVG', ...
'expDir', 'data/modelzoo/fcn-tvg-voc11', ...
'dataDir', 'data/voc11', ...
'vocEdition', '11', ...
'vocAdditionalSegmentations', true, ...
'vocAdditionalSegmentationsMergeMode', 2, ...
'gpus', gpus) ;
end
end
for i = 1:numel(models)
fprintf('| %15s | %5.1f | %5.2f | %5.2f |\n', ...
models{i}, ...
info{i}.miu*100, ...
info{i}.pacc*100, ...
info{i}.macc*100) ;
end