Skip to Content
SensorsSensors
  • Article
  • Open Access

27 March 2026

19 Pages

MSAdaNet: An Adaptive Multi-Scale Network for Surface Defect Detection of Smartphone Components

,
,
,
,
,
,
and
1
School of Information Engineering, Jiangxi University of Science and Technology, Ganzhou 341000, China
2
School of Information Engineering, Wenzhou Business College, Wenzhou 325000, China
*
Author to whom correspondence should be addressed.

Abstract

The detection of surface defects on smartphone components is a critical step in quality assurance for industrial manufacturing. However, existing deep learning-based methods struggle with the extreme variations in defect morphology and scale, while labeled training data remains scarce due to the high cost of expert annotation. To address these challenges, we propose a twofold solution. First, we introduce MSAdaNet, a Multi-Scale Adaptive Defect Detection Network, which integrates three novel modules: a Parallel Multi-Scale Feature Aggregation (PMSFA) backbone, a Focusing Diffusion Pyramid Network (FDPN) neck, and a Scale-Adaptive Shared Detection (SASD) head. Second, to combat data scarcity, we propose a novel data generation pipeline, creating the synthetic Smartphone Camera Bezel Dataset (SCBD) of 4936 images. Extensive experiments on both real-world and synthetic datasets validate our approach. On the challenging public SSGD, MSAdaNet achieves a state-of-the-art mAP@0.5 of 54.8%, outperforming prominent frameworks and improving upon the strong YOLOv11m baseline by +10.6 points in mAP@0.5 and +18.3 points in recall. Furthermore, on our synthetic SCBD, the model achieves an impressive 94.0% mAP@0.5, confirming the quality of our data generation pipeline and the robustness of our architecture across different data distributions. Ablation studies systematically confirm the significant contribution of each proposed module, validating MSAdaNet as an effective and efficient solution for industrial defect detection.

1. Introduction

With the proliferation of edge-to-edge displays and multi-camera modules in modern smartphones, the quality control of optical components such as screen glass and camera bezels has become critically important. These glass components are highly susceptible to defects during manufacturing and assembly, including micro-scratches, structural cracks, contamination spots, and coating damage. Such defects not only degrade the surface quality of the product but also directly impair its functional integrity. Consequently, industrial quality inspection standards for smartphone glass components have become increasingly stringent, necessitating high-precision automated defect detection systems. Traditional non-destructive testing methods, like manual visual inspection, are no longer adequate for modern manufacturing demands due to their low efficiency, high labor costs, and poor consistency [1]. Therefore, developing an automated defect detection system using machine vision technology to improve accuracy and efficiency has emerged as a crucial research direction in this field.
Defect detection methods for smartphone components can be broadly classified into two main categories. The first category comprises traditional machine vision methods, which rely on manually designed feature extractors tailored for specific detection tasks [2]. However, due to the limited expressive power of these handcrafted features, their detection performance, stability, and generalization capability are often unsatisfactory when confronted with the diverse morphologies of component defects [3]. The other major category consists of deep learning-based methods. Benefiting from their powerful ability to extract high-level abstract features, these methods generally achieve superior detection performance. In recent research, object detection frameworks have been widely employed for the classification and localization of component defects. In one representative study, Han et al. constructed a dataset for smartphone screen defects and experimentally validated the applicability of several classical object detection frameworks, such as Faster R-CNN, ATSS, and YOLOX [4,5,6,7]. Their results indicate that these frameworks provide a viable technical route for detecting defects on smartphone components.
However, when generic object detection models are directly applied to this task, their performance remains insufficient, largely due to fundamental differences between industrial defect detection and natural image analysis. As illustrated in Figure 1, this task is impeded by three primary challenges. First, unlike natural objects, defects exhibit extreme inter- and intra-class morphological variation, which complicates robust feature extraction. Second, defects span a vast range of scales, from micro-defects occupying only a few pixels to large structural failures that can exceed the limited receptive fields of standard models, necessitating advanced multi-scale feature representation. Finally, the field suffers from severe data scarcity due to the prohibitive cost of manual annotation and the privacy-sensitive nature of industrial data. This bottleneck severely impedes the ability of a model to learn diverse defect patterns and generalize to real-world manufacturing scenarios.
Figure 1. Seven types of defects in Smartphone Screen Glass Dataset (SSGD): (a) Crack, (b) Spot, (c) Broken, (d) Scratch, (e) Light-Leakage, (f) Broken-Membrane, (g) Blot.
To combat these deficiencies, recent research has explored several avenues. While some approaches have incorporated attention mechanisms to improve adaptability, these modules are primarily optimized for salient objects in natural images and thus yield only marginal improvements for the subtle features of industrial defects [8,9,10,11]. Other methods have explored multi-scale feature fusion schemes to handle varying defect sizes; however, their reliance on high-resolution feature maps and global attention modules introduces substantial computational overhead, compromising real-time performance [12,13,14]. In particular, architectures such as FPN and PAN rely on sequential top-down or bottom-up pathways. Consequently, they lack direct interaction between non-adjacent feature levels, which results in accumulated semantic loss when handling the extreme scale differences characteristic of smartphone component defects. Furthermore, these studies are often constrained to a limited set of defect classes, failing to enhance overall system robustness. Therefore, a detection framework that is both highly accurate and efficient, explicitly designed for the unique characteristics of smartphone component defects, is urgently needed.
To address this gap, this paper proposes the Adaptive Multi-Scale Network (MSAdaNet). Our framework integrates a novel backbone and detection head with a Focusing Diffusion Pyramid Network (FDPN) neck [15] to enhance feature extraction for defects of varying shapes and sizes while maintaining real-time inference efficiency. Our primary contributions are as follows:
(1)
We design a novel Parallel Multi-Scale Feature Aggregation (PMSFA) backbone that employs parallel convolutional kernels of varying sizes. This allows the network to effectively capture defect details across multiple scales simultaneously, demonstrating significant advantages in detecting minute defects.
(2)
We introduce a Scale-Adaptive Shared Detection (SASD) head that improves accuracy and localization through cross-task parameter sharing and dynamic, scale-adaptive feature transformations that adjust feature representation according to defect scale.
(3)
We develop a comprehensive data enrichment strategy to address data scarcity, combining synthetic data generation with a systematic augmentation pipeline to robustly expand the training dataset.

