augmentedImageDatastoreに格納した変数にインデックスorプロパティ(変数.label)ができなくて困っています。可能ですか?
Mostrar comentarios más antiguos
imds = imageDatastore('機械学習500',"IncludeSubfolders",true,"LabelSource","foldernames");
[xtrain,xval] = splitEachLabel(imds,0.5,"randomized");
xtrainimg = augmentedImageDatastore([128 128 1],xtrain,"ColorPreprocessing","gray2rgb");
xvalimg = augmentedImageDatastore([128 128 1],xval,"ColorPreprocessing","gray2rgb");
whos xval
whos imds
T = imshow(readimage(imds,1))
whos T
Dt= zeros(128,128,1,2500);
Dv = zeros(128,128,1,2500);
for i=1:numel(xtrainimg.Files)
ytraining = xtrainimg.label(i); <ー%質問箇所.labelをつけたい!ができないので他のアイデアをご教授してほ しいです!
yval = xvalimg.label(i)
I = imread (xtrainimg.Files{i});
Dt(:,:,:,i) = I;
II = imread (xvalimg.Files{i});
Dv(:,:,:,i) = II;
end
Dt(:,:,:,3)
[Dt,~,ytraining] = digitTrain4DArrayData;
[Dv,~,yval] = digitTest4DArrayData;
したいことは画像の名前と画像を紐づけしたいということです。
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!