基于改进YOLOv5的中药饮片缺陷检测算法
Improved defect detection algorithm of TCM decoction pieces based on YOLOv5
李云阳 1李根 1闫磊1
作者信息
- 1. 北京林业大学工学院,北京 100083
- 折叠
摘要
为实现中药饮片的高效分选,针对筛选过程中部分缺陷特征相似且难以区分的问题,提出了一种基于改进YOLOv5的中药饮片缺陷检测算法.首先,在Backbone中引入Faster Net网络结构,替换原始的C3结构,减少模型参数量,提高检测效率;其次,添加SimAM三维注意力模块,更好地提取目标特征;最后,引入Sim OTA标签匹配机制,提升模型训练速度的同时也提高检测精度.在黄芪饮片数据集上进行测试,最后结果表明,改进后的网络模型mAP为87.53%,相较于原始模型提高了 1.78%,对中药饮片各类缺陷识别能力更强.
Abstract
To achieve efficient sorting of Chinese herbal medicine pieces,and to address the issue of some defect fea-tures being similar and difficult to distinguish during the screening process,this paper proposes a Chinese herbal medicine piece defect detection algorithm based on an improved YOLOv5.Firstly,the Faster Net network structure is introduced in the Backbone,replacing the original C3 structure,to reduce the model parameter count and improve detection efficiency.Secondly,a SimAM three-dimensional attention module is added to better extract target features.Lastly,the Sim OTA label matching mechanism is introduced to increase the training speed of the model while also enhancing detection accuracy.Testing on the Astragalus herbal pieces dataset,the final results show that the improved network model achieves a mean Average Precision of 87.53%,which is a 1.78%improvement over the original model,indicating a stronger capability in recognizing various defects in Chinese herbal medicine pieces.
关键词
中药饮片/YOLOv5/缺陷检测/机器视觉/深度学习Key words
TCM decoction pieces/YOLOv5/defect detection/machine vision/deep learning引用本文复制引用
出版年
2024