## 3 Materials and Methods
### Transfer Learning with ResNet  
To assess the performance of PV-ISM in distinguishing real images from synthetic counterparts, we utilized transfer learning with ResNet, a deep residual network architecture renowned for achieving exceptionally good results in problems involving image classification. ResNet effectively preserves essential low-level features, including edges, textures, and fundamental patterns, thereby enhancing its applicability and efficacy throughout a variety of computer vision applications [71].  
Transfer learning allows for the utilization of a pre-trained model, usually trained by use of extensive datasets like ImageNet, which can then be specially fine-tuned for the specific task of classification at hand. This methodology substantially decreases the training time required and improves the model's ability to generalize across diverse data. The architecture of ResNet is based on residual blocks (illustrated in Figure 8), which incorporate shortcut connections. These links mitigate the problem of vanishing gradients that deep networks frequently face while enabling the neural network to learn richer representations of features [71]. The primary advantage of residual connections lies in their facilitation of efficient gradient flow through the network, enabling the training of models with greater depth. ResNet has been widely adopted in contemporary classification applications, including facial recognition, breast cancer subtype diagnosis, and malicious software detection, among others [72; 73; 74].  
In our implementation, illustrated in Figure 9, we employed ResNet50, a 50-layer deep variant of the ResNet architecture, as a feature extractor [71]. The convolutional layers of ResNet50 were frozen to preserve the learned filters from pre-training on ImageNet, whereas the classifier layers were adjusted to fit our dataset's unique features. The feature extraction and classification pipeline consisted of the following steps.  
Figure 8: Residual block [71].  
Preprocessing and data augmentation: The input images, originally sized at \(32\times 32\times 3\), were resized to \(224\times 224\times 3\) to comply with ResNet50's input requirements. Normalization was applied in accordance with the procedure described in Section 3.2. Additionally, geometric data augmentation techniques, such as random horizontal flipping and rotations, and color-based augmentations, such as random brightness, contrast, and saturation adjustments, were applied to enhance model generalization and robustness.  
Extraction of features using ResNet50: A ResNet50 model that had already been trained, aside from its fully linked top layers, was loaded. The final convolutional block's output was used to represent the input images' extracted features.  
Custom classification head: On top of the ResNet50 base, we appended a custom classification head comprising multiple fully connected (dense) layers, dropout layers for regularization, and a last dense output layer for binary detection of the input images that used a sigmoid activation function [71].  
Hyperparameter tuning: Various hyperparameter configurations (e.g., learning rate, learning rate scheduler, batch size, optimizer, dropout rate) were explored during training to identify the optimal settings for performance maximization.  
By integrating transfer learning with ResNet50, we effectively harnessed pre-trained feature representations derived from a large-scale dataset, enabling the model to capture general visual patterns while simultaneously adapting to the specific characteristics of our dataset [71]. This strategy is widely recognized for its ability to enhance performance in generalization and training efficiency. Moreover, it serves as a cutting-edge standard for evaluating the efficacy of PV-ISM in determining which images are artificially created and which are real.