DICOM data as input for Deep Learning
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Mahesh Taparia
le 11 Mai 2020
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 commentaires
Mahesh Taparia
le 11 Mai 2020
Yes, if the input data is stored in variable V then it will be
I = I.V;
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur DICOM Format dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!