[关键词]
[摘要]
目的 改进YOLOv8模型,为中药生产、调剂与教学等实际应用场景提供一种高精度、高效率的中药饮片自动化检测方案。方法 以YOLOv8为基线模型,提出轻量化残差深度注意瓶颈模块(residual depthwise-attention Bottleneck,RDA-Bottleneck),替换C2f中的Bottleneck模块,以降低冗余计算并增强通道特征表达;提出频域感知空间注意力模块(frequency-aware spatial attention,FASA),替换YOLOv8的Backbone网络与Neck网络中的Conv模块,以增强检测网络在多尺度特征学习过程中的判别能力;构建包含板蓝根、甘草等10种中药饮片数据集,共8 281张图像,用于评价改进模型的检测性能。结果 相较于YOLOv8模型,改进后的模型参数量降低了39.5%,浮点运算量(floating point operations,FLOPs)降低了34.1%,单阈值平均精度mAP50提升了0.2%,多阈值平均精度mAP50-95提升了0.2%。结论 改进后的模型在复杂背景与形态多变的中药饮片检测任务中展现出更高的检测精度与推理效率,为中药饮片自动化检测提供了一种高效的新方法。
[Key word]
[Abstract]
Objective To improve the YOLOv8 model and provide a high-accuracy and high-efficiency automated detection solution for Chinese herbal slices in practical scenarios such as production, dispensing, and teaching. Methods Taking YOLOv8 as the baseline model, a lightweight residual depthwise-attention Bottleneck (RDA-Bottleneck) is proposed to replace the Bottleneck blocks in C2f, reduce redundant computations and enhance the expression of channel features. To strengthen the discriminative capability of the detector during multi-scale feature learning, a frequency-aware spatial attention (FASA) module is introduced to replace the Conv blocks in the Backbone and Neck of YOLOv8. To evaluate the performance of the improved model, a dedicated dataset containing 10 categories of Chinese herbal slices [e.g., Banlangen (Isatidis Radix) and Gancao (Glycyrrhizae Radix et Rhizoma)] is constructed, comprising 8 281 images. Results Compared with YOLOv8, the proposed model reduces parameters by 39.5% and floating point operations (FLOPs) by 34.1%, while improving single-threshold average accuracy mAP50 by 0.2% and multi-threshold average accuracy mAP50-95 by 0.2%. Conclusion The improved model achieves higher detection accuracy and inference efficiency for Chinese herbal slice detection under complex backgrounds and diverse appearances, providing an effective method for automatic detection of Chinese herbal slices.
[中图分类号]
TP18;R283
[基金项目]
甘肃省药品监督管理局青年科技创新项目(2024GSMPA034)