Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Chinese Medicine Detection Based on Improved YOLOv11 and Active Learning

  

  • Online:2025-12-24 Published:2025-12-24

基于改进YOLOv11和主动学习的中药检测

Abstract: In the production process of granular traditional Chinese medicine solid dosage forms, the active ingredients mainly exist in granular and powdered states. Particle size, as a critical quality indicator, directly influences the solubility and bioavailability of traditional Chinese medicines, and plays an essential role in subsequent formulation processes, product quality control, and ensuring medication safety. To address the problems of missed detection and low accuracy in the analysis of Chinese medicine powder particles, this study proposes an intelligent detection system based on improved YOLOv11 and active learning. YOLOv11 is selected as the benchmark model considering real-time performance and computational resources. By introducing Space-to-Depth Non-stride Convolution (SPD-Conv) and an attention mechanism, the Cross-Subblock Multi-Kernel Attention (CSMKA) module is designed to replace the traditional strided convolution, thereby enhancing the feature learning ability for small particles. The improved model is employed to conduct reverse evaluation of the training set, where, based on the idea of active learning, sample images with labeling deviations are automatically identified and handed over to experts for fine correction, thus improving training data quality and model generalization performance. After particle detection, a linear regression model is constructed to predict the weight percentage of particles, enabling accurate assessment of weight characteristics. Experimental results show that after introducing the CSMKA module, the mAP@0.5 reaches 72.8%, representing an improvement of 3.0 percentage points over the original YOLOv11 After incorporating active learning optimization, the performance further improves to 75.0%. The relative error of the particle weight percentage prediction model is controlled at 12.6%. This study provides a comprehensive system that integrates particle detection, data annotation optimization driven by active learning, and particle weight percentage prediction for traditional Chinese medicine powder, offering efficient and reliable technical support for quality control.

摘要: 在颗粒型中药固体制剂的生产进程中,药品主要以颗粒与粉末形态存在。颗粒粒度作为关键质量指标,对中药的溶解度和利用度有着直接影响,并在后续的制剂成型工艺、产品质量控制以及用药安全保障等环节中发挥着至关重要的作用。针对中药粉体颗粒检测中存在的漏检和精度低的问题,提出一种基于改进YOLOv11和主动学习的中药颗粒智能检测系统。从实时性和计算资源考虑选择YOLOv11作为基准模型,结合空间-深度非跨步卷积(SPD-Conv)和注意力机制,提出跨子块多核注意力(CSMKA),用于替换传统的跨步卷积,增强对小颗粒的特征学习能力。利用改进模型对训练集进行反向评估,基于主动学习思想自动筛选出标注质量存在偏差的样本图像,交由专家进行精细化修正,提升训练集数据质量和模型泛化性能。颗粒检测后采用线性回归方法构建预测颗粒重量占比模型,实现对重量特性的精确评估。结果表明,引入CSMKA模块后,模型在中药颗粒检测任务中性能提升显著,mAP@0.5达到72.8%,比原始YOLOv11提高了3.0百分点;结合主动学习优化后进一步提升至75.0%。颗粒重量占比预测模型的相对误差控制在12.7%。本文构建了一个集成中药粉体颗粒检测、主动学习驱动的数据标注优化和颗粒重量占比预测的综合系统,为中药粉体质量控制提供了高效且可靠的技术支持。