3. The Proposed Method

The proposed MSAdaNet framework, illustrated in Figure 2, is designed to address the critical challenge of insufficient and diverse defect samples in the industrial inspection of smartphone components. The framework introduces a novel data synthesis and augmentation pipeline to train a robust deep learning model for accurately identifying defects on both smartphone camera bezels and screen glass.
Figure 2. Overview of the proposed MSAdaNet framework.

3.1. Overall Framework of MSAdaNet

The core of this framework is the MSAdaNet, a single-stage object detection architecture designed to automatically detect and localize defects. As illustrated in Figure 2, the network is composed of three primary modules: a backbone for feature extraction, a neck for multi-scale feature aggregation, and a head for final prediction.
(1)
The backbone network processes input images to extract hierarchical feature maps. We introduce a novel PMSFA module as the core of our backbone. By employing parallel convolutional kernels of varying sizes, the PMSFA is designed to efficiently capture defect details across multiple scales, which is particularly advantageous for detecting minute defects. Residual connections are incorporated into deeper layers to ensure robust feature flow. The depth and width of the backbone are designed to balance accuracy and efficiency, consistent with principles from the YOLO series. A detailed description of the PMSFA module is provided in Section 3.2.
(2)
Feature maps extracted from multiple stages of the backbone are fed into the neck network for multi-scale feature fusion. We utilize the FDPN as the neck module to effectively aggregate features from different scales while maintaining high computational efficiency. Further details are presented in Section 3.3.
(3)
The aggregated feature maps from the neck are then passed to the detection head for final class and bounding box prediction. We propose a SASD head, which introduces two key mechanisms to enhance detection accuracy. First, it employs cross-task parameter sharing between the classification and localization branches, enabling mutual feature learning. Second, it incorporates scale-adaptive feature transformations, which use learnable scale factors to dynamically adjust feature representations based on defect scale. This design significantly improves the ability of the model to accurately localize defects, especially in challenging scenarios involving complex scale distributions. The SASD head is detailed further in Section 3.4.

3.2. Parallel Multi-Scale Feature Aggregation Module

The C3K2 module, the core feature extractor in the YOLOv11 backbone, is sub-optimal for the specific challenges of smartphone component defect detection. Its fixed receptive field struggles with the inherently multi-scale nature of defects, which can range from pixel-level bright spots to linear scratches. Furthermore, its standard bottleneck structure can lead to the loss of fine-grained details, increasing the rate of missed detections for small defects. While existing multi-scale architectures offer partial solutions, Inception incurs substantial computational redundancy by applying standard convolutions across all channels in every parallel branch [40], and the cascaded inter-subset information flow of Res2Net risks diluting fine-grained micro-defect features through inter-scale mixing [41].
To address these limitations, we propose the PMSFA module. As illustrated in Figure 3, this module replaces the C3K2 block in the backbone to enhance multi-scale feature representation while maintaining computational efficiency. The design is based on a “divide-and-conquer” strategy, using a parallel branching architecture to avoid the information attenuation common in deep serial structures.
Figure 3. The structure of the PMSFA module. Different colors are used to visually distinguish feature maps at different stages.
Given an input feature map X ∈ R H × W × C i n , the PMSFA module first applies a 3 × 3 standard convolution for preliminary feature enhancement:
F 0 = σ ( B N C o n v 3 × 3 X ) ∈ R H × W × C o u t
where σ ( ⋅ ) denotes the SiLU activation function and B N ( ⋅ ) represents the batch normalization operation.
Next, the module employs a progressive channel partitioning strategy. The enhanced feature map F 0 is bisected along the channel dimension into F 0 ( 1 ) and F 0 ( 2 ) . The first branch F 0 ( 1 ) is processed by a 5 × 5 depthwise separable convolution to extract medium-scale features:
F 1 = σ ( B N ( D W C o n v 5 × 5 ( F 0 ( 1 ) ) ) ) ∈ R H × W × 1 2 C o u t
where D W C o n v 5 × 5 ( ⋅ ) represents a depthwise convolution. This new feature map F 1 is again bisected into F 1 ( 1 ) and F 1 ( 2 ) . The first half, F 1 ( 1 ) , is then processed by a 7 × 7 depthwise convolution to capture large receptive field features:
F 2 = σ ( B N ( D W C o n v 7 × 7 ( F 1 ( 1 ) ) ) ) ∈ R H × W × 1 4 C o u t
This parallel, non-overlapping processing allows for the extraction of a diverse set of features without redundancy. Following this, the features from all three parallel paths, representing small, medium, and large receptive fields respectively, are aggregated via channel concatenation:
F c o n c a t = C o n c a t ( F 2 , F 1 ( 2 ) , F 0 ( 2 ) ) ∈ R H × W × C o u t
Finally, a 1 × 1 convolution fuses the concatenated features, while a residual connection from the original input is added to preserve information and enhance gradient flow:
F o u t = C o n v 1 × 1 ( F c o n c a t ) + X
By replacing the standard C3K2 module with our PMSFA module, the backbone can construct a rich, hierarchical feature representation better suited to the diverse scales of smartphone defects, while the use of depthwise separable convolutions ensures high computational efficiency.

