Next Article in Journal
Data-Efficient Insulator Defect Detection in Power Transmission Systems via Multi-Granularity Feature Learning and Latent Context-Aware Fusion
Next Article in Special Issue
A Bayesian Approach to Bad Data Identification in Power System State Estimation
Previous Article in Journal
A Systematic, Scalable, and Interpretable Mapping of Artificial Intelligence Research in Leukemia Using a Hybrid Machine Learning and Qualitative Framework
Previous Article in Special Issue
Computer Vision and XRF-IoT Sensor Systems for Detecting Heavy Metals in Export Crops: A Comprehensive Systematic Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

BFI-YOLO: A Lightweight Bidirectional Feature Interaction Network for Aluminum Surface Defect Detection

School of Information Engineering, Dalian Ocean University, Dalian 116023, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(5), 1080; https://doi.org/10.3390/electronics15051080
Submission received: 10 February 2026 / Revised: 27 February 2026 / Accepted: 2 March 2026 / Published: 4 March 2026

Abstract

As a critical step in industrial quality control, surface defect detection in aluminum materials remains challenging for minor defects despite advances in deep learning. To address this, this paper proposes an enhanced YOLOv8-based model, BFI-YOLO, that incorporates a Bidirectional Multi-scale Residual Network. Specifically, we design a Bidirectional Multi-scale Feature Pyramid Network (BM-FPN) based on BiFPN to strengthen cross-scale feature fusion. The parameter-free SimAM attention module is embedded to enhance subtle defect responses while suppressing background texture interference, without introducing additional computational overhead.Furthermore, we develop a Multi-scale Residual Convolution (MSRConv) module to capture defects of varying sizes on aluminum surfaces comprehensively. MSRConv utilizes multi-scale convolutional kernels to adapt to cross-scale defect features and retains shallow details via residual connections, thereby strengthening the model’s representation of fine defects. Extensive experiments on the public TAPSDD dataset show that BFI-YOLO achieves a precision of 91.3%, a recall of 89.8%, and mAP@0.5 of 92.1%, with only 1.8 M parameters. Compared to the baseline, BFI-YOLO reduces parameters by 40% while increasing mAP@0.5 by 4.2%, effectively balancing detection accuracy and lightweight performance. Optimized for resource-constrained industrial platforms such as embedded systems and mobile robots, BFI-YOLO meets real-time monitoring requirements while achieving competitive detection accuracy, providing an efficient and practical solution for metal surface defect detection.

1. Introduction

Aluminum profiles have become a critical foundational material for modern industries such as aerospace and automotive manufacturing due to their excellent properties of lightweight, high strength, corrosion resistance, and ease of processing [1]. Their surface quality directly determines product safety and aesthetic integrity, serving as a core indicator that affects product grade and market competitiveness. In mass production, influenced by multiple factors, including environmental conditions and transport friction, aluminum profiles are prone to surface defects such as scratches, dents, and paint bubbles. Even micrometer-scale defects can lead to severe consequences, including product rejection and significant economic losses [2]. Therefore, developing accurate and efficient defect detection technology is essential to ensuring product quality and production efficiency.
Traditional aluminum defect detection methods, including magnetic particle testing, penetrant testing [3], X-ray testing [4], ultrasonic testing [5], eddy current testing [6], and magnetic flux leakage testing [7], all exhibit significant limitations. For instance, magnetic particle and penetrant testing rely on manual interpretation, resulting in low efficiency, high subjective error, and elevated rates of false negatives and false positives. X-ray testing shows insufficient sensitivity to shallow defects, such as surface microcracks, and poses radiation hazards. Ultrasonic and eddy current testing are susceptible to environmental factors such as temperature, humidity, and surface contamination with oil, which degrade detection accuracy. Even though related studies have attempted to improve these traditional methods through simulation modeling for parameter optimization and multi-modal fusion for integrating multi-source data, it remains challenging to ensure generalization capability under complex industrial conditions or meet the real-time detection requirements of modern production lines [8,9,10]. With the rapid development of deep learning technology in computer vision, deep learning-based object detection methods, leveraging their powerful feature extraction and self-learning capabilities, are gradually replacing traditional detection techniques and have become a research hotspot in aluminum surface defect detection [11]. These methods are primarily divided into two-stage and one-stage detection architectures based on differences in their detection pipelines. The two-stage architecture is represented by the Region-based Convolutional Neural Network (R-CNN) series. This type of algorithm employs a stepwise process of region proposal generation followed by object classification and localization. While capable of achieving high detection accuracy, it suffers from high computational complexity due to the sequential extraction of candidate regions and subsequent fine-grained classification, making it difficult to meet the demands of industrial real-time detection. In contrast, the one-stage architecture is represented by the YOLO [12] series, SSD [13], and Transformer [14]-enhanced models, among others. These algorithms simultaneously perform object localization and classification via a unified network, significantly reducing computational complexity and making them better suited to the efficiency requirements of industrial scenarios [15,16].
However, existing deep learning-based methods for aluminum defect detection still face critical challenges. Firstly, current models exhibit insufficient capability in multi-scale defect detection. Aluminum defects vary widely in scale, ranging from micrometer-sized paint bubbles to centimeter-scale stains. Traditional single-stage detection models, which rely solely on fixed-size convolutional kernels, often have limited receptive fields within individual layers, making it difficult to simultaneously capture the fine details of extremely small defects and the global contours of larger ones within a single layer. To overcome this limitation, existing methods commonly adopt multi-scale feature fusion strategies such as multi-layer stacking, feature pyramids, dilated convolutions, or kernel pyramids, enabling single-stage network models to integrate both detailed and global information effectively. Although feature fusion structures like FPN [17] and PANet [18] attempt to alleviate this issue through multi-level feature interaction, FPN may weaken shallow small-defect features due to its unidirectional top-down pathway, while PANet alleviates this issue through bidirectional fusion at the cost of increased computational redundancy, which is unfavorable for lightweight industrial deployment.
Secondly, there is a low recognition rate for small defects against complex textured backgrounds. Moreover, in detection tasks, background noise formed by inherent textures on aluminum surfaces, such as brushed or frosted patterns, often interferes with the detection process. Existing attention mechanisms, such as SE [19] and CBAM [20], struggle to effectively focus on subtle small-defect signals, leading to a high rate of missed detections. While specialized techniques like passive acoustic tomography [21] and dedicated visual artifact analysis [22] have shown effectiveness in specific crack characterization tasks, their reliance on specialized sensors, intrusive setups, or customized calibration limits their scalability and generalizability for inline industrial inspection.Furthermore, it is challenging to balance model lightweighting with detection accuracy. Mainstream single-stage networks suffer from large parameter counts and high computational costs, making them difficult to deploy on embedded detection terminals or mobile inspection robots in industrial settings. Simply reducing parameters, however, tends to degrade detection accuracy significantly [16].
To address the aforementioned challenges, this study proposes an improved aluminum defect detection network named BFI-YOLO, based on the YOLOv8n baseline model. Specifically, a Multi-Scale Residual Convolution (MSRConv) module is designed within the backbone network to enhance feature extraction. This module effectively reduces parameter count and computational load by leveraging depthwise separable convolutions, while simultaneously incorporating convolutional kernels of varying sizes to adapt to the multi-scale characteristics of surface defects in aluminum. Through residual connections, shallow-level detailed information is preserved, significantly improving the model’s ability to represent fine defects. Furthermore, a Bidirectional Multi-scale Feature Pyramid and the SimAM attention mechanism are introduced to address the insufficient multi-scale feature fusion in the original network while maintaining model lightweightness, thereby enhancing the detection accuracy of aluminum defects.
The main contributions of this study are as follows:
(1)
We propose a lightweight bidirectional multi-scale fusion neck called BM-FPN that enhances cross-scale feature interaction and preserves fine-grained defect cues for small targets under complex textures.
(2)
We introduce MSRConv as a building block for the feature extraction network. MSRConv adopts a dual-branch depthwise separable convolutional structure, reducing computational complexity while enhancing resistance to interference from complex aluminum textures. It also improves the efficiency of synergistic extraction of local details and global contextual features.
(3)
Experimental validation is conducted on the public dataset TAPSDD. Compared to the baseline network, BFI-YOLO achieves significant improvements in detection accuracy while reducing parameter count and achieving greater lightweightness.

