원시데이터 수집 시스템
선정목록으로

PCB-DETR: A Detection Network of PCB Surface Defect With Spatial Attention Offset Module

간접 관련 필름·전자재료 · (14) 드라이 필름(포토레지스트) (21) 에폭시수지(23) 컴파운드

기본 정보

저자
  1. Q. Li — School of Computer Engineering, Guangzhou City University of Technology, Huadu, Guangzhou, China
  2. Lihao Wu — School of Computer Engineering, Guangzhou City University of Technology, Huadu, Guangzhou, China
  3. H. L. Xiao — School of Computer Engineering, Guangzhou City University of Technology, Huadu, Guangzhou, China
  4. Chuangmian Huang — Guangdong Provincial Key Laboratory of Electronic Information Products Reliability Technology, Guangzhou, China
DOI
10.1109/access.2024.3486176
저널
IEEE Access
발행년도
2024
발행기관
Institute of Electrical and Electronics Engineers
피인용수
10
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/access.2024.3486176
토픽
Advancements in Photolithography Techniques
OpenAlex ID
W4403721744

평가 내용

관련도
간접 관련
사업분야
필름·전자재료 · (14) 드라이 필름(포토레지스트)
부 분야
(21) 에폭시수지, (23) 컴파운드
R&D 측면
분석·모델링
확신도
0.80
근거 용어
PCB surface defect detection, deep learning, automated optical inspection, defect recognition, manufacturing environments
판단 근거
본 논문은 PCB(인쇄회로기판)의 표면 결함을 자동으로 검출하는 딥러닝 모델(PCB-DETR)에 관한 연구입니다. 이는 코오롱인더스트리의 직접적인 제품은 아니나, 드라이 필름(14) 등 전자재료 제조 공정의 품질 관리(AOI) 및 검사 자동화 시스템에 응용할 수 있는 기술입니다.
R&D 활용 포인트
PCB 및 전자재료 제조 공정 내 자동 광학 검사(AOI) 시스템의 결함 검출 정확도 향상 및 실시간 품질 관리 알고리즘 고도화에 활용 가능합니다.
평가 입력
본문 44,479자 중 30,032자 발췌

초록

The paper proposes PCB-DETR, a novel detection network for PCB surface defect identification, which enhances the performance of small defect detection through improvements to the Deformable-DETR model. Traditional supervised learning methods demonstrate strong performance in PCB surface defect detection but require large labeled datasets, which are often costly and impractical to obtain. PCB-DETR addresses this challenge by integrating EfficientNet as the backbone and introducing a spatial attention offset module that dynamically adjusts attention maps to enhance detection accuracy for small and scattered defects.The proposed model is evaluated on the PKU-Market-PCB dataset, consisting of six common PCB defect types. Experimental results demonstrate that PCB-DETR outperforms several mainstream object detection models, including Faster R-CNN, YOLOv5, YOLOv7, and the original Deformable-DETR, achieving higher mean Average Precision (mAP) and recall. The incorporation of spatial attention offset module and efficient feature extraction techniques allows PCB-DETR to excel in detecting small and complex defects while maintaining low computational overhead, making it suitable for real-time industrial applications. The study concludes that, compared to existing methods, PCB-DETR improves accuracy and the ability to determine whether defects are present in images, providing a reliable solution for small defect detection in complex manufacturing environments.

본문 44,479자

