Abstract:Objective To improve the accuracy of liquor packaging defect detection.Methods A detection model based on an improved YOLOv8n is proposed. The ADown module is introduced into the model to effectively reduce parameter count and computational load while maintaining the original feature extraction capability. Large separable kernel attention (LSKA) is integrated into the spatial pyramid pooling fusion (SPPF) structure to further enhance the model's ability to capture and extract multi-scale features. In addition, the original CIOU loss function is replaced with the Inner-WIoU loss function, which combines Inner-IoU and Wise-IoU, thereby improving detection accuracy and accelerating model convergence.Results On a self-built liquor packaging dataset, the improved YOLOv8n model achieves an average precision of 86.4%, representing a 5.2% improvement over the original model. Moreover, the parameter count is reduced by 4.9%, and computation is reduced by 6.6%.Conclusion The model can meet the real-time detection requirements of liquor packaging.