Improved YOLOv8 algorithm for tobacco shred anomaly detection in cigarette production lines
摘要
To address the challenge of abnormal tobacco shred detection in cigarette production lines, this study proposes an improved lightweight YOLOv8-based model that balances model efficiency and detection accuracy. First, the C3Ghost and GhostConv structures from GhostNet are integrated into the YOLOv8n backbone network, thereby reducing the number of model parameters. Second, a Context Anchor Attention mechanism is introduced to enhance feature extraction performance. In addition, a progressive feature pyramid network is constructed to improve multi-scale detection capabilities, and the WIoU v3 boundary loss function is adopted to optimize bounding box regression performance. Finally, validation on a dataset of anomalous tobacco shreds demonstrates the lightweight nature and competitive performance of the proposed method. The results show that: (1) compared with four other models, the proposed model exhibits advantages in terms of speed and accuracy; compared with the original model, detection precision is improved by 9.5%, and recall is increased by 10.6%; (2) the detection model achieves 86.27 frames per second for tobacco production line image detection, enabling real-time detection of abnormal tobacco shreds during the production process. This study offers a promising technical approach for intelligent quality detection in cigarette production lines under the studied conditions.