Abstract

At present, the surface defect detection task of mobile phone lens still suffers from low detection accuracy and slow detection speed. To solve these problems, this paper proposes a real-time and effective algorithm based on YOLOv4. Firstly, we combine the cross stage partial block of YOLOv4 and convolutional block attention module, introducing channel attention and spatial attention to learn discriminative features of defects. Secondly, due to the limited differential characteristics of small defects, a novel feature fusion network is designed to further integrate the shallow details with deep semantics. Finally, in order to further boost the detection speed without reducing in accuracy, the proposed model is refined by using the structure tailoring strategies. Compared with YOLOv4 algorithm, our algorithm improves average precision (AP) of linear defect by 2.11%, reduces model size by 13.3% and parameters by 14.14%. Besides, our algorithm improves frames per second (FPS) by 50% and achieves the real-time performance for industrial production. Compared with other algorithms, our algorithm has superior performance in both AP and FPS.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call