To guarantee the security of personnel on-site, diagnosing the malfunction of mechanical apparatus is imperative. The accomplishments within the domain of fault diagnosis have been partly attributed to the advancements in deep learning technology, which excels in feature extraction through extensive datasets. However, it is difficult to collect sufficient data to train high-precision fault diagnosis models in practice. To solve this problem, a novel method called DCGAN-RepLKNet is proposed to address the challenge of gathering enough data to train high-precision fault diagnosis models in practice. This technique involves transforming a one-dimensional time series vibration signal into a two-dimensional time-frequency map via wavelet transform technology. Subsequently, DCGAN expands the two-dimensional time-frequency map samples produced. Finally, RepLKNet is used to classify the fault samples. The proposed method has been verified in PU compound fault data set and bearing real damage data set. The results show that the accuracy of this method has been improved by 5.70%, 6.34%, 9.08%, and 16.35% compared to 2D-CNN under different sizes datasets in Case 1, and by 24.5% compared to 2D-CNN in Case 2.