Abstract
Surface defect detection is a core of industrial product quality control, vital for ensuring product reliability and production efficiency. However, due to diverse types and significant size variations of industrial surface defects—especially minute or complex ones—accurate feature extraction and efficient detection remain major challenges, and existing You-Only-Look-Once (YOLO) methods struggle to meet high-precision demands. This paper proposes a symmetry-aware YOLOv13-based industrial surface defect detection network. First, a Multi-level Feature Enhancement Module (MFEM) is designed, combining a star-shaped architecture with the CBAM attention mechanism to enhance defect feature discriminability via multi-branch feature interaction and nonlinear expression, while compensating for detail loss from multi-layer depth-wise separable convolutions (DSConv). The symmetric dual-branch structure in MFEM improves feature balance and structural consistency. Second, the Spatial Pixel Global Attention (SPGA) module is introduced to supplement detail information during feature pyramid transmission and enhance multi-scale feature fusion efficiency, while maintaining symmetric feature distribution. Third, the HyperACE module is improved using a multi-branch hypergraph structure to enhance long-range dependency modeling and local feature representation. On the GC10-DET dataset, the improved model achieved 69.6% Precision, 66.1% Recall, and 67.0% mAP@50, demonstrating superior performance while maintaining real-time capability.
1. Introduction
Surface defect detection plays a critical role in industrial quality inspection, aiming to identify various surface abnormalities that may compromise product reliability and safety [1]. Due to the complexity and variability of manufacturing processes, industrial product surfaces often exhibit diverse defects such as scratches, oil contamination, cracks, and pits [2]. Accurate and efficient detection of these defects is therefore of great importance for ensuring product quality and reducing economic losses. In recent years, deep learning-based methods have gradually replaced traditional manual inspection and handcrafted feature-based approaches, demonstrating remarkable advantages in detection accuracy and automation.
As a major research focus in industrial vision applications, deep learning-based surface defect detection methods typically rely on convolutional neural networks (CNNs) to learn discriminative visual representations [3]. Existing approaches can be broadly categorized into two-stage and single-stage detection frameworks. Two-stage detectors, such as R-CNN and Fast R-CNN, achieve high accuracy by generating region proposals followed by precise classification and regression. However, their relatively high computational complexity and inference latency limit their applicability in real-time industrial environments [4].
Consequently, single-stage detectors, particularly the YOLO series, have become increasingly popular in industrial surface defect detection due to their high efficiency and end-to-end design [5]. Recent YOLO variants further integrate feature pyramid networks, multi-scale detection strategies, and attention mechanisms to improve detection performance [6]. Despite these advances, applying such general-purpose detectors to industrial surface defect detection still faces several critical challenges.
First, surface defects in industrial products are often extremely small, weakly textured, and irregular in shape. During multi-scale feature extraction and fusion, fine-grained defect features are easily suppressed or overwhelmed by dominant background information, leading to missed detections. Second, industrial inspection scenes usually involve complex backgrounds and defect-like noise, making it difficult for existing models to effectively distinguish true defects from background interference using local features alone. Third, although attention mechanisms have been widely adopted to enhance feature representation, many existing designs introduce considerable computational overhead, which conflicts with the strict efficiency requirements of real-time industrial applications.
These challenges indicate that simply stacking deeper networks or more complex attention modules is insufficient. Instead, it is crucial to enhance defect-related feature representation, improve global–local feature interaction, and maintain computational efficiency simultaneously.
In addition, symmetry plays an important role in visual perception and feature representation. Many industrial defects exhibit local structural symmetry or symmetry-breaking characteristics. Effectively modeling such symmetric or asymmetric patterns can significantly enhance the discriminability between defect regions and complex backgrounds. Therefore, incorporating symmetry-aware feature modeling into detection frameworks is beneficial for improving robustness and accuracy.
Motivated by these observations, this study proposes several targeted improvements for surface defect detection.
- A Multi-level Feature Enhancement Module (MFEM) is designed to strengthen defect-related fine-grained features through continuous feature fusion and saliency-aware representation, thereby improving the visibility of minute defects.
- A lightweight Spatial Pixel Global Attention (SPGA) mechanism is introduced to compensate for fine-detail loss during multi-scale feature transmission by integrating global contextual information with pixel-level responses.
- The HyperACE module is further enhanced using multi-branch convolution and pooling operations, enabling more effective multi-scale and long-range feature aggregation without sacrificing efficiency.
Through these designs, the proposed method aims to address the inherent challenges of industrial surface defect detection while achieving a favorable balance between detection accuracy and real-time performance.
2. Related Work
2.1. Surface Defect Detection
In recent years, deep learning-based algorithms for industrial surface defect detection have been continuously iterated and optimized, aiming to address core challenges such as detection accuracy, real-time performance, lightweight design, and domain adaptability. Zhou et al. [7] focused on the missed detection problem in hot-rolled strip surface defect detection, enhancing multi-scale feature representation and small target feature fusion through cross-layer connections to achieve a balance between lightweight design and detection accuracy. To tackle the difficulty in detecting small targets among surface defects, Zhou et al. [8] enabled convolutional kernels to focus on key image regions via adaptive weight assignment, improving the detection accuracy of small targets under low resolution. Tian et al. [9] combined dynamic snake convolution with a coordinate attention mechanism to enhance feature extraction capability and adaptability to targets of different scales and shapes, thereby solving the problems of low detection accuracy and easy missed detection caused by the small area and indistinct features of surface defects. However, industrial product surfaces usually contain defects of varying scales, which easily lead to significant missed detection. To this end, Fu et al. [10] integrated efficient feature extraction with a contextual anchor attention mechanism to accurately capture key defect features, strengthen the detection capability for defects of different sizes and shapes, optimize the effect of multi-scale feature fusion, and reduce the loss of feature information. Zhang et al. [11] developed a recalibrated feature pyramid network, improving the interaction capability of multi-scale features and the sensitivity to small defects through a bidirectional fusion mechanism of high and low-resolution features. Liu et al. [12] introduced a superpixel-aware corruption strategy before forward diffusion, allowing the model to recover defect masks from corrupted masks and enhancing the model’s ability to correct false predictions; a coarse-to-fine dilation supervision strategy was adopted to locate defect regions in the early stage of decoding and depict clear boundaries in the later stage. To meet the demand for surface defect detection under gradual domain transfer in industrial scenarios, Chen et al. [13] designed an unsupervised continual learning mechanism based on batch streaming, buffers, and sample replay, constructing source domains, intermediate domains, target domains, and fusion domains to alleviate catastrophic forgetting caused by changes in different detection scenarios.
2.2. Attention Mechanism in Surface Defect Detection
In industrial scenarios, the backgrounds of industrial product surfaces are often complex and variable. The attention mechanism can filter out irrelevant information, enabling the model to focus more on feature learning of defects themselves. Based on RT-DETR, Hao et al. [14] introduced an efficient encoder module based on additive attention to adaptively amplify the core features of defects, achieving a balance between accuracy and efficiency in metal surface defect detection. Wu et al. [15] proposed a Transformer architecture combining a dynamic sparse attention mechanism with the SPPF module, optimizing multi-scale feature extraction and information retention for steel surface defects and improving the detection performance of complex defects. Based on YOLOv8, Ni et al. [16] proposed another content-guided attention fusion module that enhances edge capture of steel surface defects, strengthening the model’s multi-scale adaptability and interaction capability between shallow and deep features. Also using YOLOv8 as the framework, Ma et al. [17] incorporated a linear attention mechanism, a selective feature pyramid network, and a lightweight detection head, reducing computational complexity while ensuring the detection accuracy of steel surface defects to meet real-time industrial requirements. Based on YOLOv5, Liu et al. [18] introduced a joint attention block module to optimize feature extraction, small defect capture, and cross-scale feature fusion for PCB surface defects, realizing high-precision real-time detection. Song et al. [19] improved the model by introducing the SimAM attention mechanism, expanding the receptive field, reducing the loss of texture information, and enhancing the model’s target feature extraction capability, specifically addressing the detection challenges of small steel surface defects and indistinct edge features. The model based on the GhostConvolution attention mechanism focuses on the surface defect segmentation of ultrasonic welded wire harnesses, achieving accurate defect segmentation [20]. In addition to industrial defect detection, recent studies in related visual tasks have further highlighted the importance of global–local interaction and saliency-guided feature enhancement. For example, in optical remote sensing image salient object detection, a progressive interaction and saliency-guided enhancement network was proposed to jointly model irregular structures and complex contextual relationships through hierarchical interaction, multi-scale fusion, and saliency-aware attention mechanisms [21].
2.3. Application Status of YOLO Series in Industrial Defect Detection
In recent years, YOLOv8 and its subsequent versions have been widely applied in industrial surface defect detection. By decoupling detection heads, improving feature fusion structures, and adopting lightweight designs, these models achieve a favorable balance between real-time performance and detection accuracy. However, in complex industrial scenarios—particularly when encountering minute defects, low-contrast targets, and intricate textured backgrounds—existing YOLO series models still exhibit significant limitations. To address the issue of varying defect scales, some studies have enhanced the YOLO framework by introducing multi-scale feature fusion and attention mechanisms. Examples include frequency-domain–hollow attention [22], wavelet multi-frequency feature fusion [23], and PyConv with multi-scale attention structures [24], which have partially improved the representation capability for small defects. However, these approaches primarily rely on feature layer stacking or local receptive field expansion, failing to adequately model the global–local interaction between defects and backgrounds. This often leads to suppression of minute defect features in complex textured scenes. In later models, the HyperACE module introduced in the YOLOv13 baseline enhances global semantic information through a channel-adaptive augmentation mechanism, demonstrating strong performance in conventional object detection tasks. Nevertheless, this module primarily relies on channel statistics for feature recalibration, exhibiting limited responsiveness to extremely small, sparsely distributed defect targets. Under complex backgrounds or high-frequency texture interference, defect features are prone to weakening during feature fusion, constraining its effectiveness in high-precision industrial defect detection. Significant performance gaps persist across different model versions for small defect detection [25,26], and most improvement methods rely on task-specific customization to compensate for the lack of micro-defect perception capabilities [27,28]. Therefore, how to further enhance the robust modeling capability for micro-defects and complex backgrounds while maintaining the efficiency of the YOLO framework remains a critical issue that requires urgent attention in current research.
2.4. Research Motivation
Despite the remarkable progress achieved by existing methods, surface defect detection in industrial scenarios still faces several unresolved challenges caused by scale variability, feature ambiguity, and complex backgrounds. First, most existing multi-scale feature fusion strategies primarily focus on feature-level interactions, while lacking continuous enhancement mechanisms and salient representation of defect-specific details. As a result, defect foreground information is not sufficiently emphasized, leading to weak feature discriminability, particularly for small-scale and low-contrast defects. Second, current attention mechanisms are typically designed for local feature refinement or single-dimensional enhancement. During multi-scale feature transmission, they fail to effectively model the complementary relationship between global semantic context and local fine-grained details, which limits feature fusion efficiency and hinders effective global–local feature integration. Third, existing feature aggregation modules struggle to balance detailed feature extraction with long-range contextual modeling. The correlation among multi-scale features and the aggregation capability of long-range contextual information remain insufficient, restricting the representation capacity required for complex defect patterns. Moreover, practical industrial applications impose strict constraints on both detection accuracy and computational efficiency. Achieving a favorable trade-off between lightweight design and high performance, while mitigating feature degradation in complex scenarios, remains an open and critical problem.
3. Methodology
3.1. The Overall Network Structure of the Model
YOLOv13 builds upon the technical foundations of the YOLO series models, introducing the HyperACE hypergraph enhancement module. This module integrates hypergraph learning with feature enhancement, modeling multi-vertex higher-order correlations through learnable hyperedge structures. Simultaneously, it incorporates a message passing mechanism with linear complexity, enriching feature correlation information while avoiding computational blowups. Furthermore, the model adopts the FullPAD end-to-end feature distribution paradigm, precisely routing enhanced features through three independent channels to the backbone, neck, and detection head, thereby optimizing information collaboration within the network.
To enhance the detection accuracy of YOLOv13, we designed an improved surface defect detection network based on YOLOv13, whose architecture is illustrated in Figure 1. First, to enhance the network’s feature extraction capability and address the loss of fine-grained information caused by multiple DSConv layers, we drew inspiration from the star architecture [29] to design an efficient convolutional SConv. During the feature extraction phase, the DSC3k2 and A2C2f modules [6] are employed for feature extraction and feature enhancement. By developing MFEM to refine feature edges and strengthen core features, we integrated it into the DSC3k2 and A2C2f structures. In the DSC3k2 module, we replaced the Bottleneck component with MFEM to form DSC3k2-MFEM. In A2C2F, we discarded the attention mechanism and replaced the ABlock component with MFEM to form C2f-MFEM. This replaces consecutive DSConv layers to improve the model’s feature capture capability. Within the HyperACE hypergraph structure, we further enhance its processing of long-range dependency features by employing a multi-branch saliency enhancement architecture.
Figure 1.
Improved YOLOv13 Network Architecture.
3.2. Multi-Level Feature Enhancement Module
To address the issues of insufficient feature representation and loss of convolutional features caused by DSConv, inspired by prior research, we propose a dual-branch feature fusion enhancement architecture, as shown in Figure 2b. This dual-branch design inherently introduces a form of structural symmetry, where two parallel branches process complementary feature representations in a balanced manner. Such symmetric feature processing enhances the consistency and robustness of feature extraction, enabling the model to better capture both symmetric patterns and symmetry-breaking characteristics of surface defects. MFEM aims to leverage the star-shaped structure of dual branches and the nonlinear expressions from multiple convolutional layers to achieve more efficient feature extraction capabilities.
Figure 2.
MFEM Structure.
Among surface defects in industrial products, multiple defect types exist with significant size variations. Convolutions concatenated in a chain structure alone struggle to balance both global features and local details of defects. To enhance defect detection accuracy, we employ MFEM for more precise feature extraction. MFEM utilizes CBAM in two consecutive branches to capture spatial and channel-wise feature information. First, input features undergo Global Average Pooling (GAP) to aggregate global statistics, followed by feature transformation via SConv. The CBAM attention module then applies adaptive weighting to feature importance across spatial and channel dimensions. Finally, Sigmoid activation functions generate attention weights, which fuse with inter-branch features through element-wise multiplication. For input feature , the salient features are computed as
In SConv, to ensure that the number of input and output channels remains consistent, the feature map is split before being fed into the star-shaped structure, generating the feature map of . Among these, both DSConv and HalfConv yield input . After the concatenation operation, both the input and output of DSConv are . In MFEM, the dimensions and channel numbers of the input and output feature maps are kept identical, while the feature representation is significantly enhanced. When integrating this module into YOLOv13, the channel number design is consistent with that of the baseline model.
Subsequently, features capture local salient features via Global Max Pooling (GMP). Features from the left branch undergo preliminary aggregation through element-wise addition, then pass sequentially through SConv and CBAM modules for refinement and attention enhancement, and finally achieve cross-branch feature integration via element-wise addition before output. MFEM integrates the global perceptuality of GAP with the local saliency of GMP, and combines SConv’s lightweight feature extraction capability with CBAM’s attention modulation mechanism. It achieves refined feature representation in both channel and spatial dimensions, while enhancing feature richness and discriminative power through branch interactions via multiply-add operations. The computational steps are as follows:
Compared to chain structures, star structures [7] can integrate differentiated features captured by multiple branch nodes, enabling multi-path feature fusion. We have integrated a convolutional SConv based on a star structure, thereby enhancing features after pooling. Within each parallel branch, lightweight initial feature extraction and dimensionality reduction are performed sequentially via DSConv, followed by nonlinear feature processing through the HalfConv module. By concatenating complementary feature information from both branches along the channel dimension, the aggregated features subsequently pass through two consecutive DSConv modules to achieve deep feature integration and enhanced expressive capability.
3.3. Spatial Pixel Global Attention
After obtaining the features extracted by the backbone network, we apply Spatial Pixel-level Global Attention (SPGA) to each feature map in the feature fusion pyramid to refine the feature representations. As shown in Figure 3, SPGA employs a multi-branch parallel framework that modulates features using global statistical information. Let the module input be . First, the input features undergo convolution to generate the base intermediate feature . Based on this base feature, the architecture splits into three processing paths. The first branch applies BN to stabilize the distribution. The second branch preserves features to maintain original information. Both are combined via channel concatenation:
Figure 3.
SPGA Structure.
Meanwhile, the third branch is responsible for generating global attention weights. It first captures spatial context through convolution, then uses GAP to reduce the spatial dimension into global features, and finally generates an attention map via the Sigmoid activation function.
Finally, the concatenated features are multiplied by the attention map and integrated through an convolution. SPGA is applied during the transfer from the backbone network to the fusion network, with the base channel count set to . This effectively utilizes the global context to enhance pixel-level features.
Moreover, the multi-branch parallel design of SPGA maintains a symmetric structure in feature transformation, ensuring balanced information flow across different branches. This symmetry-aware attention mechanism improves global-local feature coordination and stabilizes feature responses.
3.4. Improved HyperACE
Meanwhile, improvements are made to HyperACE [6]: with multi-branch parallel processing and hypergraph-based feature enhancement, input features are split into three branches. The left branch undergoes 3 × 3 convolution and GAP, then performs element-wise multiplication with the middle branch’s convolutional output for preliminary modulation. The multiplication-modulated middle-branch features then undergo lightweight transformation via DSConv. Finally, the middle branch’s DSConv-processed features are concatenated with the right branch’s features via hypergraph convolution; multi-branch feature integration is finalized via convolution prior to output. The improved HyperACE structure is shown in Figure 4. Compared with the original HyperACE, the improved architecture captures local spatial detail features more accurately, aggregates global statistical information, and outputs multi-scale detail features while preserving global feature semantics—thus enhancing feature expressiveness and the representation of multi-scale objects in complex scenarios.
Figure 4.
The structure of improved HyperACE.
4. Experiments
4.1. Implementation Details
All experiments were conducted on an NVIDIA RTX 2080 Ti GPU hardware platform. The training image resolution was set to 640 × 640 pixels with a batch size of 8, and the total number of iterations was set to 400. We employed the Adam optimizer with a learning rate of 0.001. Data augmentation was applied by randomly selecting four images for scaling, rotation, flipping, and color transformation. These modified images were then synthesized into a new image and added to the training set.
The first dataset used in this study is the GC10-DET dataset [30]. It comprises 2285 images representing 10 distinct defect categories: Punching (Pu), Weld Line (Wl), Crescent Gap (Cg), Water Stain (Ws), Oil Stain (Os), Silk Stain (Ss), Inclusion (In), Roll Pit (Rp), Crease (Cr), and Waist Fold (Wf). We divided the dataset into training, validation, and test sets at an 8:1:1 ratio.
The second dataset used in this study is the NEU-DET dataset [31]. It comprises 1800 images representing six distinct defect categories: Rolled-in Scale (RS), Patches (Pa), Crazing (Cr), Pitted Surface (PS), Inclusion (In), and Scratches (Sc). We divided the dataset into training, validation, and test sets at an 8:1:1 ratio.
The third dataset used in this study is the PCB dataset. It consists of six defect categories, namely Missing Hole, Mouse Bite, Open Circuit, Short Circuit, Spur, and Spurious Copper, comprising a total of 623 samples. The dataset was partitioned into training, validation, and test sets in an 8:1:1 ratio.
4.2. Evaluation Indicators
To compare the efficiency and inference speed across different models, we conducted tests across three metrics: Parameters (M), GFlops, and FPS. When testing FPS, both the batch size and number of threads were set to 1, and the tests were run across the entire dataset. We evaluate performance using four metrics: mean average precision (mAP@50), Precision, and Recall. The specific calculation rules are as follows:
where represents the number of correctly detected targets among all detection targets, refers to the number of incorrectly detected targets, and refers to the number of actual targets that were not detected by the model. Here, is the Precision–Recall curve, and N is the number of categories in the dataset. The average precision (AP) is calculated as the area under the curve for each category, and mAP is the mean of these AP values across all N categories.
4.3. Result in GC10-DET
We selected YOLOv5, YOLOv8, Yolov9 [32], YOLOv10 [33], YOLOv11, YOLOv12 [34], and YOLOv13—the most widely used and effective basic models in industrial applications—for comparative experiments, and all models had the same configuration. At the same time, we introduced a variety of advanced surface defect detection methods for comparison to verify the progressiveness of our methods. These advanced models are GCNet [35], SLF [36], D-FINE [37], MDCA [38], GD-YOLO [39] and YOLO-HDEW [40].
The comparative experimental results are shown in Table 1, where the results of our method are highlighted in bold. The improved YOLOv13 achieves the best overall performance on this dataset, achieving 69.6% Precision, 66.1% Recall, and 67.0% mAP@50. Compared to the baseline YOLOv13 model, the proposed method achieves improvements of 4.8%, 1.4%, and 1.8% in Precision, Recall, and mAP@50, respectively. When compared to the state-of-the-art and industrially proven YOLOv8, the proposed method exhibits a slight decrease in Precision but achieves significant gains of 6.5% and 2.4% in Recall and mAP@50, respectively. The detection results for surface defects across different models are shown in Figure 5. It can be observed that for the same image recognition task, the improved YOLOv13 model achieves higher confidence scores, more complete prediction boxes, and higher-quality prediction results. Meanwhile, it only requires a slight increase in computational resources for Parameters and GFlops. The FPS reaches 115, representing a detection speed reduction in only 3.3% compared to the YOLOv13 model, while mAP@50 improves by 1.8%. Compared with other mainstream defect detection models, the improved YOLOv13 also maintains a significant competitive advantage. Compared with the best-performing D-FINE, our method has some disadvantages in Precision, but Recall and mAP@50 have significant improvements. FPS has a significant advantage in inference speed.
Table 1.
Comparative experimental results of various models on GC10-DET.
Figure 5.
Performance of various models on different defect categories in the GC10-DET dataset.
Although our approach achieves the highest mAP@50 value, its Precision is surpassed by models such as YOLOv8n and YOLOv11n. YOLOv13n also exhibits slightly lower Precision than other models on this dataset. This reflects the inherent Precision–Recall trade-off inherent in object detection tasks. Through architectural optimization, our model captures true positive defect instances more comprehensively, achieving a significantly higher Recall (0.661) than YOLOv8n (0.596) and YOLOv11n (0.558). In industrial surface defect detection scenarios, maximizing Recall is typically prioritized to reduce the risk of missing critical defects, even at the cost of a slight increase in false positives. The superior mAP@50 metric (which synthesizes Precision and Recall performance across all confidence thresholds) confirms the overall robustness and effectiveness of this approach.
4.4. Result in NEU-DET
In the NEU-DET dataset, we conducted comparative experiments using the same model as in the NEU-DET experiment. The experimental results are shown in Table 2, where the results of our method are highlighted in bold.
Table 2.
Comparative experimental results of various models on NEU-DET.
The comparative experimental results are shown in Table 2. Our proposed method achieves the best overall performance on this dataset, achieving 76.9% Precision, 71.5% Recall, and 77.6% mAP@50. Compared to the baseline YOLOv13n model, the proposed method achieves improvements of 9.8%, 2.6%, and 2.9% in Precision, Recall, and mAP@50, respectively. When compared to the state-of-the-art and industrially proven YOLOv8n, the proposed method exhibits significant gains of 5.6%, 0.5%, and 2.5% in Precision, Recall, and mAP@50, respectively. The detection results for surface defects across different models are shown in Figure 6. It can be observed that for the same image recognition task, our method achieves higher confidence scores, more complete prediction boxes, and higher-quality prediction results. Meanwhile, it only requires a slight increase in computational resources for Parameters and GFlops. The FPS reaches 115, representing a detection speed reduction of only 3.3% compared to the YOLOv13n model, while mAP@50 improves by 2.9%. Compared with other mainstream defect detection models, our method also maintains a significant competitive advantage. Compared with the competitive D-FINE, our method not only achieves improvements in Precision, Recall, and mAP@50 but also has a significant advantage in inference speed.
Figure 6.
Performance of various models on different defect categories in the NEU-DET dataset.
4.5. Result in PCB
In the PCB dataset, we conducted comparative experiments using the same model as in the NEU-DET experiment. The experimental results are shown in Table 3, where the results of our method are highlighted in bold.
Table 3.
Comparative experimental results of various models on PCB.
The comparative experimental results are presented in Table 3. Our proposed method demonstrates the superior overall performance on this dataset, achieving 94.3% Precision, 82.6% Recall, and 89.1% mAP@50. Compared to the baseline YOLOv13n model, our approach leads to improvements of 2.1%, 2.7%, and 3.0% in Precision, Recall, and mAP@50, respectively. When compared to the state-of-the-art YOLO-HDEW, our method shows significant enhancements of 2.8%, and 1.0% in Recall and mAP@50, respectively. The detection results across various models for surface defects are illustrated in Figure 7. It is evident that, for the same image recognition task, our method yields higher confidence scores, more complete prediction boxes, and overall higher-quality predictions.
Figure 7.
Performance of various models on different defect categories in the PCB dataset.
4.6. Ablation Experiment
To demonstrate the overall effectiveness of the improved method, we conducted ablation experiments on the GC10 dataset, and the experimental results are shown in Table 4. “√” denotes the use of the corresponding module.
Table 4.
Experimental results of ablation of various models on GC10.
The study evaluates the impact of MFEM, SPGA, and IHyperACE, both individually and in combination. When activated independently, each module demonstrates a positive effect. The SPGA module yields the most significant individual improvement, achieving a Precision of 0.672, Recall of 0.651, and mAP@50 of 0.659. The MFEM effectively boosts Precision to 0.669. The IHyperACE loss also contributes consistent gains across all metrics. However, as observed in the dual-module combinations, the interactions between modules are not simply additive and can lead to complex trade-offs. Specifically: The MFEM + SPGA combination shows a slight decrease in Precision and Recall compared to using SPGA alone, yet it achieves a higher mAP@50 (0.661). This suggests that while the joint operation may introduce some feature redundancy or oversampling for high-confidence detections, it improves the overall localization quality across different confidence thresholds, which is precisely what mAP measures. The MFEM + IHyperACE combination exhibits a notable drop in Precision (0.627) while Recall and mAP@50 increase. This fluctuation likely occurs because both MFEM (enhancing multi-scale features) and IHyperACE (refining classification boundaries) can make the model more sensitive to challenging or ambiguous regions. This increased sensitivity raises Recall but may also temporarily increase false positives on difficult negatives, thereby depressing Precision.
These observations underscore that the modules are not orthogonal; they interact in a nonlinear manner. The performance of a combination depends on whether their functional focuses—MFEM on feature richness, SPGA on contextual attention, and IHyperACE on decision boundary optimization—complement or temporarily conflict in the high-dimensional feature space. Crucially, the full integration of all three modules (MFEM + SPGA + IHyperACE) achieves the optimal equilibrium, with Precision, Recall, and mAP@50 reaching 0.696, 0.661, and 0.670, respectively. This result indicates that the three modules, when combined, can effectively reconcile their individual biases. The SPGA module provides the necessary contextual prior to modulate the rich features from MFEM, while the IHyperACE loss guides the joint optimization towards a more robust decision boundary. This synergistic integration ultimately yields comprehensive performance that surpasses all other configurations and the base model, achieving the best balance for the practical demands of industrial defect detection.
5. Conclusions
This study focuses on the high-precision requirements for surface defect detection and improves the YOLOv13 network model. By constructing the MFEM, it is applied to enhance the A2C2f and DSC3k2 structures to achieve this goal. Additionally, the SPGA module is utilized during feature transmission from the backbone network to the feature pyramid to enrich the detail information contained within features, thereby preserving defect detail features while acquiring contextual semantic information. Finally, the HyperACE module was enhanced by introducing a multi-branch architecture to accentuate defect feature representation, thereby improving the ability to capture local detail features when conveying high-order contextual semantic information. Although these methods sacrifice some detection speed, they achieve sufficient detection accuracy to meet the high-precision defect detection requirements. Future work will focus on integrating dynamic pruning with quantization compression techniques, aiming to overcome the bottleneck in achieving synergistic optimization between lightweight architecture and high accuracy. In addition, the incorporation of symmetry-aware design principles in feature extraction and attention modeling further improves the structural consistency and robustness of the proposed network.
Author Contributions
Conceptualization, Y.Y. and S.C.; Methodology, Y.Y.; Software, Y.Y.; Validation, S.C. and J.L.; Formal Analysis, Y.Y.; Investigation, Y.Y.; Resources, S.C.; Data Curation, J.L.; Writing—Original Draft Preparation, Y.Y.; Writing—Review and Editing, S.C.; Visualization, Y.Y.; Supervision, J.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The GC10-DET dataset used in this study is publicly available at: https://github.com/lvxiaoming2019/GC10-DET-Metallic-Surface-Defect-Datasets (accessed on 27 February 2026). The NEU-DET dataset used in this study is publicly available at: https://ieee-dataport.org/documents/neu-det (accessed on 27 February 2026). The PCB dataset used in this study is publicly available at: https://robotics.pkusz.edu.cn/resources/dataset/ (accessed on 27 February 2026).
Acknowledgments
The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Guo, S.; Li, D.-A.; Zhao, J.-M.; Tang, B.; Luo, B. MFSF-Net: A Multiscale Feature and Side-Outputs Fusion Network for Pixelwise Catastrophic Optical Damage Detection. IEEE Trans. Instrum. Meas. 2024, 73, 5015810. [Google Scholar] [CrossRef] [Scilit]
- Chen, J.-J.; Chan, I.; Brilakis, I. Shifting research from defect detection to defect modeling in computer vision-based structural health monitoring. Autom. Constr. 2024, 164, 105481. [Google Scholar] [CrossRef] [Scilit]
- Ma, J.; Zhao, Y.-K.; Fan, W.-P.; Liu, J.-H. An Improved YOLOv8 Model for Lotus Seedpod Instance Segmentation in the Lotus Pond Environment. Agronomy 2024, 14, 1325. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Wang, H.-Y.; Yang, F.; Liu, F.; Zeng, L. Attention-based deep learning for chip-surface-defect detection. Int. J. Adv. Manuf. Technol. 2022, 121, 1957–1971. [Google Scholar] [CrossRef] [Scilit]
- Zhu, X.-M.; Wang, S.; Su, J.-Y.; Liu, F.; Zeng, L. High-Speed and Accurate Cascade Detection Method for Chip Surface Defects. IEEE Trans. Instrum. Meas. 2024, 73, 2506612. [Google Scholar] [CrossRef] [Scilit]
- Lei, M.-Q.; Li, S.-Q.; Wu, Y.-H.; Hu, H.; Zhou, Y.; Zheng, X.-H.; Ding, G.-G.; Du, S.-Y.; Wu, Z.-Z.; Gao, Y. YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception. arXiv 2025, arXiv:2506.17733. [Google Scholar] [CrossRef] [Scilit]
- Zhou, M.-R.; Wang, R.-Y.; Chen, Y. PMSE-YOLO: An efficient framework for detecting surface defects of hot-rolled strip steel. Signal Image Video Process. 2025, 19, 534. [Google Scholar] [CrossRef] [Scilit]
- Zhou, H.-X.; Zou, H.; Hu, G.-J. An efficient and lightweight algorithm for detecting surface defects of steel based on SCCI-YOLO. Sci. Rep. 2025, 15, 36276. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tian, J.-H.; Feng, X.-F.; Li, F.; Xian, Q.-L.; Jia, Z.-H.; Liu, J.-L. An improved YOLOv5n algorithm for detecting surface defects in industrial components. Sci. Rep. 2025, 15, 9756. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Fu, G.-Z.; Le, W.-W.; Li, J.-B.; Jiang, Q.-S.; Zhu, Q.-X.; Shen, Y.-H. A fast steel surface defect inspection approach using contextual anchor attention and bidirectional feature pyramid fusion network. Meas. Sci. Technol. 2025, 36, 055002. [Google Scholar] [CrossRef] [Scilit]
- Zhang, S.-J.; Wei, H.-L.; Liu, J.-B.; Tong, H. WRI-YOLO11: A deep learning approach for detecting surface defects in metal shafts. Eng. Res. Express 2025, 7, 025260. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.-Y.; Zhou, J.-N.; Huang, R.; Fang, X.-Y.; Tu, Z.-Z.; Wang, L.-B. DiffRSD: Diffusion-Based and Integrity-Aware RGB-D Rail Surface Defect Inspection. IEEE Trans. Intell. Transp. Syst. 2025, 26, 22716–22727. [Google Scholar] [CrossRef] [Scilit]
- Chen, R.-F.; Li, Z.-W.; Zhao, Z.-Y. A novel method for surface defect inspection: Unsupervised continual learning for gradually varying domains. Eng. Appl. Artif. Intell. 2025, 155, 111150. [Google Scholar] [CrossRef] [Scilit]
- Hao, Z.-C.; Liu, B.; Xu, B.-R. A Lightweight RT-DETR Model for Metal Surface Defect Detection Using Multi-Scale Network and Additive Attention Mechanism. J. Nondestruct. Eval. 2025, 44, 107. [Google Scholar] [CrossRef] [Scilit]
- Wu, S.-L.; Yang, H.; Liao, L.-F.; Song, C.; Fang, Y.-T.; Fu, J.-L.; Li, T. DSAT: A dynamic sparse attention transformer for steel surface defect detection with hierarchical feature fusion. Sci. Rep. 2025, 15, 29198. [Google Scholar] [CrossRef] [Scilit]
- Ni, Y.-F.; Zi, D.-X.; Chen, W.; Wang, S.-H.; Xue, X.-Y. Egc-yolo: Strip steel surface defect detection method based on edge detail enhancement and multiscale feature fusion. J. Real-Time Image Proc. 2025, 22, 65. [Google Scholar] [CrossRef] [Scilit]
- Ma, R.-C.; Chen, J.-L.; Feng, Y.; Zhou, Z.-Y.; Xie, J.-S. ELA-YOLO An efficient method with linear attention for steel surface defect detection during manufacturing. Adv. Eng. Inform. 2025, 65, 103377. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.-W.; Wang, H.-C. MDUA-YOLO: An advanced deep learning approach for PCB surface defect detection. Pattern Anal. Appl. 2025, 28, 164. [Google Scholar] [CrossRef] [Scilit]
- Song, H.-R. RSTD-YOLOv7: A steel surface defect detection based on improved YOLOv7. Sci. Rep. 2025, 15, 19649. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Jing, X.; Zhao, L.; Ren, Y.; Wang, S.; Ye, X.-L.; Zhang, H.-H.; Liang, F.; Abbas, Z.-S. Surface defect segmentation in ultrasonic welding harnesses using GhostConvolution attention mechanism. Mater. Today Commun. 2025, 47, 112840. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.-Z.; Wang, T.; Xue, L.-Y.; Lian, W.-Q.; Tao, R. ORSI Salient Object Detection via Progressive Interaction and Saliency-Guided Enhancement. IEEE Geosci. Remote Sens. Lett. 2026, 23, 6002105. [Google Scholar] [CrossRef] [Scilit]
- Zhou, S.-Y.; Yang, Z.-Y.; Ao, S.-M.; Yan, X.-G. Industrial surface defect detection using hybrid attention mechanism and multiscale feature fusion. Measurement 2026, 257, 119040. [Google Scholar] [CrossRef] [Scilit]
- Guan, L.; Zhang, H.-T.; Zhou, Y.-J.; Du, X.-Y.; Li, M.-X. YOLOv11-WBD: A wavelet-bidirectional network with dilated perception for robust metal surface defect detection. PLoS ONE 2025, 20, e0331025. [Google Scholar] [CrossRef] [Scilit]
- Ruan, S.-F.; Zhan, C.-M.; Liu, B.; Wan, Q.; Song, K.-F. A high precision YOLO model for surface defect detection based on PyConv and CISBA. Sci. Rep. 2025, 15, 15841. [Google Scholar] [CrossRef] [Scilit]
- Chen, J.-S.; Fu, H.-X.; Lin, C.-H.; Liu, X.; Wang, L.-J.; Lin, Y.-H. YOLOPears: A novel benchmark of YOLO object detectors for multi-class pear surface defect detection in quality grading systems. Front. Plant Sci. 2025, 16, 1483824. [Google Scholar] [CrossRef] [Scilit]
- Zeng, Z.-L.; Wang, H.-Y.; Yao, C.; Dong, Z.L.; Cai, S.-M. Optimizing surface defect detection with YOLOv9: The role of advanced backbone models. Front. Artif. Intell. 2025, 8, 1675154. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mohamed, A.; Nacera, Y.; Ahcene, B.; Teta, A.; Belabbaci, E.-O.; Rabehi, A.; Alsabah, Y.-A.; Benghanem, M. Optimized YOLO based model for photovoltaic defect detection in electroluminescence images. Sci. Rep. 2025, 15, 32955. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Z.-M.; Dong, C.-Y.; Wei, Z.; Chen, X.-Y.; Zan, W.-D.; Xue, Y. GCB-YOLO: A Lightweight Algorithm for Wind Turbine Blade Defect Detection. Wind Engery 2025, 28, e70029. [Google Scholar] [CrossRef] [Scilit]
- Ma, X.; Dai, X.-Y.; Bai, Y.; Wang, Y.-Z.; Fu, Y. Rewrite the Stars. arXiv 2024, arXiv:2403.19967. [Google Scholar] [CrossRef] [Scilit]
- Lv, X.-M.; Duan, F.-J.; Jiang, J.-J.; Fu, X.; Gan, L. Deep Metallic Surface Defect Detection: The New Benchmark and Detection Network. Sensors 2020, 20, 1562. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- He, Y.; Song, K.-C.; Meng, Q.-G.; Yan, Y.-H. An End-to-End Steel Surface Defect Detection Approach via Fusing Multiple Hierarchical Features. IEEE Trans. Instrum. Meas. 2020, 69, 1493–1504. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.-Y.; Yeh, I.-H.; Mark Liao, H.-Y. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In Computer Vision—ECCV 2024; Springer: Cham, Switzerland, 2024; Volume 15089. [Google Scholar] [CrossRef] [Scilit]
- Wang, A.; Chen, H.; Liu, L.-H.; Chen, K.; Lin, Z.-J.; Han, J.-G.; Ding, G.-G. YOLOv10: Real-Time End-to-End Object Detection. arXiv 2024, arXiv:2405.14458. [Google Scholar] [CrossRef] [Scilit]
- Tian, Y.-J.; Ye, Q.-X.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar] [CrossRef] [Scilit]
- Liu, G.-H.; Chu, M.-X.; Gong, R.-F.; Zheng, Z.-H. Global attention module and cascade fusion network for steel surface defect etection. Pattern Recognit. 2025, 158, 110979. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Liu, Y.-L.; Guo, X.-Y.; Ling, X.; Geng, Q.-Y. Metal surface defect detection using SLF-YOLO enhanced YOLOv8 model. Sci. Rep. 2025, 15, 11105. [Google Scholar] [CrossRef] [Scilit]
- Peng, Y.-S.; Li, H.-B.; Wu, P.-X.; Zhang, Y.-Y.; Sun, X.-Y.; Wu, F. D-FINE: Redefine regression task in DETRs as fine-grained distribution refinement. arXiv 2024, arXiv:2410.13842. [Google Scholar] [CrossRef] [Scilit]
- Lin, Y.-D.; Pan, S.-W.; Yu, J.; Hong, Y.-D.; Wang, F.-M.; Zheng, L.-X.; Tang, J.-N.; Chen, S.-Y. MDCA-DETR: DETR with multi-channel deformable convolution and coordinate attention for mini-LED wafer surface defects detection. Opt. Laser Eng. 2025, 193, 109082. [Google Scholar] [CrossRef] [Scilit]
- Xu, C.-Y.; Liao, Y.-Y.; Liu, Y.-Q.; Tian, R.-L.; Guo, T. Lightweight rail surface defect detection algorithm based on an improved YOLOv8. Measurement 2025, 242, 115922. [Google Scholar] [CrossRef] [Scilit]
- Song, C.-W.; Zhou, Y.-T.; Ma, Y.-H.; Qi, Q.-S.; Wang, Z.-Y.; Hu, K.-Y. YOLO-HDEW: An Efficient PCB Defect Detection Model. Electronics 2025, 14, 3383. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2026 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.






