The presence of possible defects in welding can lead to many risks, so identifying these defects is very important. Therefore, in recent years, the automatic detection of these defects using artificial intelligence techniques has also received a lot of attention. The present study presents an enhanced approach for welding defect detection based on a hybrid deep learning technique. The method uses Ridgelet Neural Network (RNN) as a non-destructive detection technique for the detection of welding defects. The study uses an enhanced variant of the Pufferfish Optimization Algorithm (EPOA) for optimizing the parameters of the RNN. The proposed approach is validated using a standard dataset, namely GDXray, and its results are compared with some state-of-the-art methods to show the method's superiority. The findings indicate that the proposed RNN/EPOA model can effectively identify various welding defects.