2. Related Work

2.1. Deep Learning-Based Object Detection Techniques

In recent years, deep learning-based object detection techniques have been extensively studied for surface defect detection. Researchers have primarily focused on improving feature extraction modules and fusion structures to enhance detection performance. For instance, Li Xin et al. [23] introduced a 10 × 10 scale detection head based on YOLOv5 to enhance the feature-capture capability for micron-level small defects. However, the lack of optimization in the feature fusion pathways led to confusion between features of different scales, resulting in a decline in the detection accuracy for larger defects. Hu Zhe et al. [24] designed the C3CA module, integrating a multi-head self-attention mechanism into the feature extraction process to enhance global feature interaction.
Nevertheless, the computational complexity of this method increases quadratically with the size of the feature map, significantly reducing model inference speed and failing to meet real-time detection requirements. Gao et al. [25] proposed the Cas-VSwin Transformer, which adapts the feature distribution of surface defects by improving the shifting strategy of the Swin Transformer and incorporating channel attention. Tang et al. [26] constructed an end-to-end pipeline for steel strip defect detection using the Swin Transformer as the backbone, leveraging its hierarchical feature capture to improve multi-scale defect detection accuracy. Wang et al. [27] introduced Transformer modules into YOLOv7, leveraging global self-attention to capture long-range feature dependencies, thereby enhancing defect recognition rates in complex textured backgrounds. However, this approach significantly increases the number of parameters and computational overhead, making it unsuitable for deployment on edge devices. Zhou et al. [27] embedded a Context Aggregation Module (CAM) into YOLOv8, improving feature utilization by concatenating local and global features. However, the CAM did not fully account for feature differences among defects of varying scales, leading to larger localization errors for large-scale stain defects. Sun et al. [28] proposed MCH-YOLOv12, which effectively enhances feature extraction for irregular aluminum defects via Multi-Scale Ghost Convolution, SCCGLU attention modules, and a hybrid detection head.
Despite the progress in existing deep learning-based methods for aluminum defect detection, their performance remains suboptimal. The core challenge lies in balancing detection accuracy with real-time performance. As demonstrated in domain-specific applications such as maritime ship detection [29] and adverse-weather object detection [30], tailoring architectures to specific scenarios is crucial. Pursuing higher accuracy often introduces complex modules, which in turn increase computational requirements and hinder deployment on industrial edge devices. Emphasizing speed, on the other hand, tends to weaken feature fusion capabilities. Coupled with insufficient adaptation to the multi-scale characteristics of aluminum defects, this imbalance often results in compromised detection accuracy. Therefore, there is a critical need to achieve an effective balance among feature fusion effectiveness, computational efficiency, and adaptability to multi-scale defects.

2.2. Multi-Scale Feature Fusion

Feature pyramids are a core architecture for feature fusion in deep learning-based visual tasks. By constructing a multi-level feature hierarchy, they integrate shallow, high-resolution, detailed features with deep, high-level semantic abstract features, enabling accurate perception and localization of targets at different scales. Due to their excellent multi-scale processing capabilities, this structure has been widely applied in computer vision, including object detection and semantic segmentation. For example, FPN first established a top-down feature fusion pathway, which has become a key component of mainstream detection models like YOLO and Faster R-CNN. PANet further added a bottom-up fusion branch to enhance the transmission of shallow features and improve detection performance in complex scenarios. However, existing optimization efforts addressing the fusion limitations of FPN and PANet have yet to resolve the trade-off between efficiency and accuracy in multi-scale feature integration: the unidirectional information flow in FPN leads to the loss of shallow details, making it difficult to capture small-scale aluminum defects. In contrast, PANet’s bidirectional fusion alleviates this issue, it introduces significant computational redundancy. Both approaches struggle to adapt to the wide range of aluminum defects.
In terms of model lightweighting and industrial deployment adaptation, researchers have primarily focused on simplifying network structures and embedding lightweight modules to reduce computational costs and meet the requirements of edge devices. Traditional methods, such as increasing input resolution [31] and employing Mosaic data augmentation [32], can enhance the representation of small defect features but substantially increase computational load. Some lightweight module replacement strategies, on the other hand, come at the cost of reduced detection accuracy. For instance, the improved Para-CBAM module proposed by Feng et al. [33] enhances defect features through channel-spatial weighting but remains susceptible to interference from complex aluminum textures. Furthermore, most lightweight solutions do not adequately account for the computational power and storage constraints of industrial edge devices, resulting in high deployment barriers and hindering practical industrial applications.
Regarding the suppression of complex texture interference, background noise, such as brushed or frosted patterns on aluminum surfaces, can easily obscure defect features. To improve model robustness against such interference, researchers often employ attention mechanisms and data enhancement techniques. For example, the YOLOv7-SiamFF model proposed by Yi Feifan et al. [34] uses a Siamese network to compare feature differences and amplify defect signals, thereby improving recognition rates. However, its dual-branch structure doubles the computational load. RFB-Net [35] employs multi-branch dilated convolutions to expand the receptive field and improve the distinction of small defects. Still, sparse sampling can lead to information loss in feature maps, thereby reducing localization accuracy. These methods fail to balance interference suppression performance with computational efficiency, rendering them unsuitable for real-time industrial detection.
In summary, existing research on aluminum defect detection still exhibits notable shortcomings. Multi-scale feature fusion struggles to balance comprehensiveness and efficiency, failing to adapt to the wide range of aluminum defect scales. There is also a conflict between complex texture interference suppression and computational efficiency, while lightweight model designs often compromise detection accuracy. To address these issues, the method proposed in this study incorporates multi-scale fusion pathways and lightweight design, effectively suppressing background texture interference. This approach helps balance inference latency and detection accuracy, offering a viable solution for aluminum defect detection.

3. Method

As shown in Figure 1, we propose an improved bidirectional multi-scale residual network based on YOLOv8 for aluminum surface defect detection. Specifically, we upgrade the PANet structure in the neck network layer to a BM-FPN structure to achieve multi-scale feature fusion and enhance the representation of small target information in deep features. To further improve the model’s feature extraction for small-scale aluminum defects, we introduce MSRConv into the backbone network. By combining depthwise separable convolution with a parallel design of multi-sized convolutional kernels, this module effectively captures defect features at different scales while reducing computational complexity, thereby significantly enhancing the model’s detection accuracy for small target defects.

3.1. BM-FPN

