With the development of deep neural network technology, artificial intelligence technology has excellent performance in many visual tasks. However, the excellent performance of deep neural networks relies heavily on massive data. In actual engineering projects, infrared images are less susceptible to changes in illumination than visible light images. Therefore, in unmanned systems or other vision tasks in the field of military, infrared images are a good choice. However, the actual number of infrared images in many scenes is very small, and it is difficult to support the training of a deep neural network model. Therefore, this paper focuses on how to obtain more samples that follow the same distribution as real infrared images. There are many methods for generating infrared images, such as simulation-based methods, variational autoencoder-based methods, and adversarial network-based methods. The method of generating infrared images based on the generated adversarial network is one of the relatively novel and popular methods at present. Based on the application requirements in actual engineering projects, this paper uses a deep generation model built by deep neural networks and adversarial networks model to generate infrared images. Firstly, on the premise of a large number of scene visible light images, an infrared image generation method based on image translation is improved. Since the semantic information of color images and infrared images in the high-dimensional space is consistent, the encoder-decoder network structure was employed in this model to realize the image translation from color field to infrared field. The encoder mainly extracts the high-dimensional semantic information of the input image, and the decoder is responsible for mapping the high-dimensional semantic information into an infrared image. Finally, experiments prove that the image translation method can improve the quality of generated infrared images. Secondly, in order to control the generator to generate the specified type of infrared image, a method of directly generating infrared images based on prior knowledge and the adversarial network is proposed. This method uses a self-attention mechanism module to better discover the internal connections in the image and better assist in generating infrared images. And based on prior knowledge of class labels and domain classification loss constraints, the generator can learn to generate a specified type of infrared image. Finally, the effectiveness of the method is validated through experiments, and the method will be more practical when generating infrared images. The research in this paper is mainly aimed at the problem of small samples in actual projects and has conducted in-depth discussion and research on how to obtain more sample data. Besides, two methods for generating infrared images are proposed. And the feasibility of the method was verified through experiments, which provides a possible way for practical application.