3.3. Focusing Diffusion Pyramid Network

Standard feature pyramid architectures like FPN and PAN, while foundational, suffer from several limitations in the context of defect detection. Their sequential pathways create large semantic gaps between non-adjacent feature levels, and their uniform fusion operations fail to adaptively select the most discriminative information from each scale. To overcome these limitations, we use a novel neck architecture, the FDPN. The key innovation of this architecture lies in its core building block, the FocusFeature module, which performs direct, parallel fusion of non-adjacent feature levels. As shown in Figure 4, the FDPN architecture is designed for more direct and efficient multi-scale information fusion compared to the PAN structure used in YOLOv11.
Figure 4. The difference between YOLOv11 neck and FDPN.
The core of FDPN is the FocusFeature module, illustrated in Figure 5. It processes inputs from three levels P3/8, P4/16, and P5/32 through two sequential stages: scale alignment and multi-scale fusion with refinement.
Figure 5. The structure of the FocusFeature module.
The first stage, scale alignment, transforms the input features to a common resolution and channel dimension. The high-resolution feature is downsampled using the ADown module. This module first applies average pooling, then splits the result channel-wise into parallel spatial and channel branches. The spatial branch uses a 3 × 3 convolution to capture structural information, while the channel branch employs max pooling and a 1 × 1 convolution to preserve salient features. The outputs are then concatenated, effectively retaining both spatial structure and key channel-wise information. This operation can be summarized as:
F a v g = A v g P o o l 2 × 2 s = 1 P 3
F a v g 1 , F a v g 2 = S p l i t ( F a v g )
F s p a t i a l = C o n v 3 × 3 s = 2 ( F a v g 1 )
F c h a n n e l = C o n v 1 × 1 ( M a x P o o l 3 × 3 s = 2 ( F a v g 2 ) )
F A D o w n = C o n c a t ( F s p a t i a l , F c h a n n e l )
The intermediate-scale feature undergoes a lightweight 1 × 1 convolution for channel compression:
F m i d = C o n v 1 × 1 ( P 4 )
The low-resolution feature is brought to the target resolution via a 1 × 1 convolution followed by 2× bilinear upsampling:
F u p = C o n v 1 × 1 ( U p s a m p l e 2 × ( P 5 ) )
Once aligned, the three feature streams F A D o w n , F m i d , and F u p are concatenated into a single feature map F f u s e d . This unified representation is then processed through a residual block designed for multi-scale feature enhancement. First, parallel depthwise convolutions with multiple kernel sizes K = {5, 7, 9, 11} are applied to capture defect patterns of various sizes, and the results are refined with a pointwise convolution:
F e n h a n c e d = F f u s e d + ∑ k ϵ K D W C o n v k × k ( F f u s e d )
F f o c u s e d = P W C o n v ( F e n h a n c e d )
A residual connection is then added to combine the refined features with the original concatenated map, facilitating gradient flow and enabling the learning of fine-grained variations:
F o u t = F f u s e d + F f o c u s e d
This architectural design offers several key advantages. First, the direct fusion of non-adjacent pyramid levels reduces information loss and computational cost. Second, the multi-kernel depthwise convolution provides adaptive receptive fields to capture defects across a wide scale range, from pixel-level anomalies to large structural defects. Finally, the dual-pooling operation of the ADown module effectively retains both detailed texture and semantic information during the downsampling process.

3.4. Scale-Adaptive Shared Detection Head

The standard YOLOv11 detection head suffers from two primary drawbacks for smartphone component defect detection. First, its independent branches process multi-scale features in isolation, making them scale-agnostic and unable to adapt to the fact that small defects require fine spatial detail while large defects demand high-level semantic context. Second, the complete separation of classification and localization tasks prevents collaborative feature learning between these two closely related objectives.
To address these issues, we propose the SASD, which introduces cross-task parameter sharing and a scale-adaptive regression mechanism. Inspired by the per-level trainable scalars in FCOS for scale-aware regression [42], SASD extends this idea by applying learnable scale factors exclusively to the regression branch within a GroupNorm-based shared convolutional architecture. This enables precise regression calibration at each detection scale while maintaining parameter efficiency. The architecture, detailed in Figure 6, first creates a unified feature space and then performs decoupled predictions. Given the multi-scale feature maps { F i } from the FDPN neck, the SASD head first projects them into a common hidden feature space via a scale-adaptive convolutional block:
H i = σ ( G N ( C o n v 3 × 3 ( i ) ( F i ) ) )
where C o n v 3 × 3 ( i ) is the layer-specific convolution, followed by Group Normalization (GN), and σ is the activation function.
Figure 6. The structure of the SASD head.
Subsequently, a parameter-efficient shared module performs deep feature extraction:
H i ′ = P W C o n v ( D W C o n v ( H i ) )
where DWConv and PWConv denote depthwise and pointwise convolutions, respectively.
Specifically, SASD introduces learnable, layer-wise scale factors a i to adaptively modulate the bounding box regression branch for different feature semantics:
R e g i = a i ⋅ C o n v 3 × 3 ( r e g ) ( H i ′ )
C l s i = C o n v 3 × 3 ( c l s ) ( H i ′ )
For each feature level i, the regression branch outputs a tensor of shape (4 × (L + 1)) for Distribution Focal Loss (DFL) based regression, while the classification branch outputs a tensor of shape C representing class scores. R e g i and C l s i denote the regression branch output and classification branch output for the i-th feature level, respectively. Critically, this output is modulated by a per-level, learnable scale factor, a i , which is learned end-to-end. This mechanism enables effective scale-aware regression within a unified feature space, with the final bounding box coordinates obtained via the standard DFL decoding process [43].

