Quality Inspection of Printed Circuit Board Pin Insertion via Semantic Segmentation and Board-Level Feature Extraction
Organizations: Technical University of Applied Sciences Regensburg Regensburg, Germany · Siemens AG, Technology Regensburg/Munich, Germany
Abstract
Quality control during printed circuit board (PCB) assembly is a critical step in ensuring reliable electronic products. Detecting misaligned pins during or after pin insertion remains a particularly challenging inspection task. This paper presents an automated defect detection method for identifying incorrectly inserted pins on PCBs. The proposed pipeline combines semantic segmentation using a U-Net architecture with contour-based feature extraction and logistic regression for board-level pass/fail classification. Segmentation masks are used to derive contour representations of individual pins, from which board-level features -such as average contour size- are extracted and used to train a logistic regression classifier. We evaluate the method on two datasets: an industrial collection of real-world PCB images, and a publicly available PCB pin-inspection dataset with substantially different visual characteristics. To assess the effectiveness of the proposed approach, a comparison against PatchCore, an anomaly detection technique new to be applied to pin inspection, as well as instance segmentation-based pin detection is made. The developed method achieved Area Under the Receiver Operating Characteristic Curve (ROC-AUC) values of 0.990 on a random test set split from the industrial data and 1.000 on the public dataset indicating strong separation between pass and fail boards. The results indicate that the proposed approach is a promising candidate for automated pin inspection in industrial environments and achieves strong performance on datasets with substantially different visual characteristics after dataset-specific training.
Figures & tables
| Dataset | Model | Accuracy | Precision | Recall | F1-Score | IoU |
|---|---|---|---|---|---|---|
| Industrial | U-Net (ResNet34) | 0.995 | 0.864 | 0.724 | 0.788 | 0.650 |
| DeepLabV3 (ResNet50) | 0.994 | 0.748 | 0.817 | 0.781 | 0.640 | |
| FCN (ResNet50) | 0.994 | 0.752 | 0.795 | 0.773 | 0.630 | |
| LRASPP (MobileNetV3) | 0.993 | 0.742 | 0.759 | 0.750 | 0.600 | |
| Roboflow | U-Net | 0.981 | 0.936 | 0.767 | 0.843 | 0.728 |
| Method | Class | Precision | Recall | F1-Score | Support |
| Industrial Dataset | |||||
| Proposed | pass | 1.000 | 0.953 | 0.976 | 190 |
| fail | 0.654 | 1.000 | 0.791 | 17 | |
| PatchCore | pass | 0.976 | 0.811 | 0.886 | 148 |
| fail | 0.481 | 0.897 | 0.626 | 29 | |
| Roboflow Dataset | |||||
| Method | Class | Prec. | Rec. | mAP 50 | mAP 50:95 |
|---|---|---|---|---|---|
| Industrial Dataset | |||||
| Instance Seg. | All | 0.492 | 0.692 | 0.584 | 0.293 |
| pin | 0.787 | 0.848 | 0.784 | 0.319 | |
| pin_tilt | 0.197 | 0.535 | 0.384 | 0.268 | |
| BBox Detect. | All | 0.566 | 0.692 | 0.678 | 0.442 |
| pin | 0.841 | 0.891 | 0.867 | 0.532 | |
Industrial Inspection
Industrial inspection uses sensing, computer vision, and robotics to detect, measure, and explain defects and verify product or infrastructure quality.
See all 120 papers