Electronic Research Archive (Jan 2023)
Detection of cigarette appearance defects based on improved YOLOv4
Abstract
Appearance defects are visible factors that affect the quality of cigarettes. Most of the consumer complaints received by tobacco companies are caused by appearance defects of cigarettes. Therefore, it is of great significance to reduce cigarettes with appearance defects. At present, tobacco factories mainly detect the appearance quality of cigarettes through manual sampling inspection. The manual method has low detection efficiency, it is difficult to unify the judgment standard, and it is easy to cause secondary pollution to cigarettes. According to the features of cigarette appearance defects, the YOLOv4 (You Only Look Once Version 4) model was improved for cigarette appearance defect detection. We have improved the following: 1) the channel attention mechanism was introduced into YOLOv4 to improve the detection precision; 2) the K-means++ algorithm was used to optimize the selection of clustering centers; 3) the spatial pyramid pooling (SPP) was replaced with atrous spatial pyramid pooling (ASPP) to improve the defect detection ability with different sizes; 4) the α-CIoU loss function was used to improve the detection precision. The mAP of our improved method reached 91.77%, the precision reached 93.32%, and the recall reached 88.81%. Compared with other models, our method has better comprehensive performance and better detection ability.
Keywords