To address the problem of inefficient and inaccurate inspection of workpiece characters In this paper, a fusion YOLOv5, we make datasets of the metal workpieces and propose character recognition methods based on deep learning. Firstly, Adding the attention mechanism (CBAM) to the backbone module of the Deformable DETR model to increase the initial picture feature extraction ability. By combining the benefits of Smooth-L1 loss and GIoU loss, the intercepted characters are passed through the ResNext50 model, thus further enhancing the recognition...