can any 1 guide me to clear this error

1 view (last 30 days)
SARAH LONER
SARAH LONER on 29 Nov 2019
Commented: SARAH LONER on 29 Nov 2019
A1 = 'G:\sarAH\MATH';
dataSetDir = fullfile(A1,'foldername','imageset');
imds= imageDatastore('imageset', ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames','FileExtensions',{'.dcm'});
labelDir = fullfile(dataSetDir,'trainingImages');
classNames = ["beign","malignant"];
labelIDs = [0 1];
pxds = pixelLabelDatastore(labelDir,classNames,labelIDs);
imageSize = [512 512 1];
numClasses = 2;
lgraph = createUnet(imageSize, numClasses);
ds = pixelLabelImageDatastore(imds,imds);
options = trainingOptions('sgdm', ...
'InitialLearnRate',1e-3, ...
'MaxEpochs',20, ...
'VerboseFrequency',10);
trainedNet = trainNetwork(ds,lgraph,options);
ERROR AT
Error using matlab.io.datastore.PixelLabelDatastore.create (line 895)
Cannot find files or folders matching: 'G:\SARAH\MATH\foldername\imageset\trainingImages'.
Error in pixelLabelDatastore (line 151)
ds = matlab.io.datastore.PixelLabelDatastore.create(location, classes, values, params);
Error in unet_ex1 (line 15)
pxds = pixelLabelDatastore(labelDir,classNames,labelIDs);

Answers (0)

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!