4. Experiments

4.1. Experimental Setup

All experiments were conducted on a 64-bit Ubuntu 20.04 operating system, utilizing an AMD EPYC 7352 CPU (AMD, Santa Clara, CA, USA) and an NVIDIA GeForce RTX 4090 GPU (NVIDIA, Santa Clara, CA, USA). The models were implemented using PyTorch 2.3.0 (Meta AI, Menlo Park, CA, USA) with CUDA 12.4. (NVIDIA, Santa Clara, CA, USA) To ensure a fair comparison, all models were trained for 300 epochs with a batch size of 32. We used the SGD optimizer with a learning rate of 0.01, momentum of 0.937, and weight decay of 0.0005, following a cosine learning rate decay schedule. The key hyperparameters are summarized in Table 1.
Table 1. Experimental parameters.
YOLO-series baselines adopt the official open-source implementations released by the respective authors, while the remaining models are reproduced using the 3.3.0 MMDetection framework. Input resolutions follow the recommended settings of each framework: 640 × 640 for YOLO-series models and 1333 × 800 for MMDetection-based models (OpenMMLab, Shanghai, China). To ensure a fair comparison in terms of model complexity, all YOLO-series models use the medium-scale (‘m’) variant, and MSAdaNet adopts a matching channel configuration accordingly.

4.2. Datasets

4.2.1. Augmented Smartphone Screen Glass Dataset

To validate the performance of our model on real-world data, we utilized the public SSGD. This dataset contains seven common defect types (Crack, Broken, Spot, Scratch, Light-Leakage, Blot, and Broken-Membrane) and is challenging due to numerous small, multi-category defects with complex shapes. To enhance robustness, we applied an offline augmentation pipeline that expanded the training set to five times its original size by generating four augmented versions per image. Each iteration randomly applied at least one of six operations: rotation within ±5° and scaling by a factor between 0.7 and 0.8; translation up to one-third of the image dimensions; brightness adjustment with a factor α ∈ [0.35, 1.0]; Gaussian noise injection; flipping horizontally, vertically, or diagonally with equal probability; and CutOut regularization using a 50 × 50 patch with an IoU threshold of 0.5 to preserve defect regions. Bounding box coordinates were updated for all geometric transformations. This expanded the original 1752 training images to 8760, as reported in Table 2. All compared models were trained on this identical augmented set to ensure fairness.
Table 2. SSGD and SCBD.

4.2.2. Smartphone Camera Bezel Dataset

Due to the scarcity of defect data for camera bezels, a single defect-free sample image was captured as the base for data generation. To address data scarcity, we developed a synthetic pipeline to generate the Smartphone Camera Bezel Dataset (SCBD). The pipeline begins by transferring defect patterns from the NEU-DET dataset [44] to the base image, which matches color statistics in the LAB space to align defects with the target while preserving their structure [45]. It then applies Contrast Limited Adaptive Histogram Equalization (CLAHE) to the L-channel to enhance local contrast [46,47]. The process concludes with natural blending using Gaussian-smoothed alpha masks to avoid hard edges and ensure seamless integration [48]. This pipeline produced 4936 synthetic images containing six balanced defect classes, partitioned as detailed in Table 2.

4.3. Evaluation Metrics

We evaluated model performance using Precision (P), Recall (R), Average Precision (AP), and mean Average Precision (mAP) as the primary metric for detection accuracy. We report mAP@0.5 and mAP@0.5:0.95. Model complexity and speed were measured using Parameters (M), FLOPs (G), and inference speed in Frames Per Second (FPS). The core metrics of Precision (P), Recall (R), and Average Precision (AP) for a single class are defined as:
P r e c i s i o n = T P T P + F P × 100 %
R e c a l l = T P T P + F N × 100 %
A P = ∫ 0 1 P ( r )   d r
m A P = 1 m ∑ i = 1 m A P i
where TP, FP, and FN represent true positives, false positives, and false negatives, respectively.

4.4. Results and Analysis

4.4.1. Performance Comparison on the SSGD

To comprehensively evaluate MSAdaNet, we benchmarked it against eight state-of-the-art models (including Faster R-CNN, DETR [49], and YOLO variants) on the SSGD. As shown in Table 3, our proposed model demonstrates superior performance across key detection metrics.
Table 3. Results on the SSGD dataset of different models.
MSAdaNet achieves the highest Recall of 59.5%, along with the best mAP@0.5 of 54.8% and mAP@0.5:0.95 of 26.9% among all evaluated models. Compared to the strong YOLOv11m baseline, our model shows a +18.3-point increase in Recall and a +10.6-point increase in mAP@0.5, with only a minor trade-off of −1.7 points in precision. This significant improvement in recall validates the effectiveness of our proposed modules in detecting difficult, fine-grained defects that are often missed by other models. It is worth noting that YOLOv12m yields a notably lower mAP@0.5 of 27.7% on the SSGD. A per-class analysis confirms that this degradation is consistent across all defect categories, which we attribute to the data-hungry nature of its attention-centric architecture struggling to converge effectively on this relatively small-scale industrial dataset.
Regarding computational complexity, MSAdaNet, with 28.4 M parameters and 113.2 GFLOPs, introduces a moderate overhead compared to YOLOv11m, which has 20.0 M parameters and 67.7 G FLOPs. It nevertheless maintains a clear efficiency advantage over two-stage detectors like Faster R-CNN, which requires 41.3 M parameters and 194 GFLOPs. We posit that for quality-critical inspection applications, the significant +10.6-point gain in mAP@0.5 justifies this well-managed trade-off between accuracy and efficiency.

