# Feature Separation and Fusion to Optimise the Migration Model of Mural Painting Style in Toms
## 2 Related Work
### Image Quality Analysis Metrics  
In this paper, we use four objective evaluation metrics to quantitatively compare the effects of the stylistic migration of images, three quality evaluation metrics with reference images, and one quality evaluation metric without reference images. Structural similarity (SSIM), Learned Perceptual Image Patch Similarity (LPIPS), and the Frechet inception distance (FID) were selected for reference image evaluation metrics, and the Naturalness Image Quality Evaluator (NIQE) was selected for no-reference image evaluation metrics. The structural similarity index (SSIM) [39] is a metric used to compare the degree of similarity between two images. The SSIM measurement system consists of three main contrast modules: luminance, contrast, and structure. The closer its value is to 1, the more similar the two images are, i.e., the less the content structure is distorted during the migration process. The SSIM function is a combination of the Luminance-Contrast function, the Contrast-Contrast function and the Structure-Contrast function with the following formula:  
\[f(l(x,y),c(x,y)s(x,y))=\frac{\left(2\mu_{x}\mu_{y}+c_{1}\right)\left(2\sigma_{ xy}+c_{2}\right)}{\left(\mu_{x}^{2}+\mu_{y}^{2}+c_{1}\right)\left(\sigma_{x}^{2} \sigma_{y}^{2}+c_{2}\right)} \tag{1}\]  
where \(\mu_{x}\) and \(\mu_{y}\) are the average grey levels of the image, \(\sigma_{x}\) and \(\sigma_{y}\) are the standard deviation of the grey levels of the image, \(\sigma_{xy}\) is the covariance, and \(c_{1}\) and \(c_{2}\) are constants. The distance score (FID) [40] is a method for extracting high-level image information through the top layer of a pre-trained neural network, and is used to measure the similarity of features between the real image and the generated image. The proposers of FID use the pre-trained Inception V4 [41] model to extract 2048-dimensional vectors as the feature representation of the image before the fully connected layer, and evaluate the degree of similarity between the feature vectors of the real and generated images by calculating the mean and covariance distance between them. When the features of the generated image and the real image are more similar, i.e., the smaller the mean and covariance, the smaller the value of FID, which reflects the degree of similarity between the images. The specific mathematical expression formula is:  
\[FID=\left\|\mu_{r}-\mu_{g}\right\|^{2}+\text{T}_{r}\left(\Sigma_{x}+\Sigma_{g} -2\left(\Sigma_{x}\Sigma_{y}\right)^{1/2}\right) \tag{2}\]where \(\mu_{r}\) is the average of the real image characteristics, \(\mu_{g}\) is the mean of the generated image characteristics, \(T_{r}\) is the trajectory of the real image characteristics, \(\Sigma_{x}\) is the covariance matrix of the real image characteristics, and \(\Sigma_{y}\) is the covariance matrix of the generated image features. Learned Perceptual Image Patch Similarity (LPIPS) [42], also known as \"perceptual loss\", is a metric for evaluating the perceptual similarity between images, which can be obtained by LPIPS, also known as \"perceptual loss\", is a metric for evaluating the perceptual similarity between images by forcing the generator to learn to reconstruct a fake image into a real image by allowing the generator to reverse map in a fake image. LPIPS uses a pre-trained VGG neural network to extract features from an image and normalise the features. Then, their perceived similarity is determined by calculating the L2 distance between the feature representations of the generated image and the real image on each fully connected layer. A lower value of LPIPS indicates that the two images are more similar, and conversely, the greater the difference. The specific mathematical expression formula is:  
\[d(x,y)=\frac{1}{L}\sum_{l=1}^{L}\left\|w_{l}\odot(F_{l}(x)-F_{l}(y))\right\|_{2} \tag{3}\]  
where \(w_{l}\) is the weighting point of the layer, and \(F_{l}\) is the feature that was extracted.