Defect Detection Algorithm of Pharmaceutical Blister Package Based on Improved YOLOv8
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.