收藏切换
DWG-CA-YOLOv8 algorithm for real-time detection of capsule defect
收藏切换
Chinese Traditional and Herbal Drugs | 2026, 57(17) : 6878 - 6886
Less
收藏切换
Chinese Traditional and Herbal Drugs | 2026, 57(17): 6878-6886
DWG-CA-YOLOv8 algorithm for real-time detection of capsule defect
Full
PENG Xulong1, WANG Shengsheng1, YAO Tian1, WAN Qingzhao1, MAO Zhixiong1, WU Zhenfeng1, YANG Ming1, PENG Changchun2, WANG Yaqi1,3
Affiliations
    1 National Key Laboratory of Classical Formula for Modern Traditional Chinese Medicine Creation, Jiangxi University of Chinese Medicine, Nanchang 330004, China;
    2 Jiangxi JeMinCare Group Co., Ltd., Nanchang 330224, China;
    3 Traditional Chinese Medicine Pharmaceutical Technology Collaborative Innovation Institute, Jiangxi University of Chinese Medicine, Nanchang 330004, China
doi: 10.7501/j.issn.0253-2670.2026.17.019
Outline
收藏切换
Objective To address the challenges of difficult detection of tiny tangential defects, strong background noise interference, and the difficulties in deploying general detection models on low-computing-power edge devices in pharmaceutical capsule production lines, an improved lightweight object detection algorithm is proposed. Methods Using YOLOv8n as the baseline architecture, targeted optimizations are performed through a three-pronged strategy. A coordinate attention (CA) mechanism is embedded in the backbone network to enhance the model’s spatial perception capability for tiny tangential defects and edge micro-defects of capsules. A C2f_GhostConv module is designed to reconstruct the neck network, utilizing Ghost convolution (“primary convolution + cheap operations”) to enhance fine-grained feature representation. Depthwise separable convolution (DWConv) is comprehensively adopted to replace the standard convolution in the backbone, decoupling spatial convolution and channel fusion into two independent steps, thereby achieving deep compression of parameter count and computational load. Results On an industrial dataset containing 1 204 images of various capsule defects, DWG-CA-YOLOv8 achieves a mean Average Precision (mAP@0.5) of 90.5%, demonstrating high-precision localization and accurate classification for six defect types and normal capsules, meeting the reliability required for industrial real-time detection. The model’s parameter count is reduced to 2.10 M, and the floating-point operations (FLOPs) to 5.9 G, representing reductions of 30.2% and 28.1%, respectively, significantly improving lightweight performance. Conclusion This study successfully achieves synergistic optimization of detection accuracy and model complexity, providing a scalable and low-cost lightweight solution for real-time online quality control of pharmaceutical production lines.
machine vision  /  capsule defect detection  /  YOLOv8  /  Ghost convolution  /  lightweight network
彭旭龙, 王生生, 姚添, 万倾兆, 毛志雄, 伍振峰, 杨明, 彭常春, 王雅琪. 胶囊缺陷实时检测的DWG-CA-YOLOv8算法. 中草药, 2026 , 57 (17) : 6878 -6886 . DOI: 10.7501/j.issn.0253-2670.2026.17.019
PENG Xulong, WANG Shengsheng, YAO Tian, WAN Qingzhao, MAO Zhixiong, WU Zhenfeng, YANG Ming, PENG Changchun, WANG Yaqi. DWG-CA-YOLOv8 algorithm for real-time detection of capsule defect[J]. Chinese Traditional and Herbal Drugs, 2026 , 57 (17) : 6878 -6886 . DOI: 10.7501/j.issn.0253-2670.2026.17.019
Year 2026 volume 57 Issue 17
23
4
Cite this Article
BibTeX
Article Info
doi: 10.7501/j.issn.0253-2670.2026.17.019
  • Receive Date:2026-06-10
  • Online Date:2026-10-29
Article Data
Affiliations
History
  • Received:2026-06-10
Affiliations
References
Share
https://castjournals.cast.org.cn/joweb/zcy/EN/10.7501/j.issn.0253-2670.2026.17.019
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT