Abstract:To solve the problems of small size of metal bipolar plate surface defects in hydrogen fuel cells, indistinct defect contrast and various types of defects that make it difficult to detect, easily cause false and leaky detection and large size of the complexity of defect detection model that makes it difficult to deploy, an improved metal bipolar plate defect detection algorithm DN-YOLOv5 is proposed to explore the feasibility of rapid and accurate defect detection in the scene of metal bipolar plate visual detection workbench formed by stamping, so as to realize intelligent detection and improve detection efficiency. This research focuses on modifying the Backbone part of YOLOv5 backbone network, adding the number of modules in the network and the NAM attention mechanism, using the deeply separable convolution module to replace the original CSP/CBS backbone network convolution module and introducing SIoU to redefine the loss function, which greatly improves the lightweight degree of the backbone network. The experimental results show that the algorithm map@0.5 can reach 0.988, the detection transmission frame rate per second is 9.98, the number of model parameters is reduced by 52.13% and the true detection rate of 75 defect images in the test set reaches 99.74%. This method not only ensures the high detection rate of the model, but also significantly reduces the complexity of the model and the amount of parameter calculation. In addition, the algorithm combines the new detection scale to design a feature fusion network, which improves the small target and multi-target detection capabilities of the network. It has good stability, good robustness and good comprehensive performance, meeting the lightweight requirements of deploying mobile end scenarios for defect detection.