arXiv:2608.22937cs.CVAug 2026

Manuscript Offprint

arXiv:2608.22937

Quality Inspection of Printed Circuit Board Pin Insertion via Semantic Segmentation and Board-Level Feature Extraction

Nils Rabeneck, André Kiunke, Nicole Hoess, Wolfgang Mauerer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Nils Rabeneck ID^{ID}

Technical University of

Applied Sciences Regensburg

Regensburg, Germany

nils.rabeneck@othr.de

André Kionke

Technical University of

Applied Sciences Regensburg

Regensburg, Germany

andre.kionke@st.othr.de

Nicole Hoess ID^{ID}

Technical University of

Applied Sciences Regensburg

Regensburg, Germany

nicole.hoess@othr.de

Wolfgang Mauerer ID^{ID}

Technical University of

Applied Sciences Regensburg

Siemens AG, Technology

Regensburg/Munich, Germany

wolfgang.mauerer@othr.de

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.

Index Terms—artificial intelligence, defect detection, logistic regression, U-Net

I. INTRODUCTION

Image processing plays an important role in quality assessment for printed circuit boards (PCBs). It aims at removing defective PCBs identified from production at an early stage [1]. Advances in artificial intelligence (AI) methods for machine vision open up a wide range of possibilities for defect detection alongside established rule-based methods [2]. Deep learning methods are regarded as established standard in PCB quality inspection for various defects because of their high accuracy and speed. However, they also face limitations, such as the range of defects, including open circuits, short circuits, underetching, and spurious copper defects [3]. While existing work focuses primarily on board-level defects and device defects [4], comparatively little work has addressed the detection and evaluation of PCB pins in industrial environments. However, pin defects can lead to quality issues and increased rejection rates during PCB manufacturing.

In this work, we consider pin insertion: the automated placement of pins on a PCB. Owing to the large number of insertion operations and tight manufacturing tolerances, defects such as misaligned pins can occur and may lead to quality issues, increased rejection rates, and costly rework [5]. Such defects occur for both, individual components and, more frequently, as systematic deviations of a desired process. Our aim is to detect tilted pins directly after or even during pin insertion. Methods and datasets designed for component detection do not address the problem. Nevertheless, the successful implementation of AI-based methods for PCB inspection encourages the use of deep learning segmentation approaches for pin tilt detection. The primary goal is the development and evaluation of a decision function at the board-level, classifying PCB images as pass or fail based on detected pin misalignments. Since tilted pins are characterised by a larger surface area, semantic segmentation enables the extraction of contours and contour-based features at the board level. Our main contributions are as follows:

  1. We investigate semantic segmentation for pin localisation in industrial PCB images.

  2. We propose a board-level defect classification pipeline based on contour features extracted from segmentation masks.

  3. We compare the proposed approach with alternative methods, including anomaly detection and object detection approaches.

  4. We evaluate the investigated methods on both an industrial dataset and a publicly available dataset and discuss their strengths and limitations for automated pin

This work was partially supported by the European Regional Development Fund (ERDF) and by the Free State of Bavaria as part of the project AIM-SMEs (Grant No. 2506-014-3.2), co-funded by the European Union; also by the High-Tech Agenda of the Free State of Bavaria.

inspection.

  1. We provide a self-contained reproduction package [6] that contains an environment allowing others to build directly upon our approach.

References (30)