In aluminum defect detection tasks, multi-scale feature pyramids enhance the ability to identify minute defects by extracting and fusing features in parallel at different resolution levels, thereby capturing both fine-grained details and global information. However, traditional feature fusion networks often suffer from inefficient computational resource utilization, and interference from complex background textures with subtle defect features results in insufficient detection accuracy. To address these issues, we have designed BMFPN, a bidirectional multi-scale feature pyramid network. It strengthens feature interaction through bidirectional information flow and leverages SimAM to deeply capture the detailed textures on aluminum surfaces.
As shown in Figure 2, the traditional FPN employs a top-down, unidirectional feature-propagation path (Figure 2a), leading to the gradual loss of detailed features of underlying minor defects during hierarchical transmission. Although PANet introduces a bottom-up supplementary path (Figure 2b), redundant node connections significantly increase the network’s computational load, thereby affecting detection efficiency. In Figure 2c, BiFPN simplifies the bidirectional network by removing nodes with a single input edge. Since such nodes contribute minimally to feature fusion, this operation effectively reduces the network’s computational load without compromising its feature fusion performance or hindering the effective extraction of aluminum defect features. However, it still falls short in adequately representing minute features.
To enhance perception of subtle features, BM-FPN adapts the BiFPN structure by adding additional pathways between the original input nodes and the original output nodes residing on the same layer. This modification enables the fusion of more effective features from different hierarchical levels without significantly increasing computational costs.
Furthermore, unlike the traditional approach to feature fusion, which treats all input features equally, BM-FPN introduces learnable weights to determine the importance of different input features. By assigning weights to each input feature, BM-FPN can place greater emphasis on more informative features, thereby improving the accuracy and effectiveness of feature fusion. The weighted fusion formula Equation (1) is as follows:
O = i W i · I i
In the formula, O denotes the fused feature, I represents the Ii-th input feature, and wi is the corresponding learnable weight. Since wi may be a scalar or a vector, such an inconsistency can lead to unstable training results. Therefore, we employ weight normalization to constrain each weight’s value range. The final implementation is shown in Equation (2):
O = i w i · I i ϵ + i w i
where w i 0 , and the ReLU activation function is applied to each wi, with ϵ = 0.0001 introduced to avoid numerical instability. Ultimately, each normalized weight falls within the range [0,1].
In aluminum defect detection, existing attention mechanisms, such as SE and CBAM, exhibit significant limitations in disentangling interference from complex surface textures and in enhancing the representation of subtle defect features. These mechanisms either focus solely on single-dimensional optimization or require additional parameters, making it difficult to precisely capture weak defect signals while also conflicting with lightweight objectives. To address this, this study integrates SimAM into the Bottleneck unit of the C2F module within BM-FPN, as illustrated in Figure 3.
SimAM is a parameter-free, lightweight three-dimensional attention module. Unlike traditional attention mechanisms that focus solely on either channel or spatial dimensions, SimAM can simultaneously address both dimensions by assigning unique attention weights to each neuron, thereby forming a three-dimensional attention perception. The spatial inhibition phenomenon inspires its design in neuroscience, where an energy function is defined to quantify differences between neurons. Lower energy values indicate a higher information value of the neuron, enabling weight allocation that enhances defects and suppresses backgrounds. Specifically, neurons in defect regions are assigned higher weights due to their significant differences from the background, while those in textured background regions are suppressed.
SimAM operates without parameters, eliminating the need for additional convolutional or fully connected layers to learn parameters. This avoids model expansion and reduces training complexity. The importance of neuron information is quantified by the energy function, where lower energy values indicate a higher likelihood that the neuron contains effective defect information, corresponding to higher assigned attention weights. Its mathematical definition is shown in Equation (3).
e t = 1 M 1 i = 1 M 1 1 w t x i + b t 2 + 1 w t t + b t 2 + λ w t 2
where M is the total number of neurons in a single channel, i is the index of non-target neurons, xi represents other neurons except the current one, wt and bt are linear transformation parameters, and λ = 1 × 10 4 is the regularization constant. Through this function, SimAM can accurately identify defect regions and enhance their feature responses, effectively improving the detection rate of subtle defects. Intuitively, SimAM operates by comparing each neuron with its neighboring neurons. Neurons that exhibit substantial differences from their adjacent neurons, for example those located at defect edges or interior defect regions, are assigned higher attention weights. In contrast, neurons within homogeneous background regions are suppressed. This mechanism enables the model to automatically focus on anomaly regions without introducing additional learnable parameters. In this work, we assume that aluminum surface defects exhibit distinct intensity or structural differences from their backgrounds. The target defects are primarily small-to-medium in scale (>10 pixels), with regular surface textures considered as the main interference.
BM-FPN adopts structural optimization strategies, including bidirectional feature propagation, redundant node pruning, and the addition of supplementary connection pathways. Combined with a dynamic weighted fusion mechanism, it efficiently integrates multi-scale features while simplifying the network architecture and reducing computational costs. Integrated into this structure, the parameter-free three-dimensional attention mechanism, SimAM, is specifically designed for aluminum defect detection. It effectively isolates interference from complex background textures and enhances the representation of subtle defect features, thereby significantly improving the identification of small target defects. Through their synergistic interaction, BM-FPN and SimAM achieve efficient multi-scale feature integration, streamlined network architecture, and reduced computational overhead. Ultimately, this results in balanced improvements in both detection accuracy and inference efficiency, meeting the real-time detection requirements of industrial production lines.

3.2. MSRConv

To address the YOLOv8n base convolutional module’s insufficient feature extraction for detecting subtle defects in aluminum materials, we propose MSRConv. This module adopts a dual-branch structure and leverages depthwise separable convolution to enhance feature extraction efficiency. As illustrated in Figure 4, in depthwise convolution each channel is convolved with a single filter, unlike traditional convolution, where each channel is convolved with all filters. This approach reduces both computational load and parameter count while improving the model’s efficiency and speed. Furthermore, the module collaboratively integrates max-pooling operations and residual connections, significantly enhancing the model’s ability to represent features of small targets.
As shown in Figure 5, MSRConv adopts a parallel dual-branch architecture to achieve multi-scale feature extraction. The depthwise convolution branch with a kernel size of 3 × 3 utilizes a smaller receptive field to effectively focus on local detailed features, capturing fine-grained information such as edges and textures with precision. In contrast, the depthwise convolution branch with a kernel size of 5 × 5 leverages a larger receptive field to extract broader contextual information, thereby modeling long-range spatial dependencies. Through this parallel design with differentiated kernel sizes, the two branches complement each other effectively in feature extraction: the 3 × 3 branch excels at preserving detailed texture features of targets. In contrast, the 5 × 5 branch captures broader target information. This structure maintains high computational efficiency while achieving richer feature representations.
The output features of the two branches are concatenated and then enhanced through a max-pooling layer. Max-pooling further emphasizes locally salient small target features, enabling multi-scale feature extraction that helps capture targets of varying sizes. This approach ensures robust feature processing capabilities for diverse targets.
Finally, to preserve feature integrity and optimize gradient propagation, MSRConv incorporates a residual connection mechanism. This mechanism fuses the original input features with the processed features, effectively mitigating feature degradation issues in deep networks. The residual connection not only retains original feature information, preventing the loss of small target features in deep layers, but also significantly improves gradient flow, enhancing the training stability of the model.
The specific computational flow of MSRConv is shown in Equation (4):
C out = f MaxPool ( f dwconv ( f 3 × 3 ( X ) ) ; f dwconv ( f 5 × 5 ( X ) ) ) + X
In the formula, X represents the input feature map of the module, f MaxPool denotes the max-pooling operation, f dwconv represents the depthwise separable convolution operation, f 3 × 3 indicates the convolution operation with a kernel size of 3 × 3 , and f 5 × 5 indicates the convolution operation with a kernel size of 5 × 5 . The output is shown in Equation (4):
MSRConv is specifically designed for detection scenarios where minute defects coexist with complex textures on aluminum surfaces, achieving a precise balance between fine-grained feature extraction and anti-interference requirements. By combining parallel multi-kernel depthwise convolutions with residual connections, MSRConv expands effective receptive fields while maintaining a lightweight design. Its applicability is precisely tailored to the deployment conditions of industrial edge devices, enabling efficient detection of minute defects under low computational overhead.

