Source-linked AI summary

A PCB Dataset for Defects Detection and Classification

Weibo Huang, Peng Wei

arXiv:1901.08204v1cs.CV

TL;DR

Few PCB defect papers published datasets, limiting convenient comparison of new methods. This paper releases a synthesized dataset and uses reference comparison with an end-to-end convolutional neural network for inspection and classification. The classification model reports average precision of 97.74% and 99.40% on two evaluation groups.

  • Problem

    Few PCB defect studies published datasets, and existing public PCBA datasets are unsuitable for this work because the target is naked PCB.

    Source: §I · pp. 1–2
  • Method

    The paper provides a synthesized PCB dataset and uses reference comparison to locate defects before an end-to-end convolutional neural network classifies them.

    Source: §I · p. 2, A. Registration · p. 4, B. Binaryzation · p. 4
  • Results

    Average precision was 97.74% on bounding-box test data and 99.40% on defect samples produced by reference comparison.

    Source: 2) Defects classification · p. 8
  • Takeaways & Limitations

    The 1,386-image dataset supplies defect boxes and rotation information for research on PCB detection, classification, and registration.

    Source: §V · p. 8

Abstract

from arXiv · show

To coupe with the difficulties in the process of inspection and classification of defects in Printed Circuit Board (PCB), other researchers have proposed many methods. However, few of them published their dataset before, which hindered the introduction and comparison of new methods. In this paper, we published a synthesized PCB dataset containing 1386 images with 6 kinds of defects for the use of detection, classification and registration tasks. Besides, we proposed a reference based method to inspect and trained an end-to-end convolutional neural network to classify the defects. Unlike conventional approaches that require pixel-by-pixel processing, our method firstly locate the defects and then classify them by neural networks, which shows superior performance on our dataset.

I. INTRODUCTION

The paper addresses the scarcity of public datasets for comparing PCB defect methods by releasing a synthesized dataset and pairing reference-based inspection with neural-network classification.

I. INTRODUCTION

  • Few PCB defect studies had published datasets, while many used their own images, making comparison of new methods inconvenient.Existing public PCBA datasets are unsuitable for this work because the target is a naked PCB without components.Source: §I · pp. 1–2
  • Reference comparison, non-reference verification, and hybrid inspection are described as three conventional AOI approaches, with different practical constraints.Reference methods face illumination, registration, and storage concerns; non-reference methods may struggle with large defects, while hybrid methods require high computation capacity.Source: §I · p. 1
  • The approach uses reference comparison to locate defects, then an end-to-end neural network to classify the inspected regions.The paper motivates reference comparison as intuitive and straightforward, and uses a convolutional neural network for classification.Source: Figure 1 · p. 1, §I · p. 2
  • The public dataset contains 1,386 naked-PCB images, with bounding boxes and rotation information, to support detection, classification, and registration research.It uses ten standard template boards and includes correctly oriented and randomly rotated images.Source: §I · p. 2

II. IMAGE ACQUISITION AND STATISTICS

The dataset is built with an AOI-like imaging setup, synthesized defect examples, and orientation information to represent registration conditions.

A. Image acquisition

  • A 16-megapixel industrial camera, adjustable 6–12 mm lens, and diffuse ring LED lights form an acquisition system designed to reduce reflection, shadows, and uneven illumination.Original photographs are 4608×3456 pixels, then adjusted according to board size when defects are made.Source: A. Image acquisition · p. 2
  • Six defect categories are added to cropped PCB images, with each image containing 3–5 defects of one category and a bounding box and coordinates for each defect.Randomly oriented images represent boards that are not appropriately placed; the angle difference from the corresponding template is also provided for registration evaluation.Source: A. Image acquisition · pp. 2–3, Figure 3 · p. 3
  • Figure 3 contrasts defect images aligned with the template against images with random orientations.The dataset also supplies the angular difference between each image and its corresponding template.Source: Figure 3 · p. 3, A. Image acquisition · p. 3

B. Statistics

