In view of the low recognition accuracy of traditional weather recognition methods and the serious imbalance in the number of weather images in various categories in the weather image data set, a weather image classification algorithm based on generative adversarial network and transfer learning is proposed to solve the above problems. The proposed method mainly includes two parts: data equalization based on generative adversarial network and image classification based on transfer learning. This paper uses generative adversarial network to amplify the data of a few categories of weather images, so as to obtain a relatively balanced weather image data set.The method of transfer learning is used to fine-tune the model to realize the classification of weather images. The experimental results show that the method proposed in this paper is better than the traditional method, effectively solving the problem of low model classification accuracy caused by the imbalance of training samples, and realizing the recognition and classification of four types of weather images: sunny, foggy, rainy, and snowy.