4.4.2. Performance Comparison on the SCBD

MSAdaNet achieves competitive performance on the SCBD, reaching 94.0% mAP@0.5. While Faster R-CNN achieves the highest precision, our method delivers superior results across all YOLO-series baselines, a full comparison of which is provided in Table 4. Specifically, MSAdaNet reaches 89.0% precision and 86.9% recall, improving recall by 5.4% over YOLOv11m. This enhancement in recall is especially critical for industrial quality control, where minimizing missed detections is essential to reduce costs. Against lightweight YOLO variants such as v10m, v11m, and v12m, MSAdaNet provides higher accuracy at a manageable computational cost of 28.4 million parameters and 113.2 GFLOPs. Furthermore, the lower result of DETR at 85.8% mAP indicates that CNN-based models are better suited to leveraging features from synthetic data for this particular application.
Table 4. Results on the SCBD dataset of different models.
Figure 7 shows that MSAdaNet converges stably and achieves the highest final metrics among YOLO variants, reaching a mAP@0.5 of 94.0% and a mAP@0.5:0.95 of 80.4%. This sustained mAP superiority during training validates the structural effectiveness of the proposed PMSFA, FDPN, and SASD modules for synthetic data.
Figure 7. Training convergence on the SCBD: (a) mAP@0.5; (b) total loss.

4.5. Ablation Studies

We evaluated the contribution of each proposed module by adding components to the baseline YOLOv11m architecture. Experiments were conducted on both the SSGD and SCBD to assess the effectiveness and robustness of the architectural innovations across different data distributions.

4.5.1. Ablation Study on the SSGD

Table 5 shows that each module contributes to the overall performance. Starting from a baseline mAP of 44.2% with 20.0 M parameters, PMSFA provides a significant improvement of 5.3% mAP. This suggests that parallel multi-scale feature extraction effectively captures defects across diverse scales despite an increase of 18.3 GFLOPs and a reduction in inference speed to 267.0 FPS. The addition of FDPN yields a further 1.7% mAP increase, which validates the focusing diffusion mechanism for multi-scale fusion. Finally, SASD contributes 3.6% mAP to reach a total of 54.8%, proving that scale adaptive transformations improve accuracy for extreme scale defects. The complete MSAdaNet achieves a 10.6% mAP gain over the baseline, justifying the computational overhead for quality critical smartphone defect inspection.
Table 5. Ablation study results on the SSGD.

4.5.2. Ablation Study on the SCBD

The ablation study on SCBD confirms consistent trends as shown in Table 6. PMSFA contributes 0.2% mAP while FDPN yields a decrease of 0.5% mAP, which likely stems from feature head mismatch on synthetic data. However, SASD delivers a 2.2% increase to reach 94.0% mAP. The consistent contributions across synthetic datasets validate the generalizability of the proposed design.
Table 6. Ablation study results on the SCBD.

4.6. Visual Qualitative Analysis

Figure 8 compares the detection results and feature activation patterns of MSAdaNet against the baseline on the SSGD. The visual comparisons in Figure 8 and Figure 9 demonstrate that MSAdaNet excels in three areas. For small defects below 20 pixels, PMSFA captures fine-grained spatial details that the baseline misses. Due to the SASD module, MSAdaNet also demonstrates superior localization accuracy with bounding boxes that align closely with ground truth. In scenarios involving low contrast or textured surfaces, MSAdaNet maintains robust performance through the multi-scale contextual fusion of FDPN.
Figure 8. Comparative detection results of YOLOv11m and MSAdaNet on the SSGD.
Figure 9. Comparative detection results of YOLOv11m and MSAdaNet on the SCBD.
Figure 10 and Figure 11 present Grad-CAM feature activation heatmaps where warmer colors indicate high activation intensities on defect regions [50]. While YOLOv11m exhibits diffuse attention patterns lacking sharp focus, MSAdaNet produces concentrated hotspots precisely aligned with actual defect locations. This focused pattern validates that the multi-receptive-field design extracts discriminative features effectively. MSAdaNet maintains strong activation even under weak visual signals, which demonstrates the capability of FDPN to amplify defect features through contextual fusion. The heatmaps also reveal that SASD maintains consistent attention quality across different scales regardless of object size.
Figure 10. Comparative heatmaps of YOLOv11m and MSAdaNet for the SSGD.
Figure 11. Comparative heatmaps of YOLOv11m and MSAdaNet for the SCBD.
These visual comparisons collectively demonstrate that MSAdaNet produces more precise bounding boxes and more concentrated feature activations than the baseline across both datasets. The Grad-CAM heatmaps confirm that the proposed modules enable the model to focus on defect-relevant areas rather than distributing attention diffusely, which is consistent with the quantitative improvements reported in the comparison and ablation experiments.

4.7. Discussions

