Research on the application of deep learning algorithms to PCB defect detection

Research Article
Open access

Research on the application of deep learning algorithms to PCB defect detection

Lingzhe Kong 1*
  • 1 Harbin Engineering University    
  • *corresponding author lk1e21@soton.ac.uk
Published on 26 February 2024 | https://doi.org/10.54254/2755-2721/43/20230805
ACE Vol.43
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-311-1
ISBN (Online): 978-1-83558-312-8

Abstract

In today's electronics industry, Printed Circuit Boards play a crucial role in providing the layout for circuit components and conductive traces in nearly all electronic devices. The quality of components soldered onto Printed Circuit Boards directly impacts product performance. To ensure the performance of electronic devices, Printed Circuit Boards defect detection based on deep learning algorithms has become a pivotal technology in the defect inspection process within the electronics industry. However, the application of deep learning algorithms in this context faces several challenges. These challenges include difficulties in acquiring Printed Circuit Boards defect datasets, limited generalization capability in Printed Circuit Boards defect detection, and slow and low-quality Printed Circuit Boards image stitching processes. To enhance researchers' understanding of deep learning-based Printed Circuit Boards defect detection, this paper analyzes the challenges associated with deep learning in the Printed Circuit Boards defect detection process and proposes several viable solutions. In conclusion, this paper provides insights into the future of deep learning-based Printed Circuit Boards defect detection.

Keywords:

PCB, Deep Learning, Automatic Optical Inspection, Printed Circuit Boards

Kong,L. (2024). Research on the application of deep learning algorithms to PCB defect detection. Applied and Computational Engineering,43,44-48.
Export citation

1. Introduction

In the actual production process of Printed Circuit Boards (PCBs), issues such as non-standard manufacturing processes and an environment that does not meet production standards can lead to surface defects on PCBs, including misalignment, scratches, open circuits, short circuits, and contamination. These defects can impact the manufacturing process, increase production costs, and even affect a company's competitiveness.

To address these defects, optical inspection methods are commonly employed in the industry. Traditional manual optical inspection methods require significant labor and mental effort. In contrast, AOI (Automatic Optical Inspection) methods not only reduce the need for human labor but also improve inspection accuracy. With the integration of deep learning technology, AOI is advancing towards faster and more accurate detection.

However, PCB defect detection based on deep learning relies on data. During normal production, defective products account for a small portion compared to the normal ones, and the frequency of different types of defects varies significantly. This makes it challenging to obtain sufficient defect data. Additionally, most current single deep learning models can only detect one or a few types of defects, lacking comprehensive coverage and generalization. Moreover, image clarity requirements during the detection process are relatively high. Due to limitations in industrial camera capabilities, complete inspection images can only be obtained through stitching, and the quality of stitching directly affects the final detection results.

In summary, based on the review and summarization of recent literature in the field of PCB defect detection using deep learning in the past few years, we have identified the prevailing algorithms and approaches for addressing challenges related to data scarcity, low model generalization, and poor image stitching quality.

2. Difficulty in acquiring PCB defect data

2.1. Description of the problem

Deep learning-based defect detection models require extensive sample training to achieve satisfactory defect detection performance. On the one hand, data labeling is a highly labor and time-intensive task, and in practical production processes, there are relatively fewer defective PCBs compared to defect-free ones, making it challenging to obtain a sufficient amount of labeled data [1]. On the other hand, although there exist multiple datasets with fewer samples at present, they are difficult to directly merge into a larger dataset due to variations in the data collection equipment used, differences in the background images of PCB boards, varying lighting conditions during the collection process, and other factors [2].

2.2. Solution

To address the issue of insufficient defect datasets, there are currently two primary approaches. The first method involves data generation using Generative Adversarial Networks (GANs) or improved GAN networks. This approach aims to generate defect regions and defect-free backgrounds directly, thus increasing the quantity of data in the dataset. The second method is based on pre-trained models, employing transfer learning to utilize existing high-quality feature extraction networks for defect feature extraction. This reduces the reliance on training data and helps overcome the challenges associated with obtaining defect data.

