# High-Quality Text-to-Image Generation Using High-Detail Feature-Preserving Network
## 1 Introduction  
Generative adversarial networks (GAN) [1] and deep learning have recently been increasingly used in image and video generation and restoration [2, 3, 4, 5, 6, 7, 8] for the use and application of related optical devices. These networks are also commonly used to transform text descriptions into realistic images, known as the text-to-image task. A primary goal of artificial intelligence (AI) development is to enable AI machines to understand natural language and generate appropriate responses. To achieve this goal, various scholars have strived to improve the output quality of AI-generated images based on text prompts and ensure that these text-based images possess the detail required by users. Several methods have been proposed to improve the text-based image quality [9, 10, 11, 12, 13, 14]. Stacked methods [9, 11] were proposed to generate images through multiple stages and achieve improved image resolutions. [PERSON] et al. [10] used an attention mechanism to combine text and image features, ensuring that the generated images matched the corresponding textual descriptions. Text-to-image and image-to-text models [13] were combined to improve the consistency between image details and textual descriptions. A dynamic memory network [14] was used tocompute and integrate word-level features with image features. This method enabled the network to generate images that contained the details indicated by single words. Although these methods have generated higher-quality images compared to previous approaches, several issues remain unresolved. Multistage methods [9; 10; 11; 14] improve image resolutions and extract image and text features. They first extract text and image features from the previous stage and then implement a residual network [15] to retain relevant image features. A residual network uses skip connections to resolve the gradient vanishing problem commonly encountered in deep neural networks. In general, residual networks use nonlinear transformations to integrate the data of the current and previous stages, thereby preventing data loss. However, the number of parameters processed by the residual network increases in deeper network layers, causing the network to lose essential data when these data propagate through the bottleneck layer. Thus, information regarding the contextual representation of text and image fusion is lost, resulting in the calculated contextual representation being unusable for efficient image generation. Hence, producing the contextual representation requires additional computing resources. To address these issues, the novel High-Detail Feature-Preserving Network (HDfpNet) is proposed to attempt to generate images with high detail and feature preservation. First, the initial text-to-image generation (iT2 IG) module is used to generate initial feature maps. The fast excitation and squeeze feature extraction (FESFE) module is then proposed to recursively generate high-detail and feature-preserving images through channel excitation (CE), fast feature extraction (FFE), and channel squeeze (CS). Finally, the channel attention (CA) mechanism [16] further enriches the feature details. The experimental results indicate that the proposed HDfpNet achieves better performance and visual representation on the CUB-Bird [17] and MS-COCO [18] datasets than the state-of-the-art methods, especially regarding high-detail images and feature preservation. We list some specific practical examples combined with our method and present schematic diagrams in Figure 1. By utilizing devices like mobile phones as sensors to capture text and analyzing it with the proposed HDfpNet model, we can enhance both understanding and safety. As shown in Figure 1a, when people see a warning sign but cannot recognize the language, they may face safety risks. At this point, by using a mobile phone or other device to sense the text and then analyzing it with the proposed HDfpNet model, relevant images can be generated to understand the meaning of the text, thereby avoiding dangerous behavior.