DICOM data as input for Deep Learning
2 ビュー (過去 30 日間)
古いコメントを表示
Dear colleagues!
I am new with Deep Learning and I am having problems in introducing DICOM data as input into imagedatastore in order to train a network.
I have followed the steps described here https://www.mathworks.com/help/deeplearning/ug/preprocess-volumes-for-deep-learning.html to "create an ImageDatastore from a collection of DICOM files".
I am able to load the .mat files and I see de 3D volumes for each case (I have 2 classes, each with three 3D volume data sets)
The problem is when I try to "trainNetwork", I get an error:
" Error using matlab.io.datastore.ImageDatastore/read (line 77)
Unable to read file:
'C:\Users\...\TrainingData\...\MATFiles\Class1\Case04.mat'."
Any help please???
(I have multiple clinical datasets. Each dataset is stored in a different folder and it is represented by multiple slices)
Thank you in advance!
0 件のコメント
採用された回答
Mahesh Taparia
2020 年 5 月 11 日
Hi
It seems that you are unable to load the mat file into the network. Your input is in mat file format. So, create a custom read function which read the files in that specified format and then pass it to the network. For example, call the read function after declaring the image datastore as given below:
datastore.ReadFcn=@readFcn_mat;
Define the read function as per your file. For example, consider a function given below:
function I = readFcn_mat(filename)
I = load(filename);
I = I.Input; %%%%change here as per your dataset
end
Hope it will helps.
3 件のコメント
Mahesh Taparia
2020 年 5 月 11 日
Yes, if the input data is stored in variable V then it will be
I = I.V;
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Big Data Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!