4.7.1. Advantages and Applications

Experiments and visualizations validate the superior detection performance of MSAdaNet on smartphone component defects. Leveraging high recall and multi-scale capabilities, it applies to screen glass inspection, camera bezel assessment, and downstream material screening. By integrating parallel multi-scale extraction, focusing diffusion fusion, and scale-adaptive regression, MSAdaNet enhances general detectors for industrial defect characteristics, with potential extension to other glass and optical surface inspection tasks.

4.7.2. Limitations and Analyses

Although MSAdaNet has demonstrated strong detection performance, several limitations remain. Detection accuracy suffers for categories with insufficient labeled images. To mitigate data scarcity, we developed the SCBD as a cross-domain augmentation strategy. However, the quality of the synthetic data is currently validated only indirectly through downstream detection performance; more rigorous fidelity assessment using FID metrics and expert evaluation is required.
Computationally, MSAdaNet roughly doubles the complexity of YOLOv11m, it achieves 232.9 FPS on the SSGD and 375.1 FPS on the SCBD when tested on an RTX 4090, meeting server-side demands. However, these benchmarks may not translate to resource-constrained platforms like the NVIDIA Jetson series. On such devices, memory bandwidth limitations and thermal throttling can fundamentally alter the FLOPs-to-latency relationship, often making memory access patterns rather than computational throughput the primary bottleneck. Quantization (FP16/INT8) facilitates deployment, but the parallel convolutions of FDPN are unevenly sensitive to reduced precision, larger kernels in particular suffer greater quantization errors. Hence, thorough edge profiling and quantization analysis, along with edge-cloud collaboration, are essential to ensure real-world performance [51].
Per-class analysis reveals uneven performance. Blot and light-leakage defects suffer from high false positives, primarily because their low-contrast signatures blend with background textures, a phenomenon exacerbated by the multi-kernel enhancement of FDPN. Scratch-type defects, while effectively captured by the scale-adaptive regression of SASD, remain difficult to localize precisely under stricter IoU thresholds due to their extreme aspect ratios, which often deviate from typical anchor priors.

5. Conclusions

In this paper, we introduced MSAdaNet, a novel network designed for the surface defect detection of smartphone components. To address the fundamental challenges of extreme morphological and scale variation, we proposed three domain-specific modules: the PMSFA backbone for enhanced multi-scale feature capture, the application of a FDPN for efficient feature fusion, and a SASD head to improve localization accuracy. Furthermore, we developed a comprehensive data enrichment tool to combat data scarcity by generating a synthetic SCBD.
Extensive experiments validate our approach. On the real-world SSGD, MSAdaNet achieves a state-of-the-art mAP@0.5 of 54.8%, outperforming the YOLOv11m baseline by a substantial +10.6 points, driven largely by an +18.3-point gain in recall. On our synthetic SCBD, the model achieves 94.0% mAP@0.5, again surpassing all single-stage detectors and confirming the effectiveness of our data generation strategy. Ablation studies systematically confirmed that each proposed module contributes significantly to the final performance gains.
Despite these advances, certain limitations warrant further investigation, including dependence on labeled data quantity, the gap between server-grade and edge-device performance, and uneven detection accuracy across defect categories. Collecting more real-world defect images across various smartphone components, expanding the synthetic dataset with varied samples, and conducting fidelity validation using FID metrics and expert assessments would further strengthen the approach. Developing lightweight MSAdaNet variants through pruning and knowledge distillation, coupled with latency benchmarking on edge platforms and robustness evaluation under quantization, represents a step toward practical embedded deployment. Evaluation on additional public industrial defect benchmarks would also help validate generalization, while aspect-ratio-aware regression strategies and weakly supervised detection methods offer directions for improving performance under challenging defect geometries and data-scarce conditions.

Author Contributions

