Feature optimization-guided high-precision and real-time metal surface defect detection network

Sixian Chan, Suqiang Li, Hongkai Zhang, Xiaolong Zhou, Jiafa Mao, Feng HongScientific 2024 · DOI

Abstract

Existing computer vision-based surface defect detection techniques for metal materials typically encounter issues with defect overlap, significant differences within classes, and similarity between defect samples. These issues compromise feature extraction accuracy and result in missed and false detections. This study proposed a feature optimization-guided high-precision and real-time metal surface defect detection network (FOHR Net) to improve defect feature expressiveness. Firstly, the network presents a multi-layer feature alignment module that enhances the feature information relevant to the target defect by fusing shallow and deep features using a multi-layer feature alignment approach. Secondly, the slice features are reorganized using a dual-branch feature recombination module, and the channel-level soft attention is applied to produce the channel-optimized feature map. The dual-branch transformation stage's output features are adaptively merged, which may effectively lower feature information loss, improve feature expressiveness, and allow the model to collect useful feature information. Finally, we carried out thorough tests on the NEU-DET, GC10-DET, and APDDD datasets. Our results show that our average mean average precision is superior to other widely used defect detection techniques, with 78.3%, 70.5%, and 65.9%, respectively. Furthermore, we further illustrated the efficacy of our approach using several ablation trials and visualization detection outcomes.

Challenges in Industrial Metal Inspection

In industrial manufacturing, identifying surface defects on metal materials is critical for quality control. However, automated detection using computer vision faces significant hurdles. Defects such as crazing, inclusions, and scratches often exhibit high inter-class similarity, where different defect types appear nearly identical in grayscale and texture. Conversely, intra-class variation is common; defects of the same type can vary drastically in scale and shape, frequently overlapping. Furthermore, industrial environments often yield low-clarity, blurred images, making it difficult for standard algorithms to discern fine-grained details.

While Convolutional Neural Networks (CNNs) are standard for these tasks, they often suffer from information loss during downsampling. Deep features frequently lose the fine-grained context of shallow features as information traverses many layers, leading to missed or false detections.

The FOHR Net Architecture

To address these challenges, we propose FOHR Net, which utilizes CSPDarkNet-53 as its backbone and introduces two primary innovations to the network's "neck":

  • Multi-layer Feature Alignment Module (MFAM): Unlike traditional layer-by-layer transmission, MFAM fuses features from multiple levels (P2 through P5) simultaneously. By aligning these different scales to a single benchmark, the model captures richer contextual information and prevents the loss of shallow details as the network goes deeper.
  • Dual-branch Feature Recombination Module (DFRM): This module acts as a sophisticated filter by splitting feature maps into two branches and applying channel-level soft attention (using both global average and max pooling). This allows the model to selectively enhance informative channels while suppressing noise, effectively compensating for details lost during convolution.

The architecture is further integrated using a Path Aggregation Feature Pyramid Network (PAFPN) before reaching the detection head, ensuring robust feature fusion.

Experimental Evaluation and Results

FOHR Net was evaluated on three public benchmarks: NEU-DET (hot-rolled steel), GC10-DET (industrial steel), and APDDD (aluminum surfaces).

Examples of metal surface defects from the NEU-DET dataset, illustrating the challenges of low clarity and intra-class variation across types like crazing, inclusions, and scratches.

Our results demonstrate that FOHR Net achieves superior performance compared to mainstream models like YOLOv5s, YOLOv7, and YOLOv8s:

  • NEU-DET: Achieved 78.3% mAP at 115 FPS, a 2.2% accuracy improvement over YOLOv8s.
  • GC10-DET: Reached 70.5% mAP at 94 FPS, outperforming the second-best model by 4.3%.
  • APDDD: Achieved 65.9% mAP, 1.6% higher than the next-best competitor.

Qualitative analysis shows that FOHR Net is significantly more effective at locating small, blurred defects that other models often misclassify or miss entirely.

Conclusion

FOHR Net provides a high-precision, real-time solution for metal surface defect detection by bridging the "transmission gap" between shallow and deep features. While the model is robust, future work will focus on expanding datasets to include more extreme environmental noise—such as smoke and vibration—and integrating real-world operator feedback to further fine-tune detection sensitivity for live factory floors.

Summary updated

Abstract

Existing computer vision-based surface defect detection techniques for metal materials typically encounter issues with defect overlap, significant differences within classes, and similarity between defect samples. These issues compromise feature extraction accuracy and result in missed and false detections. This study proposed a feature optimization-guided high-precision and real-time metal surface defect detection network (FOHR Net) to improve defect feature expressiveness. Firstly, the network presents a multi-layer feature alignment module that enhances the feature information relevant to the target defect by fusing shallow and deep features using a multi-layer feature alignment approach. Secondly, the slice features are reorganized using a dual-branch feature recombination module, and the channel-level soft attention is applied to produce the channel-optimized feature map. The dual-branch transformation stage's output features are adaptively merged, which may effectively lower feature information loss, improve feature expressiveness, and allow the model to collect useful feature information. Finally, we carried out thorough tests on the NEU-DET, GC10-DET, and APDDD datasets. Our results show that our average mean average precision is superior to other widely used defect detection techniques, with 78.3%, 70.5%, and 65.9%, respectively. Furthermore, we further illustrated the efficacy of our approach using several ablation trials and visualization detection outcomes.
BibTeX
@inproceedings{chan2024feature,
  author = {Sixian Chan and Suqiang Li and Hongkai Zhang and Xiaolong Zhou and Jiafa Mao and Feng Hong},
  title = {{Feature optimization-guided high-precision and real-time metal surface defect detection network}},
  booktitle = {Scientific},
  year = {2024},
  doi = {10.1038/s41598-024-83430-3},
}
Figure