본문 펼치기
Received 6 September 2024, accepted 20 October 2024, date of publication 24 October 2024, date of current version 5 November 2024. _Digital Object Identifier 10.1109/ACCESS.2024.3486176_ # PCB-DETR: A Detection Network of PCB Surface Defect With Spatial Attention Offset Module QIFENG LI 1, LIHAO WU 1, HUANGPEI XIAO1, AND CHUANGMIAN HUANG 2 1School of Computer Engineering, Guangzhou City University of Technology, Huadu, Guangzhou 510800, China 2Guangdong Provincial Key Laboratory of Electronic Information Products Reliability Technology, Guangzhou 511370, China Corresponding author: Chuangmian Huang (huangchuangmian@163.com) This work was supported in part by the Open Foundation of Guangdong Provincial Key Laboratory of Electronic Information Products Reliability Technology, and in part by the Science and Technology Plan Project of Guangzhou Zengcheng District under Grant 2024ZCKJ04. ABSTRACT The paper proposes PCB-DETR, a novel detection network for PCB surface defect identification, which enhances the performance of small defect detection through improvements to the Deformable-DETR model. Traditional supervised learning methods demonstrate strong performance in PCB surface defect detection but require large labeled datasets, which are often costly and impractical to obtain. PCB-DETR addresses this challenge by integrating EfficientNet as the backbone and introducing a spatial attention offset module that dynamically adjusts attention maps to enhance detection accuracy for small and scattered defects.The proposed model is evaluated on the PKU-Market-PCB dataset, consisting of six common PCB defect types. Experimental results demonstrate that PCB-DETR outperforms several mainstream object detection models, including Faster R-CNN, YOLOv5, YOLOv7, and the original Deformable-DETR, achieving higher mean Average Precision (mAP) and recall. The incorporation of spatial attention offset module and efficient feature extraction techniques allows PCB-DETR to excel in detecting small and complex defects while maintaining low computational overhead, making it suitable for real-time industrial applications. The study concludes that, compared to existing methods, PCB-DETR improves accuracy and the ability to determine whether defects are present in images, providing a reliable solution for small defect detection in complex manufacturing environments. INDEX TERMS PCB surface defect recognition, deformable DETR, spatial attention offset module. I. INTRODUCTION With the continuous development of the electronics industry, Printed Circuit Board (PCB), as important components of electronic devices, are becoming increasingly complex and sophisticated. As the most basic and common component in electronic products, PCB are widely used in fields such as smartphones, household appliances, medical diagnosis, transportation, and the Internet of Things. Once there are defects in PCB, they will have a great impact on the stability and reliability of electronic products. Due to various uncertainties such as raw materials, production environment, and manual operations, various surface defects of PCB are inevitable. With the rapid development of precision The associate editor coordinating the review of this manuscript and approving it for publication was Wu-Shiung Feng. manufacturing technology in recent years, the integration level of PCB has become higher and higher. At the same time, PCB surface defects have gradually become smaller. These PCB surface defects are small in size, diverse in shape, and similar to intact areas, which bring new challenges to the detection of PCB surface defects. The most common types of PCB surface defects include missing holes, short circuits, mouse bites, false copper, piercing, and open circuits, as shown in Figure 1. In traditional quality inspection, the surface quality of PCB is manually inspected. However, the manual inspection process is subjective, labor-intensive, slow, and difficult to achieve real-time inspection tasks. Therefore, the automation of PCB defect detection systems has emerged as a central topic of study for academics in recent years, with the goals of reducing manufacturing costs and raising overall detection speed. FIGURE 1. Common PCB surface defect images. (a) missing hole, (b) mouse bite, (c) open circuit, (d) short, (e) spur, and (f) spurious copper. In the last few years, as an inspection methods based on machine vision, automated optical inspection (AOI) technique has been using to detect the defect, which widespread use of the technique to detect the defect during the PCB manufacturing process. Although the AOIbased PCB detection method has some significance in the industry, however, it is only applicable in a limited number of situations. This method is not robust because it rely on lighting, environment, and industrial camera apparatus and is extremely sensitive to changes in environmental conditions.Deep learning, particularly convolutional neural networks (CNNs), has demonstrated considerable promise in PCB defect identification due to their capacity to automatically learn discriminative features from data. At present, many PCB surface defect detection methods based CNNs have been applied to practice. Yang and Kang [1] proposed an enhanced detection method based on an improved YOLOv7 network, integrating the SwinV2TDD module and Magnification Factor Shuffle Attention mechanism (MFSA) into the YOLOv7 network, indicating a significant improvement in PCB defect detection performance. Li et al. [2] proposed an improved PCB defect detection method based on an extended Feature Pyramid Network (FPN) model.By designing a feature layer to capture multi-scale information for tiny defect detection, they achieve state-of-the-art detection performance on public datasets. In this paper, we propose an improved defect detection method for PCB surfaces by redesigning a more effective defect feature extraction network based on an attention offset mechanism, enhancing Deformable-DETR. This method introduces an offset branch and a residual branch into the traditional spatial attention mechanism, allowing for dynamic adjustment of the attention focus and improving the network’s sensitivity to small defect regions. In terms of feature fusion, we enhanced the network’s capability by integrating the proposed Spatial Attention Offset Module. This method effectively combines diverse and dispersed information, enriching feature representation and improving robustness. II. RELATED WORKS There are three common automatic defect detection methods employed in practical production environments for printed circuit board (PCB) surface inspection [3], [4] One approach relies on artificial feature identification and detection. Through human-designed and extracted features such as edges, textures and colors from local image information, traditional algorithms typically utilize classifiers or detectors to determine the presence and localize positions and sizes of targets [5]. While exhibiting advantages of low computational cost and speed, such methods struggle with complex scenarios due to limited generalization capabilities [6], [7]. A second emerging paradigm is deep learning-based detection. By leveraging adaptive extraction and representation of high-dimensional contextual features, these methods demonstrate strong generalization performance and high accuracy [8]. However, sufficient labeled training data is required to complete the model training and learning process [9], [10]. The third method is based on Automatic Optical Inspection (AOI) technology [11], which utilizes high-resolution cameras and advanced image processing algorithms to thoroughly scan the surface of PCBs. This method typically incorporates multi-angle and multi-light source illumination systems to capture detailed defect features [12]. The AOI system compares the captured images against predefined reference templates, identifying surface defects such as open circuits, short circuits, poor solder joints, and more. _A._ _PCB DEFECT DETECTION METHODS_ The deep learning-based detection approach has become a popular research focus due to its ability to alleviate the datahungry nature of traditional methods. Overall model performance depends on specialized feature learning directly from large-scale annotated image datasets, circumventing costly manual engineering of hand-crafted visual features [13], [14]. In traditional image-based PCB defect detection, Onshaunjit and Srinonchat [15] proposed an algorithmic scheme for printed circuit board defect detection and classification that can identify and categorize all 14 known types of PCB defects. By utilizing image subtraction, fuzzy c-means clustering for segmentation and arithmetic operations, circle Hough transform, morphological reconstruction, and connected component labeling, the algorithm achieves 100% defect detection accuracy and 99.05% classification accuracy. Deng et. al [16] proposed a novel Edge-guided Energy-based method (EEDD) for printed circuit board defect detection that focuses on the salient edge features of PCB images. By introducing an energy transformation using edge information and employing SURF for alignment, the method detects defects by measuring energy anomalies pixel-wise, showing superior performance in detecting micro-scale defects and robustness to misalignments compared to state-of-the-art methods. With the rapid development of deep learning-based machine vision in recent years, researchers have developed more generalized models to address the growing needs for defect detection [17]. Adibhatl et al. [18] porposed a deep learning based approach for PCB defect detection, which designs a YOLO model with 24 convolutional layers and 2 fully connected layers for feature extraction and classification., evaluation shows the model achieves 98.79% detection accuracy on PCB samples, demonstrating the effectiveness of this method in automating PCB inspection. Ding et al. [19] proposed a tiny defect detection network (TDD-Net) which leverages multi-scale convolutional features and employs online hard example mining during training, achieved superior performance over compared approaches in terms of mean average precision. Tang et al. [20] proposed an improved PCB defect detection algorithm called PCB-YOLO based on YOLOv5, researchs embedded swin transformer into the backbone network, and constructed a united attention mechanism reduce the interference between the background and defects. Experimental results demonstrate that PCB-YOLO achieves outperforming other algorithms. _B._ _DETR MODELS_ In 2017, Google inc. proposed an excellent method of natural language processing named Transformer [21]. The transformer model, by the integration of the self-attention mechanism and the absence of the recurrent neural network (RNN) sequence structure, facilitates concurrent training of models and effectively captures comprehensive global information. Soon after, researcher proposed a detection pipeline named detection transformer (DETR) to apply the transformer to object detection pioneeringly. In the course of their practice, the researchers discovered, in contrast to CNN-based detection approaches, DETR requires fewer manuall stages, while still achieving comparable detection accuracy [22]. _C._ _DEFORMABLE DETR_ The original DETR model necessitates a substantial number of training epochs and a substantial dataset only can attain satisfactory model fitting during the training stage, and has unsatisfactory performance for relative small object detection. To solve this drawback, Zhu et al. [23] led into the concepts of deformable convolution and multi-scale feature integration within the framework of convolutional neural networks, specifically focusing on the DETR (Detection Transformer) model. Therefore, they proposed a novel variant called Deformable DETR, which incorporates deformable convolutions and multi-scale features to enhance the model’s object detection capabilities [24]. Deformable Attention Module and Multi-scale Deformable Attention Module are crucial modules in the Deformable DETR model. By introducing deformable convolution and deformable attention mechanism, it allows the model to adaptively model the target objects at different positions, better accommodating their deformations and the complexity of the scenes [25]. As another important component in Deformable DETR, Multi-scale Deformable Attention Module, which combines feature maps at multiple scales and leverages deformable attention mechanism to fuse and integrate these scale-specific features [26]. Through crossscale feature fusion, the model can comprehensively capture the contextual information and detail features of the targets, thereby improving the performance of object detection [27]. Their introduction enables the model to better adapt to target deformations and the complexity of scenes, get the utmost out of multi-scale deformable attention module to extracts the different sizes’ feature maps from the stages, leading to improved performance in object detection tasks [28]. Hong et al. [29] proposed a Sparse Block DETR method that significantly improves the accuracy and speed of PCB defect detection by utilizing object set reinforcement and encoder query sparsification, where the former enhances defect saliency through reinforcement encoder tokens and the latter optimizes encoder input by mapping object regions. These two methods were combined and validated on an enhanced PCB dataset, demonstrating that the approach achieves efficient and precise defect detection while maintaining low computational complexity. Liu et al. [30] proposed a defect detection method based on an improved DETR model, called GM-DETR, which integrates GAM global attention with CNN feature extraction and matching to reduce defect information diffusion and enhance global feature interaction, improving the model’s performance in recognizing defects within complex backgrounds. As a local attention mechanism, the deformable attention module enhances the receptive field by replacing normal convolution with deformable convolution. As shown in equation (1) and equation (2), for addressing the issue of attention in DETR being spread across the entire image and not focusing on sparse points, the algorithm pays more attention to certain coefficient values. It adopts K sampled points as the intervals for accumulation. Instead of computing the correlation between the query and all elements as equation (3), attention is now calculated solely based on _zq_, focusing exclusively on _K_ sampled points. where _p_ 0 is each point of the output feature map and corresponds with the convolution center, _pn_ is each offset of _p_ 0 in the field of convolution kernel size. This equation introduces an offset for each point on the basis of the conventional convolution formula, and the offset is generated by the input feature map and another convolution. _DeformAttn_ ( _zq, pq, x_ ) = _M_ _m_ =1 _Wm_ - - <sup>_K_</sup> _k_ =1 _Amqk_ - W <sup>′</sup> _mx_ ( _pq_ + _�pmqk_ ) - (2) In the equation (2), feature map _x_ of size C × H × W as input of network, Where _zq_ is vector channels of all pixel point in the _x_ inputted, _K_ total sampled keys are obtained from the initial sampled key points _pq_ and the offset _�pmqk_, it should be note that the _�pmqk_ cannot be an integer, cause bilinear interpolation is used to obtain the features on this offset. _Attention_ ( _q, k, v_ ) = _softmax_ ( _qk_ <sup>_T_</sup> ) _v_ (3) The Multi-scale Deformable Attention Module is an extension of attention mechanism designed to enhance the model’s perception of features at different scales by learning deformable attention weights. By introducing deformable operations, the module allows the model to adaptively adjust the position and shape of attention, thereby capturing important information in the input feature maps more effectively, it can be represented by equation (4). Such attention mechanism helps the model to better focus on crucial features when dealing with multi-scale inputs, leading to improved task performance. _MSDeformAttn_ ( _zq, pq,_ { _x_ <sup>_l_</sup> } <sup>_L_</sup> _l_ =1 <sup>)</sup> _K_ _k_ =1 = _M_ _m_ =1 _Wm_ _L_ _l_ =1 _Amlqk_ - _W_ <sup>′</sup> _mx_ <sup>_l_</sup> _φlOpq_ + _�pmlqk_ (4) Here, the offset and weights are still obtained from the query vector through a linear layer. Where { _x_ <sup>_l_</sup> } <sup>_L_</sup> _l_ =1 <sup>denote the</sup> multi-scale feature map inputted, and { _x_ <sup>_l_</sup> } ∈ R <sup>_C_</sup> <sup>×</sup> <sup>_H_</sup> <sup>×</sup> <sup>_W_</sup>, _φl_ is a mapping function that maps the positions of reference points back to the corresponding feature map levels. III. METHOD Considering the tiny size of the targets presented by PCB surface defects, the original DERT model falls short in terms of detection accuracy. Thereforce, This paper proposed some effective methods for improving the DERT network model. _A._ _OVERVIEW FRAMEWORK OF PCB-DERT_ The model we constructe, which we’ve designed the PCB Detection Tranformer (PCB-DETR). Among which, Backbone, Encoder, Decoder, and Prediction Heads are the four main parts of the PCB-DETR model. What necessitates particular elucidation is the encoder and predictor heads follow the same design as the original Deformable DETR. The backbone network comprises EfficientNet. These channels _y_ ( _p_ 0) = _pn_ ∈R _W_ ( _pn_ ) · _x_ ( _p_ 0 + _pn_ + _�pn_ ) (1) are used for the purpose of amalgamating and extracting distinctive characteristics from photographs depicting faults in printed circuit boards (PCBs), and then, detector is used to produce the category and location of surface faults. _B._ _IMPROVEMENT OF DEFORMABLE DETR MODEL_ 1) FEATURE EXTRACT NETWORK The backbone plays an important role in object detection models. It is typically used for extracting image features and obtaining feature representations with multiple dimensions. It transforms the input data into more meaningful and discriminative feature representations through layer-by-layer feature extraction and transformation. The extraction of a rich set of usable characteristics at each step of processing is critical in improving the performance of downstream tasks, notably in context of detection. When a broad variety of important attributes is gathered and used, the resulting reference data becomes more informative and helpful for following tasks. DeformableDETR utilizes ResNet50 as its backbone, which is commonly chosen in many object detection models for its strong performance. It outputs three feature maps, namely _C_ 3 - _C_ 5 feature maps. Finally, it outputs a list containing three feature maps, then fed into subsequent modules for object detection. Although ResNet largely addresses the degradation problem in deep learning networks, the use of stride-based convolutions to reduce the spatial dimensions of images still leads to significant loss of spatial information. Additionally, ResNet has limited receptive field size and lacks interaction between channels. EfficientNet has stronger feature extraction capabilities and fewer parameters than ResNet, and can learn deeper level semantic information. Therefore, we used the lightweight network EfficientNet to replace the original ResNet in Deformable-DETR as the feature extract network. The key structure of the EfficientNet network is the Mobile Inverted Bottleneck Convolution (MBConv) module. MBConv is a unique feature extraction structure in the EfficientNet network. It combines depthwise separable convolution and attention mechanism in an inverted residual architecture, as illustrated in Figure. EfficientNet adopts a multi-dimensional mixed scaling method through compound model expansion to obtain scaling coefficients that can effectively balance width, depth and resolution. Based on the baseline model EfficientNet-B0 obtained through neural architecture search, By increasing the scaling factor, the three dimensions of the basic baseline model are simultaneously expanded to obtain the EfficientNet-B1 to EfficientNet-B7 network models. While there are multiple versions of EfficientNet with different structures, the lower versions of EfficientNet are suitable for use with low resolution image inputs, and the higher versions have problems such as difficulty in training and overfitting due to too many parameters. Therefore, considering that the resolution of images in the PCB surface defect dataset is relatively high, this paper selects the EfficientNet-B5 network as the baseline network for improvement. EfficientNet-B5 is a version within the EfficientNet series. Compared to EfficientNet-B0, it has increased depth, width, and resolution to provide enhanced expressive power and improved performance. The original EfficientNet-B5 structure includes 28 MBConv modules, 1 global average pooling layer and 1 classification layer, as shown in the Table 1. TABLE 1. Structure of EfficientNet-B5. _C._ _SPATIAL ATTENTION OFFSET MODULE_ While traditional attention mechanisms are highly effective at capturing contextual semantic information from feature maps, they incur substantial computational costs and significant memory usage because of the requirement to compute pairwise token interactions across all spatial positions. In order to address the challenge of detecting small and dispersed targets, such as PCB surface defects, we designed a novel attention offset module specifically designed to enhance the detection accuracy of small targets by dynamically adjusting the focus of the spatial attention map, especially in PCB surface defect. This module aims to overcome the inherent limitations of traditional spatial attention mechanisms when applied to the detection of small defects. The development of this module is grounded in the following rationale: High-level semantic feature maps contain probabilistic information for each pixel, which can be aggregated into a spatial attention map representing the prior spatial distribution of targets within the image. However, conventional spatial attention mechanisms often suffer from a reliance on local features, limiting their ability to adequately encompass the entire target region. To mitigate this limitation, the proposed spatial attention offset module comprises two complementary sub-modules: an offset branch and a residual branch. These sub-modules collaboratively enhance the generation of spatial attention maps, thereby improving the network’s capability to accurately detect small targets across the image, as shown in Figure 2. Before applying the spatial attention offset module, multiscale feature extraction is performed on the input image. Let _X_ represent the input image, { _F_ 1 _, F_ 2 _, . . ., FL_ } represent a series of multi-scale feature maps extracted from a deep FIGURE 2. The details of the spatial attention offset module in decoder layer. backbone network, and _L_ be the number of layers in the network. with the adjusted spatial attention map through weighted summation, forming a hybrid attention map. This design not only prevents information loss due to excessive focus during the offset process but also provides supplementary structural information about the target. In the residual branch, we need to weight the original spatial attention map to maintain the original attention distribution, as shown in Equation (8). _A_ <sup>′′</sup> = _α_ - _A_ + (1 − _α_ ) · _A_ <sup>′</sup> (8) In this expression, _α_ refers to a learnable weight that can be dynamically adjusted to balance the original attention map and the updated attention map. Let _Al_ be the attention map of the feature map from the _l_ - _th_ layer after passing through the residual branch, given by Equation (9): _,_ _l_ ∈{1 _, . . ., L_ } (5) _F_ 1 = _R_ 1 - _l_ −1 _�l,_ ⊕ _sj_ _j_ =1 <sup>_Dl_</sup> <sup>−</sup> <sup>_j_</sup> _sj_ <sup>(</sup> <sup>_Fj_</sup> <sup>)</sup> <sup>_l_</sup> <sup>−</sup> <sup>_j_</sup> In Equation (5), _R_ 1 be the feature extraction function of the _l_ - _th_ layer, _�l_ be its corresponding parameters, _D_ <sup>_l_</sup> _sj_ <sup>−</sup> <sup>_j_</sup> <sup>(</sup> <sup>_Fj_</sup> <sup>) is</sup> the downsampling function from one layer to another, and ⊕ represent the feature concatenation operation. In the offset branch, we extract the intrinsic offset information from the existing spatial attention map through two consecutive convolutional layers. This information reflects the direction and magnitude of the attention shift required to better cover the target area. - _l_ _Al_ = _σ_ ( _k_ =1 _ωlk_ - _Conv_ ( _ηlk_ _, Fk_ )) _,_ _l_ ∈{1 _, . . ., L_ } (6) _Al_ = _Sigmoid_ ( _Conv_ ( _Fl_ <sup>_D_</sup> _l_ <sup>_D, φ_</sup> _l_ <sup>_A_</sup> _l_ <sup>_A_</sup> <sup>))</sup> (9) In Equation (6), _Al_ is the attention map of the _l_ - _th_ layer, _σ_ is the activation function, _ωlk_ and _ηlk_ are the weights and biases of the convolutional layers, respectively, and _f_ is the convolution operation. Subsequently, in the residual branch, a convolutional layer _Conv_ and subsequent processing steps are used to calculate the spatial offset for each pixel, represented as a 2 _D_ vector field _V_ . After obtaining the spatial offsets, each pixel in the spatial attention map needs to be adjusted according to the vector field _V_, generating the updated attention map _A_ <sup>′</sup>, which is represented by the Equation (7): _A_ <sup>′</sup> ( _x, y_ ) = _A_ ( _x_ + _Vx_ ( _x, y_ ) _, y_ + _Vy_ ( _x, y_ )) (7) Here, ( _x, y_ ) are the coordinates of a pixel in the original spatial attention map _A_, and _Vx_ and _Vy_ represent the components of the vector field in the x and y directions, respectively. During the convolutional calculation, there may be a loss of valuable information. To compensate for this loss, a residual branch is introduced in this section. This branch preserves part of the original spatial attention map and combines it Here, _Sigmoid_ is Sigmoid activation function, _, φl_ <sup>_A_</sup> <sup>repre-</sup> sents the parameters of the attention module in the _l_ - _th_ layer. The calculation formula for the feature map after attention offset is given by Equation (10). _Fl_ <sup>_A_</sup> _l_ <sup>_A_</sup> <sup>=</sup> <sup>_F_</sup> _l_ <sup>_D_</sup> _l_ <sup>_D_</sup> <sup>⊗</sup> <sup>_Al_</sup> (10) Here, ⊗ represents the element-wise multiplication. Finally, after the dual adjustments from the offset branch and the residual branch, pixel-wise multiplication is performed between the spatial attention map and the high-level semantic feature map. In Summary, the Spatial Attention Offset Module discards the typically redundant traditional spatial attention mechanisms, as well as more complex approaches like multihead self-attention. Instead, we leverage the sparsity of defect distribution in PCBs, focusing on prioritizing defect detection. This approach enhances the model’s ability to detect defects in PCB surface scenarios without excessively increasing complexity. It not only improves the detection accuracy of small targets but also, due to its simple structure, can be easily integrated into existing object detection frameworks without introducing excessive computational complexity. This allows the module to be effective even in resource-constrained environments. IV. EXPERIMENTAL RESULTS AND ANALYSIS 1) EVALUATION METRICS This paper employs several key evaluation metrics, including Precision, Recall, mean Average Precision (mAP), and a specialized metric known as Image-recall for defect detection tasks. These metrics provide a comprehensive assessment of the model’s performance in various scenarios, particularly in its ability to detect defects at the image level. Firstly, Precision measures the model’s accuracy in predicting positive classes by calculating the proportion of true positives (TP) among all samples predicted as positive. Precision is especially important for reducing false positives (FP) and helps the model focus on improving the accuracy of positive predictions. Secondly, Recall assesses the model’s ability to identify all actual positive samples by calculating the proportion of true positives in the total actual positives. When reducing false negatives (FN) is crucial, recall becomes important, ensuring that the model does not miss any positive instances. Image-recall is a specialized evaluation metric that focuses on the model’s ability to detect defects at the image level. Unlike traditional recall, Image-recall measures whether the model can accurately identify whether an entire image contains defects. It calculates the proportion of correctly identified defective images out of all actual defective images. This is critical in defect detection tasks and provides an effective measure of the model’s performance in detecting defective images. Additionally, Average Precision (AP) is a commonly used metric to evaluate object detection performance by calculating the area under the precision-recall curve for each class. To further assess the model’s performance in multiclass object detection tasks, mean Average Precision (mAP) is used, which represents the average AP across all classes. mAP50 is the mAP at an Intersection over Union (IoU) threshold of 50%, while mAP50-95 averages mAP across IoU thresholds ranging from 50% to 95%, providing a more rigorous and detailed evaluation of the model’s performance. The specific formulas for these evaluation metrics are as follows: _<u>TP</u>_ _Precision_ = (11) _TP_ + _FP_ _<u>TP</u>_ _Recall_ = (12) _TP_ + _FN_ _<u>TPI</u>_ _ImageRecall_ = (13) _TPI_ + _FNI_ where _TPI_ (True Positive Images) refers to the number of images correctly identified as containing defects, and _FNI_ (False Negative Images) refers to images incorrectly classified as not containing defects. It is important to emphasize that Image-Recall is a critical metric for PCB defect detection. As long as defects are present on the PCB surface, it indicates that the PCB is a defective product from the manufacturing process and should be removed from the production line. In other words, Image-Recall is a more suitable evaluation metric for defect detection, as the industrial sector prioritizes determining whether a product has defects over precisely locating them. - 1 _AP_ = _P_ ( _R_ ) _dR_ (14) 0 where _P_ ( _R_ ) is the precision as a function of recall. _mAP_ = <sup><u>1</u></sup> _C_ _C_ _i_ =1 _APi_ (15) where _C_ is the total number of categories, and _APi_ is the Average Precision for each category. Using these metrics, this paper provides a more comprehensive evaluation of the model’s overall performance, particularly its effectiveness in defect detection tasks. 2) PERFORMANCE COMPARISON EXPERIMENTS WITH OTHER MAINSTREAM MODEL We utilized the PCB-DETR model and conducted multiple rounds of training on the PKU-Market-PCB dataset, which was randomly divided into training sets. Throughout the training process, we continuously optimized the model to enhance its performance. After comparing and evaluating the results, we selected the best weights as the final weights of the model. These weights were then used for image detection tasks on the test dataset, ensuring accurate detection capabilities. In order to better assess the model’s ability to perceive defects in the inspected images, we designed the dataset based on the defect ratio observed in actual production processes. Specifically, we reconstructed the dataset with 10% of the images containing defects and 90% without defects. This adjustment reflects the real-world scenario where defective products are relatively rare. To further validate the performance of the PCB-DETR algorithm, we utilized multiple evaluation metrics such as the recall rate, mAP, and image-recall, comparing its prediction results with other mainstream object detection models on the PCB surface defect dataset. The results of this comparison are presented in Table 2. These metrics provide a comprehensive view of the model’s detection ability, particularly in handling the imbalance between defective and non-defective samples, which is a crucial aspect in real industrial applications. The comparison table clearly demonstrates that PCBDETR achieves superior performance compared to other mainstream algorithms. It consistently outperforms models such as Faster R-CNN, YOLOv3, and the original Deformable-DETR across various metrics. 3) PERFORMANCE COMPARISON EXPERIMENTS WITH ORIGINAL DEFORMABLE-DETR To evaluate the effectiveness of the proposed method, we conducted performance comparison experiments between FIGURE 3. Comparison of Original Deformable-DETR and PCB-DETR in missing hole of PKU-Market-PCB datasets. (a) Original Deformable-DETR; (b) PCB-DETR. FIGURE 4. Comparison of YOLOv7 and PCB-DETR in short of PKU-Market-PCB datasets. (a) YOLOv7; (b) PCB-DETR. TABLE 2. Comparison results of different methods under the PKU-Market-PCB defect dataset. our improved model and the original Deformable-DETR. The experiments were performed on a standard defect detection dataset, with a specific focus on detecting small and complex defects, such as those encountered missing hole in printed circuit boards (PCBs). Both models were trained under identical conditions, including the same training dataset, optimizer, learning rate schedule, and data augmentation techniques, ensuring a fair comparison. Key performance metrics such as mean Average Precision (mAP), precision, recall, and inference speed were utilized to measure the effectiveness of the models. The results demonstrate that the improved model significantly outperforms the original Deformable-DETR across all metrics. Specifically, our model achieved a 3.6% increase in mAP@0.5 than original Deformable-DETR, highlighting its superior ability to detect small and scattered defects. Additionally, the model achieved a 15.2% reduction in inference time, demonstrating its improved computational efficiency, which is critical in real-time defect detection applications. The performance improvements can be largely attributed to two key modifications. First, the original backbone network was replaced with EfficientNet, which provides a better balance between accuracy and computational efficiency through optimized scaling of depth, width, and resolution. This change allowed for more efficient feature extraction across different scales. Second, we introduced the Spatial Attention Offset Module, which dynamically adjusts the spatial attention maps to better capture small and dispersed targets, improving the model’s ability to focus on critical areas in the image. These enhancements together contribute to the overall superior performance, as evidenced by the improved accuracy and faster inference times. These changes make the proposed model highly suitable for industrial defect detection applications, particularly in scenarios where both precision and speed are paramount. The comparison of detection results and performance metrics is illustrated in Figures 3 and Figures 4. By applying different algorithms to detect defects on the same defective image, it can be observed that our PCB-DETR model is able to detect the defect locations more accurately. V. CONCLUSION In this paper, we proposed an enhanced PCB defect detection model, PCB-DETR, which was rigorously trained and optimized on the PKU-Market-PCB dataset. By comparing multiple mainstream object detection models, including Faster R-CNN, YOLOv3, and the original DeformableDETR, our model demonstrated significant improvements in detection accuracy. Specifically, PCB-DETR achieved up to 3.6% higher detection accuracy on the dataset, emphasizing its superior performance in detecting small and complex defects. Key to these performance gains were two primary modifications: replacing the original backbone with EfficientNet, which optimizes feature extraction across different scales, and introducing the Spatial Attention Offset Module, which dynamically adjusts the attention focus to better capture small and dispersed defects. These improvements not only enhanced the model’s accuracy but also significantly reduced inference time by 15.2%, making it more suitable for realtime defect detection applications. The extensive performance comparison experiments confirmed the advantages of our approach, with PCB-DETR excelling in terms of precision, recall, image-recall, and mAP, particularly in challenging defect detection tasks such as those found in PCB surface defects and road surface potholes. Overall, the proposed model offers a robust and efficient solution for industrial defect detection, capable of balancing high accuracy and computational efficiency in scenarios where both are critical. REFERENCES [1] Y. Yang and H. Kang, ‘‘An enhanced detection method of PCB defect based on improved YOLOv7,’’ _Electronics_, vol. 12, no. 9, p. 2120, May 2023. [2] C.-J. Li, Z. Qu, S.-Y. Wang, K.-H. Bao, and S.-Y. Wang, ‘‘A method of defect detection for focal hard samples PCB based on extended FPN model,’’ _IEEE_ _Trans._ _Compon.,_ _Packag.,_ _Manuf._ _Technol._, vol. 12, no. 2, pp. 217–227, Feb. 2022. [3] I.-C. Chen, R.-C. Hwang, and H.-C. Huang, ‘‘PCB defect detection based on deep learning algorithm,’’ _Processes_, vol. 11, no. 3, p. 775, Mar. 2023. [4] D. I. Ural and A. Sezen, ‘‘Research on PCB defect detection using artificial intelligence: A systematic mapping study,’’ _Evol. Intell._, vol. 17, nos. 5–6, pp. 3101–3111, Oct. 2024. [5] K. Qiu, L. Tian, and P. Wang, ‘‘An effective framework of automated visual surface defect detection for metal parts,’’ _IEEE Sensors J._, vol. 21, no. 18, pp. 20412–20420, Sep. 2021. [6] R. Li, B. Xue, K. Zhao, H. Chu, and B. Jiao, ‘‘PCB defect recognition and elimination based on secondary error and statistical histogram,’’ in _Proc._ _Int._ _Wireless_ _Commun._ _Mobile_ _Comput._ _(IWCMC)_, Jun. 2020, pp. 1981–1984. [7] Y. Gao, J. Lin, J. Xie, and Z. Ning, ‘‘A real-time defect detection method for digital signal processing of industrial inspection applications,’’ _IEEE_ _Trans. Ind. Informat._, vol. 17, no. 5, pp. 3450–3459, May 2021. [8] Y. Wu, L. Zheng, and E. Chen, ‘‘EEMNet: An end-to-end efficient model for PCB surface tiny defect detection,’’ _Int._ _J._ _Mach._ _Learn._ _Cybern._, pp. 1–16, Jun. 2024. [9] X. Zhao, Y. Zhao, S. Hu, H. Wang, Y. Zhang, and W. Ming, ‘‘Progress in active infrared imaging for defect detection in the renewable and electronic industries,’’ _Sensors_, vol. 23, no. 21, p. 8780, Oct. 2023. [10] S. B. Jha and R. F. Babiceanu, ‘‘Deep CNN-based visual defect detection: Survey of current literature,’’ _Comput. Ind._, vol. 148, Jun. 2023, Art. no. 103911. [11] M. Noroozi, J. Ghadermazi, A. Shah, and J. L. Zayas-Castro, ‘‘Toward optimal defect detection in assembled printed circuit boards under adverse conditions,’’ _IEEE Access_, vol. 11, pp. 127119–127131, 2023. [12] W. Dai, A. Mujeeb, M. Erdt, and A. Sourin, ‘‘Soldering defect detection in automatic optical inspection,’’ _Adv. Eng. Informat._, vol. 43, Jan. 2020, Art. no. 101004. [13] Q. Ling and N. A. M. Isa, ‘‘Printed circuit board defect detection methods based on image processing, machine learning and deep learning: A survey,’’ _IEEE Access_, vol. 11, pp. 15921–15944, 2023. [14] Y. Zhou, M. Yuan, J. Zhang, G. Ding, and S. Qin, ‘‘Review of vision-based defect detection research and its perspectives for printed circuit board,’’ _J. Manuf. Syst._, vol. 70, pp. 557–578, Oct. 2023. [15] J. Onshaunjit and J. Srinonchat, ‘‘Algorithmic scheme for concurrent detection and classification of printed circuit board defects,’’ _Comput._ _Mater. Continua_, vol. 71, no. 1, pp. 1–13, 2022. [16] S. Deng, L. Deng, T. Sun, S. Yu, L. Wang, B. Chen, H. Hu, Y. Xie, H. Yin, J. Xiao, X. Cui, Y. Fu, X. Tang, R. Song, L. Li, S. Xiao, Y. Li, and Y. Li, ‘‘EEDD: Edge-guided energy-based PCB defect detection,’’ _Electronics_, vol. 12, no. 10, p. 2306, May 2023. [17] 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,’’ _IEEE Trans. Instrum. Meas._, vol. 71, pp. 1–14, 2022. [18] V. A. Adibhatla, H.-C. Chih, C.-C. Hsu, J. Cheng, M. F. Abbod, and J.-S. Shieh, ‘‘Defect detection in printed circuit boards using you-onlylook-once convolutional neural networks,’’ _Electronics_, vol. 9, no. 9, p. 1547, Sep. 2020. [19] R. Ding, L. Dai, G. Li, and H. Liu, ‘‘TDD-Net: A tiny defect detection network for printed circuit boards,’’ _CAAI_ _Trans._ _Intell._ _Technol._, vol. 4, no. 2, pp. 110–116, Jun. 2019. [20] J. Tang, S. Liu, D. Zhao, L. Tang, W. Zou, and B. Zheng, ‘‘PCB-YOLO: An improved detection algorithm of PCB surface defects based on YOLOv5,’’ _Sustainability_, vol. 15, no. 7, p. 5963, Mar. 2023. [21] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, ‘‘Attention is all you need,’’ in _Proc._ _Adv._ _Neural Inf. Process. Syst._, vol. 30, 2017, pp. 1–11. [22] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko, ‘‘End-to-end object detection with transformers,’’ in _Proc._ _Eur. Conf. Comput. Vis._ Cham, Switzerland: Springer, 2020, pp. 213–229. [23] X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and J. Dai, ‘‘Deformable DETR: Deformable transformers for end-to-end object detection,’’ 2020, _arXiv:2010.04159_ . [24] Z. Wang, J. Yao, C. Zeng, L. Li, and C. Tan, ‘‘Students’ classroom behavior detection system incorporating deformable DETR with Swin transformer and light-weight feature pyramid network,’’ _Systems_, vol. 11, no. 7, p. 372, Jul. 2023. [25] Z. Xia, X. Pan, S. Song, L. E. Li, and G. Huang, ‘‘Vision transformer with deformable attention,’’ in _Proc. IEEE/CVF Conf. Comput. Vis. Pattern_ _Recognit. (CVPR)_, Jun. 2022, pp. 4784–4793. [26] T. Liang and G. Zeng, ‘‘FSH-DETR: An efficient end-to-end fire smoke and human detection based on a deformable detection transformer (DETR),’’ _Sensors_, vol. 24, no. 13, p. 4077, Jun. 2024. [27] Z. He, Y. He, and W. Cao, ‘‘Deformable image registration with attention guided fusion of multi-scale deformation fields,’’ _Appl._ _Intell._, vol. 53, no. 3, pp. 2936–2950, Feb. 2023. [28] P.-C. Hu, S.-B. Chen, L.-L. Huang, G.-Z. Wang, J. Tang, and B. Luo, ‘‘Road extraction by multiscale deformable transformer from remote sensing images,’’ _IEEE Geosci. Remote Sens. Lett._, vol. 20, pp. 1–5, 2023. [29] J. Hong, J. Xie, and C. Yang, ‘‘Sparse block DETR: Precise and speedy end-to-end detector for pcb defect detection,’’ in _Proc._ _Int._ _Conf._ _Artif._ _Neural Netw._ Cham, Switzerland: Springer, 2023, pp. 281–292. [30] X. Liu, X. Yang, L. Shao, X. Wang, Q. Gao, and H. Shi, ‘‘GM-DETR: Research on a defect detection method based on improved DETR,’’ _Sensors_, vol. 24, no. 11, p. 3610, Jun. 2024. QIFENG LI received the B.S. degree in software engineering from Guilin University of Electronic Technology, Guilin, China, and the M.S. degree in software engineering from Guangxi Normal University. He is currently with the School of Computer Engineering, Guangzhou City University of Technology, Guangzhou, China. His research interests include computer vision, object detection, deep learning, and big data. LIHAO WU received the B.E. degree from Guangdong University of Education, in 2005, and the master’s degree from South China Normal University, in 2008. He is currently a Professor with the School of Computer Engineering, Guangzhou City University of Technology. His research interests include data mining and artificial intelligence technology and their applications. HUANGPEI XIAO received the Doctor of Engineering degree from the School of Computer Engineering, South China University of Technology, in 2008. His research interests include the big data technology, artificial intelligence, and information security. CHUANGMIAN HUANG received the B.E. degree from Jinan University (JNU), in 2005, and the M.E. degree from the South China University of Technology, in 2014. He is currently a Senior with CEPREI. His current research interests include environmental adaptability and reliability evaluation of electronic device.

