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!