SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components
Abstract
:1. Introduction
2. The SolDef_AI Dataset
2.1. Dataset Acquisition
2.2. Dataset Statistics
3. Labeling Strategies
- For properly executed solder joints, a mask with an upward concavity and a specific area was built (Figure 11);
- For solder joints characterized by an excessive amount of material, a mask with a downward concavity was built (Figure 12);
- For joints with insufficient solder material, a mask with a downward concavity was built but with a lower area in comparison to the properly executed solder joint (Figure 13);
- For solder joints characterized by spikes, a mask with a protrusion on its profile was generated (Figure 14).
4. Model Configuration
5. Model Evaluation
6. Training and Validation
6.1. Model Settings
- Batch size = 128;
- Number of classes = 2 for dataset_1 (good and no_good);
- Number of classes = 4 for dataset_2 (good, exc_solder, poor_solder, spike);
- Learning rate = 0.0025;
- Max iteration parameter = 500.
6.2. Result for Dataset_1
6.3. Result for Dataset_2
6.4. Result Discussion
- The algorithm better manages the top view images (dataset_1). In this case, the metrics highlight the robustness of the model. Indeed, for dataset_1, the total loss function decreased to 0.282, while in the 45-degree view (dataset_2), the total loss function was 0.745.
- The better performance for dataset_1 was also confirmed by other metrics (loss to the classification task, loss mask, loss to the detection, mAP for detection, and mAP for segmentation).
- For dataset_1, the algorithm managed only two classes (good and no_good); meanwhile, in the case of dataset_2, the number of classes was four (good, exc_solder, poor_solder, spike).
- The algorithm performances are interesting for the two datasets. However, the results highlight some limits to managing the soldering defects in the 45-degree images (dataset_2). Indeed, the algorithm had more difficulty detecting especially the class poor_solder. For the other classes (good, exc_solder, and spike), the algorithm, on average, gave better performances, but with rare cases in which the inference was lower than 70%. This behavior probably depends on boundaries that are not identifiable clearly due to the defects’ characteristics and the point of view of the image.
- Further studies should be carried out for the exc_solder and poor_solder classes to overcome the aforementioned limitations.
- Updating the SolDef_AI dataset with a new experimental campaign to acquire new images with different points of view: 15 degrees, 30 degrees, 45 degrees, 60 degrees, and 75 degrees. Indeed, the SolDef_AI dataset represents a dynamic open source dataset with scheduled updates.
- Optimizing the training phase with improvements in the labeling strategies, dimension of the training sub-datasets, and model settings.
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ackermann, M.; Iren, D.; Wesselmecking, S.; Shetty, D.; Krupp, U. Automated segmentation of martensite-austenite islands in bainitic steel. Mater. Charact. 2022, 191, 112091. [Google Scholar] [CrossRef]
- Karem, M. Reviewing Mask R-CNN: An In-depth Analysis of Models and Applications. EasyChair 2024, 11838. [Google Scholar]
- Chen, X.; Wu, Y.; He, X.; Ming, W. A Comprehensive Review of Deep Learning-Based PCB Defect Detection. IEEE Access 2023, 11, 139017–139038. [Google Scholar] [CrossRef]
- Park, J.-H.; Kim, Y.-S.; Seo, H.; Cho, Y.-J. Analysis of Training Deep Learning Models for PCB Defect Detection. Sensors 2023, 23, 2766. [Google Scholar] [CrossRef] [PubMed]
- Chen, I.-C.; Hwang, R.-C.; Huang, H.-C. PCB Defect Detection Based on Deep Learning Algorithm. Processes 2023, 11, 775. [Google Scholar] [CrossRef]
- Lian, J.; Wang, L.; Liu, T.; Ding, X.; Yu, Z. Automatic visual inspection for printed circuit board via novel Mask R-CNN in smart city applications. Sustain. Energy Technol. Assess. 2021, 44, 101032. [Google Scholar] [CrossRef]
- Liu, Y.; Wu, H. Automatic Solder Defect Detection in Electronic Components Using Transformer Architecture. IEEE Trans. Compon. Packag. Manuf. Technol. 2023, 14, 166–175. [Google Scholar] [CrossRef]
- Xin, H.; Chen, Z.; Wang, B. PCB Electronic Component Defect Detection Method based on Improved YOLOv4 Algorithm. J. Phys. Conf. Ser. 2021, 1827, 012167. [Google Scholar] [CrossRef]
- Wu, X.; Ge, Y.; Zhang, Q.; Zhang, D. PCB defect detection using deep learning methods. In Proceedings of the 2021 IEEE 24th International Conference on Computer Supported Cooperative Work in Design (CSCWD), Dalian, China, 5–7 May 2021. [Google Scholar]
- Mujeeb, A.; Dai, W.; Erdt, M.; Sourin, A. One class based feature learning approach for defect detection using deep autoencoders. Adv. Eng. Inform. 2019, 42, 100933. [Google Scholar] [CrossRef]
- Sezer, A.; Altan, A. Detection of solder paste defects with an optimization-based deep learning model using image processing techniques. Solder. Surf. Mt. Technol. 2021, 33, 291–298. [Google Scholar] [CrossRef]
- Wang, H.; Xie, J.; Xu, X.; Zheng, Z. Few-Shot PCB Surface Defect Detection Based on Feature Enhancement and Multi-Scale Fusion. IEEE Access 2022, 10, 129911–129924. [Google Scholar] [CrossRef]
- Kim, J.; Ko, J.; Choi, H.; Kim, H. Printed Circuit Board Defect Detection Using Deep Learning via A Skip-Connected Convolutional Autoencoder. Sensors 2021, 21, 4968. [Google Scholar] [CrossRef] [PubMed]
- Benedek, C.; Krammer, O.; Janoczki, M.; Jakab, L. Solder Paste Scooping Detection by Multilevel Visual Inspection of Printed Circuit Boards. IEEE Trans. Ind. Electron. 2012, 60, 2318–2331. [Google Scholar] [CrossRef]
- Öztürk, Ş.; Akdemir, B. Detection of pcb soldering defects using template based image processing method. Int. J. Intell. Syst. Appl. Eng. 2017, 4, 269–273. [Google Scholar]
- Vakili, E.; Karimian, G.; Shoaran, M.; Yadipour, R.; Sobhi, J. Valid-IoU: An improved IoU-based loss function and its application to detection of defects on printed circuit boards. Res. Sq. 2023. preprint. [Google Scholar] [CrossRef]
- Bártová, B.; Bína, V. A Novel Data Mining Approach for Defect Detection in the Printed Circuit Board Manufacturing Process. Eng. Manag. Prod. Serv. 2022, 14, 13–25. [Google Scholar] [CrossRef]
- Ding, R.; Dai, L.; Li, G.; Liu, H. TDD-net: A tiny defect detection network for printed circuit boards. CAAI Trans. Intell. Technol. 2019, 4, 110–116. [Google Scholar] [CrossRef]
- Liao, X.; Lv, S.; Li, D.; Luo, Y.; Zhu, Z.; Jiang, C. YOLOv4-MN3 for PCB Surface Defect Detection. Appl. Sci. 2021, 11, 11701. [Google Scholar] [CrossRef]
- Park, J.-M.; Yoo, Y.-H.; Kim, U.-H.; Lee, D.; Kim, J.-H. D3PointNet: Dual-Level Defect Detection PointNet for Solder Paste Printer in Surface Mount Technology. IEEE Access 2020, 8, 140310–140322. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef] [PubMed]
- Zhang, G.; Cao, Y. A novel pcb defect detection method based on digital image processing. J. Phys. Conf. Ser. 2023, 2562, 012030. [Google Scholar] [CrossRef]
- An, K.; Zhang, Y. LPViT: A Transformer Based Model for PCB Image Classification and Defect Detection. IEEE Access 2022, 10, 42542–42553. [Google Scholar] [CrossRef]
- Li, Q.; Zheng, Q.; Jiang, S.; Hu, N.; Liu, Z. An improved YOLOv5-based model for automatic PCB defect detection. J. Physics Conf. Ser. 2024, 2708, 012017. [Google Scholar] [CrossRef]
- Tang, J.; Liu, S.; Zhao, D.; Tang, L.; Zou, W.; Zheng, B. PCB-YOLO: An Improved Detection Algorithm of PCB Surface Defects Based on YOLOv5. Sustainability 2023, 15, 5963. [Google Scholar] [CrossRef]
- Calabrese, M.; Agnusdei, L.; Fontana, G.; Papadia, G.; Del Prete, A. Application of Mask R-CNN for Defect Detection in Printed Circuit Board manufacturing. SN Appl. Sci. 2024. preprint. [Google Scholar]
- Lu, H.; Mehta, D.; Paradis, O.; Asadizanjani, N.; Tehranipoor, M.; Woodard, D.L. FICS-PCB: A Multi-Modal Image Dataset for Automated Printed Circuit Board Visual Inspection. Cryptol. Eprint Arch. 2020. preprint. [Google Scholar]
- Tang, S.; He, F.; Huang, X.; Yang, J. Online pcb defect detector on a new pcb defect dataset. arXiv 2019, arXiv:1902.06197. [Google Scholar]
- Huang, W.; Wei, P. A pcb dataset for defects detection and classification. arXiv 2019, arXiv:1901.08204. [Google Scholar]
- Mahalingam, G.; Gay, K.M.; Ricanek, K. PCB-METAL: A PCB Image Dataset for Advanced Computer Vision Machine Learning Component Analysis. In Proceedings of the 2019 16th International Conference on Machine Vision Applications (MVA), Tokyo, Japan, 27–31 May 2019; pp. 1–5. [Google Scholar] [CrossRef]
- Pramerdorfer, C.; Kampel, M. A dataset for computer-vision-based PCB analysis. In Proceedings of the 2015 14th IAPR International Conference on Machine Vision Applications (MVA), Tokyo, Japan, 18–22 May 2015; pp. 378–381. [Google Scholar] [CrossRef]
- Fontana, G.; Ruggeri, S.; Fassi, I.; Legnani, G. Flexible Vision Based Control for Micro-Factories. In Proceedings of the ASME 2013 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, Portland, OR, USA, 4–7 August 2013. [Google Scholar] [CrossRef]
- Ruggeri, S.; Fontana, G.; Fassi, I. Micro-assembly. In Micro-Manufacturing Technologies and Their Applications; Fassi, I., Shipley, D., Eds.; Springer Tracts in Mechanical Engineering; Springer: Cham, Switzerland, 2017. [Google Scholar] [CrossRef]
- Basile, V.; Modica, F.; Fontana, G.; Ruggeri, S.; Fassi, I. Improvements in Accuracy of Fused Deposition Modeling Via Integration of Low-Cost On-Board Vision Systems. J. Micro Nano-Manuf. 2020, 8, 010905. [Google Scholar] [CrossRef]
- Ruggeri, S.; Fontana, G.; Legnani, G.; Fassi, I. Performance Indices for the Evaluation of Microgrippers Precision in Grasping and Releasing Phases. Int. J. Precis. Eng. Manuf. 2019, 20, 2141–2153. [Google Scholar] [CrossRef]
- Kitada, T.; Seki, Y. Mounting Technique of 0402-Sized Surface-Mount Device (SMD) on FPC. Fujikura Tech. Rev. 2011, 29. [Google Scholar]
- Sezer, A.; Altan, A. Optimization of Deep Learning Model Parameters in Classification of Solder Paste Defects. In Proceedings of the 2021 3rd International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), Ankara, Turkey, 11–13 June 2021; pp. 1–6. [Google Scholar]
- Rastegari, M.; Ordonez, V.; Redmon, J.; Farhadi, A. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision; Springer International Publishing: Cham, Switzerland, 2016; pp. 525–542. [Google Scholar] [CrossRef]
Datasets | Number of Images | Inspected Items | Inspected Target | Defect Classes | Vision System | Resolution [Mpx] | Spatial Resolution [px/cm] | Image Variation |
---|---|---|---|---|---|---|---|---|
FICS-PCB [27] | 9.912 | 6 SMT components | Component classification | - | Digital microscope + DSLR camera | 10 + 45.7 | 462 − 921 + 118 | Lighting intensity and image scale |
DeepPCB [28] | 1500 | PCB traces | Defect identification | 6 | CCD camera | 25.6 | 480 | no |
PCBA-def [29] | 1386 | PCB traces | Defect identification | 6 | Digital microscope | 16.2 | n.a. | PCB rotation |
PCB-Metal [30] | 984 | 4 SMT components | Component classification | - | DSLR camera | 30.4 | n.a. | PCB rotation |
PCB-DSLR [31] | 748 | 1 SMT components | Component classification | - | DSLR camera | 16.2 | 87.4 | PCB rotation |
Proposed | 1115 | 4 SMT components + soldered joints | Defect identification | 2 + 4 | Digital microscope | 5 | 3333–6536 | Lighting intensity and point of view |
SMT Types | SMT Number | Correct Position Number | Wrong Position Number |
---|---|---|---|
C 0805 | 15 | 10 | 5 |
R 0603 | 30 | 20 | 10 |
R 0805 | 135 | 90 | 45 |
R 1206 | 50 | 34 | 16 |
Total | 230 | 154 | 76 |
SMT Types | Top View Image Number | |
---|---|---|
Setup 1 (Brighter Lighting Condition) | Setup 2 (Darker Lighting Condition) | |
C 0805 | 15 | 15 |
R 0603 | 30 | 30 |
R 0805 | 135 | 135 |
R 1206 | 50 | 50 |
Total | 460 |
SMT Types | Soldered Joint Number | Correct Soldered Joint Number | Joints with Excessive Quantity of Solder Material | Joints with Insufficient Quantity of Solder Material | Joints with Presence of Spike |
---|---|---|---|---|---|
C 0805 | 30 | 15 | 5 | 5 | 5 |
R 0603 | 60 | 30 | 10 | 10 | 10 |
R 0805 | 270 | 190 | 60 | 60 | 60 |
R 1206 | 100 | 40 | 20 | 20 | 20 |
Total | 460 | 275 | 95 | 95 | 95 |
SMT Types | 45-Degree View Image Number | Axonometric View Image Number | |
---|---|---|---|
Setup 1 (Top–Bottom Direction) | Setup 2 (Bottom–Top Direction) | ||
C 0805 | 15 | 15 | 15 |
R 0603 | 30 | 30 | 30 |
R 0805 | 135 | 135 | 135 |
R 1206 | 50 | 50 | 50 |
Total | 460 | 230 |
Variables | Setting |
---|---|
Batch size | 128 |
Learning rate | 0.001 |
Learning rate schedule | Adagrad |
Rotation | None |
Weight decay | None |
Label | Description | Representation |
---|---|---|
TP | The object is there, and the model detects it with an IoU > 0.5. | ▬ Ground Truth ▬ Prediction |
FP | The object is there, but the model detects it with an IoU ≤ 0.5. | ▬ Ground Truth ▬ Prediction |
The object is not there, and the model detects one. | ▬ Ground Truth ▬ Prediction | |
FN | The object is there, and the model does not detect it. | ▬ Ground Truth ▬ Prediction |
Average Precision (AP) | |
---|---|
AP | Percentage of AP at IoU = 0.50:0.05:0.95 |
AP IoU = 0.50 | Percentage of AP at IoU = 0.50 |
AP IoU = 0.75 | Percentage of AP at IoU = 0.75 |
Average Precision Across Scales | |
AP small | Percentage of AP for small objects: area < 322 |
AP medium | Percentage of AP for medium objects: 322 < area < 962 |
AP large | Percentage of AP for large objects: area > 962 |
AP all | Percentage of AP not considering the size of the detection |
Detection | ||||
---|---|---|---|---|
Metric | IoU | Area | maxDets | Value [%] |
mAP | @IoU = 0.50:0.05:0.95 | All | 100 | 62.11 |
mAP | @IoU = 0.50 | All | 100 | 71.05 |
mAP | @IoU = 0.75 | All | 100 | 71.05 |
mAP | @IoU = 0.50:0.05:0.95 | Small (area < 322) | 100 | NaN |
mAP | @IoU = 0.50:0.05:0.95 | Medium (322 < area < 962) | 100 | NaN |
mAP | @IoU = 0.50:0.05:0.95 | Large (area > 962) | 100 | 62.113 |
Segmentation | ||||
mAP | @IoU = 0.50:0.05:0.95 | All | 100 | 68.57 |
mAP | @IoU = 0.50 | All | 100 | 71.05 |
mAP | @IoU = 0.75 | All | 100 | 71.05 |
mAP | @IoU = 0.50:0.05:0.95 | Small (area < 322) | 100 | NaN |
mAP | @IoU = 0.50:0.05:0.95 | Medium (322 < area < 962) | 100 | NaN |
mAP | @IoU = 0.50:0.05:0.95 | Large (area > 962) | 100 | 68.57 |
Detection | ||||
---|---|---|---|---|
Metric | IoU | Area | maxDets | Value [%] |
mAP | @IoU = 0.50:0.05:0.95 | All | 100 | 42.70 |
mAP | @IoU = 0.50 | All | 100 | 56.90 |
mAP | @IoU = 0.75 | All | 100 | 56.90 |
mAP | @IoU = 0.50:0.05:0.95 | Small (area < 322) | 100 | NaN |
mAP | @IoU = 0.50 | Medium (322 < area < 962) | 100 | NaN |
mAP | @IoU = 0.75 | Large (area > 962) | 100 | 42.70 |
Segmentation | ||||
mAP | @IoU = 0.50:0.05:0.95 | All | 100 | 48.30 |
mAP | @IoU = 0.50 | All | 100 | 56.90 |
mAP | @IoU = 0.75 | All | 100 | 56.90 |
mAP | @IoU = 0.50:0.05:0.95 | Small (area < 322) | 100 | NaN |
mAP | @IoU = 0.50 | Medium (322 < area < 962) | 100 | NaN |
mAP | @IoU = 0.75 | Large (area > 962) | 100 | 48.30 |
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 MDPI and/or the editor(s). MDPI 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Fontana, G.; Calabrese, M.; Agnusdei, L.; Papadia, G.; Del Prete, A. SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components. J. Manuf. Mater. Process. 2024, 8, 117. https://doi.org/10.3390/jmmp8030117
Fontana G, Calabrese M, Agnusdei L, Papadia G, Del Prete A. SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components. Journal of Manufacturing and Materials Processing. 2024; 8(3):117. https://doi.org/10.3390/jmmp8030117
Chicago/Turabian StyleFontana, Gianmauro, Maurizio Calabrese, Leonardo Agnusdei, Gabriele Papadia, and Antonio Del Prete. 2024. "SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components" Journal of Manufacturing and Materials Processing 8, no. 3: 117. https://doi.org/10.3390/jmmp8030117
APA StyleFontana, G., Calabrese, M., Agnusdei, L., Papadia, G., & Del Prete, A. (2024). SolDef_AI: An Open Source PCB Dataset for Mask R-CNN Defect Detection in Soldering Processes of Electronic Components. Journal of Manufacturing and Materials Processing, 8(3), 117. https://doi.org/10.3390/jmmp8030117