# Improved U2 Net-Based Surface Defect Detection Method for Blister Tablets
## 5 Experiments and Analysis of Results
### Blister Tablets Visual Inspection Results  
It should be noted that this paper selected serious defects such as surface stains, surface scratches, surface damage, as well as minor defects that are difficult to observe with the naked eye. For serious defects such as surface damage, surface stains, surface scratches, the original drawing before detection is represented by the capital letters A, B, C. For minor defects, the original drawing before detection is represented by a capital letter D. For each class of defects, Pspnet, Deeplabv3, and U2 Net are compared with the improved U2 Net presented in this paper. In Figure 8, the object of detection is surface damage. In Pspnet model detection, Figure 8a(2) Pspnet performs poorly in damage detection, and the position of the red box is obviously offset, which fails to accurately cover the damaged area. This reflects Pspnet's lack of global awareness when dealing with complex scenes, especially in complex backgrounds, where the model has difficulty capturing the correct location of damage. The binary segmentation results in a(3) show that the shape and size are inconsistent, and the damaged edges are fuzzy and noisy, which shows that the model cannot accurately handle the boundary segmentation. This indicates that Pspnet has deficiencies in edge detection and fails to accurately segment the damaged area. In Deeplabv3 model detection, Figure 8b(2) shows that Deeplabv3 has improved in damage detection. The red box covers part of the damaged area but fails to completely cover all damage. This shows that Deeplabv3 has a slight improvement in perceiving global information but still has the problem of missing details. The binary segmentation diagram of b(3) shows that, although the damaged area is divided, there is obvious noise at the edge and the segmentation edge is not smooth enough, indicating that the model still has inaccuracies in detail segmentation. In the U2 Net model detection, in c(2), U2 Net detected most of the damaged areas, but the red box failed to completely cover the entire damaged area, and there were small areas missing detection. This reflects the limitations of U2 Net in capturing damage details. The binary segmentation results in c(3) show that the edges are relatively clear, but there is still some background noise, indicating that the model has improved in the boundary accuracy and noise suppression, but these problems have not been completely solved. In the Improve U2 Net model detection, in d(2), the improved U2 Net model can accurately detect and cover the damaged area, and the position of the red box is very accurate, with no obvious deviation or missing detection. LKA plays a key role here, enabling the model to efficiently perceive global information and thus accurately identify the location and shape of damage. In d(3), the binary segmentation diagram of the improved U2 Net shows very smooth edges, almost no noise, and the segmentation area is completely consistent with the actual damage. This is due to the Gaussian Laplacian operator, which enhances the ability of the model to detect edges and makes the segmentation edges clearer. The cross-entropy loss function optimizes the classification of foreground (damaged area) and background, which makes the segmentation results more accurate. In Figure 9, the object of detection is the surface stain. Pspnet performed poorly in the detection of stains in a(2). The position of the red mark box was obviously shifted, and the stained area was not covered correctly, resulting in large errors in the detection results. The binary segmentation diagram in a(3) shows that the shape and size are not accurate, and the boundary of the stain is fuzzy and has significant deviation, indicating that the model cannot effectively distinguish the stain from the background when dealing with the task of stain detection. The detection result of Deeplabv3 in b(2) is slightly improved compared with that of Pspnet.