DICOM imageとDeep Learning
2 views (last 30 days)
Show older comments
masakazu sugino
on 9 Jul 2019
Commented: masakazu sugino
on 11 Jul 2019
DICOM画像をdeeplearningで学習させているときに、生じる問題があるのでしょうか。
png画像に変換したほうがいいのでしょうか。
以下は自分で作成したdeep learningの分類に関するスクリプトです。
currentdirectory = pwd;
imds = imageDatastore(fullfile(currentdirectory, categories),'IncludeSubfolders',true,'FileExtensions','.dcm','LabelSource', 'foldernames','ReadFcn',@dicomread);
% 検証枚数を増やす
numTrainFiles = 1064;
[imdsTrain,imdsValidation] = splitEachLabel(imds,numTrainFiles,'randomize');
% 分類器の作成
layers = [
imageInputLayer([30 30 1])
convolution2dLayer(3,8,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2,'Stride',1)
convolution2dLayer(3,16,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2,'Stride',1)
convolution2dLayer(3,32,'Padding','same')
batchNormalizationLayer
reluLayer
dropoutLayer(0.2)
fullyConnectedLayer(9)
softmaxLayer
classificationLayer];
options = trainingOptions('sgdm', ...
'MiniBatchSize',128, ...
'InitialLearnRate',0.001, ...
'MaxEpochs',30, ...
'Shuffle','every-epoch', ...
'ValidationData',imdsValidation, ...
'ValidationFrequency',50, ...
'Verbose',false, ...
'Plots','training-progress');
net17= trainNetwork(imdsTrain,layers,options);
YPred = classify(net17,imdsValidation);
YValidation = imdsValidation.Labels;
accuracy = sum(YPred == YValidation)/numel(YValidation);
誤り等あったら教えていただきたいです。
0 Comments
Accepted Answer
More Answers (1)
See Also
Categories
Find more on イメージを使用した深層学習 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!