Abu Ebayyeh et al. leveraged an enhanced neural network based on Generative Adversarial Networks (GANs), known as DCGAN (Deep Convolutional Generative Adversarial Network) [3] [4]. The distinctive and improved feature of the DCGAN architecture lies in the replacement of the original Multi-Layer Perceptron (MLP) structure in both the discriminator and generator networks with convolutional layers and transposed convolutional layers. Subsequently, DCGAN was trained using the MNIST dataset. The data generated by DCGAN was mixed with the original MNIST dataset to train the WaferCaps model [4]. As a result, the accuracy on the test set reached an impressive 91.41%, a substantial improvement compared to the accuracy of 78.2% achieved when training with only the mixed MNIST dataset. Wan et al. introduced a semi-supervised learning framework for defect detection called BA-SSL, which incorporates a data augmentation strategy [2]. The framework proposes a dynamic threshold strategy and a batch-adding strategy for unlabeled data. Ultimately, they achieved a detection accuracy of 98.4% on the DeepPCB dataset using only 50 labeled samples. Ghosh et al., performed transfer learning using a pre-trained Inception-V3 model [5]. They extracted the mid-level neural network of Inception-V3 as the front half of the defect detection network and an adaptation network as the back half of the detection network. By training the adaptation network using the output from the mid-level, they reconstructed the complete detection network. This method ultimately achieved a detection accuracy of 91.125%.

3. Low generalizability of PCB component defect detection

3.1. Description of the problem

Due to the limited availability of PCB component defect datasets at present, and the imbalance in data distribution and sample sizes for different defect types among various datasets, certain defect types exhibit a degree of ambiguity. Sankar et al. conducted a study where they ranked the top 5 defect types in terms of their occurrence frequency within a one-month period [6]. The defect type ranked fifth had an occurrence frequency that was less than 1% of the average occurrence frequency of the top-ranked defect type. Meanwhile, most current detection models can only recognize a single type of defect or multiple defects of the same kind [7]. This leads to a situation where some defect types are relatively ambiguous, making it difficult or challenging to obtain corresponding features and shapes for the respective defect categories. Consequently, this poses difficulties in accurately identifying various types of defects and results in lower generalization capability.

3.2. Solution

Ding et al. proposed a method based on multi-scale deep similarity measure. The main architecture of the model is a Siamese model, and a spatial pyramid pooling network is incorporated into the feature maps of the convolutional module to achieve the fusion of multi-scale feature vectors [8]. Finally, during the training process, discriminative feature embeddings and a similarity metric can be obtained by calculating the contrastive loss, thereby enabling image similarity measurement. The test results showed a significant improvement compared to existing networks. A semi-supervised learning method based on GANs, called the Tinynomaly approach, is proposed for defect detection [9]. This approach involves training an end-to-end network using defect-free samples during the training phase. In the final testing phase, it determines the type of unknown defects by calculating the spatial distance in the feature space between the samples generated by the network and real samples. Test results on the MNISTand CIFAR-10 datasets demonstrate that this method exhibits strong generalization capabilities and performs effectively in detecting tiny unknown defects on printed circuit boards (PCBs) [10][11]. Meanwhile, some tiny defects can be challenging for certain deep neural networks to extract accurate features. Zeng et al. proposed a multiscale feature fusion strategy called ABFPN for detecting small PCB defects [12]. This approach leverages different dilation rates to fully extract contextual information, followed by the utilization of skip connections and a balanced module to achieve feature fusion and enhancement. The model's detection performance on three public datasets surpasses that of seven other top-performing models. Yu et al. introduced an ES-Net network for small object detection that is applicable to various resource scenarios [13]. They addressed the issue of small target information loss by designing the "aggregated feature guidance module (AFGM)" and tackled the problem of differences in target size and detection field of view by designing the "dynamic scale-aware head (DSH)." These two aspects, respectively, address the challenges of easy information loss for small targets and the significant differences in target size and detection field of view that can lead to reduced detection performance. In addition, through image enhancement techniques such as rotation, cropping, resizing, brightness adjustment, and color enhancement applied to existing data, diverse images are generated to increase the model's generalization and robustness. This method has relatively low technical complexity and is widely adopted, and therefore, I won't delve into it further here.

