# Improved U-Net++ with Patch Split for Micro-Defect Inspection in Silk Screen Printing
## 1 Introduction
Furthermore, U-Net++ does not treat skip-connection as a simple add operation but adds a layer to the connection to further improve the upscaling ability, enabling more precise analysis. In addition, in the manufacturing industry where the cycle time is very important, quality inspection must be carried out efficiently. By enabling model pruning, inferences can be implemented not only at high speed but also with high performance [17]. The patch-split method solves the difficult problem of detecting the defects when the size of the defect is small compared to the size of the product. With this processing method, defects in the image can be accurately identified by using the patch level as input rather than the original image. Most computer vision tasks perform transfer learning using the ImageNet pretrained model; however, the ImageNet pretraining is mostly performed on a size of 224 or 384. However, computer vision tasks used in actual industrial sites often have a resolution of 1000 pixels or higher [18]. Thus, it is necessary to overcome the large differences in image resolution between the images learned during pretraining and the data generated from the real problem. The task is to detect a small object, which is difficult, and a lot of information is lost in resizing the image to 224 or 384. To overcome the difference in resolution, a pretrained model must be created to learn anew from large-size image data generated in the real world, but this requires considerable time and resources. However, our study was characterized by the efficient solving of patch splits that could be broadly divided into learning and inference. First, during learning, augmentation was required to solve the problems of imbalance and insufficient data. Therefore, a random crop was applied rather than splitting the original image. Thus, images with many defects could be created using one original image. The learning was performed using the patch level accordingly obtained as input. In the next step, training was conducted using U-Net++, which can implement inference at high speeds and enables precise analysis. A robust model is required to avoid false inspections when the learned model is applied to the field because of insufficient data from the manufacturing company [19]. To this end, instead of learning with a single loss function, several loss functions were combined, suitable for segmentation, to proceed with learning. When performing inference, duplicate inspection harms the production cycle time; therefore, the original image was divided by patch size, as previously studied. This divided patch-level image was input into the U-Net++ model that was trained to find defects in the product. Furthermore, a quality inspection process was proposed for microdefects. In addition, a self-manufactured hardware capable of inspecting products of various sizes, an image acquisition method that could find microdefects using the corresponding mechanical part, and a method of finding and processing microdefects in an easy-to-understand manner, were studied [20]. This paper proposes an improved U-Net++ based on the patch-split method to effectively detect defects. The paper makes the following contributions:  
* A learning and inference method based on the patch-split method is proposed to detect defects that are minute compared to the product size. * A combination of several loss functions is proposed to solve the problem of robustness during inference resulting from a lack of data in the manufacturing industry. * A microdefect inspection process is proposed for quality inspection in a manufacturing environment with various product sizes. The remainder of this paper is organized as follows. Section 2 provides an overview on U-Net and U-Net++, silk screen-printing, defects, and patch sampling. In Section 3, the proposed architecture is described in detail. In Section 4, the experimental environment, dataset, evaluation index, and results are described. Finally, in Section 5, the conclusions of our study are presented and future research is suggested.