3.3. NWD

In aluminum defect detection tasks, small targets often exhibit limited edge information and blurred boundaries, making feature extraction challenging for models and leading to significant localization errors. To address this issue, this study introduces the Normalized Wasserstein Distance (NWD) into the regression loss function of the YOLOv8n model to measure the similarity between predicted bounding boxes and ground truth bounding boxes. Given a bounding box R = ( c x , c y , w , h ) , where ( c x , c y ) denotes the center coordinates and h and w denote height and width, respectively.The expression for the inscribed ellipse equation within the bounding box is shown in Equation (5):
( x μ x ) 2 σ x 2 + ( y μ y ) 2 σ y 2 = 1
In the formula, σ x represents the semi-axis length along the x-axis, σ y represents the semi-axis length along the y-axis, and ( μ x , μ y ) denotes the coordinates of the center point. Correspondingly, μ x = c x , μ y = c y , σ x = w / 2 , σ y = h / 2 .
Then, the bounding box is modeled as a two-dimensional Gaussian distribution N = ( μ , ) , where the parameter values of μ and ∑ are shown in Equation (6):
μ = c x c y , = w 2 4 0 0 h 2 4
The Wasserstein distance between two two-dimensional Gaussian distributions μ 1 = N ( m 1 , 1 ) and μ 2 = N ( m 2 , 2 ) can be expressed as Equation (7):
W 2 2 ( μ 1 , μ 2 ) = m 1 m 2 2 2 + 1 1 / 2 2 1 / 2 F 2
In the formula, m 1 and m 2 are mean vectors, ∑ is the covariance matrix, and · F denotes the Frobenius norm. By combining the above formulas, the Wasserstein distance between the two-dimensional Gaussian distributions of bounding box A = ( c x a , c y a , w a , h a ) and bounding box B = ( c x b , c y b , w b , h b ) can be expressed as Equation (8):
W 2 2 ( N a , N b ) = c x a , c y a , w a 2 , h a 2 T , c x b , c y b , w b 2 , h b 2 T 2 2
Then, normalization is performed using an exponential form to derive a new metric, NWD. The Equation is shown in (9):
N W D ( N a , N b ) = exp W 2 2 ( N a , N b ) C
In the Equation, C is a constant. In the detection of small target defects on aluminum surfaces, NWD can better capture the geometric relationships between bounding boxes, particularly performing more effectively when there is minimal overlap between target boxes. Within complex defect backgrounds, NWD contributes to improving the precision of defect localization. CIOU primarily focuses on the overlapping regions of bounding boxes and incorporates constraints on center point distance and aspect ratio, thereby optimizing bounding box regression more effectively. During training, the CIOU loss function enables faster convergence and reduces the drift of predicted boxes. We have adopted a combined metric approach integrating NWD and CIOU, which helps comprehensively address the issue of bounding box overlap in object detection, thereby reducing sensitivity to positional deviations in small targets.

4. Experiments

4.1. Experimental Settings

The experimental environment consists of a Windows 11 64-bit operating system, with a hardware platform equipped with an NVIDIA GeForce RTX 4060 Laptop GPU and an Intel Core i9-14900HX processor. The software environment is based on Python 3.8, PyTorch 2.4.0 framework, and CUDA 12.4 drivers. All comparative experiments adopt uniform training parameters and data augmentation strategies: the initial learning rate is set to 0.01, momentum to 0.937, weight decay to 0.0005, training is conducted for 300 epochs, batch size is configured as 16, and the SGD optimizer is employed. The data augmentation strategy follows the default settings of YOLOv8, including Mosaic augmentation, MixUp augmentation, random geometric transformations, and HSV color space adjustments.All images are resized to 640 × 640, and FPS is tested on the aforementioned hardware platform.

4.2. Evaluation Metrics

To ensure a more precise evaluation of object detection performance, six fundamental metrics [36] are introduced: P, R, mAP, Params, FPS, and GFLOPs. The specific calculation formulas for these metrics are as follows (Equations (10)–(13)):
P = T P T P + F P
R = T P T P + F N
In the formula, TP represents the number of samples correctly classified by the model; FP represents the number of samples incorrectly classified by the model; FN represents the number of samples missed by the model.
A P = P ( R ) d R
m A P = i = 1 k A P i k
In the formula, AP measures the detection accuracy of the model for each category; K represents the total number of categories, and the mean is the average of the summed AP values across all categories.
mAP refers to the average precision of all targets detected by the model on the test set. A larger mAP value indicates higher detection accuracy. In this study, when the IoU threshold is set to 0.5, mAP@0.5 represents the mAP value under this threshold. A higher mAP@0.5 value indicates better detection performance for different types of target objects.
The number of parameters (Params) is a metric for evaluating model complexity. A smaller parameter count typically indicates a simpler model structure and faster processing speed.
FPS refers to the number of image frames the model can process per second. A higher FPS value indicates faster detection speed.
Computational complexity (GFLOPs) refers to the number of floating-point operations of the model, which is used to measure its computational efficiency.

4.3. Experimental Dataset

This study employs two datasets, namely TAPSDD [37] and NEU-DET [38]. The TAPSDD dataset consists of 6008 aluminum surface images. These images are divided into training, test, and validation sets with 4866, 601, and 541 samples respectively. The partition ratio is 8:1:1. All images are collected at a resolution of 2560 × 1920. This dataset covers ten defect categories, including non-conduct, scratch, orange peel, reveal, paint bubble, pit, flow, mottle, corner reveal, and dirty. It provides diverse surface textures including rolled, polished, and ground surfaces, as well as multiple lighting conditions including uniform illumination, directional lighting, and low-contrast environments. However, the dataset presents limited samples of tiny defects smaller than 10 pixels and contains no defect examples on curved surfaces. The original TAPSDD images have a high resolution of 2560 × 1920, which is much larger than the common input size of modern object detectors. In our experiments, all images are resized to 640 × 640 before being fed into the network. This operation maintains the relative scale of defects and enables efficient batch inference. For industrial deployment involving large-format images, a sliding window inference strategy can be adopted, in which the large image is split into overlapping 640 × 640 patches for independent detection and the results are merged afterward. Benefiting from its lightweight architecture with only 1.8 M parameters, BFI-YOLO supports real-time multi-patch processing on embedded devices, enabling reliable and efficient detection for large-scale images commonly encountered in industrial production lines. Example images of the TAPSDD dataset are illustrated in Figure 6.
The NEU-DET dataset contains six types of steel surface defects, specifically crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches. Each defect class includes 300 samples with an original image size of 200 × 200 pixels. This dataset is also split at a ratio of 8:1:1, generating 1440 training images, 180 test images, and 180 validation images.

4.4. Comparative Experiments

