Input folders or files do not contain specified file extensions:
이전 댓글 표시
hy,
I have a doubt regarding loading '.nii' (NIFTI) files in my CNN architecture for segmentation (I am using segnet architecture). I have attached the snapshot of the error and my code. I want to load my .nii file dataset inside imds . please suggest me any option.

댓글 수: 3
Walter Roberson
2019년 11월 1일
The error is occuring for the pixelLabelDatastore() call, not for the imageDataStore that you are creating.
pxds = pixelLabelDatastore(location,classNames,pixelLabelIDs) creates a PixelLabelDatastore object from image files that store pixel label data, in the folder or files specified by location. The function creates the object using pixel IDs that map image pixel label values to class names.
However, it cannot find any image files in E:\PHD\LITS17\GroundTruth\
Emerson Nithiyaraj
2019년 11월 2일
Walter Roberson
2019년 11월 2일
You would need to provide the FileExtensions option for the pixelLabelDatastore call. You will need to provide a ReadFcn property. You will probably also need a ReadFcn property for the imageDataStore .
채택된 답변
추가 답변 (1개)
Gökay Karayegen
2020년 5월 18일
편집: Gökay Karayegen
2020년 5월 18일
0 개 추천
Hello ! I have a problem regarding pixellabel data store too. The screenshot of the error and the part of the code are enclosed above. Do you have any suggentions? I would be really glad if anyone could help me? Regars,
댓글 수: 7
Walter Roberson
2020년 5월 18일
편집: Walter Roberson
2020년 5월 18일
That option is new for pixelLabelDatastore as of R2019a.
Before that, the workaround would seem to be to pass in all of the file names. For example,
dinfo = dir(fullfile(labelDir, '**', '*.nii'));
filenames = fullfile({dinfo.folder}, {dinfo.name});
pxds = pixelLabelDatastore(filenames, classnames, labelIDs, 'ReadFcn', matReader);
Gökay Karayegen
2020년 5월 19일
Thank you so much for the update. First two lines worked very well. However, I got the same error for 'ReadFcn' this time. Do you have an idea to overcome this issue. Thank you in advance for your help.
Walter Roberson
2020년 5월 19일
try
dinfo = dir(fullfile(labelDir, '**', '*.nii'));
filenames = fullfile({dinfo.folder}, {dinfo.name});
pxds = pixelLabelDatastore(filenames, classnames, labelIDs);
pxsd.ReadFcn = matReader;
Gökay Karayegen
2020년 5월 19일
I am getting this error message.
Walter Roberson
2020년 5월 24일
My recommendation would be to upgrade MATLAB versions.
Gökay Karayegen
2020년 5월 26일
Hello again ! Finally I manage to solve the problem. However, this time I am getting an error regarding trainnetwork command. Do you have any suggestions? Thank you once again.
Error using trainNetwork (line 170)
The subscript vectors must all be of the same size.
Error in semantik_derinogrenme (line 145)
net = trainNetwork(trainingData,layers,opts);
Caused by:
Error using sub2ind (line 69)
The subscript vectors must all be of the same size.
hla hla myint
2020년 10월 20일
Dear
Gökay Karayegen'
My research is same to you. I do not solve error_message PNG. Please help me.
카테고리
도움말 센터 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!