Deep learning technology has advanced rapidly and has started to be applied for the detection of welding defects. In the manufacturing process of power batteries for new energy vehicles, welding defects may occur due to the high directivity, convergence, and penetration of the laser beam. The accuracy of deep learning prediction relies heavily on big data, but balanced big data of welding defects is hard to acquire at the battery production site. In this paper, the authors construct a dataset named RIAM, which consists of images captured from an industrial environment for laser welding of power battery modules. RIAM contains four types of images: Normality, Lack of fusion, Surface porosity, and Scaled surface. The characteristics of RIAM are carefully considered in the application scenarios. Moreover, this paper proposes a gradient-based unsupervised model named Grad-MobileNet, which can be trained with only a few normal images and can extract the feature gradients of the input images. Welding defects can then be classified by the gradient distribution. This model is based on MobileNetV3, which is a lightweight convolutional neural network (CNN), and achieves 99% accuracy, which is higher than the accuracy expected from supervised learning.