To evaluate the superiority of the BFI-YOLO model compared to existing algorithms, this study systematically compares it with current mainstream and representative detection models. The selected models for comparison encompass a variety of typical detectors, including single-stage, two-stage, and Transformer-based architectures. Specifically, the models include: SSD, YOLOv5s, YOLOv7, Faster-RCNN, DETR, RT-DETR, YOLOv8n, YOLOv10n, YOLOv11n, and YOLOv12n. These models each exhibit distinct characteristics in detection accuracy, inference speed, and architectural design, and all serve as widely applied backbone frameworks in practical scenarios such as industrial inspection. To comprehensively validate the generalization ability of the proposed method, experiments were conducted on two datasets: the TAPSDD dataset and the publicly available NEU-DET dataset. The NEU-DET dataset serves as an additional benchmark to assess model performance under different data distributions and surface defect scenarios, addressing the reviewer’s suggestion for broader validation. By conducting comparisons under a unified experimental environment, the applicability and comprehensive advantages of the proposed method in real-world tasks can be more objectively assessed.All experiments were repeated five times with different random seeds, and the average results are reported throughout this section. The comparison results are shown in Table 1.
As shown in Table 1, the BFI-YOLO model proposed in this study demonstrates superior comprehensive performance in aluminum defect detection tasks, exhibiting significant competitive advantages in detection precision, recall rate, and lightweight design. A detailed comparative analysis is outlined below:
Among mainstream comparative models, YOLO series models such as YOLOv5 and YOLOv8n hold certain performance advantages due to their mature feature fusion architectures. However, they still exhibit notable limitations: YOLOv5 relies on a unidirectional FPN structure, while YOLOv8n employs PANet for feature interaction. Both models suffer from fixed feature propagation pathways, which easily lead to information loss, especially for the detailed features of minor defects that tend to be diluted in deeper network layers, thereby constraining their detection performance. In contrast, BFI-YOLO achieves an mAP@0.5 of 92.1%, representing improvements of 4.6% over YOLOv5 and 4.2% over YOLOv8n. The recall rate is also optimized simultaneously, fully validating the multi-scale fusion advantages of BM-FPN.
DETR series models, such as DETR [31], introduce Transformer encoder-decoder architectures and global attention mechanisms, eliminating the constraints of manually designed anchor boxes. However, DETR suffers from high computational complexity, slow convergence, and high demands on GPU memory and training data scale. RT-DETR [32] further optimizes real-time performance but still lacks sensitivity to local subtle features. Preliminary experiments show that DETR and RT-DETR achieve mAP@0.5 values of 76.7% and 77.5%, respectively, both lower than BFI-YOLO. Additionally, their parameter counts and computational costs are significantly higher than BFI-YOLO, indicating a clear gap in comprehensive detection efficiency.
Both the C3 module in YOLOv5 and the C2f module in YOLOv8n are designed based on stacked standard convolutions, resulting in large parameter counts and limited receptive fields, making it difficult to balance detailed and global information. In contrast, the MSRConv module designed in this study integrates depthwise separable convolutions and dilated convolutions in parallel, reducing parameter counts while covering richer scale information, thereby successfully balancing detection efficiency and precision.
Compared to YOLOv11n and YOLOv12n, BFI-YOLO reduces the parameter count by 0.7 M, demonstrating better balance between lightweight design and detection precision. By combining the depthwise separable convolutions of MSRConv and the shared weight mechanism of BM-FPN, BFI-YOLO compresses the parameter count to an ultra-lightweight level of 1.8 M while maintaining a detection precision of 91.3%, significantly outperforming YOLOv11.
In summary, through the synergistic optimization of the BM-FPN and MSRConv modules, BFI-YOLO achieves the optimal balance between detection precision and efficiency under an ultra-light parameter count (1.8 M). Its comprehensive performance surpasses that of existing mainstream models, making it more suitable for deployment in industrial scenarios requiring real-time detection of aluminum defects.
On the newly introduced NEU-DET dataset, our method achieves 79.8% Precision, 78.5% Recall, and 78.4% mAP@0.5, consistently surpassing other detectors. Notably, YOLOv8n performs best among existing methods on NEU-DET with 75.3% mAP, while our method exceeds it by 3.1 percentage points. The results demonstrate that BFI-YOLO achieves 78.4% mAP@0.5 on NEU-DET, outperforming the best existing method by 3.1 percentage points while maintaining low parameters and high inference speed. This confirms the model’s strong effectiveness and generalization capability across different metal surface defect detection tasks.
To evaluate the lightweight advantage of BFI-YOLO, we select two representative lightweight backbone networks for comparison: the classic lightweight model MobileNetv3 and the recent extremely simple architecture VanillaNet. The experimental results are shown in Table 2.
As shown in Table 2, BFI-YOLO achieves 92.1% mAP@0.5, greatly surpassing MobileNetv3 and VanillaNet. Although these lightweight models have smaller model sizes, they suffer from severe accuracy degradation. Meanwhile, BFI-YOLO reduces parameters by 40% relative to the baseline and achieves the fastest inference speed of 243 FPS. These results demonstrate that BFI-YOLO achieves a more superior accuracy-efficiency trade-off than existing lightweight detectors.

4.5. Ablation Study

To validate the individual contributions and combined effects of each improved module on detection performance, we designed a series of ablation experiments. We incrementally introduced each module into the original YOLOv8 and analyzed its effectiveness through performance comparisons. The experiments used the original YOLOv8 as the baseline and separately incorporated the BM-FPN, MSRConv, and NWD modules. We maintained consistent training strategies and datasets, introducing only structural modifications to ensure the fairness of the experiments. The experimental results are shown in Table 3.
The model with only BM-FPN introduced reduces the parameter count by 36.7% while increasing mAP@0.5 from 87.9% to 91.0%, with the recall rate improving by 2.6 percentage points. This indicates that BM-FPN significantly enhances the efficiency of multi-scale feature fusion by streamlining redundant connections and strengthening bidirectional feature interaction. It particularly aids in preserving and transmitting features of minute defects, laying a crucial foundation for model lightweighting and performance improvement.
The model with only MSRConv introduced achieves a 1.8% increase in mAP@0.5, a 2.1% rise in recall rate, and a 16.7% reduction in parameter count. This module enhances the model’s ability to represent features of defects of varying sizes through parallel multi-scale depthwise convolution and residual connections. Its lightweight structural design also contributes to optimizing overall computational efficiency.
After introducing NWD, the model achieves comprehensive, albeit modest, improvements in precision, recall rate, and mAP@0.5 without increasing any parameters or computational overhead. This validates the effectiveness of NWD in optimizing bounding box regression for small targets and mitigating scale sensitivity issues, providing an important foundation for localization optimization in subsequent multi-module collaboration.
The final model, which incorporates NWD loss on top of BM-FPN and MSRConv, effectively aligns the feature optimization directions of BM-FPN and MSRConv through the refined calculation of the NWD loss for bounding box regression. This fully leverages the synergistic benefits among the modules, achieving optimal levels in core metrics such as precision, recall rate, and mAP@0.5. Moreover, it maintains extremely low parameter count and computational cost, with only 1.8 M parameters-a 40% reduction compared to the baseline A0 ultimately achieving the best balance among detection accuracy, parameter count, and computational efficiency.
The above ablation results are visually presented in Figure 7: Comparison of aluminum defect detection performance under different module configurations. As can be observed from Figure 7, although the problem of missed detection has been resolved for some typical tiny and dirty defects, their confidence scores are still only around 0.3–0.4, which are significantly lower than those of defects with clear features and distinct contours. This phenomenon is mainly attributed to the low contrast between tiny defects and the complex aluminum surface texture, the lack of prominent and representative features of the defects themselves, as well as the interference from background noise and texture.

4.6. Heatmap Analysis

