Semantic Segmentation without Data Store Object
Afficher commentaires plus anciens
Hi everyone, I have a problem using categorical response. I dont want to use data store object to prepare data. I have Itrn NxNx3XM image store and trn_gnd NxNx1xM pixel label matrix which each elements are 0 and 1; I translated numerical [0,1] to string "b","c" labels.
classNames = ["b","c"];
pxLayer = pixelClassificationLayer('Name','labels','ClassNames',classNames, 'ClassWeights', [1 20]);
lgraph = removeLayers(lgraph, 'pixelLabels');
lgraph = addLayers(lgraph, pxLayer);
lgraph = connectLayers(lgraph, 'softmax' ,'labels');
%%options specifications %%
trn_gnd_categ = categorical( trn_gnd,[0 1],{'b','c'});
net = trainNetwork(Itrn , trn_gnd_categ , lgraph, options)
But I get "Invalid training data. Y must be a vector of categorical responses. " error. I cant find where I'm wrong...
Réponses (0)
Catégories
En savoir plus sur Image Segmentation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!