n practical industrial environments, rotating machinery typically operates under normal conditions. As a result, the signals collected are primarily normal signals. This imbalance in the sample data diminishes the effectiveness of fault diagnosis. To address this issue, this paper produces a novel semi-supervised fault diagnosis approach based on a Siamese neural network combined with a generative adversarial network (SNNGAN) to enhance classification accuracy. Firstly, vibration signals collected are subjected to continuous wavelet transformation to obtain time-frequency representations, which are utilized for pre-training convolutional encoders in the generator and discriminator. Subsequently, a cosine similarity algorithm is employed to ensure the quality of generated samples. For generated data, set a similarity threshold. Those surpassing the threshold are assigned their corresponding labels and added to the original sample set. Otherwise, those falling below the threshold are transformed back into vibration vectors through an inverse transform and then serve as input to create new samples. Finally, fault diagnosis experiments are conducted on the newly balanced data set. In four imbalanced data experiments, the results demonstrate that SNNGAN outperforms other methods in average accuracy, G-mean, and F1 score, with average accuracy values of 0.919, 0.948, 0.927, and 0.953 for the respective datasets. Therefore, SNNGAN exhibits outstanding fault diagnosis performance under conditions of data imbalance.