Abstract
The advancement of generative artificial intelligence has enabled the creation of increasingly realistic facial images that are difficult to distinguish from authentic images, thereby creating a need for automated classification methods capable of maintaining both accuracy and consistency in detection. This study compares the performance of two deep learning architecture groups, namely Convolutional Neural Networks (CNNs) and Transformers, for the binary classification of AI-generated images and real images. Four models were evaluated: ResNet50 and MobileNetV2 as CNN representatives, and Vision Transformer (ViT) and Data-efficient Image Transformer (DeiT) as Transformer representatives. The dataset was obtained from the 140k Real and Fake Faces dataset on Kaggle, with 28,000 images used in a balanced distribution: 20,000 images for training, 4,000 for validation, and 4,000 for testing. The experimental workflow followed the CRISP-DM framework, comprising business and data understanding, data preparation, modeling, evaluation, and deployment. Model performance was assessed using accuracy, precision, recall, F1-score, confusion matrix, and classification report. The results show that DeiT achieved the best performance, with an accuracy of 86.98%, precision of 86.81%, recall of 87.20%, and F1-score of 87.00%, followed by MobileNetV2, ViT, and ResNet50. In aggregate, the Transformer-based models achieved an average accuracy of 79.5%, which was 7% higher than that of the CNN-based models. The DeiT model was subsequently implemented in a Gradio-based prototype application capable of receiving user-uploaded images, performing inference, and displaying the predicted classification label along with its confidence score.
Keywords
Article Details
How to Cite
Citation FormatReferences
22 References- Aria, M. S. A., Slamet, C., & Firdaus, M. D. (2025). Klasifikasi fake dan real menggunakan Vision Transformer dan EfficientNet-B0 pada gambar asli dan generatif AI. SMATIKA Jurnal, 15(01), 179–192. https://doi.org/10.32664/smatika.v15i01.1531.
- Arshed, M. A., Alwadain, A., Faizan Ali, R., Mumtaz, S., Ibrahim, M., & Muneer, A. (2023). Unmasking deception: Empowering deepfake detection with vision transformer network. Mathematics, 11(17), Article 3710. https://doi.org/10.3390/math11173710.
- Arshed, M. A., Mumtaz, S., Ibrahim, M., Dewi, C., Tanveer, M., & Ahmed, S. (2024). Multiclass AI-generated deepfake face detection using patch-wise deep learning model. Computers, 13(1), Article 31. https://doi.org/10.3390/computers13010031.
- Bammey, Q. (2023). Synthbuster: Towards detection of diffusion model generated images. IEEE Open Journal of Signal Processing, 5, 1–9. https://doi.org/10.1109/OJSP.2023.3337714.
- Dong, F., Zou, X., Wang, J., & Liu, X. (2023). Contrastive learning-based general deepfake detection with multi-scale RGB frequency clues. Journal of King Saud University: Computer and Information Sciences, 35(4), 90–99. https://doi.org/10.1016/j.jksuci.2023.03.005.
- Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., & Houlsby, N. (2020). An image is worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations. https://doi.org/10.48550/arXiv.2010.11929.
- Erwin, I. T., Arda, A. L., Taufik, I., & Erwin, H. A. (2025). Implementasi model DeiT untuk membedakan gambar buatan AI dan manusia pada ilustrasi animasi 2D. INTI Nusa Mandiri, 19(2), 172–180. https://doi.org/10.33480/inti.v19i2.6306.
- Gong, L. Y., & Li, X. J. (2024). A contemporary survey on deepfake detection: Datasets, algorithms, and challenges. Electronics, 13(3), Article 585. https://doi.org/10.3390/electronics13030585.
- Gulo, S. A., Pertiwi, A. A., Nasution, S. P. S., & Syahputra, H. (2025). Deteksi deepfake dalam citra menggunakan Convolutional Neural Network (CNN). JATI (Jurnal Mahasiswa Teknik Informatika), 9(5), 8655–8660. https://doi.org/10.36040/jati.v9i5.14896.
- Kusnaeni, K., Adriani, I. R., Hafid, M. S., & Rizal, M. E. (2025). Deepfake image classification using ResNet50 feature extraction and XGBoost learning model. Journal of Mathematics, Computations and Statistics, 8(2), 258–268. https://doi.org/10.35580/jmathcos.v8i2.8387.
- Malik, A., Kuribayashi, M., Abdullahi, S. M., & Khan, A. N. (2022). DeepFake detection for human face images and videos: A survey. IEEE Access, 10, 18757–18775. https://doi.org/10.1109/ACCESS.2022.3151186.
- Manisha, M., Li, C.-T., & Kotegar, K. A. (2025). AI-synthesized image detection: Source camera fingerprinting to discern the authenticity of digital images. IEEE Access, 13, 29660–29672. https://doi.org/10.1109/ACCESS.2025.3537558.
- Maulana, D., Azzahrah, N. S., Syach, R. A., Syauri, S., Syafi'i, M., & Rozikin, C. (2025). Identifikasi konten visual buatan AI dengan ResNet dan fine-grained feature extraction. Jurnal Informatika dan Teknik Elektro Terapan, 13(3S1), 1248–1256. https://doi.org/10.23960/jitet.v13i3S1.8056.
- Park, D., Na, H., & Choi, D. (2024). Performance comparison and visualization of AI-generated-image detection methods. IEEE Access, 12, 62609–62627. https://doi.org/10.1109/ACCESS.2024.3394250.
- Rafique, R., Gantassi, R., Amin, R., Frnda, J., Mustapha, A., & Alshehri, A. H. (2023). Deep fake detection and classification using error-level analysis and deep learning. Scientific Reports, 13(1), Article 7422. https://doi.org/10.1038/s41598-023-34629-3.
- Rana, M. S., Nobi, M. N., Murali, B., & Sung, A. H. (2022). Deepfake detection: A systematic literature review. IEEE Access, 10, 25494–25513. https://doi.org/10.1109/ACCESS.2022.3154404.
- Ranupadma, N. K. R., Dharma, E. M., & Paramitha, A. A. I. I. (2026). Implementasi transfer learning dan augmentasi pada model CNN untuk meningkatkan robustness klasifikasi AI-generated image. JATI (Jurnal Mahasiswa Teknik Informatika), 10(2), 2370–2377. https://doi.org/10.36040/jati.v10i2.17412.
- Rizqullah, G. F., Eosina, P., & Pramuko, A. E. K. (2026). Enhanced performance evaluation of VGG16 and ResNet50 for deepfake detection using local ternary pattern. Sinkron: Jurnal dan Penelitian Teknik Informatika, 10(1), 701–712. https://doi.org/10.33395/sinkron.v10i1.15582.
- Sihananto, A. N., Al Haromainy, M. M., Fauzi, Z. A., Reza, R. A., Putra, G. C. H., & Christianty, T. M. (2024). Wayang's images recognition using Vision Transformer. IJDASEA (International Journal of Data Science, Engineering, and Analytics), 4(2), 15–27. https://doi.org/10.33005/ijdasea.v4i2.24.
- Subkhi, M. B., Setiawan, A. B., & Candra, M. Y. A. (2023). Klasifikasi gambar: Membedakan lukisan buatan manusia dan AI dengan CNN. Paradigma: Jurnal Filsafat, Sains, Teknologi, dan Sosial Budaya, 29(4), 149–155. https://doi.org/10.33503/paradigma.v29i4.1284.
- Tahyudin, G. G., Sulistiyo, M. D., Arzaki, M., & Rachmawati, E. (2024). Classifying gender based on face images using vision transformer. JOIV: International Journal on Informatics Visualization, 8(1), 18–25. https://doi.org/10.62527/joiv.8.1.1923.
- Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., & Jégou, H. (2021). Training data-efficient image transformers & distillation through attention. In Proceedings of the 38th International Conference on Machine Learning (pp. 10347–10357). PMLR.
License
Copyright (c) 2027 David Yus Humisar Silalahi, Junaidi Junaidi, Eka Ari Endrawati

