# FA-VTON: A Feature Alignment-Based Model for Virtual Try-On
## 4 Methods
### Try-On Generation Module (TGM)  
The TGM takes the human image and the warped garment as inputs, fusing them to generate the final try-on result. The goal of the module is to produce a realistic image of the person wearing the target garment. In order to achieve try-on without parsing, the model must generate try-on images without any human or garment parsing. In this method, the try-on image generation module cannot use additional human parsing to create a human-agnostic image that reduces the influence of the original image's garment, which requires the generation module to be able to filter out important features and reduce irrelevant information, thereby minimizing artifact generation. The overall structure of the module is illustrated in Figure 8.  
In this module, we utilize an enhanced U-Net [40] as the backbone architecture for the TGM. We introduce residual structures and the ECA attention mechanism [32] on it. The addition of the ECA mechanism helps alleviate incorrect results due to prior parsing errors or excessive garment deformation, improving the quality of the generated image. It not only preserves the details of the warped garment but also maintains key human body parts, reducing the impact of irrelevant information. Many studies have shown that attention mechanisms can enhance the overall performance of deep learning methods. The SE module [41] proposed an effective mechanism  
Figure 8: Structure of the TGM. for attention learning, which first learned channel attention and achieved outstanding performance. However, the SE attention mechanism compresses the input feature maps along the channel dimension, which has a detrimental effect on learning dependencies between channels. In order to avoid dimensionality reduction and facilitate proper cross-channel interaction, ECA proposes a local cross-channel interaction strategy without dimensionality reduction and a method for adaptive selection of the size of one-dimensional convolutional kernels. With just a few extra parameters, the ECA module achieves significant performance improvements. The structure of the ECA module is shown in Figure 9.  
ECA first performs global pooling on the input feature layer. Then, ECA captures local cross-channel interactions and obtains the weight for each channel by sigmoid function. Finally, the weights are multiplied by the corresponding elements of the input feature layer to obtain the final output feature layer. The local cross-channel interaction strategy can be implemented through a one-dimensional convolution with a kernel size of k, calculated as follows:  
\[w=\sigma(L_{k}(y)), \tag{9}\]  
where \(w\) represents the channel weights, \(\sigma\) is the sigmoid function, \(L_{k}(\cdot)\) denotes the one-dimensional convolution, \(k\) is the kernel size of \(L\), and \(y\) represents the aggregated features. This method involves only \(k\) parameters. We adopt an adaptive method to determine the convolution kernel \(k\), where the size of the kernel \(k\) is proportional to the channel dimension \(C\) (i.e., there may be a mapping between \(k\) and \(C\)). Due to the limitations of linear mapping, we employ non-linear mapping instead. Additionally, we know that the channel dimension is typically a power of 2; thus, we use an exponential function with base 2 to represent the non-linear mapping relationship, as shown below:  
\[C=\phi(k)=2^{(\gamma*k-b)}. \tag{10}\]  
Once the mapping relationship between the kernel size and channel dimension is determined, we can determine the range of local cross-channel interactions based on the channel dimensions of different feature maps, using different kernel sizes for different channels. The kernel size \(k\) can be calculated using the following equation:  
\[k=\psi(C)=\left|\frac{log_{2(C)}}{\gamma}+\frac{b}{\gamma}\right|_{old}, \tag{11}\]  
where \(k\) is the size of the convolution kernel, \(C\) is the number of channels, and \(\mid t\mid odd\) represents the nearest odd number to \(t\). We set \(\gamma\) and \(b\) as 2 and 1, respectively.