基于YOLOv8的中草药目标检测模型改进:融合多注意力机制与大核卷积
Improved Model for Chinese Herbal Medicine Object Detection Based on YOLOv8: Integrating Multi-Attention Mechanisms and Large-Kernel Convolutions
摘要: 中草药作为中华文明的重要组成部分,拥有数千年的悠久历史,在传统医学体系上有着举足轻重的地位。随着现代科技的发展,中草药的质量检测与类型识别已成为推动产业升级的关键环节。针对传统中草药人工采集、挑拣和分类的过程中效率低下、准确率不高等问题,本文提出了一种基于YOLOv8s的改进目标检测模型YOLOv8s-LCD。该模型在YOLOv8s的主干网络基础上,融合了多种注意力机制和大核卷积结构,采用了大核注意力模块(LKA)、动态注意力模块(DyHead)、坐标注意力机制(CoordAttention)、CBAM模块与RepLK大核卷积。本文选取了白茯苓、白芍、人参等45类常见的中草药作为检测目标,构建了包含一万张图像的中草药数据集,并与原始YOLOv8s、YOLOv8s-ECA、YOLOv8s-GCNet和YOLOv8s-CondConv四个模型进行了对比。结果表明,YOLOv8s-LCD在mAP@0.5和mAP@0.5:0.95指标上均显著优于其他模型。相较于原始的YOLOv8s模型,YOLOv8s-LCD在mAP@0.5、mAP@0.5:0.95上分别提升3.7%和4.2%。上述结果验证了多重注意力机制与大核卷积融合的有效性。该研究为中草药的智能识别提供了一种高效、精准的技术方案,具有良好的实际应用价值与推广前景。
Abstract: Chinese herbal medicine, as a vital component of Chinese civilization, has a rich history spanning thousands of years and plays a significant role in traditional medical systems. With the rapid advancement of modern technologies, the quality assessment and classification of Chinese herbs have become critical tasks in driving industrial modernization. However, conventional methods for collecting, sorting, and classifying herbs are typically labor-intensive, inefficient, and prone to human error. To address these challenges, this study proposes an enhanced object detection model, termed YOLOv8s-LCD, based on the YOLOv8s architecture. The proposed model integrates multiple attention mechanisms and large kernel convolution modules into the YOLOv8s backbone, incorporating Large Kernel Attention (LKA), Dynamic Head (DyHead), Coordinate Attention (CoordAttention), Convolutional Block Attention Module (CBAM), and RepLK convolutional blocks. A custom dataset comprising 10,000 images across 45 commonly used Chinese herbal categories—including Poria cocos, Paeonia lactiflora, and Panax ginseng—was developed for evaluation. Comparative experiments were conducted against the baseline YOLOv8s, as well as three existing variants: YOLOv8s-ECA, YOLOv8s-GCNet, and YOLOv8s-CondConv. Experimental results demonstrate that YOLOv8s-LCD achieves superior performance, attaining improvements of 3.7% in mAP@0.5 and 4.2% in mAP@0.5:0.95 over the original YOLOv8s model. These findings validate the effectiveness of combining multi-attention mechanisms with large kernel convolutions for enhanced feature extraction and detection accuracy. The proposed method offers a robust and efficient solution for the intelligent recognition of Chinese herbal medicine, with strong potential for real-world deployment and industrial application.
参考文献
|
[1]
|
Liu, X.Y., Liang, J., Long, J.H., et al. (2025) Fine-Grained Chinese Herbal Medicine Image Classification Based on Feature Fusion and Channel Information Compensation. Journal of Computer Applications. [Google Scholar] [CrossRef]
|
|
[2]
|
Mao, Z., Yang, X., Wang, T., et al. (2025) Research on Intelligent Image Quality Assessment Method for Chrysanthemum Morifolium Ramat via Deep Color Feature Fusion. Chinese Archives of Traditional Chinese Medicine. https://link.cnki.net/urlid/21.1546.R.20250514.1440.012
|
|
[3]
|
Pan, Z.L., Wang, Y.S., You, Z. and Wang, Y.F. (2024) Chinese Herbal Medicine Recognition Based on Improved YOLOv5 Algorithm. Technology of IoT & AI, 56, 64-68.
|
|
[4]
|
Zhang, C.H., Jiang, Y., Zhang, L. and Dai, J. (2024) Design and Implementation of Chinese Herbal Medicine Image Recognition Classification Model. Journal of Fujian Computer, 40, 14-20. [Google Scholar] [CrossRef]
|
|
[5]
|
Dai, X., Chen, Y., Xiao, B., Chen, D., Liu, M., Yuan, L., et al. (2021). Dynamic Head: Unifying Object Detection Heads with Attentions. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 7369-7378.[CrossRef]
|
|
[6]
|
Shen, J.Y., Ran, W.H., Huang, J.C., et al. (2025) Comparative Study on Rice Pest Detection Performance Using YOLOv5 Enhanced with Three C3 Attention Modules. Computer Science and Application, 15, 41-49. [Google Scholar] [CrossRef]
|