インデックスが配列要素数 (5) を超えています。というエラーが出ます
Afficher commentaires plus anciens
https://jp.mathworks.com/help/vision/examples/semantic-segmentation-using-deep-learning.html
の例文を基にプログラムを作成しようとしているんですが、インデックスが配列要素数 (5) を超えています。というエラーが出ます。
その後、以下のようなエラーが出て停止します。
エラー: neosegmantion4>partitionCamVidData (行 274)
trainingLabels = pxds.Files(trainingIdx);
エラー: neosegmantion4 (行 81)
[imdsTrain, imdsVal, imdsTest, pxdsTrain, pxdsVal, pxdsTest] = partitionCamVidData(imds,pxds);
クラスの部分は以下のようにしています
classes = [
"wainbudou"
"graund"
"biniruhouse"
"burun"
"nasi"
"sakura"
"kage"
"yama"
"sora"
"kusa"
];
labelIDs = cell(10,1);
labelIDs{1,1} = 1;
labelIDs{2,1} = 2;
labelIDs{3,1} = 3;
labelIDs{4,1} = 4;
labelIDs{5,1} = 5;
labelIDs{6,1} = 6;
labelIDs{7,1} = 7;
labelIDs{8,1} = 8;
labelIDs{9,1} = 9;
labelIDs{10,1} = 10;
cmap = [
0 114 189
217 83 25
237 177 32
126 47 142
119 172 48
77 190 238
162 20 47
255 0 0
0 255 0
255 26 185
];
Réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!