摘 要: 针对传统中药材检测任务中识别效率低、受主观因素影响较大的问题,文章选取77种中药材作为研究对象。采用自行拍摄图像和在互联网获取图像的方式,并结合旋转平移、高斯噪声等数据增强技术,最终构建了一个包含4万多张图像的数据集。在模型改进方面,对第八代只看一次目标检测算法(You Only Look Once version 8,YOLOv8)的Backbone部分进行了针对性的优化,引入了DSConv和Biformer注意力机制。DSConv能够自适应地关注细长和曲折的局部特征,而Biformer则通过双层路由机制,实现了内容感知的稀疏模式,提高了模型对图像细节和关键目标的识别能力。实验结果表明,改进后的YOLOv8模型的精确率、召回率和平均精度分别达到了96.4%、98.0%和97.7%,相较于原模型的精确率和平均精度分别增长了1.7百分点和1.0百分点。在中药材检测任务上取得了显著的性能提升效果。 |
关键词: YOLOv8;中药材识别;蛇形动态卷积;Biformer注意力机制 |
中图分类号: TP391.7
文献标识码: A
|
基金项目: 高校教师创新基金项目(2024B-078) |
|
Image Recognition of Chinese Herbal Medicine Based on Improved YOLOv8 |
ZHAO Zhe, YAN Zhengang, CHEN Lei
|
(College of In f ormation Science and Technology, Gansu Agricultural University, Lanzhou 730070, China)
499357869@qq.com; yanzhg@gsau.edu.cn; 472660321@qq.com
|
Abstract: This paper addresses the issues of the low recognition efficiency and high subjective influence associated with traditional Chinese herbal medicine detection tasks. This paper proposes to use a total number of 77 types of traditional Chinese herbal medicine as the subjects of study and construct a dataset of over 40 000 images by using self-taken images as well as images collected from the internet, incorporating data augmentation techniques such as rotation, translation, and Gaussian noise. In terms of model improvement, the Backbone part of YOLOv8 (the eighth generation of You Only Look Once) object detection algorithm is specifically optimized by introducing DSConv and the Biformer attention mechanism. DSConv can adaptively focus on elongated and convoluted local features, while Biformer implements a content-aware sparse mode through a dual-layer routing mechanism, enhancing the model's ability to recognize image details and key targets. Experimental results show that the improved YOLOv8 model achieves precision, recall, and mean average precision of 96.4% , 98.0% , and 97.7% , respectively, which represents an increase of 1.7 percentage points and 1.0 percentage points in precision and mean average precision compared to the original model. Significant performance improvements are achieved in the detection task of traditional Chinese herbal medicine. |
Keywords: YOLOv8; traditional Chinese herbal medicine recognition; S-shaped dynamic convolution; Biformer attention mechanism |