4. Slow image stitching process with low quality

4.1. Description of the problem

Due to the precision requirements of detection algorithms for image accuracy, the field of view captured in a single shot by industrial cameras in industrial settings is often much smaller than the area of the PCB (Printed Circuit Board). Traditional automatic optical inspection systems with industrial cameras typically require multiple captures through the movement of a gimbal [14]. However, due to the limitations of gimbal movement accuracy and the impact of stitching algorithms, this approach can lead to issues with the quality of stitched images. Such issues can directly result in a reduction in the defect detection capability of neural networks. Another stitching method involves extracting features from the PCB through software and then performing image stitching by matching these features. This approach demands substantial computational power, leading to longer detection times. Nevertheless, compared to hardware-based detection methods, this method is more cost-effective.

Therefore, there is a need for a fast and moderately priced image stitching method to achieve efficient image stitching for defect detection.

4.2. Solution

Lin Deng proposed an improved ant colony algorithm using variable domain path search to achieve the shortest image-capturing path. Additionally, a clustering method conducted in the coverage domain was introduced to minimize the number of image-capturing windows required for all target electronic components [14]. Through practical testing, the overall image-capturing time for the window path was reduced by over 12%, and the image capture time for PCB images with window counts ranging from 16 to 83 was consistently under 30 seconds, demonstrating excellent overall performance. Huo et al. proposed a method for image stitching using convolutional neural networks [15]. This convolutional network enhances the similarity between images through a multi-level neural network in the reconstruction network. They defined two loss functions to minimize errors during the image stitching process and ultimately achieved the goal of smoothing the image by reducing pixel gradients. In addition to the two relatively traditional stitching methods mentioned above, Zhao et al. proposed a wide-field, high-resolution image stitching method based on a curved compound eye in [16]. They obtained a special arrangement of sub-eyes based on the relationship between the sub-eyes and the field of view, achieving high angular resolution in both the edge and central fields. Feature points were extracted using Scale-Invariant Feature Transform (SIFT) and then matched using the Random Sample Consensus (RANSAC) algorithm for image stitching.

5. Conclusion

This article reviews the challenges encountered by deep learning methods in PCB defect detection. It identifies several key issues, including the limited size of training datasets, imbalanced distribution of defect categories, low model generalization, single detection type, slow image stitching speed, and poor image quality. Based on existing literature, solutions to these problems have been explored.

To address the problem of small training datasets, approaches such as transfer learning, semi-supervised learning, or unsupervised learning have been utilized to reduce the data requirements. Additionally, improvements in Generative Adversarial Networks (GANs) have been employed to generate synthetic defect data. To enhance model generalization, techniques like feature fusion and enhancement have been applied. By calculating spatial vector distances, unknown category defect detection has been achieved. Semi-supervised learning methods have also been used to calculate spatial distances between feature vectors and real samples, thus improving the model's ability to recognize various defects and enhance its generalization. Regarding the issue of slow image stitching, deep learning techniques have been employed to minimize stitching errors through loss function minimization. Dynamic path planning has been introduced to improve image quality and speed. Furthermore, a novel method utilizing compound eyes to enhance image resolution and achieve a large field of view has been introduced.


References

[1]. I. Volkau, A. Mujeeb, D. Wenting, E. Marius and S. Alexei, "Detection Defect in Printed Circuit Boards using Unsupervised Feature Extraction Upon Transfer Learning," 2019 International Conference on Cyberworlds (CW), Kyoto, Japan, 2019, pp. 101-108, doi: 10.1109/CW.2019.00025.

[2]. Wan, Y.; Gao, L.; Li, X.; Gao, Y. Semi-Supervised Defect Detection Method with Data-Expanding Strategy for PCB Quality Inspection. Sensors 2022, 22, 7971. https:// doi.org/10.3390/s22207971.

[3]. Goodfellow, I.J. et al. (2014) Generative Adversarial Networks, arXiv.org. Available at: https://doi.org/10.48550/arXiv.1406.2661 (Accessed: 10 September 2023).