The dataset is organized to expose images, annotations, templates, and rotation metadata; the section also reports per-board defect counts and template dimensions.

B. Statistics

  • The dataset is divided into Images, Annotations, PCB USED, and rotation folders, with bounding boxes stored in XML and rotation angles in text files.PCB USED contains the ten template images; the rotation folder stores oriented PCB images and their angles.Source: B. Statistics · p. 3, Figure 4 · p. 3
  • Most PCBs have more than two defects, and the majority have fewer than six; Figure 5 shows the distribution per PCB.Figure 6 gives the height and width of every template; the text reports the largest as 20mm × 120mm and the minimum as 53mm×48mm.Source: B. Statistics · p. 3, Figure 5 · p. 3, Figure 6 · p. 3

III. PREPROCESSING AND DETECTION

  • Preprocessing applies registration and binarization, followed by XOR and mathematical morphology operations to locate defects.Figure 4 depicts the four-part dataset structure.Source: §III · p. 3, Figure 4 · p. 3

A. Registration

The method registers test and template boards before comparison, addressing differences in direction and geometric center. It then uses adaptive thresholding to convert grayscale images into binary maps for defect localization.

A. Registration

  • Table I lists figures for PCB images and defect samples, with sample counts shown in brackets.Source: Table I · p. 4
  • SURF feature points are matched to estimate a 2-D geometric transform that recovers the test image’s orientation and position relative to the template.SURF was chosen because it has less computational complexity than SIFT and matches better under brightness changes, relevant to the practical scenarios described.Source: A. Registration · pp. 3–4

B. Binaryzation

  • Adaptive threshold segmentation calculates thresholds for small image regions rather than using one global value, accommodating different lighting conditions across a PCB image.Source: B. Binaryzation · p. 4
  • Each pixel’s threshold is a Gaussian-weighted sum of values in its blocksize × blocksize neighborhood; the kernel’s aperture size is odd.The Gaussian standard deviation is computed from ksize.Source: B. Binaryzation · p. 4

C. Localization of defects

The localization process compares template and test binary images, then filters and morphologically processes the result to isolate defect regions. Connected areas in the processed image provide defect locations.

C. Localization of defects

  • The XOR operation takes the template and test binary maps as inputs and produces a result binary image for subsequent filtering.Source: C. Localization of defects · p. 4
  • Median filtering removes tiny noise points, while closing and opening help connect local defect parts and remove small or isolated structures.The described opening removes isolated points, burrs, and bridges; closing fills small holes and cracks.Source: C. Localization of defects · pp. 4–5
  • The XOR result is filtered with a 5 × 5 kernel, followed by 15 × 15 closing and 3 × 3 opening, area thresholding, and non-maximum suppression to isolate defect regions.The authors report that the final image contains only areas where real defects are located; connected areas provide their locations.Source: C. Localization of defects · pp. 4–5, Figure 9 · p. 5

IV. EXPERIMENT AND CLASSIFICATION

The section introduces CNN-based defect classification experiments. It also presents data augmentation and the distribution of defects across training, validation, and test folders.

IV. EXPERIMENT AND CLASSIFICATION

  • The section introduces experiments on convolutional neural networks for defect classification, including data preparation, model selection, and results analysis.Source: §IV · p. 5
  • Figure 10 illustrates augmentation that creates three additional frames from an original defect bounding box to produce more defect images.Source: Figure 10 · p. 6
  • Table II presents the distribution of defects across the training, validation, and test folders.Source: Table II · p. 6

A. Preparing for data

Defect crops from annotated bounding boxes are prepared for CNN classification, with augmentation used to expand the training data. Images are resized to 64 × 64 and organized by split and defect type.

A. Preparing for data

  • Defect bounding boxes provide cropped images for CNN training and testing, and random 5-to-10-pixel offsets of the existing coordinates augment the training images.Source: A. Preparing for data · p. 6
  • All cropped defect images are resized to 64 × 64 and divided into train, val, and test folders, each containing six defect-type subfolders.Source: A. Preparing for data · p. 6
  • Figure 11 shows an example of training data with images resized to 64 × 64.Source: Figure 11 · p. 6

