# Tampered and Computer-Generated Face Images Identification Based on Deep Learning
## 4 Experimental Results
### Balanced Dataset Experiment  
The initial experiment is conducted to examine the performance of TFID model on the balanced MANFA dataset (Dataset 1) for the tampered face images identification task. The training dataset contains 4200 tampered images and 4200 real images, which were randomly taken from the original MANFA dataset. 4-fold cross-validation is then implemented on the extracted dataset by dividing it into four subsets, and each subset contains 2100 images. The number of tampered and real images are shown in Table 3. For each fold, three subsets are used as the training dataset, and the remaining subset is used for testing purposes. Within the training dataset, 80% of the training data are used to train the proposed model, and the rest of the images are utilized as a validation dataset to validate the trained model. Face regions are first localized and extracted based on a python implementation of a facial landmark algorithm proposed by [22]. This study applied a 5-point facial landmark (2 points for the left eye, 2 points for the right eye, and 1 point for the nose) because it has been proved to be 8-10% faster than the original 68-point detector [27]. Then, localized face images are rotated and aligned to frontal to remove pose changes. The facial landmark algorithm is implemented with dlib library version 19.18.0. Next, OpenCV library version 4.1.1 is used to perform the face rotation and resize all images to \(256\times 256\). Python programming language and Keras neural-network library are \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Prediction**} \\ \cline{3-4}  & & **Tampered** & **Real** \\ \hline \multirow{2}{*}{Actual} & Tampered & TP (True positive) & FN (False negative) \\  & Real & FP (False positive) & TN (True negative) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: A confusion matrix for the binary classification results of one class against the other class. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Subset 1** & **Subset 2** & **Subset 3** & **Subset 4** \\ \hline Real & 1047 & 1051 & 1053 & 1049 \\ Tampered & 1044 & 1048 & 1052 & 1056 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The numbers of real and tampered images in four subsets. used to implement the proposed models. The optimization function in the proposed TFID is Adam optimization with the learning rate is set to 0.001 initially as recommend by [28] for model with a small number of convolutional layers. The batch size is set to 32 because for Adam optimizer the smaller batch size can increase the test accuracy [29]. The model is trained through 50 epochs. The validation accuracy, validation loss, training accuracy, and training loss for each fold are provided in Figure 7.  
The training accuracy and the validation accuracy increase dramatically to over 79%, whereas training loss and the validation loss decline significantly to 32% after the 7 th epoch. During the remaining epochs, the training accuracy and the validation accuracy rose steadily and reach a peak of 83%. Robust results are observed in fold 3 regarding validation accuracy and validation loss. In contrast, other folds fluctuate in validation accuracy and validation loss. The proposed model is also compared with pre-trained SE-ResNet-50 model and VGGFace model, which have achieved state-of-the-art performance on VGGFace2 dataset [3]. The reason these two models were selected is that they are trained on huge dataset related to human facial features. Therefore, human face features help the pre-trained models optimized faster on MANFA dataset, which is also related to the human face. We set the hyper-parameters as suggested by [3,30] for pre-trained VGG16 and SE-ResNet-50 models to enable a good trade-off between bias and variance. A performance comparison between TFID, VGG16, and SE-ResNet-50 models are shown in Table 4.  
In general, all three models performed well on the balanced MANFA dataset.