- imageDatastore: https://www.mathworks.com/help/matlab/ref/imagedatastore.html
- List of Supported Layers: https://www.mathworks.com/help/deeplearning/ug/list-of-deep-learning-layers.html
- trainnet: https://www.mathworks.com/help/deeplearning/ref/trainnet.html
Breast Density in Mammography
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi to all,
Does anyone knows of any app/code to classify mammograms in density terms? Or even an app that computes a density value.
I do not want to retrieve a segmentation, only a classification or a single final value.
Thank you!
댓글 수: 0
답변 (1개)
Aastha
2025년 6월 18일
I understand your objective is to regress a density value from a mammogram image. You may consider the following steps to accomplish this using a Convolutional Neural Network (CNN) in MATLAB:
1. Begin by preparing your dataset, where the input data consists of mammogram images and the corresponding target values are the associated density values. Store the image files in a folder and create a datastore or table that links each image to its label.
imageFolder = 'path_to_images';
imds = imageDatastore(imageFolder, 'FileExtensions', '.png', 'LabelSource', 'foldernames');
% Assuming labels are stored in a separate table or array
load('densityLabels.mat'); % Contains variable `densityValues`
tbl = table(imds.Files, densityValues, 'VariableNames', {'Image', 'Density'});
2. Next, define the CNN architecture using a layers array. The network should be structured for a regression task. You may use the following MATLAB code snippet for reference:
layers = [
imageInputLayer([M N 1])
convolution2dLayer(3,8,Padding="same")
batchNormalizationLayer
reluLayer
fullyConnectedLayer(numResponses)
];
3. Configure the training process by specifying training options with the "trainingOptions" function. Then, train the CNN model using the "trainnet" function. Choose an appropriate loss function for your regression task as per your requirements.
For more information on the functions mentioned above, you may refer to the following documentation pages:
I hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Biotech and Pharmaceutical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!