forked from nightrome/matconvnet-calvin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_fcn.m
34 lines (26 loc) · 772 Bytes
/
demo_fcn.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
% demo_fcn()
%
% Trains and tests a Fully Convolutional Network on SIFT Flow.
%
% Copyright by Holger Caesar, 2016
% Add folders to path
setup();
% Settings
expNameAppend = 'testRelease';
% Define global variables
global glFeaturesFolder;
labelingsFolder = fullfile(glFeaturesFolder, 'CNN-Models', 'FCN', 'SiftFlow', sprintf('fcn16s-%s', expNameAppend), 'labelings-test-epoch50');
% Download dataset
downloadSiftFlow();
% Download base network
downloadNetwork();
% Train network
fcnTrainGeneric('expNameAppend', expNameAppend);
% Test network
stats = fcnTestGeneric('expNameAppend', expNameAppend);
disp(stats);
% Show example segmentation
fileList = dirSubfolders(labelingsFolder);
image = imread(fullfile(labelingsFolder, fileList{1}));
figure();
imshow(image);