Abstract:Current you only look once (YOLO)-based algorithm model is facing the challenge of overwhelming parameters and calculation complexity under the printed circuit board (PCB) defect detection application scenario. In order to solve this problem, we propose a new method, which combined the lightweight network mobile vision transformer (MobileViT) with the convolutional block attention module (CBAM) mechanism and the new regression loss function. This method needed less computation resources, making it more suitable for embedded edge detection devices. Meanwhile, the new loss function improved the positioning accuracy of the bounding box and enhanced the robustness of the model. In addition, experiments on public datasets demonstrate that the improved model achieves an average accuracy of 87.9% across six typical defect detection tasks, while reducing computational costs by nearly 90%. It significantly reduces the model’s computational requirements while maintaining accuracy, ensuring reliable performance for edge deployment.