摘要: |
目的 针对目前药片泡罩包装缺陷检测算法中缺陷类型单一、检测精度低、实时性能差等问题,提出了一种基于改进YOLOv8的药片泡罩包装缺陷检测算法UACSS-YOLO(UNetV2-ADown-ContextAggregation- Slim-Neck-SAttention-YOLO)。方法 该算法首先设计了主干网络UNetV2捕捉多尺度特征,采用轻量化下采样卷积层ADown降低训练成本,接着引入注意力机制ContextAggregation聚合上下文信息,提升复杂背景下的检测能力,最后将原颈部网络和检测头分别替换为Slim-Neck和SAttention,以减少参数量并提高检测速度。结果 UACSS-YOLO较YOLOv8在精确度P上提升了6.6%,在召回率R上提升了5.2%,在PmA@0.5上提升了4.8%,同时浮点运算数只有11.9 G。结论 相比其他算法,UACSS-YOLO满足低算力兼顾高精度的部署需求,为药片制造过程中的实时缺陷检测提供了一种高效的技术解决方案。 |
关键词: 缺陷检测 泡罩包装 药片 YOLOv8 轻量化 |
DOI:10.19554/j.cnki.1001-3563.2025.01.017 |
分类号: |
基金项目:国家自然科学基金青年基金(51805039) |
|
Defect Detection Algorithm of Pharmaceutical Blister Package Based on Improved YOLOv8 |
YANG Mingxu1, ZHANG Junning1, ZHANG Zhiqiang1, LIU Jia2
|
(1. Beijing Information Science and Technology University, Beijing 100192, China;2. Xinzhou Teachers University, Shanxi Xinzhou 034000, China)
|
Abstract: |
In order to solve the problems of single defect types, low detection accuracy, and poor real-time performance in current pharmaceutical blister package defect detection algorithms, the work aims to propose a pharmaceutical blister package defect detection algorithm named UACSS-YOLO (UNetV2- ADown-ContextAggregation-Slim-Neck-SAttention-YOLO) based on the improved YOLOv8. Firstly, UNetV2 was designed as the backbone network to capture multi-scale features, while the lightweight downsampling convolution layer ADown was adopted to reduce training costs. Then, the attention mechanism ContextAggregation was introduced to aggregate context information, which improved the detection ability under complex background. Finally, the original neck network and detection head were replaced with Slim-Neck and SAttention, which reduced the number of parameters and improved the detection speed. Compared to YOLOv8, UACSS-YOLO improves precision P by 6.6%, recall R by 5.2%, and PmA@0.5 by 4.8%, and the floating point operation per second was only 11.9 G. Compared with other algorithms, UACSS-YOLO meets the deployment needs of low computational power and high precision. This provides an efficient technical solution for real-time defect detection in the tablet manufacturing process. |
Key words: defect detection blister package pharmaceutical YOLOv8 lightweight |