Classifying Authentic and AI-Generated Images with a Fine- Tuned ResNet50 Model.
Classifying Authentic and AI-Generated Images with a Fine- Tuned ResNet50 Model.
Figure 1
Experiment 2: Fine-Tuning Training accuracy consistently improves, while test
Figure 2 shows the results for Experiment 2 with 5 accuracy dips at first but begins to rise after the
epochs. The training loss decreases steadily, while first epoch, eventually reaching 98%. However,
the test loss initially rises until the second epoch, when this experiment was repeated with the same
then starts to decrease along with the training loss. setup, test accuracy did not exceed 94%.
Figure 2
Figure 3 displays the results for Experiment 2 pattern. The accuracy curves indicate an increase in
conducted over 10 epochs. Both the training and both training and test accuracy, with test accuracy
test loss decrease, with the training loss dropping reaching 95% and training accuracy reaching
smoothly, while the test loss shows a more zigzag around 97%
Figure 3
Figure 4 illustrates the results for Experiment 2 them. Training and test accuracy initially increase,
over 15 epochs. Both training and test loss keep reaching a peak of 96%, but then begin to fluctuate
decreasing, though a clear gap appears between in a zigzag pattern.
Figure 4
Performance Metrics : The formulas for these metrics are:
The accuracy, precision, recall, and F1 score for all models are summarized in the table below:
DISCUSSION when the ResNet50 model was used for feature extraction, it
achieved an accuracy of 89%, which is quite good for an
The experiment demonstrates that fine-tuning the ResNet50 unsupervised learning approach. However, when we applied
model significantly boosts its classification accuracy fine-tuning by updating the weights of the pre-trained
compared to using it as a feature extraction model. Initially, network with additional training, the accuracy rose to an
impressive 98% after just 5 epochs of training. This shows Adversarial Networks), which could be worth
that allowing the model to learn and adjust to the specifics of exploring.
the current dataset significantly enhances its ability to classify 2. Use a Larger Dataset: One limitation of this research
correctly. is the size and variety of the dataset used. To make the
detection system more reliable, future research should
However, the consistency of these results varied across use a bigger and more varied dataset. This could include
different runs of the experiment. While fine-tuning with 5 higher-quality images, images from different AI
epochs led to high accuracy, repeating the experiment yielded models, and images from a variety of sources, like
varying results, indicating some instability. Additionally, social media, news, and entertainment. A larger dataset
when we extended the training to 10 or 15 epochs, the model's will help the model perform better on a wider range of
accuracy remained stable but slightly decreased compared to AI-generated content.
the 5-epoch fine-tuning. This slight drop in accuracy after 3. Real-Time Detection: The current model might take
longer training durations may indicate that the model was some time to process large images or datasets. In the
starting to overfit. Overfitting occurs when the model future, it would be useful to make the model faster so it
becomes too specialized in the training data, losing its ability can classify images in real time. This could help with
to generalize well to new, unseen data. It could also point to practical uses, like detecting fake images on social
instability in the training process, where the model’s media or during live TV broadcasts.
performance fluctuates with prolonged training. 4. Include Other Types of Data: This research focused
only on images, but AI-generated content often comes
with other data, like text or metadata (such as the time
For future improvements, several steps can be considered:
and place an image was uploaded). Future work could
combine different types of data into one model. For
1. Exploring Alternative Architectures: Trying different example, if an AI-generated image has a caption,
deep learning architectures (such as DenseNet, analyzing both the image and the text together could
EfficientNet, or Vision Transformers) could provide help the model detect fakes more accurately.
insights into whether a different model architecture 5. Handle Evolving AI Models: AI-generated images are
might result in more stable or higher performance. getting better and harder to detect, with some newer AI
2. Further Fine-tuning: Fine-tuning for more epochs or tools specifically designed to fool detection systems.
adjusting hyperparameters like the learning rate and Future research could focus on making models stronger
batch size could improve stability. A more gradual against these changes by using adversarial training.
learning rate decay or using advanced optimization This means training the model to recognize fake images
techniques like learning rate warm-up could help in even when they have been altered to look more real.
stabilizing long-term training. 6. Address Ethical Issues: AI-generated images raise
3. Incorporating Data Augmentation: To enhance the serious concerns about misinformation and
model’s ability to generalize better on new data, data manipulation, especially when they are used to mislead
augmentation techniques such as rotations, flips, color people. Future research should look not only at
adjustments, and cropping can be applied. This would improving detection but also at the ethical side of these
artificially increase the diversity of the training set, technologies. It should consider how these technologies
reducing the chances of overfitting by providing the can be misused and how we can set rules to ensure they
model with varied examples. are used responsibly. This includes thinking about how
4. Cross-Validation and Regularization: Using cross- fake images might impact public trust, privacy, and
validation during training could help assess the model’s security.
generalization ability more effectively. Regularization 7. Explore Other Applications: This research focused on
techniques, like dropout or weight decay, could also help detecting if an image is real or AI-generated, but there
mitigate overfitting and improve model robustness. are other ways this technology could be used. For
example, it could be helpful in areas like medicine,
By incorporating these improvements, we could aim for more where fake medical images could harm patients.
stable and reliable performance, making the model better Detecting fake medical images would be crucial for
suited for real-world applications where consistency is key. correct diagnosis. It could also be useful in other fields
like journalism and art, where fake images could
FUTURE WORK mislead people.
[3] He, Kaiming, Xiangyu Zhang, Shaoqing Ren, and Jian [16] Choi, Yong-Hyun, et al. "Learning deep generative
Sun. "Deep residual learning for image recognition." In models for efficient image synthesis and generation."
Proceedings of the IEEE conference on computer vision and International Journal of Computer Vision (2020).
pattern recognition, pp. 770-778. 2016.
[17] Wu, Y., and M. Zeng. "Exposing deepfakes with
[4] P. Datasets, "140k Real and Fake Faces," [Online]. adaptive learning." IEEE Transactions on Image Processing
Available: https://www.kaggle.com/datasets/xhlulu/140k- 29 (2020): 741-755.
real-and-fake-faces. [Accessed 23 3 2022].
[18] Rössler, Andreas, et al. "FaceForensics++: Learning to
[5] P. Datasets, "70k Real Faces," [Online]. Available: Detect Manipulated Facial Images." Proceedings of the
https://www.kaggle.com/c/deepfake-detection- IEEE International Conference on Computer Vision (2019):
challenge/discussion/122786. [Accessed 23 3 2022]. 1-11.