## 3 HCPS-Based Smart Factory Model
### AI Method  
Currently, the majority of PCB manufacturing companies that perform hole processing using CO\({}_{2}\) laser equipment on packages, F-PCB, and non-memory semiconductor substrates capture images of hole units using high-magnification microscopes and hole size measurement programs and then manually (visually) inspect and measure the states and sizes of the holes. The upper and lower circles that are produced by PCB hole processing range in size from 40 \(\upmu\)m to 100 \(\upmu\)m (about 0.04 mm to 0.1 mm). One PCB panel can contain 700 million to 8 million holes, which were made during the hole processing. However, human visual inspection only covers a small portion of the holes and it is anticipated that hole sizes will continue to shrink in the future, which would limit the success of human visual inspection. The AI method that we applied to implement our NGIM HCPS-based smart factory system could be managed in real time to overcome these limitations and improve productivity due to reduced inspection times and facility utilization rates, the systematic image storage management and measurement information, and its integration with an MES system. This study considered that preprocessing to remove noise was essential for computers to recognize circle shapes accurately because the human visual inspection of images that were collected with high-magnification microscopes can identify circle shapes but computers cannot. Therefore, we intended to maximize the efficiency of our system by using an algorithm to detect circles and a deep learning-based algorithm to analyze and learn the detected images. Current algorithms for detecting circles include the Hough circle transform (HCT), the histogram of gradient and texture segmentation using the Gabor filter, and random sample consensus (RANSAC). Of these, RANSAC was able to accurately detect circles even in noisy parts of the original images. A semantic segmentation model was introduced to train this process. Segmentation methods that are based on upsampling or deconvolution mainly include FCN, U-Net, and SegNet. U-Net is a semantic segmentation network that is based on FCN, which can be trained using very few images and can outperform the previous best networks using the ISBI database of cell image segmentation by electron microscopy [37]. The U-Net network was designed for biomedical images and has been widely used in medical image segmentation since it was first proposed [38]. Our primary focus when selecting an algorithm to use was addressing \"speed, context, and localization\" issues. The U-Net structure has no fully connected layers (only convolutional and downsampling layers) and the network can simultaneously combine low-level and high-level information ([PERSON] et al., 2021). Due to this feature, although the current segmentation models create a type of computational waste that slows down the process, U-Net increases the speed because of the low overlap ratio of the unit that identifies the images. There are currently few cases in which this AI solution has been implemented in PCB hole processing. Therefore, by using U-Net (which is a deep learning network that is renowned for its efficiency in semantic segmentation within the field of medical artificial intelligence), this study became the first case of integrated medical AI and PCB manufacturing engineering. The U-Net approach was employed in this study and the accuracy increased to 96.7% (when utilizing the AI method) from 87% (when utilizing on-site human visual inspection). This meant that U-Net adequately fulfilled its function in our NGIM HCPS 2.0 system, so we used it as the algorithm for the \"AI technique\", among other methods that utilized different residual 3D CNN networks. Our future study will compare these different methods, including PSP-NET, RES-NET, etc., with the aim of achieving 99% accuracy. An algorithm from the classification field could be used to recognize the different types of defects on PCB substrates.