## 4 Methodology
### The Proposed CGFace Model  
In this section, we explain in detail our computer-generated face detection model called CGFace. To the best of our knowledge, little research has been done on detecting CG face images created by GAN models; take [2; 23] as an example. Even though the two models were trained using the same CelebA, the generated images were completely different. Also, existing research on the topic [1; 12] has mainly focused on monitoring the dataset, and then selecting and analyzing a set of representative features. Although the results were promising, these models were restricted to the selected features, so they will not work well on datasets that are slightly different from the training dataset. As the result, we propose a model which identifies computer-generated images created from different GAN models by automatically extracting characteristic features using the power of customized convolutional neuron network. Figure 2: Overall architecture of the proposed method. The first task is to select a suitable CNN architecture; this depends heavily on a practical point. By examining some state-of-the-art models [1; 7; 24] and comparing the performance, we discovered that five convolution layers were sufficient to handle the classification problem for the computer-generated face detection. After the number of convolution layers was decided upon, we examined the best kernel size to map the image input size to (1 \(\times\) 2) output. Each layer must follow an appropriate kernel size to control the parameters' flow. Figure 3 introduces each layer with its corresponding input, kernel, and output size. The input of this model is 64 \(\times\) 64 grayscale images, while the output indicates whether the image is generated by a computer or by normal means. Overall, the proposed model contains five convolutional layers (Conv1 to Conv5), three max-pooling layers (Max-Pool1 to Max-Pool3) followed by a flattening and two fully connected layers or dense layers. As shown in Figure 3, the first convolutional layer (Conv1) filters the input image (64 \(\times\) 64) using eight 5 \(\times\) 5 learnable kernels. Next, the second convolutional layer (Conv2) filters eight 60 \(\times\) 60 output feature maps from Conv1 with eight 5 \(\times\) 5 kernels. Then, the third convolutional layer (Conv3) filters sixteen 28 \(\times\) 28 output feature maps from max pooling layer (Max-pool1) with sixteen 3 \(\times\) 3 kernels. The following fourth convolutional layer (Conv4) filters sixteen 13 \(\times\) 13 output feature maps from the second max pooling layer (Max-pool2) with thirty-two 3 \(\times\) 3 kernels. Finally, the final convolutional layer (Conv5) filters thirty-two 5 \(\times\) 5 output feature maps from the third max polling layer (Max-pool3) with sixty-four 3 \(\times\) 3 kernels. The sixty-four 3 \(\times\) 3 output feature maps will be passed to flatten layer to give 576 values. Finally, the output layer only gives two classes, i.e., computer-generated and real. The convolutional layer is the first layer of CNN used to extract features from an input image. Convolution preserves the relationship between pixels by learning image features using small squares of input data. Generally, increasing the number of convolutional layers will increase the learned feature complexity. The convolutional layer uses a set of learnable kernels sliding across the input image to extract the features. The convolution operation is illustrated as  
\[x_{j}^{l}=f\left(\sum_{i\in\Omega_{j}}x_{i}^{l-1}*k_{ij}^{l}+b_{j}^{l}\right) \tag{5}\]  
where \(x_{j}^{l}\) is the \(j\)-th output feature map of layer \(l\) and \(x_{i}^{l-1}\) is the \(i\)-th input feature map of the previous layer \((l-1)\) of layer \(l\). \(\Omega_{j}\) indicates a set of input feature maps. \(b_{j}^{l}\) is the bias and \(k_{ij}^{l}\) kernel connects the \(i\)-th and \(j\)-th feature maps. Finally, the activation function \(f(\cdot)\) conducts a nonlinear transformation.