This article focuses on the identification of welding defects in engine exhaust pipe welds. Firstly, a binocular vision system is built, and the models and parameters of the cameras and lenses involved in the entire system are explained in detail. At the same time, the cameras are calibrated; Then, in response to the problems of large volume, low efficiency, and lack of attention mechanism in the current neural network model, the network model was improved by adding MP structure, CA attention mechanism, and other methods to improve the recognition efficiency of the model. Finally, the reliability of the proposed method was verified through simulation experiments, and the overall recognition efficiency was improved to 97.28%.