Error using Semantic Segmentation Using Deep Learning

2 ビュー (過去 30 日間)
Vasilis Giannoglou
Vasilis Giannoglou 2019 年 12 月 10 日
回答済み: Vasilis Giannoglou 2019 年 12 月 16 日
I was trying to replicate the example in Semantic Segmentation Using Deep Learning
Error using matlab.io.datastore.PixelLabelDatastore.label2cat (line 1030)
Pixel label image has RGB-triplet pixel label IDs instead of scalar pixel label IDs.
At first I got it at
pximds = pixelLabelImageDatastore(imdsTrain,pxdsTrain, ...
'DataAugmentation',augmenter);
But then I didn't include the augmenter and there was no problem there. Afterwards, the same again in:
[net, info] = trainNetwork(pximds,lgraph,options);
I searched it in google, it seems other people also had the same, but there was no answer to it. It's just the example proposed in mathworks

回答 (2 件)

Sourav Bairagya
Sourav Bairagya 2019 年 12 月 13 日
I have tried to replicate that same example (mentioned in the provided link) on MATLAB R2019b and it sucessfully ran.
On MATLAB 2019a, "deeplabv3plusLayers" function is not available. Here I have ran the same example using U-Net and it sucessfully ran.
% Create U-Net
lgraph = unetLayers(imageSize, numClasses);
imageFreq = tbl.PixelCount ./ tbl.ImagePixelCount;
classWeights = median(imageFreq) ./ imageFreq;
pxLayer = pixelClassificationLayer('Name','labels','Classes',tbl.Name,'ClassWeights',classWeights);
lgraph = replaceLayer(lgraph,"Segmentation-Layer",pxLayer);
The above mentioned errors have not been produced in any of the cases.

Vasilis Giannoglou
Vasilis Giannoglou 2019 年 12 月 16 日
If I copy-paste all the commands in a seperate .m file, I get the above errors. If I open the
openExample('deeplearning_shared/SemanticSegmentationUsingDeepLearningExample')
then it runs ok. I really don't know why

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by