To more intuitively demonstrate the effectiveness of the improved model, we randomly selected four typical aluminum surface defect images from the test set of the dataset. We employed the Grad-CAM method to generate heatmaps [38] and visualized them. Figure 8 compares the heatmap visualization results of YOLOv8n and BFI-YOLO:
Figure 8 displays the heatmaps generated by the original YOLOv8n model and the BFI-YOLO model proposed in this study, revealing several typical detection challenges. The first category involves significant offsets in detection boxes, which directly lead to increased localization errors. The second category pertains to shallow defects, such as minor scratches, which produce almost no effective activation in the heatmaps, ultimately resulting in missed detections. The third category involves small targets in sparse scenes, where heatmap responses appear as weak and scattered peaks. The third category also includes missed detections of small targets, a problem that encompasses both feature attenuation caused by repeated downsampling in sparse scenes and the mutual interference of adjacent target features in dense scenes, where heatmap responses overlap and are erroneously merged or suppressed.
The primary cause of detection box offsets lies in the feature pyramid’s insufficient fusion of multi-scale information. In the original network, deep semantic features often overshadow shallow texture details, resulting in low-amplitude, discrete heatmap responses at defect edges. After threshold processing, detection boxes are prone to deviating from the true contours. To address this, this study introduces an optimized BiFPN structure integrated with the SimAM attention mechanism into the feature fusion pathway. This module achieves effective feature interaction across different scales through dynamic weighting, enhancing detailed information in deep networks and producing sharp, high-amplitude heatmap activations at defect edges. As a result, detection boxes can more closely align with the actual boundaries of defects.
Shallow features have limited receptive fields and low contrast, making them susceptible to suppression as noise during traditional convolution operations, leading to missed detections of shallow defects. To tackle this issue, the MSRConv module we designed constructs feature extraction branches with differentiated receptive fields. The dilated convolution expands the receptive field without adding extra parameters, while depthwise separable convolution enhances the efficiency of the response to subtle textures. After fusion via residual connections, the features of shallow defects are significantly enhanced, producing distinct bright patches in the corresponding heatmap regions, thereby effectively reducing the missed-detection rate for these defects.
For small target detection in sparse scenes, the gradual attenuation of features during repeated downsampling is a key factor leading to missed detections. To maintain sensitivity to tiny targets, our method retains high-resolution feature layers in the BiFPN structure. It leverages the multi-receptive field characteristics of the MSRConv module, enabling even extremely small targets to be fully represented on higher-resolution feature maps. The result is sharper, more concentrated, and higher-amplitude heatmap peaks at small target locations, allowing detection boxes to capture these targets accurately.
In dense scenes, missed detections of small targets primarily stem from feature interference between adjacent targets, manifested as overlapping heatmap responses. To address this, we further incorporate a self-attention mechanism based on cross-scale interactions in BiFPN, decoupling the features of adjacent targets to ensure each target obtains an independent activation region in the heatmap. Additionally, a weighted NWD-CIoU loss function is employed during the regression stage to balance the model’s sensitivity to positional errors, encouraging the network to focus more on learning overall shape matching rather than over-optimizing pixel-level offsets. This strategy significantly suppresses erroneous merging caused by boundary overlap, allowing the heatmap to clearly distinguish each small target even in dense areas, thereby substantially reducing the missed detection rate.
In summary, the synergistic effect of BiFPN’s dynamic weighted cross-scale fusion mechanism, MSRConv’s differentiated receptive field design, and the weighted NWD-CIOU regression strategy enables BFI-YOLO to achieve more concentrated response distributions, higher peak intensities, and lower background noise in heatmaps. The improvement in heatmap quality is directly reflected in enhanced detection performance: bounding boxes align more closely with defect boundaries, the recall rate for shallow defects is improved, and the detection completeness for small targets, whether sparsely or densely distributed, is significantly elevated. These experimental results validate the effectiveness of the bidirectional multi-scale residual network proposed in this study for industrial defect detection tasks.

4.7. Detection Performance Analysis

To more intuitively demonstrate the effectiveness of the improved model, we randomly selected representative surface defect images from the test set for each defect category-namely, Pit, Scratch, Paint Bubble, and Flow. The detection results of the original YOLOv8n and the enhanced BFI-YOLO proposed in this study are compared, as shown in Figure 9.
The detection results demonstrate that the improved BFI-YOLO significantly outperforms the YOLOv8n baseline model, effectively addressing issues present in the baseline model for aluminum defect detection. The original input images preserve the true texture of the aluminum surface. Subsequently, the baseline model YOLOv8n detects the same images, revealing frequent missed detections or low confidence in subtle, low-contrast defects such as pits and paint bubbles. The detection boxes for scratches are overly large and exhibit positioning offsets, while flow marks suffer from fragmented detections. BFI-YOLO, which incorporates bidirectional multi-scale feature fusion, efficient local attention mechanisms, and a lightweight shared detection head, achieves significant improvements across all four defect categories: detection boxes for pits tightly adhere to defect edges, with confidence rising from approximately 0.5 to 0.6; repeated false detection boxes for scratches are effectively suppressed, with confidence increasing to 0.8; faint textures of paint bubbles are enhanced, transitioning from missed detection to effective identification; and detection confidence for flow marks improves from 0.8 to 0.9, with detection boxes fully covering defect regions and coverage completeness markedly enhanced. Overall, BFI-YOLO significantly surpasses the baseline model in three key metrics: detection completeness, localisation accuracy, and confidence. This validates that the proposed improvements in this study enable efficient, accurate detection of aluminum surface defects in industrial settings, meeting the stringent quality-control demands of production lines.

5. Limitation and Future Work

Compared to the current mainstream methods in the field of metal surface defect detection, BFI-YOLO achieves a comprehensive balance among detection accuracy, real-time performance, and model lightweighting, demonstrating significant competitiveness. However, this study still has certain limitations that need to be addressed: the scalability of the model has not been fully explored, as the experimental validation is primarily conducted on the TAPSDD dataset, which focuses on aluminum surface defects. Its generalization capability on larger-scale datasets and its adaptability to different types of defects on other materials, such as metals and composites, have yet to be thoroughly validated, which restricts its applicability in a broader range of industrial scenarios. It is worth mentioning that all datasets used in this study are publicly available datasets commonly adopted in the industry, and the improvement in detection accuracy is attributed to algorithmic enhancements. However, in practical metal surface defect detection tasks, detection accuracy is primarily influenced by the quantity and quality of datasets, which are, to a large extent, constrained by objective conditions such as lighting and viewing angles.
In future deployment efforts, we will focus on further research: integrating the proposed vision-based detection method with robotics technology, embedding the model into robotic inspection systems to expand its practical application scenarios and achieve automated, large-scale, and high-efficiency defect detection in industrial production, aligning with the Industry 4.0 development framework. Additionally, we will expand the dataset by incorporating more tiny defect samples smaller than 10 pixels and refine the feature extraction module to enhance its sensitivity to subtle defect features, thereby optimizing the model’s detection performance for extremely small defects and further improving detection accuracy for such cases.

6. Conclusions

This study proposes an improved BFI-YOLO network to address challenges in aluminum surface defect detection, including insufficient multi-scale feature fusion, limited representation of small targets, and excessive model parameters. By introducing BM-FPN and MSRConv, the method effectively enhances feature fusion capabilities and the representation of minute defects, while incorporating a parameter-free SimAM attention mechanism to suppress background interference further. Experimental results demonstrate that the proposed model achieves a precision of 91.3%, recall of 89.8%, and mAP@0.5 of 92.1% with only 1.8 M parameters, outperforming various mainstream detection models while significantly reducing parameter count and maintaining high detection accuracy. Although BFI-YOLO exhibits strong overall performance, its robustness under extreme lighting conditions and its ability to identify subtle defects against complex textured backgrounds remain areas for improvement. Future work will focus on adaptive data augmentation strategies and more refined mechanisms for multi-scale feature interactions to further enhance the model’s applicability and generalization in complex industrial scenarios.

Author Contributions

Conceptualization, T.G. and S.L.; methodology, T.G.; software, T.G. and L.S.; validation, T.G., W.L. and Q.Z.; formal analysis, Q.Z.; investigation, W.L.; resources, S.L.; data curation, W.L.; writing—original draft preparation, T.G.; writing—review and editing, S.L.; visualization, T.G. and L.S.; supervision, S.L.; project administration, S.L.; funding acquisition, S.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Major Research Plan of the National Natural Science Foundation of China (51778104) and the Department of Education of Liaoning Province (DL202005).

