# High-Quality Text-to-Image Generation Using High-Detail Feature-Preserving Network
## 3 Method
### Fesfie Module  
After the weight calculation, the image enhancement block must retain relevant image features in the next stage. In this study, a novel FESFE module is proposed to address the shortcomings of conventional residual blocks by retaining image features. This module contains three blocks: CE, FFE, and CS. These blocks are illustrated in Figure 2b-d, respectively.  
CE Block: Based on previous studies on deep residual networks [35; 42; 43], the present study introduces a receptive field to improve the relevance of the prediction models and increase the number of extracted image details. Previous studies have used 3 \(\times\) 3 filters without dilation to extract features [10; 14]. The proposed CE block optimizes and excites existing channels to increase the effectiveness of subsequent feature extraction (Figure 2b). The purpose of the CE block is to create a channel excitation effect that increases the number of channels, enabling a subsequent feature extraction process without feature loss. Batch normalization (BN) [37] is also implemented in the excitation process to optimize the overall network; \(BN(x)=\frac{h-mean(x)}{\sqrt{var(x)+eps}}\). Each iteration of \(BN\) might result in a small shift, which causes considerable changes to the network output. Therefore, a swish activation function [37], f\((x)=\frac{x}{1+x^{-x}}\), is added to improve the \(BN\) process. The proposed method enables the extraction of more image details than in existing methods, thereby generating images that more closely resemble the target images. Mathematically, the process can be described as follows:  
\[p_{i}=\rho(BN(C_{FE}(h_{i}))),\ p\in\mathbb{R}^{2N_{m}}, \tag{10}\]  
where \(C_{FE}\) denotes a filter composed of a 1 \(\times\) 1 kernel; the filter doubles the number of channels. \(BN()\) denotes the \(BN\) process [37], and \(\rho()\) denotes the swish activation function [38].  
2. FFE Block: Extending the dimensions of the CE block (Figure 2b) increases the computational cost. To accelerate the feature extraction process without reducing the model's effectiveness, an FFE block (Figure 2c) is incorporated into the proposed model based on previous research [42; 43]. The FFE block performs convolutions on the spatial and depth dimensions (i.e., channel dimensions) to reduce the computations and quickly extract features. The block includes both depth-wise convolution and point-wise convolution calculations. \[p_{i}^{DW}=C_{DW}(p_{i}),\ p\in\mathbb{R}^{2N_{m}},\] (11) \[p_{i}^{PW}=C_{PW}\Big{(}p_{i}^{DW}\Big{)},\ p\in\mathbb{R}^{2N_{m}},\] (12) where \(C_{DW}()\) denotes a depth-wise convolution with \(N\) 5 \(\times\) 5 kernels, where N is the number of channels, to calculate and stack the channels in each layer. \(C_{DW}()\) denotes point-wise convolution, in which 1 \(\times\) 1 kernels are used to generate a new feature map.  
3. CS Block: After a new feature map is obtained, the CS block performs a channel squeeze process to accelerate the data propagation speed (Figure 2d) and reduce the number of channels to its original value, namely that obtained after the iT2 IG module calculation. \[p^{FC}=\rho(BN(C_{FC}(p_{i}))),\ p\in\mathbb{R}^{N_{m}},\] (13) where \(C_{FC}\) denotes the use of 1 \(\times\) 1 filters to reduce the number of channels to their original value. \(BN()\) denotes the \(BN\) process [37], and \(\rho()\) denotes the swish activation function [38].