# Detecting Image Forgery over Social Media Using U-NET with Grasshopper Optimization
## 3 Results  
As the usage of digital image editing tools has made it simpler to change photos, digital image fraud detection is an important topic of research. When it comes to legal and forensic investigations, this manipulation might have catastrophic repercussions. The usage of social media and internet platforms has increased the possibility of picture alteration and fraud, necessitating the development of effective forgery detection methods. Numerous techniques have been suggested for the identification of manipulated images, such as the implementation of D-Net [25], CNN-HPF [35], RRU-Net [48], Mask R-CNN + Sobel filter [35], a CNN based on the pre-trained AlexNet model [49], and Deep Neural Architecture-BusterNet [50]. These techniques employ a variety of strategies to identify faked images, including deep learning, a convolutional neural network and high-pass filter combo, and residual analysis. In our study, we propose a modification of an approach that incorporates a grasshopper optimization algorithm (GOA) to overcome the limitations of the existing methods. The GOA is a metaheuristic algorithm that effectively solves optimization problems. By incorporating the GOA, we aimed to improve the accuracy and speed of the forgery detection model. During the experimentation, we assigned different subsets of the dataset with different training-validation ratios, which led to an improvement in the model's performance. This modification enhances the model's ability to learn and adapt to different types of image forgeries, making it more efficient in detecting and localizing image manipulations. Additionally, the use of the GOA improves the overall accuracy and speed of the forgery detection model. This paper presents an approach for detecting image forgery using a U-NET network optimized with the grasshopper optimization algorithm (GOA). We split the dataset into training, validation, and test sets and used the ratio comparison method to compare the performance of our proposed method with existing methods. Figure 10: An illustration of the production of manipulated images in CASIA V2.0 is presented, where (**a**) denotes authentic images and (**b**) represents tampered images [47]. Figure 9: An illustration of generating tampered images with CASIA v2.0 [45]. After training, the model's accuracy on the test set was 100 percent. These results indicate that the model is exceptionally effective at detecting image manipulation. Our forgery detection model was based on the U-Net network architecture. We trained the network using the Dice coefficient as the loss function and the Adam optimizer. The model was trained for 200 epochs. During the training phase, the grasshopper optimization algorithm was utilized to optimize the model's hyperparameters, including the learning rate, momentum, and weight decay. The validation set was used to evaluate the performance of the model during training, and the model with the highest validation accuracy was chosen for testing. Tables 4-6 present the validation accuracy of the CASIA dataset. Among all existing models, mostly CNNs based on the pre-trained Alex Net model had the best and the most stable performance by achieving 91.6%, 93.94%, and again 93.94% accuracy on the validation set with train/validation ratios of 7:3, 8:2, and 9:1, respectively. The best accuracy was achieved for the training/validation ratios 8:2 and 9:1. In the modified models, a CNN based on the pre-trained Alex Net model maintains its stability and further improves accuracy up to 92.75%, 94.49%, and 95.38% with train/validation ratios equal to 7:3, 8:2, and 9:1, respectively. The best accuracy was achieved with a training/validation ratio of 9:1. The U-Net model with GOA provides the best performance of 94.63% for a training/validation ratio of 7:3. The accuracies achieved by the modified models are higher than the original models; their general performance also varies with different train/validation ratios.