Conceptualization, J.W.; methodology, H.C.; validation, J.W. and H.W.; formal analysis, S.Y. and F.X.; investigation, J.W.; data curation, H.C. and W.H.; writing—original draft preparation, H.C. and J.W.; writing—review and editing, J.W. and X.Y.; visualization, H.C. and H.H.; supervision, J.W. and X.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Science and Technology Research Project of Jiangxi Provincial Department of Education (Grant No. GJJ2200830), along with the Jiangxi Provincial Natural Science Foundation (Grant No. 20252BAC240198) and the Jiangxi Provincial Key Laboratory of Multidimensional Intelligent Perception and Control (Grant No. 2024SSY03161).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The SSGD presented in the study is openly available on GitHub at https://github.com/VincentHancoder/SSGD, accessed on 20 June 2025.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Liu, Y.; Zhang, C.; Dong, X. A Survey of Real-Time Surface Defect Inspection Methods Based on Deep Learning. Artif. Intell. Rev. 2023, 56, 12131–12170. [Google Scholar] [CrossRef] [Scilit]
  2. Chen, Y.; Ding, Y.; Zhao, F.; Zhang, E.; Wu, Z.; Shao, L. Surface Defect Detection Methods for Industrial Products: A Review. Appl. Sci. 2021, 11, 7657. [Google Scholar] [CrossRef] [Scilit]
  3. Ming, W.; Shen, F.; Li, X.; Zhang, Z.; Du, J.; Chen, Z.; Cao, Y. A Comprehensive Review of Defect Detection in 3C Glass Components. Measurement 2020, 158, 107722. [Google Scholar] [CrossRef] [Scilit]
  4. Han, H.; Yang, R.; Li, S.; Hu, R.; Li, X. SSGD: A Smartphone Screen Glass Dataset for Defect Detection. In Proceedings of the ICASSP 2023—2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island, Greece, 4–9 June 2023; pp. 1–5. [Google Scholar]
  5. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Zhang, S.; Chi, C.; Yao, Y.; Lei, Z.; Li, S.Z. Bridging the Gap between Anchor-Based and Anchor-Free Detection via Adaptive Training Sample Selection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 9759–9768. [Google Scholar]
  7. Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar] [CrossRef] [Scilit]
  8. Liang, A.; Wang, Q.; Wu, X. Context-Enhanced Network with Spatial-Aware Graph for Smartphone Screen Defect Detection. Sensors 2024, 24, 3430. [Google Scholar] [CrossRef] [Scilit]
  9. Cheng, Y.; Wu, J.; Shaov, J.; Yang, D. Improvement and Application of YOLOv3 for Smartphone Glass Cover Defect Detection. In Proceedings of IncoME-VI and TEPEN 2021: Performance Engineering and Maintenance Engineering; Springer International Publishing: Cham, Switzerland, 2022; pp. 105–117. [Google Scholar]
  10. Yu, H.; Wang, J.; Yang, J.; Liang, Y.; Li, Z.; Wang, Z.; He, H.; Zhang, X.; Lu, G. A Lightweight and Robust Detection Network for Diverse Glass Surface Defects via Scale-and Shape-Aware Feature Extraction. Eng. Appl. Artif. Intell. 2025, 153, 110640. [Google Scholar] [CrossRef] [Scilit]
  11. Wei, Z.; Zheng, L. An Improved YOLOv5s for Detecting Glass Tube Defects. In Proceedings of the International Conference on Neural Information Processing (ICONIP), Changsha, China, 20–23 November 2023; Springer Nature: Singapore, 2023; pp. 196–206. [Google Scholar]
  12. Chen, Z.; Huang, S.; Lv, H.; Luo, Z.; Liu, J. Defect Detection in Automotive Glass Based on Modified YOLOv5 with Multi-Scale Feature Fusion and Dual Lightweight Strategy. Vis. Comput. 2024, 40, 8099–8112. [Google Scholar] [CrossRef] [Scilit]
  13. Huang, H.; Zhan, Q.; Xie, X.; Ye, D.; Liu, G. Glass Defect Detection via Multi-Scale Feature Fusion. J. Phys. Conf. Ser. 2022, 2216, 012099. [Google Scholar] [CrossRef] [Scilit]
  14. Zhao, Y.; Liu, Q.; Su, H.; Zhang, J.; Ma, H.; Zou, W.; Liu, S. Attention-Based Multiscale Feature Fusion for Efficient Surface Defect Detection. IEEE Trans. Instrum. Meas. 2024, 73, 1–10. [Google Scholar] [CrossRef] [Scilit]
  15. Zhang, W.; Shi, X.; Jiang, M.; Zhang, A.; Zeng, L.; Al-qaness, M.A. Improved You Only Look Once for Weed Detection in Soybean Field under Complex Background. Eng. Appl. Artif. Intell. 2025, 151, 110762. [Google Scholar] [CrossRef] [Scilit]
  16. Jian, C.; Gao, J.; Ao, Y. Imbalanced Defect Classification for Mobile Phone Screen Glass Using Multifractal Features and a New Sampling Method. Multimed. Tools Appl. 2017, 76, 24413–24434. [Google Scholar] [CrossRef] [Scilit]
  17. Hou, B.; Zhu, W.; Yu, A.; Jin, M.; Zhang, J. Rotation Invariant Local Binary Pattern Based on GLCM for Fluorescent Tube Defects Classification. In Proceedings of the 2018 International Conference on Machine Learning and Cybernetics (ICMLC), Chengdu, China, 15–18 July 2018; Volume 2, pp. 612–618. [Google Scholar]
  18. Ming, W.; Shen, F.; Zhang, H.; Li, X.; Ma, J.; Du, J.; Lu, Y. Defect Detection of LGP Based on Combined Classifier with Dynamic Weights. Measurement 2019, 143, 211–225. [Google Scholar] [CrossRef] [Scilit]
  19. Mao, Y.; Yuan, J.; Zhu, Y.; Jiang, Y. Surface Defect Detection of Smartphone Glass Based on Deep Learning. Int. J. Adv. Manuf. Technol. 2023, 127, 5817–5829. [Google Scholar] [CrossRef] [Scilit]
  20. Wu, P.; Zhou, H.; Yu, Y.; Miao, Z.; Pan, Q.; Zhang, X.; Gao, J. SSGDD-YOLO: Multiscale Feature Fusion and Multiattention-Based YOLO for Smartphone Screen Glass Defect Detection. IEEE Sens. J. 2025, 25, 6982–6994. [Google Scholar] [CrossRef] [Scilit]
  21. Girshick, R. Fast R-CNN. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
  22. Jocher, G.; Chaurasia, A.; Stoken, A. Ultralytics YOLOv5. 2022. Available online: https://github.com/ultralytics/yolov5 (accessed on 20 June 2025).
  23. Wang, H.; Liu, C.; Cai, Y.; Chen, L.; Li, Y. YOLOv8-QSD: An Improved Small Object Detection Algorithm for Autonomous Vehicles Based on YOLOv8. IEEE Trans. Instrum. Meas. 2024, 73, 1–16. [Google Scholar] [CrossRef] [Scilit]
  24. Wang, C.Y.; Yeh, I.H.; Liao, H.Y.M. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In Proceedings of the European Conference on Computer Vision (ECCV), Milan, Italy, 29 September–4 October 2024; Springer Nature: Cham, Switzerland, 2024; pp. 1–21. [Google Scholar]
  25. Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. Adv. Neural Inf. Process. Syst. 2024, 37, 107984–108011. [Google Scholar]
  26. Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar]
  27. Jocher, G.; Chaurasia, A.; Qiu, J. Ultralytics YOLO11. 2024. Available online: https://github.com/ultralytics/ultralytics (accessed on 20 June 2025).
  28. Zong, Z.; Song, G.; Liu, Y. DETRs with Collaborative Hybrid Assignments Training. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Paris, France, 1–6 October 2023; pp. 6748–6758. [Google Scholar]
  29. Zhang, H.; Li, F.; Liu, S.; Zhang, L.; Ni, L.M.; Shum, H.-Y. DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection. arXiv 2022, arXiv:2203.03605. [Google Scholar]
  30. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 6000–6010. [Google Scholar]
  31. Chen, G.; Wang, H.; Chen, K.; Li, Z.; Song, Z.; Liu, Y.; Chen, W.; Knoll, A. A Survey of the Four Pillars for Small Object Detection: Multiscale Representation, Contextual Information, Super-Resolution, and Region Proposal. IEEE Trans. Syst. Man Cybern. Syst. 2022, 52, 936–953. [Google Scholar] [CrossRef] [Scilit]
  32. Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature Pyramid Networks for Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
  33. Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path Aggregation Network for Instance Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 8759–8768. [Google Scholar]
  34. Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 7132–7141. [Google Scholar]
  35. Li, X.; Wang, W.; Hu, X.; Yang, J. Selective Kernel Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 510–519. [Google Scholar]
  36. Zhang, H.; Wu, C.; Zhang, Z.; Zhu, Y.; Lin, H.; Zhang, Z.; Sun, Y.; He, T.; Mueller, J.; Manmatha, R.; et al. ResNeSt: Split-Attention Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 2736–2746. [Google Scholar]
  37. Tang, X.; Du, D.K.; He, Z.; Liu, J. PyramidBox: A Context-Assisted Single Shot Face Detector. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 797–813. [Google Scholar]
  38. Bell, S.; Zitnick, C.L.; Bala, K.; Girshick, R. Inside-Outside Net: Detecting Objects in Context with Skip Pooling and Recurrent Neural Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 2874–2883. [Google Scholar]
  39. Leng, J.; Ren, Y.; Jiang, W.; Sun, X.; Wang, Y. Realize Your Surroundings: Exploiting Context Information for Small Object Detection. Neurocomputing 2021, 433, 287–299. [Google Scholar] [CrossRef] [Scilit]
  40. Szegedy, C.; Ioffe, S.; Vanhoucke, V.; Alemi, A. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017; Volume 31. [Google Scholar]
  41. Gao, S.H.; Cheng, M.M.; Zhao, K.; Zhang, X.Y.; Yang, M.H.; Torr, P. Res2Net: A New Multi-Scale Backbone Architecture. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 43, 652–662. [Google Scholar] [CrossRef] [Scilit]
  42. Tian, Z.; Shen, C.; Chen, H.; He, T. FCOS: Fully Convolutional One-Stage Object Detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 9627–9636. [Google Scholar]
  43. Li, X.; Wang, W.; Wu, L.; Chen, S.; Hu, X.; Li, J.; Tang, J.; Yang, J. Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection. Adv. Neural Inf. Process. Syst. 2020, 33, 21002–21012. [Google Scholar]
  44. Song, K.; Yan, Y. A Noise Robust Method Based on Completed Local Binary Patterns for Hot-Rolled Steel Strip Surface Defects. Appl. Surf. Sci. 2013, 285, 858–864. [Google Scholar] [CrossRef] [Scilit]
  45. Reinhard, E.; Adhikhmin, M.; Gooch, B.; Shirley, P. Color Transfer between Images. IEEE Comput. Graph. Appl. 2001, 21, 34–41. [Google Scholar] [CrossRef] [Scilit]
  46. Pizer, S.M.; Amburn, E.P.; Austin, J.D.; Cromartie, R.; Geselowitz, A.; Greer, T.; ter Haar Romeny, B.; Zimmerman, J.B.; Zuiderveld, K. Adaptive Histogram Equalization and Its Variations. Comput. Vis. Graph. Image Process. 1987, 39, 355–368. [Google Scholar] [CrossRef] [Scilit]
  47. Reza, A.M. Realization of the Contrast Limited Adaptive Histogram Equalization (CLAHE) for Real-Time Image Enhancement. J. VLSI Signal Process. Syst. Signal Image Video Technol. 2004, 38, 35–44. [Google Scholar] [CrossRef] [Scilit]
  48. Burt, P.J.; Adelson, E.H. A Multiresolution Spline with Application to Image Mosaics. ACM Trans. Graph. 1983, 2, 217–236. [Google Scholar] [CrossRef] [Scilit]
  49. Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-End Object Detection with Transformers. In Proceedings of the European Conference on Computer Vision (ECCV), Glasgow, UK, 23–28 August 2020; Springer International Publishing: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar]
  50. Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar]
  51. Chen, Y.; Li, W.; Huang, J.; Gao, H.; Deng, S. A Differential Evolution Offloading Strategy for Latency and Privacy Sensitive Tasks with Federated Local-Edge-Cloud Collaboration. ACM Trans. Sens. Netw. 2024. [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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.