In order to improve the detection accuracy of printed circuit board (PCB), this paper proposes a PCB defect detection model SWS-Yolov8n based on the Yolov8 model. Firstly, the Shuffle Attention (SA) module is introduced to make the model have the ability to randomly fuse and exchange feature information at PCB defects; Secondly, it is proposed to improve the loss function to a dynamic non monotonic loss function, so that the model shifts a portion of the focus from high-quality anchor frames to normal mass; Finally, space to depth layer and non step convolutional layer are adopted to address the problem of fine-grained information on defect location is easy to be lost and the learning efficiency is low. After expanding the public dataset PKU-Market-PCB, experiments showed that the improved SWS-Yolov8n model increased the mean average accuracy (mAP) value by 4.47% compared to the original model. When applied to PCB defect detection tasks, it can effectively improve detection accuracy. In the future, this model can be further lightweight improved and deployed on embedded systems and mobile devices. Keywords: deep learning; PCB defect detection; Yolov8; attention mechanism; loss function
Based on the current mainstream pathological staining methods, this paper studies and designs a scheduling method applied to the pathological autostainer process. The staining process performed by the pathological autostainer is based on clinical pathological standards, and a series of continuous staining operations are carried out on pathological slices. The operation process should follow a fixed staining stage. The pathologically required stained slices were strictly immersed in the corresponding reagents to achieve the demand of staining dehydration. According to the characteristics of different reagents, the staining process has high requirements in the staining time accuracy of pathological slices. The scheduling method in this paper builds a mathematical model of the staining process of the autostainer according to the time characteristics of the staining process, and uses the Simulated Annealing Algorithm to obtain the minimum total staining time under the input of multiple slices. Through the simulation of experimental data, the algorithm was analyzed and proved to be effective for the pathological staining process.