{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,5]],"date-time":"2026-11-05T07:10:29Z","timestamp":1793862629431,"version":"4.6.1"},"reference-count":59,"publisher":"MDPI AG","issue":"10","license":[{"start":{"date-parts":[[2023,9,28]],"date-time":"2023-09-28T00:00:00Z","timestamp":1695859200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"University of Dayton Libraries Open Access Fund","award":["2025234"],"award-info":[{"award-number":["2025234"]}]},{"DOI":"10.13039\/100000001","name":"NSF","doi-asserted-by":"publisher","award":["2025234"],"award-info":[{"award-number":["2025234"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Imaging"],"abstract":"<jats:p>The proliferation of Artificial Intelligence (AI) models such as Generative Adversarial Networks (GANs) has shown impressive success in image synthesis. Artificial GAN-based synthesized images have been widely spread over the Internet with the advancement in generating naturalistic and photo-realistic images. This might have the ability to improve content and media; however, it also constitutes a threat with regard to legitimacy, authenticity, and security. Moreover, implementing an automated system that is able to detect and recognize GAN-generated images is significant for image synthesis models as an evaluation tool, regardless of the input modality. To this end, we propose a framework for reliably detecting AI-generated images from real ones through Convolutional Neural Networks (CNNs). First, GAN-generated images were collected based on different tasks and different architectures to help with the generalization. Then, transfer learning was applied. Finally, several Class Activation Maps (CAM) were integrated to determine the discriminative regions that guided the classification model in its decision. Our approach achieved 100% on our dataset, i.e., Real or Synthetic Images (RSI), and a superior performance on other datasets and configurations in terms of its accuracy. Hence, it can be used as an evaluation tool in image generation. Our best detector was a pre-trained EfficientNetB4 fine-tuned on our dataset with a batch size of 64 and an initial learning rate of 0.001 for 20 epochs. Adam was used as an optimizer, and learning rate reduction along with data augmentation were incorporated.<\/jats:p>","DOI":"10.3390\/jimaging9100199","type":"journal-article","created":{"date-parts":[[2023,9,28]],"date-time":"2023-09-28T05:55:54Z","timestamp":1695880554000},"page":"199","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":65,"title":["AI vs. AI: Can AI Detect AI-Generated Images?"],"prefix":"10.3390","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4742-6861","authenticated-orcid":false,"given":"Samah S.","family":"Baraheem","sequence":"first","affiliation":[{"name":"Department of Computer Science, Umm Al-Qura University, Prince Sultan Bin Abdulaziz Road, Mecca 21421, Makkah, Saudi Arabia"},{"name":"Department of Computer Science, University of Dayton, Dayton, OH 45469, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0236-7992","authenticated-orcid":false,"given":"Tam V.","family":"Nguyen","sequence":"additional","affiliation":[{"name":"Department of Computer Science, University of Dayton, Dayton, OH 45469, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,9,28]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"10813","DOI":"10.1007\/s10462-023-10434-2","article-title":"Image synthesis: A review of methods, datasets, evaluation metrics, and future outlook","volume":"56","author":"Baraheem","year":"2023","journal-title":"Artif. Intell. Rev."},{"key":"ref_2","unstructured":"Elgammal, A., Liu, B., Elhoseiny, M., and Mazzone, M. (2017). CAN: Generating \u2018art\u2019 by learning about styles and deviating from style norms. arXiv."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Chen, J., Shen, Y., Gao, J., Liu, J., and Liu, X. (2017). Language-Based Image Editing with recurrent attentive models. arXiv.","DOI":"10.1109\/CVPR.2018.00909"},{"key":"ref_4","unstructured":"Yan, Z., Zhang, H., Wang, B., Paris, S., and Yu, Y. (2014). Automatic photo adjustment using deep neu-ral networks. arXiv."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Yu, J., Lin, Z., Yang, J., Shen, X., Lu, X., and Huang, T.S. (2018). Generative image inpainting with con-textual attention. arXiv.","DOI":"10.1109\/CVPR.2018.00577"},{"key":"ref_6","unstructured":"Nazeri, K., Ng, E., Joseph, T., Qureshi, F.Z., and Ebrahimi, M. (2019). EdgeConnect: Generative image inpainting with adversarial edge learning. arXiv."},{"key":"ref_7","unstructured":"Thaung, L. (2022, April 01). Advanced Data Augmentation: With Generative Adversarial Networks and Computer-Aided Design. 2020, Dissertation. Available online: http:\/\/liu.diva-portal.org\/smash\/record.jsf?pid=diva2%3A1484523&dswid=6768."},{"key":"ref_8","unstructured":"Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014, January 8\u201313). Generative adversarial nets. Proceedings of the 27th International Conference on Neural Information Processing Systems, Montreal, QC, Canada."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Marra, F., Gragnaniello, D., Verdoliva, L., and Poggi, G. (2019, January 28\u201330). Do GANs Leave Artificial Fingerprints?. Proceedings of the 2019 IEEE Conference on Multimedia Information Processing and Retrieval, San Jose, CA, USA.","DOI":"10.1109\/MIPR.2019.00103"},{"key":"ref_10","unstructured":"Yu, N., Davis, L., and Fritz, M. (November, January 27). Attributing Fake Images to GANs: Learning and Analyzing GAN Fingerprints. Proceedings of the IEEE\/CVF International Conference on Computer Vision, Seoul, Republic of Korea."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Zhang, X., Karaman, S., and Chang, S.-F. (2019, January 9\u201312). Detecting and Simulating Artifacts in GAN Fake Images. Proceedings of the 2019 IEEE International Workshop on Information Forensics and Security (WIFS), Delft, The Netherlands.","DOI":"10.1109\/WIFS47025.2019.9035107"},{"key":"ref_12","unstructured":"Dzanic, T., Shah, K., and Witherden, F. (2019). Fourier spectrum discrepancies in deep network generated images. arXiv."},{"key":"ref_13","unstructured":"Frank, J., Eisenhofer, T., Sch, L., Fischer, A., Kolossa, D., and Holz, T. (2020, January 13\u201318). Leveraging Frequency Analysis for Deep Fake Image Recognition. Proceedings of the 37th International Conference on Machine Learning, Virtual."},{"key":"ref_14","unstructured":"Sushko, V., Sch\u00f6nfeld, E., Zhang, D., Gall, J., Schiele, B., and Khoreva, A. (2020). You only need adversarial supervision for semantic image synthesis. arXiv."},{"key":"ref_15","unstructured":"Liu, X., Yin, G., Shao, J., Wang, X., and Li, H. (2019). Learning to predict layout-to-image conditional convolutions for semantic image synthesis. arXiv."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Park, T., Liu, M.-Y., Wang, T.-C., and Zhu, J.-Y. (2019, January 15\u201320). Semantic image synthesis with spatially-adaptive normalization. Proceedings of the 2019 IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA.","DOI":"10.1109\/CVPR.2019.00244"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Esser, P., Rombach, R., and Ommer, B. (2021, January 20\u201325). Taming transformers for high-resolution image synthesis. Proceedings of the 2021 IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA.","DOI":"10.1109\/CVPR46437.2021.01268"},{"key":"ref_18","unstructured":"Baraheem, S.S., and Nguyen, T.V. (2023). Multimedia Tools and Applications, Springer."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Xu, T., Zhang, P., Huang, Q., Zhang, H., Gan, Z., Huang, X., and He, X. (2017). AttnGAN: Fine-grained text to image generation with attentional generative adversarial networks. arXiv.","DOI":"10.1109\/CVPR.2018.00143"},{"key":"ref_20","unstructured":"Ye, H., Yang, X., Takac, M., Sunderraman, R., and Ji, S. (2021). Improving text-to-image synthesis using contrastive learning. arXiv."},{"key":"ref_21","unstructured":"Tao, M., Tang, H., Wu, S., Sebe, N., Wu, F., and Jing, X.-Y. (2022, January 18\u201324). DF-GAN: Deep fusion generative adversarial networks for text-to-image synthesis. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA."},{"key":"ref_22","unstructured":"Li, B., Qi, X., Lukasiewicz, T., and Torr, P.H.S. (2019). Controllable Text-to-Image Generation. arXiv."},{"key":"ref_23","unstructured":"Mirza, M., and Osindero, S. (2014). Conditional generative adversarial nets. arXiv."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Ronneberger, O., Fischer, P., and Brox, T. (2015). U-Net: Convolutional Networks for Biomedical Image Segmentation. arXiv.","DOI":"10.1007\/978-3-319-24574-4_28"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Isola, P., Zhu, J.-Y., Zhou, T., and Efros, A.A. (2016). Image-to-image translation with conditional adversarial networks. arXiv.","DOI":"10.1109\/CVPR.2017.632"},{"key":"ref_26","unstructured":"Ulyanov, D., Vedaldi, A., and Lempitsky, V. (2016). Instance normalization: The missing ingredient for fast stylization. arXiv."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Doll\u00e1r, P., and Zitnick, C.L. (2014, January 6\u201312). Microsoft COCO: Common objects in context. Proceedings of the Computer Vision\u2013ECCV 2014: 13th European Conference, Zurich, Switzerland.","DOI":"10.1007\/978-3-319-10602-1_48"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Qiao, S., Chen, L.-C., and Yuille, A. (2021, January 20\u201325). DetectoRS: Detecting objects with recursive feature pyramid and switchable atrous convolution. Proceedings of the 2021 IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA.","DOI":"10.1109\/CVPR46437.2021.01008"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Chen, K., Pang, J., Wang, J., Xiong, Y., Li, X., Sun, S., Feng, W., Liu, Z., Shi, J., and Ouyang, W. (2019). Hybrid Task Cascade for Instance Segmentation. arXiv.","DOI":"10.1109\/CVPR.2019.00511"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Fang, Y., Yang, S., Wang, X., Li, Y., Fang, C., Shan, Y., Feng, B., and Liu, W. (2021). Instances as Queries. arXiv.","DOI":"10.1109\/ICCV48922.2021.00683"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"He, K., Gkioxari, G., Dollar, P., and Girshick, R. (2017, January 22\u201329). Mask R-CNN. Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy.","DOI":"10.1109\/ICCV.2017.322"},{"key":"ref_32","unstructured":"Beyeler, M. (2015). OpenCV with Python Blueprints, Packt Publishing Ltd."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Xie, S., and Tu, Z. (2015, January 7\u201313). Holistically-nested edge detection. Proceedings of the IEEE International Conference on Computer Vision (ICCV), Santiago, Chile.","DOI":"10.1109\/ICCV.2015.164"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"721","DOI":"10.1016\/S0031-3203(00)00023-6","article-title":"On the Canny edge detector","volume":"34","author":"Ding","year":"2001","journal-title":"Pattern Recognit."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"358","DOI":"10.1109\/4.996","article-title":"Design of an image edge detection filter using the Sobel operator","volume":"23","author":"Kanopoulos","year":"1988","journal-title":"IEEE J. Solid-State Circuits"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Caesar, H., Uijlings, J., and Ferrari, V. (2018, January 18\u201322). COCO-stuff: Thing and stuff classes in context. Proceedings of the 2018 IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA.","DOI":"10.1109\/CVPR.2018.00132"},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Li, F.-F. (2009, January 20\u201325). ImageNet: A large-scale hierarchical image database. Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA.","DOI":"10.1109\/CVPR.2009.5206848"},{"key":"ref_38","unstructured":"Simonyan, K., and Zisserman, A. (2014). Very deep convolutional networks for large-scale image recognition. arXiv."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"He, K., Zhang, X., Ren, S., and Sun, J. (2015). Deep residual learning for image recognition. arXiv.","DOI":"10.1109\/CVPR.2016.90"},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., and Wojna, Z. (2015). Rethinking the inception architecture for computer vision. arXiv.","DOI":"10.1109\/CVPR.2016.308"},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Chollet, F. (2017, January 21\u201326). Xception: Deep learning with depthwise separable convolutions. Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA.","DOI":"10.1109\/CVPR.2017.195"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Huang, G., Liu, Z., van der Maaten, L., and Weinberger, K.Q. (2016). Densely connected convolutional networks. arXiv.","DOI":"10.1109\/CVPR.2017.243"},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"Szegedy, C., Ioffe, S., Vanhoucke, V., and Alemi, A. (2016). Inception-v4, Inception-ResNet and the impact of residual connections on learning. arXiv.","DOI":"10.1609\/aaai.v31i1.11231"},{"key":"ref_44","unstructured":"Tan, M., and Le, Q.V. (2019). MixConv: Mixed Depthwise Convolutional Kernels. arXiv."},{"key":"ref_45","unstructured":"Tu, Z., Talebi, H., Zhang, H., Yang, F., Milanfar, P., Bovik, A., and Li, Y. (2022). European Conference on Computer Vision, Springer Nature."},{"key":"ref_46","unstructured":"Tan, M., and Le, Q.V. (2019). EfficientNet: Rethinking model scaling for convolutional Neural Networks. arXiv."},{"key":"ref_47","unstructured":"Agarap, A.F. (2018). Deep Learning using Rectified Linear Units (ReLU). arXiv."},{"key":"ref_48","unstructured":"Ioffe, S., and Szegedy, C. (2015). Batch Normalization: Accelerating deep network training by reducing internal covariate shift. arXiv."},{"key":"ref_49","first-page":"1929","article-title":"Dropout: A simple way to prevent neural networks from overfitting","volume":"15","author":"Srivastava","year":"2014","journal-title":"J. Mach. Learn. Res."},{"key":"ref_50","unstructured":"Kingma, D.P., and Ba, J. (2014). Adam: A method for stochastic optimization. arXiv."},{"key":"ref_51","doi-asserted-by":"crossref","unstructured":"Graves, A. (2013). Generating sequences with recurrent neural networks. arXiv.","DOI":"10.1007\/978-3-642-24797-2_3"},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"336","DOI":"10.1007\/s11263-019-01228-7","article-title":"Grad-CAM: Visual explanations from deep networks via gradient-based localization","volume":"128","author":"Selvaraju","year":"2020","journal-title":"Int. J. Comput. Vis."},{"key":"ref_53","doi-asserted-by":"crossref","unstructured":"Desai, S., and Ramaswamy, H.G. (2020, January 1\u20135). Ablation-CAM: Visual explanations for deep convolutional network via gradient-free localization. Proceedings of the 2020 IEEE Winter Conference on Applications of Computer Vision (WACV), Snowmass Village, CO, USA.","DOI":"10.1109\/WACV45572.2020.9093360"},{"key":"ref_54","doi-asserted-by":"crossref","first-page":"5875","DOI":"10.1109\/TIP.2021.3089943","article-title":"LayerCAM: Exploring hierarchical class activation maps for localization","volume":"30","author":"Jiang","year":"2021","journal-title":"IEEE Trans. Image Process."},{"key":"ref_55","doi-asserted-by":"crossref","unstructured":"Wang, H., Wang, Z., Du, M., Yang, F., Zhang, Z., Ding, S., Mardziel, P., and Hu, X. (2020, January 14\u201319). Score-CAM: Score-weighted visual explanations for convolutional neural networks. Proceedings of the 2020 IEEE\/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Seattle, DC, USA.","DOI":"10.1109\/CVPRW50498.2020.00020"},{"key":"ref_56","doi-asserted-by":"crossref","unstructured":"Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13\u201317). Why should I trust you? Explaining the predictions of any classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.","DOI":"10.1145\/2939672.2939778"},{"key":"ref_57","doi-asserted-by":"crossref","unstructured":"Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., and Torralba, A. (2017, January 21\u201326). Scene Parsing through ADE20K Dataset. Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA.","DOI":"10.1109\/CVPR.2017.544"},{"key":"ref_58","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/2897824.2925954","article-title":"The sketchy database: Learning to retrieve badly drawn bunnies","volume":"35","author":"Sangkloy","year":"2016","journal-title":"ACM Trans. Graph."},{"key":"ref_59","unstructured":"Wah, C., Branson, S., Welinder, P., Perona, P., and Belongie, S.J. (2011). The Caltech-UCSD Birds-200-2011 Dataset, California Institute of Technology."}],"container-title":["Journal of Imaging"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2313-433X\/9\/10\/199\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T21:00:43Z","timestamp":1760130043000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2313-433X\/9\/10\/199"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,9,28]]},"references-count":59,"journal-issue":{"issue":"10","published-online":{"date-parts":[[2023,10]]}},"alternative-id":["jimaging9100199"],"URL":"https:\/\/doi.org\/10.3390\/jimaging9100199","relation":{},"ISSN":["2313-433X"],"issn-type":[{"value":"2313-433X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,9,28]]}}}