[4]. Abu Ebayyeh, A.A.R.M. (1970) Deep learning for automatic optical inspection and quality evaluation of semiconductor and optoelectronic manufacturing, British Library EThOS - Search and order theses online. Available at: https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.856988 (Accessed: 17 September 2023).

[5]. B. Ghosh, M. K.Bhuyan, P. Sasmal, Y. Iwahori and P. Gadde, "Defect Classification of Printed Circuit Boards based on Transfer Learning," 2018 IEEE Applied Signal Processing Conference (ASPCON), Kolkata, India, 2018, pp. 245-248, doi: 10.1109/ASPCON.2018.8748670.

[6]. Sankar, V.U., Lakshmi, G. & Sankar, Y.S. A Review of Various Defects in PCB. J Electron Test 38, 481–491 (2022). https://doi.org/10.1007/s10836-022-06026-7

[7]. Q. Ling and N. A. M. Isa, "Printed Circuit Board Defect Detection Methods Based on Image Processing, Machine Learning and Deep Learning: A Survey," in IEEE Access, vol. 11, pp. 15921-15944, 2023, doi: 10.1109/ACCESS.2023.3245093.

[8]. Ding, R. et al. (2020) ‘Unknown defect detection for printed circuit board based on multi‐scale deep similarity measure method’, The Journal of Engineering, 2020(13), pp. 388–393. doi:10.1049/joe.2019.1188.

[9]. Shi, W. et al. (2020) ‘Adversarial semi‐supervised learning method for printed circuit board unknown defect detection’, The Journal of Engineering, 2020(13), pp. 505–510. doi:10.1049/joe.2019.1181.

[10]. Xiao, H., Rasul, K. and Vollgraf, R. (2017) Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms, arXiv.org. Available at: https://arxiv.org/abs/1708.07747 (Accessed: 11 September 2023).

[11]. Krizhevsky, A., Nair, V., Hinton, G.: ‘The CIFAR-10 dataset’, 2014. Available at http://www.cs.toronto.edu/kriz/cifar.html

[12]. N. Zeng, P. Wu, Z. Wang, H. Li, W. Liu and X. Liu, "A Small-Sized Object Detection Oriented Multi-Scale Feature Fusion Approach With Application to Defect Detection," in IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-14, 2022, Art no. 3507014, doi: 10.1109/TIM.2022.3153997.

[13]. X. Yu, W. Lyu, D. Zhou, C. Wang and W. Xu, "ES-Net: Efficient Scale-Aware Network for Tiny Defect Detection," in IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-14, 2022, Art no. 3511314, doi: 10.1109/TIM.2022.3168897.

[14]. Deng Lin. Research on PCB surface assembly defect detection method based on machine vision [D]. Wuhan university of technology, 2020. DOI: 10.27381 /, dc nki. Gwlgu. 2019.000586.

[15]. M. Huo, Z. Zhang and X. Yang, "Deep Image Stitching with Pixel Similarity Correlation," 2022 China Automation Congress (CAC), Xiamen, China, 2022, pp. 4316-4321, doi: 10.1109/CAC57257.2022.10054983.

[16]. Yuanlin Zhao, Xiangyang Peng, Shengli Chang, Wuming Wu, Zheng Wang, "Image stitching technology based on bionic compound eye system," Proc. SPIE 11434, 2019 International Conference on Optical Instruments and Technology: Optical Systems and Modern Optoelectronic Instruments, 1143404 (12 March 2020); doi: 10.1117/12.2540455.


Cite this article

Kong,L. (2024). Research on the application of deep learning algorithms to PCB defect detection. Applied and Computational Engineering,43,44-48.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 2023 International Conference on Machine Learning and Automation

ISBN:978-1-83558-311-1(Print) / 978-1-83558-312-8(Online)
Editor:Mustafa İSTANBULLU
Conference website: https://2023.confmla.org/
Conference date: 18 October 2023
Series: Applied and Computational Engineering
Volume number: Vol.43
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. I. Volkau, A. Mujeeb, D. Wenting, E. Marius and S. Alexei, "Detection Defect in Printed Circuit Boards using Unsupervised Feature Extraction Upon Transfer Learning," 2019 International Conference on Cyberworlds (CW), Kyoto, Japan, 2019, pp. 101-108, doi: 10.1109/CW.2019.00025.