This work is licensed under a Creative Commons Attribution 4.0 International License.
This is an open-access journal distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, reproduction, and adaptation in any medium (even commercially), provided appropriate credit is given to the original author(s), a link to the license is provided, and any changes made are indicated. Authors retain copyright without restrictions and grant the journal the right of first publication as well as non-exclusive publishing rights for archiving, indexing, and scholarly dissemination.
Downloads
OJS UsageStats PluginSimilar Articles
- Klasifikasi Gambar Pemandangan dengan Kecerdasan Buatan Berbasis CNN Mozes Hasian Veltin Sinaga, Muhammad Albirra, Muhammad Fajar Sidiq · Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi) · Vol. 8 No. 2 (2024): APRIL-JUNE 2024
- Analisis Perbandingan Metode Convolutional Neural Network (CNN) dan MobileNet dalam Klasifikasi Penyakit Daun Padi Tazkira Turahman, Erfan Hasmin, Komang Aryasa · Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi) · Vol. 9 No. 1 (2025): JANUARY-MARCH 2025
- Klasifikasi Data Penderita Skizofrenia Menggunakan CNN-LSTM dan CNN-GRU pada Data Sinyal EEG 2D Firmansyah, Dian Palupi Rini, Sukemi · Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi) · Vol. 7 No. 4 (2023): OCTOBER-DECEMBER 2023
- Analisis Nutrisi Makanan Berbasis Mobile Menggunakan CNN dan Artificial Intelligence Husain Rahmani, Dadang Iskandar Mulyana · Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi) · Vol. 10 No. 2 (2026): APRIL 2026
- Analisis Framing Demonstran Indonesia Gelap dalam Bingkai Media CNN Indonesia dan Tempo.co Meidita Helvy Rosa Zamardha, Saifuddin Zuhri · Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi) · Vol. 10 No. 2 (2026): APRIL 2026
You may also start an advanced similarity search for this article.