FCN影象語義分割
阿新 • • 發佈:2019-02-07
歡迎訪問人工智慧研究網課程中心
-----------------------------------------------------------------------------------
FCN做影象語義分割--測試和訓練
FCN 論文:Fully Convolutional Networks for Semantic Segmentation(FC-Model).pdf FCN 原理: FCN 程式碼:基於MatConvNet構建模型 1. 下載原始碼,放到根目錄E:MatConvNet-fcn-master 2. 配置matconvnet, 拷貝matconvnet-beta16版本到根目錄下. 並進行編譯。5. 測試FCN,注意使用fcnTest , 執行如下。。。。。function fcnTrain(varargin) %FNCTRAIN Train FCN model using MatConvNet run matconvnet/matlabl_setupnn ; addpath matconvnet/examples ; % experiment and data paths opts.archiveDir = fullfile('F:','VOC2011'); % 下載原始資料 opts.dataDir = fullfile('F:','VOC2011','VOCtrainval'); opts.expDir = fullfile('data','fcn16s-voc11-train'); opts.modelType = 'fcn16s' ; opts.sourceModelPath = 'data/models/imagenet-vgg-verydeep-16.mat'; %-beta16版本 [opts, varargin] = vl_argparse(opts, varargin) ; % experiment setup opts.imdbPath = fullfile(opts.expDir, 'imdb.mat') ; opts.imdbStatsPath = fullfile(opts.expDir, 'imdbStats.mat') ; opts.vocEdition = '11' ; opts.vocAdditionalSegmentations = true ; opts.numFetchThreads = 1 ; % not used yet % training options (SGD) opts.train.batchSize = 20 ; opts.train.numSubBatches = 10 ; opts.train.continue = true ; opts.train.gpus = 1 ; opts.train.prefetch = true ; opts.train.expDir = opts.expDir ; opts.train.learningRate = 0.0001 * ones(1,50) ; opts.train.numEpochs = numel(opts.train.learningRate) ; opts = vl_argparse(opts, varargin) ;