通过深度神经网络进行图像修复

时间:2016-05-11 10:48:50

标签: image matlab neural-network

我正在通过深度神经网络研究绘画中的图像。 我下载了以下工具箱:http://www.mathworks.com/matlabcentral/fileexchange/42853-deep-neural-network/content/DeepNeuralNetwork/testDNN.m

就是这样的例子:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Deep Neural Network:                                     %
%                                                          %
% Copyright (C) 2013 Masayuki Tanaka. All rights reserved. %
%                    mtanaka@ctrl.titech.ac.jp             %
%                                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all;

num = 1000;
nodes = [32 16 8 4];

IN = rand(num,32);
OUT = rand(num,4);

dnn = randDBN( nodes );
%dnn = randDBN( nodes, 'BBPDBN' ); % ICPR 2014
%dnn = randDBN( nodes, 'GBDBN' );
nrbm = numel(dnn.rbm);

opts.MaxIter = 20;
opts.BatchSize = num/4;
opts.Verbose = true;
opts.StepRatio = 0.1;
opts.Layer = nrbm-1;
opts.DropOutRate = 0.5;
opts.Object = 'CrossEntropy';

dnn = pretrainDBN(dnn, IN, opts);
dnn= SetLinearMapping(dnn, IN, OUT);

opts.Layer = 0;
dnn = trainDBN(dnn, IN, OUT, opts);
rmse = CalcRmse(dnn, IN, OUT);
rmse

此代码是否适合转换图片中的情况?我可以预测丢失的像素值(= 0)吗? 他是如何决定节点值的?

此致

0 个答案:

没有答案