Main Content
Open Access Computer & Communication Science

Analisis Perbandingan Kinerja Arsitektur CNN Dan Transformer dalam Klasifikasi Gambar AI-Generated dan Gambar Asli

Main Article Content

  • David Yus Humisar Silalahi1*
  • Junaidi Junaidi2
  • Eka Ari Endrawati3

Article Sidebar

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.

Article Details

How to Cite

Citation Format
Silalahi, D. Y. H., Junaidi, J., & Endrawati, E. A. (2027). Analisis Perbandingan Kinerja Arsitektur CNN Dan Transformer dalam Klasifikasi Gambar AI-Generated dan Gambar Asli. Jurnal JTIK (Jurnal Teknologi Informasi Dan Komunikasi), 11(1), 292-304. https://doi.org/10.35870/jtik.v11i1.8767

References

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.

Author Biographies

David Yus Humisar Silalahi, Universitas Krisnadwipayana

Program Studi Teknik Informatika, Fakultas Teknik, Universitas Krisnadwipayana, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta, Indonesia.

Junaidi Junaidi, Universitas Krisnadwipayana

Program Studi Teknik Informatika, Fakultas Teknik, Universitas Krisnadwipayana, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta, Indonesia.

Eka Ari Endrawati, Universitas Krisnadwipayana

Program Studi Teknik Informatika, Fakultas Teknik, Universitas Krisnadwipayana, Kota Jakarta Timur, Daerah Khusus Ibukota Jakarta, Indonesia.

Downloads

OJS UsageStats Plugin
Download data is not yet available.

Similar Articles

You may also start an advanced similarity search for this article.

Contrimetric

Recommended Articles