# Multi-Scale Universal Style-Transfer Network Based on Diffusion Model
## 4 Experiments
### Quantitative Comparison  
This paper proposes a multi-scale style-transfer network based on diffusion models, which includes a coarse transfer module and a style-refinement module. Style-transfer experiments were conducted on a Western dataset as an example, and the experimental results are shown in Figure 6.  
This paper uses pixel-wise matching to calculate the similarity of the proposed algorithm. In the comparison between two images, identical regions are shown in light colors, while differing areas are highlighted in red. The key goal in style transfer is to \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **ArtFlow** & **AdaAIN** & **AdaAttN** & **StyTr2** & **CAST** \\ \hline User preference & 65.6\% & 38.4\% & 57.9\% & 72.2\% & 68.5\% \\ Ours & 72.4\% & 83.3\% & 79.0\% & 69.0\% & 73.3\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: User research. Figure 6: The experimental results of the style transfer using the proposed network. change the style while preserving the original content as much as possible. Therefore, in a good style-transfer comparison image, the content regions (especially edges) should appear in light colors, whereas other areas affected by style changes should be shown in red (as illustrated in Figure 7). The four pairs of content- and style-transferred images in the figure were all generated using the proposed algorithm. The four selected images depict similar scenes, all close-ups of real objects containing many details. The bottom row shows the pixel-similarity comparison images. It is clear that areas without specific objects contain evenly distributed red dots, indicating substantial style changes, which aligns with the goal of style transfer. Conversely, areas with real objects show predominantly white regions, reflecting less style alteration in order to preserve the original content features. This demonstrates that the proposed algorithm subjectively achieves style-transfer effects consistent with its intended objectives. Similarly, pixel similarity can also be used to analyze the degree of fusion between style and content. Figure 8 presents a comparison from the perspective of pixel similarity between the proposed method and the CAP-VSTNet method. In the edge areas without large content blocks, where style changes are expected to be more significant, more red regions should appear. From the fusion perspective, a more uniform distribution of red dots indicates better style-content fusion. The area highlighted by the black box in Figure 8 corresponds to an edge region in the original content image, characterized by large blank spaces without specific objects. After style transfer, this region should exhibit evenly distributed style features, meaning red dots should be scattered uniformly within this area. The results from the two algorithms shown in the upper and lower parts of the figure indicate that the proposed style-transfer network achieves better fusion of style and content. As shown in Figure 9, after style refinement, the images display more detailed edge regions and a more natural fusion of style and content. Figure 7: Pixel similarity comparison. Cosine similarity is a commonly used method for measuring the similarity between vectors. It calculates the cosine of the angle between two vectors. In image similarity computation, images can be transformed into feature vectors (e.g., feature vectors extracted using convolutional neural networks), and the cosine similarity between these vectors can then be computed to assess the similarity between images. The calculation of cosine similarity is shown in Equation (7). The cosine similarity is defined as:  
\[\text{cosine similarity}=\frac{\mathbf{A}\cdot\mathbf{B}}{\|\mathbf{A}\|\| \mathbf{B}\|} \tag{7}\]  
where \(\mathbf{A}\) and \(\mathbf{B}\) represent two vectors, \(\cdot\) denotes the dot product of the vectors, and \(\|\mathbf{A}\|\) and \(\|\mathbf{B}\|\) represent the norm (i.e., the magnitude) of the vectors.