[2]. Wan, Y.; Gao, L.; Li, X.; Gao, Y. Semi-Supervised Defect Detection Method with Data-Expanding Strategy for PCB Quality Inspection. Sensors 2022, 22, 7971. https:// doi.org/10.3390/s22207971.

[3]. Goodfellow, I.J. et al. (2014) Generative Adversarial Networks, arXiv.org. Available at: https://doi.org/10.48550/arXiv.1406.2661 (Accessed: 10 September 2023).

[4]. Abu Ebayyeh, A.A.R.M. (1970) Deep learning for automatic optical inspection and quality evaluation of semiconductor and optoelectronic manufacturing, British Library EThOS - Search and order theses online. Available at: https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.856988 (Accessed: 17 September 2023).

[5]. B. Ghosh, M. K.Bhuyan, P. Sasmal, Y. Iwahori and P. Gadde, "Defect Classification of Printed Circuit Boards based on Transfer Learning," 2018 IEEE Applied Signal Processing Conference (ASPCON), Kolkata, India, 2018, pp. 245-248, doi: 10.1109/ASPCON.2018.8748670.

[6]. Sankar, V.U., Lakshmi, G. & Sankar, Y.S. A Review of Various Defects in PCB. J Electron Test 38, 481–491 (2022). https://doi.org/10.1007/s10836-022-06026-7

[7]. Q. Ling and N. A. M. Isa, "Printed Circuit Board Defect Detection Methods Based on Image Processing, Machine Learning and Deep Learning: A Survey," in IEEE Access, vol. 11, pp. 15921-15944, 2023, doi: 10.1109/ACCESS.2023.3245093.

[8]. Ding, R. et al. (2020) ‘Unknown defect detection for printed circuit board based on multi‐scale deep similarity measure method’, The Journal of Engineering, 2020(13), pp. 388–393. doi:10.1049/joe.2019.1188.

[9]. Shi, W. et al. (2020) ‘Adversarial semi‐supervised learning method for printed circuit board unknown defect detection’, The Journal of Engineering, 2020(13), pp. 505–510. doi:10.1049/joe.2019.1181.

[10]. Xiao, H., Rasul, K. and Vollgraf, R. (2017) Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms, arXiv.org. Available at: https://arxiv.org/abs/1708.07747 (Accessed: 11 September 2023).

[11]. Krizhevsky, A., Nair, V., Hinton, G.: ‘The CIFAR-10 dataset’, 2014. Available at http://www.cs.toronto.edu/kriz/cifar.html

[12]. N. Zeng, P. Wu, Z. Wang, H. Li, W. Liu and X. Liu, "A Small-Sized Object Detection Oriented Multi-Scale Feature Fusion Approach With Application to Defect Detection," in IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-14, 2022, Art no. 3507014, doi: 10.1109/TIM.2022.3153997.

[13]. X. Yu, W. Lyu, D. Zhou, C. Wang and W. Xu, "ES-Net: Efficient Scale-Aware Network for Tiny Defect Detection," in IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-14, 2022, Art no. 3511314, doi: 10.1109/TIM.2022.3168897.

[14]. Deng Lin. Research on PCB surface assembly defect detection method based on machine vision [D]. Wuhan university of technology, 2020. DOI: 10.27381 /, dc nki. Gwlgu. 2019.000586.

[15]. M. Huo, Z. Zhang and X. Yang, "Deep Image Stitching with Pixel Similarity Correlation," 2022 China Automation Congress (CAC), Xiamen, China, 2022, pp. 4316-4321, doi: 10.1109/CAC57257.2022.10054983.

[16]. Yuanlin Zhao, Xiangyang Peng, Shengli Chang, Wuming Wu, Zheng Wang, "Image stitching technology based on bionic compound eye system," Proc. SPIE 11434, 2019 International Conference on Optical Instruments and Technology: Optical Systems and Modern Optoelectronic Instruments, 1143404 (12 March 2020); doi: 10.1117/12.2540455.