# Identifying Synthetic Faces through GAN Inversion and Biometric Traits Analysis
## 4 Experimental Setup and Analysis of Results
### Robustness Analysis
#### 4.3.1 Resizing  
We have tested our discrimination models with inputs at different resolution levels by downscaling and upscaling the images. In particular, we rescale the entire datasets at different scaling factors \(\{0.3,0.7,0.8,0.9,1.1,1.2,1.3\}\), we apply the inversion/reconstruction process for each case, and finally, we compute the differential feature vectors, \(FN_{128}\), \(FN_{512}\), \(LM_{68}\), and \(LM_{136}\). The library used for the resize process is [[https://pillow.readthedocs.io/en/stable/](https://pillow.readthedocs.io/en/stable/)]([https://pillow.readthedocs.io/en/stable/](https://pillow.readthedocs.io/en/stable/)) (accessed on 30 December 2022), with the nearest neighbor resample parameter set (PIL. Image.NEAREST in the code). Since the StyleGAN2 inversion algorithm requires inputs with fixed size \(1024\times 1024\) pixels, when inverting images of different resolutions, a further cropping/rescaling operation is needed to meet this requirement. In doing so, some details of the image change in terms of quality (see Figure 14), making the discrimination between real images and fake images in principle harder.  
After having scaled all the images, we trained and tested the models with these resized examples. Tables 4-7 report the results obtained, where the training scaling factors are reported row-wise, and the testing scaling factors column-wise. Rows and columns with a scaling factor of 1.0 correspond to the baseline case (no scaling), where no post-processing is applied to either training or testing images. We notice that the accuracies are generally preserved and they present no dramatic drops, but rather, oscillations around the aligned cases corresponding to the diagonal values. For the majority of classifiers, the average variation over different testing sets does not exceed 2%.  
Among the different representations, the FaceNet-based features seem to struggle more with the upscaled images rather than the downscaled ones, occasionally decreasing below 80%. This behavior is reversed for landmark-based features, for which the performances are more stable for upscaling factors and more sensible and oscillatory for downscaling ones. In both cases, the dimensionality of the differential vectors does not have a significant impact.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**Train/Test** & **0.3** & **0.7** & **0.8** & **0.9** & **1.0** & **1.1** & **1.2** & **1.3** \\ \hline
0.3 & 84.35 & 82.50 & 83.75 & 84.37 & 84.38 & 81.87 & 81.88 & 81.25 \\
0.7 & 85.00 & 85.00 & 84.37 & 88.13 & 85.00 & 82.50 & 83.12 & 79.36 \\
0.8 & 83.75 & 85.00 & 85.00 & 86.25 & 81.88 & 82.50 & 81.25 & 81.25 \\
0.9 & 83.12 & 80.62 & 81.88 & 86.25 & 80.00 & 78.75 & 78.75 & 78.13 \\
1.0 & 83.12 & 83.75 & 80.00 & 82.50 & 80.63 & 80.00 & 78.13 & 77.50 \\
1.1 & 83.12 & 82.50 & 82.50 & 83.75 & 80.62 & 81.25 & 78.75 & 80.00 \\
1.2 & 84.61 & 85.25 & 83.33 & 87.18 & 84.62 & 80.77 & 83.97 & 82.69 \\
1.3 & 82.70 & 80.77 & 80.12 & 85.26 & 82.05 & 83.97 & 83.33 & 80.77 \\ \hline \end{tabular}
\end{table}
Table 4: Accuracy obtained by \(FN_{128}\) with different resizing factors (reported in percentage).  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**Train/Test** & **0.3** & **0.7** & **0.8** & **0.9** & **1.0** & **1.1** & **1.2** & **1.3** \\ \hline
0.3 & 86.88 & 83.13 & 78.75 & 82.50 & 84.38 & 81.88 & 80.00 & 83.75 \\
0.7 & 85.00 & 80.62 & 78.12 & 81.25 & 81.88 & 80.63 &