# FA-VTON: A Feature Alignment-Based Model for Virtual Try-On
## 4 Methods
### Coarse-to-Fine Warping Module (CFWM)  
The purpose of the CFWM is to warp the garment to adapt to body posture while preserving garment details. Due to the superior flexibility of flow-based networks compared to the TPS algorithm, they can adapt to complex posture warping. Following the work of FS-VTON [7], we adopt a coarse-to-fine warping structure, composed of subnetworks with different-sized convolutional layers, to utilize multi-scale features extracted by the FEM for appearance flow estimation. Flow-based networks effectively capture distant correspondences between garment and person images, thereby reducing the problem of garment warping misalignment. A specific structure is shown in Figure 7.  
The CFWM is composed of \(n\) stacked Warping Blocks, and the specific structure of the Warping Block is shown in Figure 7b; each of our Warping Blocks consists of two parts. Specifically, we first use the garment and person features extracted from the last layer of the previous module to generate the global style vector \(s\) through the connected operation, which includes the global information, such as the position and structure of the two, and guides the generation of the initial rough appearance flow \(f_{k-1}^{\prime}\), which is formulated as follows:  
\[f_{k-1}^{\prime}=MConv(W(g_{k},U(f_{k-1})),s), \tag{5}\]  
where \(U(\cdot)\) is the upsampling operation and \(W(\cdot)\) is the sampling operation. According to the spatial transformation of the corresponding layer \(g_{k}\) after the upsampling of the appearance flow, we follow the design of the modulation convolution operation \(Mconv(\cdot)\)in StyleGan [16], which is able to modulate with the help of global style vectors, and it can deal with the bias of the large distance between the garment and the person to generate the rough appearance flow. Then, we refine the rough appearance flow with the help of both person and garment features in order to further improve the correspondence between the warped garment and the person. The specific formula is as follows:  
\[r_{k}=W\big{(}g_{k},f^{\prime}_{k-1}\big{)}, \tag{6}\]  
\[f_{k}=Conv\Big{(}r_{k}\bigoplus p_{k}\Big{)}\bigoplus f^{\prime}_{k-1}, \tag{7}\]  
where \(W(\cdot)\) denotes the sampling operation. After performing a spatial transformation on \(g_{k}\), it is concatenated with the person feature to obtain \(r_{k}\). \(Conv(\cdot)\) represents convolutional blocks composed of convolutions and Leaky ReLU functions. By inputting \(r_{k}\) together with the person feature \(p_{k}\) into the convolutional blocks, the network is better able to learn the correspondence between the garment and the person. Finally, the refined appearance flow, concatenated with the coarse appearance flow \(f^{\prime}_{k-1}\), serves as the final output \(f_{k}\) of this Warping Block. Throughout the entire CFWM, we utilize the appearance flow from the final module to perform the warp operation, thereby generating the final deformed garment. Additionally, to enhance the preservation of garment features, we also optimize this module with second-order smoothness loss [6]. We aim to achieve pixel-to-pixel matching between the source and target garment regions to better estimate geometric transformations and generate realistic results. By implementing pixel-level matching, we can capture subtle details, such as wrinkles and fabric textures, thus rendering a more lifelike garment appearance in the synthesized images. However, due to the density and high degree of freedom of the appearance flow, some undesirable phenomena often occur, such as significant artifacts and incoherent textures. To address these issues, we reference  
Figure 7: Overview and details of our Coarse-Fine Warping Module (CFWM). (**a**) The structure of the CFWM; (**b**) The specific structure of the Warping Block. the work of [6; 7; 28] and introduce a second-order smoothness loss, which helps regularize the estimated flow field, making it spatially smoother and more continuous.