B. Models

The paper uses a small, densely connected CNN for PCB defect classification, with layers receiving outputs from earlier layers. Its two-block architecture combines convolutional blocks with pooling and a six-output linear layer.

B. Models

  • The network has two six-layer blocks, with each layer receiving outputs from all earlier layers; the final layer in a block has 21 connections.The dense connections are inspired by DenseNet and are used in a small network for PCB defect classification.Source: B. Models · pp. 6–7
  • Each layer applies BN-ReLU-Conv (1 × 1)-BN-ReLU-Conv (3×3), producing 32 feature maps; the 1 × 1 convolution uses a four-times-wider bottleneck.The layer output function includes batch normalization, ReLU, pooling, and convolution.Source: B. Models · pp. 6–7
  • The model begins with a 7×7 convolution and max pooling, uses a transition layer to halve feature-map number and size, then applies adaptive average pooling and a linear layer producing a 6 × 1 vector.Figure 12 illustrates the six-layer block and the network’s input-to-output structure.Source: B. Models · p. 7, Figure 12 · p. 7

C. Training

Training used stochastic gradient descent with momentum on a specified computer setup. The results section frames evaluation around defect detection, defect classification, and time expenditure, and defines per-type and average classification precision measures.

C. Training

  • Training ran for 50 epochs with batch size 8 and an initial learning rate of 0.01, decayed by 0.1 every 7 epochs, using SGD with momentum 0.9.The procedure took about 25 minutes on an Intel Xeon E5-2640 system with 128GB RAM and an NVIDIA GTX 1080Ti GPU; an L2 penalty of 1×10−5 was used.Source: C. Training · p. 7

D. Results

  • Evaluation considers defect detection and classification while aiming to minimize the method’s time expenditure.The detection measure is error rate Pd; classification uses per-defect precision Pc and average precision APc.Source: D. Results · p. 8
  • APc averages the precision rates across the six defect types, while Pc is the classification precision rate for each defect type.For an individual type, the text defines c as correctly predicted defects and a as actual defects of that type.Source: D. Results · p. 8

1) Defects inspection:

The reference-comparison detection method produced needless detections for mouse bite and open circuit defects, with the two cases corresponding to different error types.

1) Defects inspection:

  • Only mouse bite and open circuit defects were needlessly detected: the mouse bite was a false detection, while the open circuit result overlapped another detection.The paper characterizes the latter as one defect producing two similar overlapping results.Source: 1) Defects inspection · p. 8

2) Defects classification:

The classifier reports high average precision on both manually boxed test defects and samples detected by the reference-comparison method; whole-board inspection takes 0.9899 seconds. The conclusion pairs this approach with a synthesized labeled dataset and identifies dataset growth, robustness, and speed as future work.

2) Defects classification:

  • 97.74% average precision on bounding-box test data and 99.40% on reference-comparison defect samples; repeated and incorrect detections were removed before classification.The authors attribute the higher result on reference-comparison samples to the defect body occupying a larger share of the resized image.Source: 2) Defects classification · p. 8

3) Time consumption:

  • The complete inspection process takes 0.9899 seconds on an Intel Core i7-7700 computer with 8GB RAM, with registration accounting for most of the time.The authors attribute registration time to feature-point search and descriptor calculation.Source: 3) Time consumption · p. 8

V. CONCLUSION

  • The synthesized dataset contains 1,386 images spanning six defect types, with bounding boxes and transformation information for detection and registration research.Half the images depict correctly oriented boards and half simulate random orientation.Source: §V · p. 8
  • The end-to-end CNN classifies reference-comparison defect regions, using DenseNet-inspired dense shortcuts to achieve high accuracy with relatively few layers.Source: §V · p. 8
  • Future work may enlarge the dataset, improve algorithm robustness, reduce inspection time, and develop a non-reference comparison method to avoid templates.Source: §V · p. 8
Loading 1901.08204v1…