# Optimizing Generative Adversarial Network (GAN) Models for Non-Pneumatic Tire Design
## 3 Validate Image Similarity  
Metrics exist for evaluating the performance of the GAN model while verifying image similarity, such as IS, FID, and LPIPS. IS is a metric that evaluates the quality of the images generated by the GAN model, and this metric aims to evaluate how qualitatively good and diverse the generated images are. The better the IS, the higher the value is. In Equation (9), x in x \(\sim\) p\({}_{\text{g}}\) denotes the sample of p\({}_{\text{g}}\). IS consists of \(\mathbb{E}_{\text{x}\sim\text{p}_{\text{g}}}\), which is the expected value; p(y|X), the conditional probability distribution; and p(y), the marginal class distribution. D_KL denotes the KL divergence (Kullback-Leibler divergence) [55] and measures the difference between two probability distributions, p(y|x) and p(y). p(y|x) is the conditional probability of a class and denotes the probability distribution of the class on the input data. In p(y|x), y refers to a class, and x refers to the input data. Therefore, it calculates the probability of an image being y given x. It calculates the probability of an image being in each class and places x in the class with the highest probability. p(y) = \(\int\) p(y|x)p\({}_{\text{g}}\)(x) is the marginal class distribution. Marginal probability distributions are used to remove the effects of variables from a multivariate probability distribution and calculate the distribution of some variables. Marginal probability distributions are used to  
Figure 9: Comparison between real images and Projected GAN-generated images.  
test for independence between variables and collapse variables, and determine the overall properties of a probability distribution.  
\[\text{IS}(\text{G})=\exp\Bigl{(}\mathbb{E}_{\text{x}\sim\text{P}_{\text{g}}}\text {D}_{\text{KL}}(\text{p}(\text{y}|\text{X})||\text{p}(\text{y})) \tag{9}\]  
FID was developed to compensate for the shortcomings of IS and facilitate the evaluation of GAN performance. The drawback of IS is that it evaluates GANs by only considering the statistics of the generated images rather than the statistics of the real-world samples. In other words, IS only evaluates the quality and diversity of the generated images and does not directly compare the similarity between the generated and real-world images. Equation (10), on the other hand, measures the statistical similarity between the quality of the generated images and the real image by measuring the distance between two probability distributions. For FID, the lower the evaluation score, the better the performance of the model.  
\[\text{FID}=\left\|\mu_{\text{r}}-\mu_{\text{g}}\right\|^{2}+\text{T}_{\text{r} }\Biggl{(}\sum_{\text{r}}+\sum_{\text{g}}-2\Biggl{(}\sum_{\text{r}}\sum_{ \text{g}}\Bigr{)}^{\frac{1}{2}}\Biggr{)} \tag{10}\]  
The learned perceptual image patch similarity (LPIPS) metric was created to address the inability of L2/PSNR [56], SSIM, and FSIM [57] to reflect human perceptual abilities. LPIPS utilizes the image classification models SqueezeNet [58], AlexNet [49], and VGG [59] to attempt to measure similarity based on human perception, in contrast to IS and FID. Given an image \(\text{x},\text{x}_{0}\) in Equation (11), a pre-trained network of ImageNets [49] is fed an activation map \(\hat{\text{y}}^{1},\hat{\hat{Y}}^{1}_{0}\in\mathbb{R}^{H_{3}\times W_{1}\times C _{1}}\) at layer I. The activation map is then fed to the network in Equation (11). The activation map is scaled by \(\omega_{\text{I}}\), and the Euclidean distance [60] is then calculated. Finally, the LPIPS can be calculated by spatially averaging and summing per channel. The lower the LPIPS, the more similar they are.  
\[\text{d}(\text{x},\text{x}_{0})=\sum_{1}\frac{1}{H_{1}W_{1}}\sum_{\text{h}, \omega}\left|\left|\omega_{1}\odot\left(\hat{\text{y}}^{1}_{\text{hw}}-\hat{ \text{y}}^{1}_{\text{0 hw}}\right)\right|\right| \tag{11}\]