Input folders or files do not contain specified file extensions:
6 ビュー (過去 30 日間)
古いコメントを表示
Emerson Nithiyaraj
2019 年 10 月 29 日
コメント済み: hla hla myint
2020 年 10 月 20 日
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 月 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 .
採用された回答
Ajay Pattassery
2019 年 11 月 4 日
編集済み: Ajay Pattassery
2019 年 11 月 4 日
Here if you do not define the ReadFcn explicitly, the default function used is imread() which is not supported for .nii extension.
pxds = pixelLabelDatastore(labelDir,classNames,labelIds,'FileExtensions','.nii','ReadFcn',sampleReadFcn);
imds = imageDatastore(imageDir,'FileExtensions','.nii','ReadFcn',sampleReadFcn);
The custom ReadFcn looks something like the following
function data = sampleReadFcn(filename)
data = niftiread(filename);
end
3 件のコメント
Walter Roberson
2020 年 5 月 18 日
pxds = pixelLabelDatastore(labelDir, classNames, labelIds, 'FileExtensions', '.nii', 'ReadFcn', @sampleReadFcn);
imds = imageDatastore(imageDir, 'FileExtensions', '.nii', 'ReadFcn', @sampleReadFcn);
その他の回答 (1 件)
Gökay Karayegen
2020 年 5 月 18 日
編集済み: Gökay Karayegen
2020 年 5 月 18 日
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 件のコメント
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.
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!