✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

⛄ 内容介绍

为解决医学上糖尿病性视网膜病变图像人工识别困难,精度差等问题,提出一种基于多特征融合的卷积神经网络识别方法.在V GG-16模型的基础上,通过融合每层网络上的局部特征,增强模型的特征提取能力.选用Softmax分类器,使病变图像识别更加准确.使用OpenCV图像处理工具采用加噪,上下左右不同角度翻转,调节对比度等5种方式扩充训练集.实验结果表明,基于多特征融合的深度学习框架图像识别系统在数据集上的平均识别精度达到94.23%.

⛄ 部分代码

clc

clear all

close al

imds = imageDatastore('.\Database',...

    'IncludeSubfolders',true,...

    'LabelSource','foldernames');

[Data,testData]= splitEachLabel(imds,0.8,'randomize');

% Training files

[trainData] =Data;

layers = [

    imageInputLayer([128 200 3],'Name','input')

    convolution2dLayer(5,16,'Padding','same','Name','conv_1')

    batchNormalizationLayer('Name','BN_1')

    reluLayer('Name','relu_1')

    convolution2dLayer(3,32,'Padding','same','Stride',2,'Name','conv_2')

    batchNormalizationLayer('Name','BN_2')

    reluLayer('Name','relu_2')

    convolution2dLayer(3,32,'Padding','same','Name','conv_3')

    batchNormalizationLayer('Name','BN_3')

    reluLayer('Name','relu_3')

    additionLayer(2,'Name','add')

    averagePooling2dLayer(2,'Stride',2,'Name','avpool')

    fullyConnectedLayer(2,'Name','fc')

    softmaxLayer('Name','softmax')

    classificationLayer('Name','classOutput')];

% Create a layer graph from the layer array. layerGraph connects all the layers in layers sequentially. Plot the layer graph.

lgraph = layerGraph(layers);

figure

plot(lgraph)

% Create the 1-by-1 convolutional layer and add it to the layer graph. Specify the number of convolutional filters and the stride so that the activation size matches the activation size of the 'relu_3' layer. This arrangement enables the addition layer to add the outputs of the 'skipConv' and 'relu_3' layers. To check that the layer is in the graph, plot the layer graph.

skipConv = convolution2dLayer(1,32,'Stride',2,'Name','skipConv');

lgraph = addLayers(lgraph,skipConv);

figure

plot(lgraph)

[convnet, traininfo] = trainNetwork(trainData,lgraph,options);

I = imread('test1.tif');

figure,imshow(I)

% % %     done classification

class = classify(convnet,I);

title(char(class))

⛄ 运行结果

【图像检测】基于CNN深度学习实现图像视网膜病变检测附matlab代码_图像识别

【图像检测】基于CNN深度学习实现图像视网膜病变检测附matlab代码_ide_02

【图像检测】基于CNN深度学习实现图像视网膜病变检测附matlab代码_2d_03

⛄ 参考文献

[1]叶显一. 基于深度学习的糖尿病视网膜病变图像中渗出物的检测方法研究[D]. 武汉工程大学.

[2]潘杨帆, 吴涛, 颜二惠,等. 基于CNN的糖尿病视网膜病变图像识别研究[J]. 电脑知识与技术:学术版, 2019, 15(11):3.

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料