节点文献
基于改进的YOLOv5实现中药饮片的检测识别
Detection and Recognition of Traditional Chinese Medicine Pieces Based on Improved YOLOv5
【摘要】 针对中药饮片检测算法的模型参数量多,计算量较大等问题,提出一种改进的YOLOv5算法,改进后算法的特点主要是轻量化,可以在保持较高的平均精度下,大大降低参数量和计算量。在YOLOv5算法的主干网络基础上,设计了轻量级的GhostBottleneck模块;针对中药饮片中的小目标检测问题,在模型结构中加入了注意力机制,可以提高小目标的检测能力;将原有的卷积层替换为深度可分离卷积,降低网络的模型参数。经过在107种常见中药饮片的数据集上训练的实验结果表明,改进后算法的mAP@0.5可以达到98.37%,比原YOLOv5算法提高了2.93%,既保持了对中药饮片识别的较高精度,同时计算量又比YOLOv5算法降低了53.45%,改进后算法的模型大小仅为6.61 MB,大大降低了硬件设备的计算成本。
【Abstract】 Aiming at the problems of the large amount of model parameters and the large amount of calculation in the detection algorithm of traditional Chinese medicine pieces, an improved YOLOv5 algorithm is proposed. The improved algorithm is mainly characterized by light weight, which can greatly reduce the amount of parameters while maintaining a high average accuracy. and calculation amount. On the basis of the backbone network of the YOLOv5 algorithm, a lightweight GhostBottleneck module is designed; for the detection of small targets in Chinese herbal decoction pieces, an attention mechanism is added to the model structure, which can improve the detection ability of small targets; The convolutional layers are replaced with depthwise separable convolutions, reducing the model parameters of the network. The experimental results of training on the dataset of 107 common TCM decoction pieces show that the mAP@0.5 of the improved algorithm can reach 98.37%, which is 2.93% higher than the original YOLOv5 algorithm. At the same time, the calculation amount is reduced by 53.45% compared with the YOLOv5 algorithm, and the model size of the improved algorithm is only 6.61MB, which greatly reduces the computing cost of hardware devices.
【Key words】 YOLOv5 algorithm; GhostBottleneck module; attention mechanism; depthwise separable convolution; Chinese herbal pieces;
- 【文献出处】 现代计算机 ,Modern Computer , 编辑部邮箱 ,2022年22期
- 【分类号】TP391.41;R28
- 【下载频次】41