섹션 본문

섹션 본문이 없습니다.

참고문헌 30건

  1. TDD‐net: a tiny defect detection network for printed circuit boards CAAI Transactions on Intelligence Technology · Institution of Engineering and Technology · 2019 10.1049/trit.2019.0019
  2. Soldering defect detection in automatic optical inspection Advanced Engineering Informatics · Elsevier BV · 2019 10.1016/j.aei.2019.101004
  3. PCB Defect Recognition and Elimination Based on Secondary Error and Statistical Histogram 2022 International Wireless Communications and Mobile Computing (IWCMC) · 2020 10.1109/iwcmc48107.2020.9148132
  4. A Real-Time Defect Detection Method for Digital Signal Processing of Industrial Inspection Applications IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2020 10.1109/tii.2020.3013277
  5. Defect Detection in Printed Circuit Boards Using You-Only-Look-Once Convolutional Neural Networks Electronics · Multidisciplinary Digital Publishing Institute · 2020 10.3390/electronics9091547
  6. Deformable DETR: Deformable Transformers for End-to-End Object Detection 2020
  7. End-to-End Object Detection with Transformers Lecture notes in computer science · Springer Science+Business Media · 2020 10.1007/978-3-030-58452-8_13
  8. An Effective Framework of Automated Visual Surface Defect Detection for Metal Parts IEEE Sensors Journal · IEEE Sensors Council · 2021 10.1109/jsen.2021.3095410
  9. Algorithmic Scheme for Concurrent Detection and Classification of Printed Circuit Board Defects Computers, materials & continua/Computers, materials & continua (Print) · 2021 10.32604/cmc.2022.017698
  10. A Method of Defect Detection for Focal Hard Samples PCB Based on Extended FPN Model IEEE Transactions on Components Packaging and Manufacturing Technology · Institute of Electrical and Electronics Engineers · 2021 10.1109/tcpmt.2021.3136823
  11. A Small-Sized Object Detection Oriented Multi-Scale Feature Fusion Approach With Application to Defect Detection IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2022 10.1109/tim.2022.3153997
  12. Deformable image registration with attention-guided fusion of multi-scale deformation fields Applied Intelligence · Springer Science+Business Media · 2022 10.1007/s10489-022-03659-1
  13. Vision Transformer with Deformable Attention 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · 2022 10.1109/cvpr52688.2022.00475
  14. Printed Circuit Board Defect Detection Methods Based on Image Processing, Machine Learning and Deep Learning: A Survey IEEE Access · Institute of Electrical and Electronics Engineers · 2023 10.1109/access.2023.3245093
  15. PCB Defect Detection Based on Deep Learning Algorithm Processes · Multidisciplinary Digital Publishing Institute · 2023 10.3390/pr11030775
  16. PCB-YOLO: An Improved Detection Algorithm of PCB Surface Defects Based on YOLOv5 Sustainability · Multidisciplinary Digital Publishing Institute · 2023 10.3390/su15075963
  17. Deep CNN-based visual defect detection: Survey of current literature Computers in Industry · Elsevier BV · 2023 10.1016/j.compind.2023.103911
  18. An Enhanced Detection Method of PCB Defect Based on Improved YOLOv7 Electronics · Multidisciplinary Digital Publishing Institute · 2023 10.3390/electronics12092120
  19. EEDD: Edge-Guided Energy-Based PCB Defect Detection Electronics · Multidisciplinary Digital Publishing Institute · 2023 10.3390/electronics12102306
  20. Students’ Classroom Behavior Detection System Incorporating Deformable DETR with Swin Transformer and Light-Weight Feature Pyramid Network Systems · Multidisciplinary Digital Publishing Institute · 2023 10.3390/systems11070372
  21. MizAR 60 for Mizar 50 DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · Schloss Dagstuhl – Leibniz Center for Informatics · 2023 10.4230/lipics.itp.2023.19
  22. Road Extraction by Multiscale Deformable Transformer From Remote Sensing Images IEEE Geoscience and Remote Sensing Letters · Institute of Electrical and Electronics Engineers · 2023 10.1109/lgrs.2023.3299985
  23. Review of vision-based defect detection research and its perspectives for printed circuit board Journal of Manufacturing Systems · Elsevier BV · 2023 10.1016/j.jmsy.2023.08.019
  24. Sparse Block DETR: Precise and Speedy End-to-End Detector for PCB Defect Detection Lecture notes in computer science · Springer Science+Business Media · 2023 10.1007/978-3-031-44207-0_24
  25. Progress in Active Infrared Imaging for Defect Detection in the Renewable and Electronic Industries Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23218780
  26. Toward Optimal Defect Detection in Assembled Printed Circuit Boards Under Adverse Conditions IEEE Access · Institute of Electrical and Electronics Engineers · 2023 10.1109/access.2023.3330142
  27. Research on PCB defect detection using artificial intelligence: a systematic mapping study Evolutionary Intelligence · Springer Science+Business Media · 2024 10.1007/s12065-024-00930-x
  28. GM-DETR: Research on a Defect Detection Method Based on Improved DETR Sensors · Multidisciplinary Digital Publishing Institute · 2024 10.3390/s24113610
  29. EEMNet: an end-to-end efficient model for PCB surface tiny defect detection International Journal of Machine Learning and Cybernetics · Springer Science+Business Media · 2024 10.1007/s13042-024-02264-7
  30. FSH-DETR: An Efficient End-to-End Fire Smoke and Human Detection Based on a Deformable DEtection TRansformer (DETR) Sensors · Multidisciplinary Digital Publishing Institute · 2024 10.3390/s24134077