How to make a regression network from a semantic segmentation network?
Mostrar comentarios más antiguos
Hello , I have just used a semantic segmentation network to detect patterns from a copper deposit but i want to know if I can get a regression network out of this . I mean the semantic segmentation network input is a 744x1432x3 image size with a output 744x1432x7 size (7 because there is 7 labels) , but the point is recognising the output state of the image.The code i get so far below:
load '/MATLAB Drive/RLE/G_truth/gTruth.mat'
[imds,pxdsTruth] = pixelLabelTrainingData(gTruth)
dsTrain = combine(imds,pxdsTruth);
trainingData_2 = combine(imds,pxdsTruth);
tbl = countEachLabel(pxdsTruth)
frequency = tbl.PixelCount/sum(tbl.PixelCount);
classes = ["Quemado","Mate","Estriado","Aspero","Blanquecino","Deposito","Fondo"];
numClasses = numel(classes);
% Create DeepLab v3+.
lgraph = deeplabv3plusLayers(imageSize, numClasses, "resnet18");
options = trainingOptions('sgdm', ...
'LearnRateSchedule','piecewise',...
'LearnRateDropPeriod',12,...
'LearnRateDropFactor',0.3,...
'Momentum',0.9, ...
'InitialLearnRate',1e-3, ...
'L2Regularization',0.005,...
'MaxEpochs',14, ...
'MiniBatchSize',2, ...
'Shuffle','every-epoch', ...
'CheckpointPath', tempdir, ...
'VerboseFrequency',2,...
'Plots','training-progress',...
'ValidationPatience', 4);
[net] = trainNetwork(dsTrain,lgraph,options);
from this input

I get an image like this ,as instance

But this is an output from a reagents blending that undergoes a electrodeposition process , so I have 80 images that means there are 80 blendings each (a table with the composition each blending). My question is if I need to make a second algorithm network for regression (with input the labeled image) and output(the predicted blending composition) apart from the semantic or If possible can fuse them into one, because I am aiming to get the blending composition from the original image. Thanks for the help.
I attach the network I use: resnet18
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!