Revolutionizing tobacco impurity detection with spatial and channel fusion
摘要
In the tobacco production line, detecting impurities in shredded tobacco is a critical task that combines classification and localization to identify and locate foreign objects accurately. Traditional methods, such as manual inspection and machine vision algorithms: the former requires visual inspection and manual removal of impurities, resulting in low efficiency, high error rates, and a lack of traceability in the inspection process; the latter is limited in identifying impurities that are morphologically similar to tobacco shreds, such as weeds, kraft paper fragments, and moldy tobacco materials. To address these limitations and achieve the aim of cost reduction and efficiency improvement in cigarette factories, this study proposes a novel detection algorithm, STCA-YOLO, based on YOLOv8, incorporating a spatial and channel enhancement module. This module performs multi-scale fusion and transposition of input feature maps, achieving long-distance connections and computing attention maps for feature enhancement. Additionally, reparameterization improvements to the backbone network enhance feature extraction capabilities while reducing the number of parameters. Experimental results demonstrate that the improved model achieves a 5.79% reduction in parameters and enhances mAP50, mAP50-95, and recall by 1.9, 5.4, and 4.6%, respectively, compared to the benchmark model. This study also devised an integrated smart tobacco factory framework, encompassing layers of service applications, Internet of Things (IoT), edge processing, and data centers. By deploying the enhanced YOLOv8 model within this framework, the task of impurity detection in tobacco production is efficiently accomplished, providing a robust solution for practical applications in the tobacco industry.