Data Availability Statement

The datasets used in this study, TAPSDD and NEU-DET, are publicly available. They can be accessed as follows: The TAPSDD dataset is available at: https://tianchi.aliyun.com/dataset/140666 (accessed on 18 December 2025). The NEU-DET dataset is available at: https://universe.roboflow.com/park-sung-ho/neu-detobject-detection (accessed on 25 February 2026).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fang, X.; Luo, Q.; Zhou, B.; Li, C.; Tian, L. Research Progress of Automated Visual Surface Defect Detection for Industrial Metal Planar Materials. Sensors 2020, 20, 5136. [Google Scholar] [CrossRef] [PubMed]
  2. Wang, Y.; Wei, Y.S.; Wu, Z.Z.; He, Z.H.; Wang, K.; Ding, Z.S.; Zou, L. Adaptive convolutional neural network for aluminum surface defect detection. Comput. Mater. Sci. 2023, 227, 112262. [Google Scholar] [CrossRef]
  3. Li, N.; Wang, F.; Song, G. New entropy-based vibro-acoustic modulation method for metal fatigue crack detection: An exploratory study. Measurement 2019, 148, 107075. [Google Scholar] [CrossRef]
  4. Mery, D.; Arteta, C. Automatic defect recognition in x-ray testing using computer vision. In Proceedings of the 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), Santa Rosa, CA, USA, 24–31 March 2017; pp. 1–8. [Google Scholar]
  5. Petcher, P.A.; Dixon, S. Weld defect detection using PPM EMAT generated shear horizontal ultrasound. NDT E Int. 2015, 74, 58–65. [Google Scholar] [CrossRef]
  6. Dziczkowski, L. Elimination of coil liftoff from eddy current measurements of conductivity. IEEE Trans. Instrum. Meas. 2013, 62, 3301–3307. [Google Scholar] [CrossRef]
  7. Li, Y.; Li, W.; Wang, Y.; Li, Y.; Jiang, G.; Song, K. Simulation and Experimental Study on Pipe Inner Wall Thinning Based on Eddy Current Array Detection. Proc. Chin. Soc. Electr. Eng. 2021, 41, 254–260. [Google Scholar] [CrossRef]
  8. Yang, G. Evaluation of the Wall Condition of Horizontal Storage Tanks Based on Magnetic Flux Leakage Detection Method. Petrochem. Ind. Appl. 2023, 42, 99–101, 107. [Google Scholar]
  9. Meng, X.; Li, C.; Wen, J. Small target detection of infrared column scan images based on local gradient. Laser J. 2023, 44, 52–56. [Google Scholar] [CrossRef]
  10. Chen, J.; Cheng, X.; Zhang, H.; Cai, H.; Zhou, J.; Na, R.; Wu, B. Experimental research and application of non-destructive detecting techniques for concrete-filled steel tubes based on infrared thermal imaging and ultrasonic method. J. Build. Struct. 2021, 42, 444–453. [Google Scholar] [CrossRef]
  11. Wu, L.; Hao, H.Y.; Song, Y. Review of industrial metal surface defect detection based on computer vision. J. Beijing Univ. Aeronaut. Astronaut. 2024, 50, 1261–1283. [Google Scholar] [CrossRef]
  12. Wang, J.Y.; Wen, B.; Shen, Y.J.; Zhang, J.; Wang, Z.H. Aluminum profile surface defect detection method based on improved YOLOv7-tiny. J. Univ. Electron. Sci. Technol. China 2024, 63, 58–65. [Google Scholar]
  13. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single shot multibox detector. In Proceedings of the European Conference on Computer Vision; Springer International Publishing: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar] [CrossRef]
  14. 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; Springer International Publishing: Cham, Switzerland, 2020; pp. 213–229. [Google Scholar] [CrossRef]
  15. Cha, Y.J.; Choi, W.; Suh, G.; Mahmoudkhani, S. Autonomous structural visual inspection using region-based deep learning for detecting multiple damage types. Comput.-Aided Civil Infrastruct. Eng. 2018, 33, 731–747. [Google Scholar] [CrossRef]
  16. Weng, Y.; Xiao, J.; Xia, Y. Detection of Strip Steel Surface Defects Based on Improved Mask R-CNN Algorithm. Comput. Eng. Appl. 2021, 57(19), 235–242. [Google Scholar]
  17. 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. 936–944. [Google Scholar] [CrossRef]
  18. 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–23 June 2018; pp. 8759–8768. [Google Scholar] [CrossRef]
  19. 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–23 June 2018; pp. 7132–7141. [Google Scholar]
  20. Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar] [CrossRef]
  21. Das, A.K.; Leung, C.K.Y. Fast Tomography: A greedy, heuristic, mesh size–independent methodology for local velocity reconstruction for AE waves in distance decaying environment in semi real-time. Struct. Health Monit. 2022, 21, 1555–1573. [Google Scholar] [CrossRef]
  22. Das, A.K.; Leung, C.K.Y. A Novel Technique for High-Efficiency Characterization of Complex Cracks with Visual Artifacts. Appl. Sci. 2024, 14, 7194. [Google Scholar] [CrossRef]
  23. Li, X.; Wang, C.; Li, B.; Guo, Z.; Li, Q.; Li, Z. Improved YOLOV5 Algorithm for Steel Surface Defect Detection. J. Air Force Eng. Univ. (Nat. Sci. Ed.) 2022, 23, 26–33. [Google Scholar] [CrossRef]
  24. Wang, Y.; Gong, X.; Cheng, J.; Su, H. Real-time detection of casting defects in X-ray images based on improved YOLOv5. Packaging Engineering J. 2022, 43, 54–60. [Google Scholar]
  25. Gao, L.; Zhang, J.; Yang, C.; Zhou, Y. Cas-VSwin transformer: A variant swin transformer for surface-defect detection. Comput. Ind. 2022, 140, 103689. [Google Scholar] [CrossRef]
  26. Tang, B.; Song, Z.-K.; Sun, W.; Wang, X.-D. An end-to-end steel surface defect detection approach via Swin transformer. IET Image Process. 2023, 17, 1334–1345. [Google Scholar] [CrossRef]
  27. Wang, X.; He, F.; Chen, Y.; Feng, S. Steel surface defect detection based on improved YOLOv7. In Proceedings of the 2024 4th International Conference on Consumer Electronics and Computer Engineering (ICCECE), Guangzhou, China, 19–21 April 2024; pp. 479–482. [Google Scholar] [CrossRef]
  28. Sun, Y.; Yan, H.; Shang, Z.; Yang, M. MCH-YOLOv12: Research on surface defect detection algorithm for aluminum profiles based on improved YOLOv12. Sensors 2025, 25, 5389. [Google Scholar] [CrossRef]
  29. Liu, R.; Zhu, Z.; Ge, H.; Wang, J.; Shu, Y. Towards scale-adaptive and lightweight maritime ship object detection via dual-cross multi-scale knowledge distillation. Ocean Eng. 2026, 343, 123206. [Google Scholar] [CrossRef]
  30. Hu, R.; Zheng, H.; Ye, S.; Qing, L.; Chen, H. A lightweight framework for robust object detection in adverse weather based on dual-teacher feature alignment. Neurocomputing 2026, 671, 132726. [Google Scholar] [CrossRef]
  31. Jung, B.; You, H.; Lee, S. Anomaly candidate extraction and detection for automatic quality inspection of metal casting products using high-resolution images. J. Manuf. Syst. 2023, 67, 229–241. [Google Scholar] [CrossRef]
  32. Yun, J.P.; Shin, W.C.; Koo, G.; Kim, M.S.; Lee, C.; Lee, S.J. Automated defect inspection system for metal surfaces based on deep learning and data augmentation. J. Manuf. Syst. 2020, 55, 317–324. [Google Scholar] [CrossRef]
  33. Feng, Y.A.; Song, W.W. Surface defect detection for aerospace aluminum profiles with attention mechanism and multi-scale features. Electronics 2024, 13, 2861. [Google Scholar] [CrossRef]
  34. Yi, F.F.; Zhang, H.G.; Yang, J.F.; He, L.; Mohamed, A.S.A.; Gao, S. YOLOv7-SiamFF: An industrial defect detection algorithm based on improved YOLOv7. Comput. Electr. Eng. 2024, 109, 109090. [Google Scholar] [CrossRef]
  35. Liu, S.; Huang, D.; Wang, Y. Receptive Field Block Net. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 385–400. [Google Scholar] [CrossRef]
  36. Padilla, R.; Netto, S.L.; da Silva, E.A.B. A Survey on Performance Metrics for Object-Detection Algorithms. In Proceedings of the 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), Niteroi, Brazil, 1–3 July 2020; pp. 237–242. [Google Scholar] [CrossRef]
  37. Guangdong Industrial Intelligent Manufacturing Big Data Innovation Competition. Tianchi Aluminum Surface Defect Dataset. Tianchi. 2018. Available online: https://tianchi.aliyun.com/dataset/140666 (accessed on 18 December 2025).
  38. Northeastern University. NEU-DET Dataset. 2022. Available online: https://universe.roboflow.com/park-sung-ho/neu-det-object-detection (accessed on 25 February 2026).
  39. Zhou, Y.; Yan, Y.; Chen, H.; Pei, S. Photovoltaic Cell Defect Detection Based on Improved YOLOv8. Laser Optoelectron. Prog. 2024, 61, 235–245. [Google Scholar] [CrossRef]
  40. Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J. Yolov10: Real-time end-to-end object detection. Adv. Neural Inf. Process. Syst. 2024, 37, 107984–108011. [Google Scholar]
  41. Khanam, R.; Hussain, M. Yolov11: An overview of the key architectural enhancements. arXiv 2024, arXiv:2410.17725. [Google Scholar] [CrossRef]
  42. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 28, 91–99. [Google Scholar] [CrossRef]
  43. Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q. DETRS beat YOLOs on real-time object detection. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 16965–16974. [Google Scholar]
  44. 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 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar] [CrossRef]
  45. Howard, A.G.; Sandler, M.; Chu, G.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; Le, Q.V.; et al. Searching for MobileNetV3. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1314–1324. [Google Scholar] [CrossRef]
  46. Chen, H.; Wang, Y.; Guo, J.; Tao, D. VanillaNet: The Power of Minimalism in Deep Learning. In Proceedings of the 37th Conference on Neural Information Processing Systems (NeurIPS), New Orleans, LA, USA, 10–16 December 2023. [Google Scholar]
