How to implement a Convolutional encoder decoder for image classification
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I am working on an implementation of convolutional encoder-decoder, The goal is to resize the input and reconstruct the ouput similar to the value of the input from images.
I tried to implement it using this code but errors are always pop-up.
clc; clear all; close all
load ('data');
digitDatasetPath = fullfile('Dataset Rahma')
imds = imageDatastore(digitDatasetPath, ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames');
encodingLayers = [ ...
convolution2dLayer(3,16,'Padding','same'), ...
reluLayer, ...
maxPooling2dLayer(2,'Padding','same','Stride',2), ...
convolution2dLayer(3,8,'Padding','same'), ...
reluLayer, ...
maxPooling2dLayer(2,'Padding','same','Stride',2), ...
convolution2dLayer(3,8,'Padding','same'), ...
reluLayer, ...
maxPooling2dLayer(2,'Padding','same','Stride',2)];
decodingLayers = [ ...
createUpsampleTransponseConvLayer(2,8), ...
reluLayer, ...
createUpsampleTransponseConvLayer(2,8), ...
reluLayer, ...
createUpsampleTransponseConvLayer(2,16), ...
reluLayer, ...
convolution2dLayer(3,1,'Padding','same'), ...
clippedReluLayer(1.0), ...
regressionLayer];
layers = [imageLayer,encodingLayers,decodingLayers];
options = trainingOptions('adam', ...
'MaxEpochs',100, ...
'MiniBatchSize',imds.ReadSize, ...
'Plots','training-progress', ...
'Verbose',false);
net = trainNetwork(trainingSet,layers,options);
1 comentario
Respuestas (0)
Ver también
Categorías
Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!