1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/Y5iUl5lv
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
中药识别是中医药领域中的一项重要任务,对于确保药品质量、保障用药安全具有重要意义。传统的中药识别方法主要依赖人工经验和形态特征,但存在主观性强、效率低下等问题。近年来,深度学习在图像识别领域取得了显著进展,为中药识别提供了新的解决方案。中药作为我国传统的医学瑰宝,其种类繁多,形态各异,识别难度较大。传统的中药识别方法主要依赖药师的视觉判断和经验积累,但受到个人知识水平和主观因素的影响,识别准确率难以保证。随着计算机视觉和深度学习技术的发展,基于深度学习网络的中药识别系统成为研究的热点,其能够通过学习大量的中药图像数据,自动提取特征并进行分类识别,有效提高了识别的准确性和效率。
4.部分源码
...............................................................................
Name1 = get(handles.edit7, 'String');
NEpochs = str2num(get(handles.edit8, 'String'));
NMB = str2num(get(handles.edit9, 'String'));
LR = str2num(get(handles.edit10, 'String'));
Rate = str2num(get(handles.edit11, 'String'));
% 使用 imageDatastore 加载图像数据集
Dataset = imageDatastore(Name1, 'IncludeSubfolders', true, 'LabelSource', 'foldernames');
% 将数据集分割为训练集、验证集和测试集
[Training_Dataset, Validation_Dataset, Testing_Dataset] = splitEachLabel(Dataset, Rate, (1-Rate)/2, (1-Rate)/2);
% 加载预训练的 GoogleNet 网络
load googlenet.mat
% 获取输入层的大小
Input_Layer_Size = net.Layers(1).InputSize(1:2);
% 将图像数据集调整为预训练网络的输入尺寸
Resized_Training_Dataset = augmentedImageDatastore(Input_Layer_Size ,Training_Dataset);
Resized_Validation_Dataset = augmentedImageDatastore(Input_Layer_Size ,Validation_Dataset);
Resized_Testing_Dataset = augmentedImageDatastore(Input_Layer_Size ,Testing_Dataset);
% 获取特征学习层和分类器层的名称
Feature_Learner = net.Layers(142).Name;
Output_Classifier = net.Layers(144).Name;
% 计算数据集的类别数目
Number_of_Classes = numel(categories(Training_Dataset.Labels));
% 创建新的全连接特征学习层
New_Feature_Learner = fullyConnectedLayer(Number_of_Classes, ...
'Name', 'Coal Feature Learner', ...
'WeightLearnRateFactor', 10, ...
'BiasLearnRateFactor', 10);
% 创建新的分类器层
New_Classifier_Layer = classificationLayer('Name', 'Coal Classifier');
% 获取完整网络架构
Network_Architecture = layerGraph(net);
% 替换网络中的特征学习层和分类器层
New_Network = replaceLayer(Network_Architecture, Feature_Learner, New_Feature_Learner);
New_Network = replaceLayer(New_Network, Output_Classifier, New_Classifier_Layer);
0Y_020m
---