Figure 1. BFI-YOLO Network Model.
Figure 1. BFI-YOLO Network Model.
Electronics 15 01080 g001
Figure 2. Schematic diagram of different feature fusion architectures. (a) FPN feature fusion architecture, (b) PANet feature fusion architecture, (c) BiFPN feature fusion architecture.
Figure 2. Schematic diagram of different feature fusion architectures. (a) FPN feature fusion architecture, (b) PANet feature fusion architecture, (c) BiFPN feature fusion architecture.
Electronics 15 01080 g002
Figure 3. Structure of SimAM.
Figure 3. Structure of SimAM.
Electronics 15 01080 g003
Figure 4. Structure of DWConv.
Figure 4. Structure of DWConv.
Electronics 15 01080 g004
Figure 5. Structure of MSRConv.
Figure 5. Structure of MSRConv.
Electronics 15 01080 g005
Figure 6. Example images from the TAPSDD dataset.
Figure 6. Example images from the TAPSDD dataset.
Electronics 15 01080 g006
Figure 7. Comparison of aluminum defect detection performance under different module configurations.
Figure 7. Comparison of aluminum defect detection performance under different module configurations.
Electronics 15 01080 g007
Figure 8. Heatmap comparisons: (a) Input, (b) YOLOv8n baseline, (c) Ours.
Figure 8. Heatmap comparisons: (a) Input, (b) YOLOv8n baseline, (c) Ours.
Electronics 15 01080 g008
Figure 9. Detection results.
Figure 9. Detection results.
Electronics 15 01080 g009
Table 1. Comparison of different models on TAPSDD and NEU-DET.
Table 1. Comparison of different models on TAPSDD and NEU-DET.
TAPSDDNEU-DETComplexity
ModelP (%)R (%)mAP@0.5 (%)P (%)Recall (%)mAP@0.5 (%)Params (M)GFLOPSFPS
YOLOv5s [23]87.985.287.572.276.874.47.016.0130
YOLOv7 [12]88.165.374.571.969.870.737.2104.545
YOLOv8n [39]90.080.287.979.574.275.33.08.2187
YOLOv10n [40]87.480.185.769.671.771.52.28.4172
YOLOv11n [41]89.582.589.171.570.871.22.56.5244
YOLOv12n [27]89.482.588.369.672.572.42.56.3251
Faster-RCNN [42]78.586.783.679.568.171.328.3138.527
DETR [43]85.285.276.772.170.370.242.5187.419
RT-DETR [44]85.984.877.573.672.471.120.960.877
Ours91.389.892.179.878.578.41.88.1243
The bold is used to highlight the best performance results.
Table 2. Performance Comparison with Mainstream Lightweight Backbones.
Table 2. Performance Comparison with Mainstream Lightweight Backbones.
ModelmAP@0.5 (%)Params (M)GFLOPSFPS
YOLOv8n [26]87.93.08.2187
MobileNetv3 [45]69.51.210.0103
VanillaNet [46]76.12.06.2120
Ours92.11.88.1243
The bold is used to highlight the best performance results.
Table 3. Ablation Study Results.
Table 3. Ablation Study Results.
ModelPrecision (%)Recall (%)mAP@0.5 (%)Params (M)GFLOPSFPS
Baseline90.080.287.93.08.2187
+BM-FPN89.882.891.01.97.0216
+MSRConv89.982.389.72.57.2209
+NWD90.680.588.23.08.2175
Ours91.389.892.11.88.1243
The bold is used to highlight the best performance results.
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.

Share and Cite

MDPI and ACS Style

Guo, T.; Li, S.; Li, W.; Zhou, Q.; Shi, L. BFI-YOLO: A Lightweight Bidirectional Feature Interaction Network for Aluminum Surface Defect Detection. Electronics 2026, 15, 1080. https://doi.org/10.3390/electronics15051080

AMA Style

Guo T, Li S, Li W, Zhou Q, Shi L. BFI-YOLO: A Lightweight Bidirectional Feature Interaction Network for Aluminum Surface Defect Detection. Electronics. 2026; 15(5):1080. https://doi.org/10.3390/electronics15051080

Chicago/Turabian Style

Guo, Tianyu, Songsong Li, Weining Li, Qiaozhen Zhou, and Luyang Shi. 2026. "BFI-YOLO: A Lightweight Bidirectional Feature Interaction Network for Aluminum Surface Defect Detection" Electronics 15, no. 5: 1080. https://doi.org/10.3390/electronics15051080

APA Style

Guo, T., Li, S., Li, W., Zhou, Q., & Shi, L. (2026). BFI-YOLO: A Lightweight Bidirectional Feature Interaction Network for Aluminum Surface Defect Detection. Electronics, 15(5), 1080. https://doi.org/10.3390/electronics15051080

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop