DOI: 10.3390/jimaging12110532 ISSN: 2313-433X

DFANet: A Lightweight Dual-Branch Feature-Aggregation Network for Metal Surface Defect Detection

Hongshan Gou, Yueji Wang, Fujian Feng, Fei Wang, Mian Tan, Weili Yang

Object detection is pivotal for automated industrial surface defect detection. However, industrial imaging of metal surfaces is often hampered by adverse factors such as uneven illumination, strong specular reflection, low contrast, and blurring of tiny defects. These issues can significantly impair the feature extraction capability of mainstream detection networks and hinder their real-time deployment on edge imaging devices. To address the aforementioned issues, this paper proposes a lightweight Dual-branch Feature-Aggregation Network (DFANet). Aiming at excessive parameters and redundant computation of traditional backbones, we design a lightweight Dual-branch Feature Alignment Fusion (DFAF) backbone. The dual-stream structure separately extracts shallow texture imaging features and deep semantic imaging features of metal surfaces, and the embedded Feature Alignment Fusion (FAF) module eliminates spatial offsets of multi-scale imaging features caused by illumination interference. Furthermore, a Parallel Spatial Deformable Module (PSDM) is integrated into the backbone to dynamically adjust receptive fields via deformable attention, strengthening feature characterization for irregular defects under low-quality imaging conditions. In the neck part, a Reparameterized Context Interaction Block (RCIB) is constructed to filter redundant background texture information from multi-layer imaging feature maps, further reducing memory and computation consumption. Comprehensive experiments are carried out on three public metal surface imaging datasets: NEU-DET, X-SDD, and GC10-DET. The DFANet achieves mAP values of 83.8%, 76.6%, and 73.1%, respectively. Compared with the YOLO11m baseline, our DFANet reduces the number of parameters by 20.7% and the computational cost (GFLOPs) by 65.9%. Extensive comparisons with state-of-the-art detection methods and ablation studies demonstrate that DFANet achieves a favorable trade-off between detection precision and lightweight performance. The proposed network offers an efficient solution for real-time automatic defect inspection on industrial metal production lines.

More from our Archive