Implementation of Transfer Learning Using DenseNet121 for Detecting Presentation Attacks in Face Images

Authors

DOI:

https://doi.org/10.25077/TEKNOSI.v12i2.2026.266-275

Keywords:

Presentation Attack Detection, DenseNet121, Face Anti-Spoofing, Transfer Learning, Image Classification

Abstract

Remote examinations have become a cornerstone of distance education in Indonesia, particularly in large-scale institutions such as Universitas Terbuka and Massive Open Online Course (MOOC) platforms. However, the reliability of face verification in commercial online proctoring systems continues to be challenged by presentation attacks (face spoofing). Using simple and inexpensive media such as printed photographs, images displayed on another device, masks, or mannequins, impersonators can deceive the initial face verification process without requiring advanced technical skills. Once authenticated, they are able to complete the entire examination without being detected. Given the large number of participants in distance education examinations, manual verification of every examinee is impractical. Therefore, an automated, fast, lightweight, and reliable detection solution is needed to efficiently screen webcam captures at scale within university server infrastructures. This study addresses this challenge by developing a presentation attack detection model based on transfer learning using the DenseNet121 architecture. The model was trained on a multiclass facial image dataset consisting of 1,403 images across six categories: fake_mannequin, fake_mask, fake_printed, fake_screen, fake_unknown, and realperson. Partial fine-tuning was applied to the final convolutional layers (denseblock4 and norm5), while the training process employed the AdamW optimizer, the ReduceLROnPlateau learning rate scheduler, and early stopping to enhance performance and prevent overfitting. Experimental results achieved an accuracy of 87.68%, a weighted precision of 88.79%, a weighted recall of 87.68%, and a weighted F1-score of 87.62%, demonstrating stable and consistent performance across all attack categories. The best-performing model was subsequently deployed in a Streamlit-based application to provide an interactive and user-friendly demonstration for non-technical users. These findings demonstrate that the proposed DenseNet121 transfer learning approach is accurate, lightweight, and computationally efficient, making it a promising additional security layer for online examination proctoring systems in large-scale distance education environments amid the growing threat of face spoofing attacks.

References

A. Putri Iskandar, Muhammad Ikhsan Thohir, Ivana Lucia Kharisma, Kamdan, and Anggun Fergina, “Implementasi Deteksi Langsung Pada Sistem Ujian Online Menggunakan Algoritma Convolutional Neural Network,” Jurnal CoSciTech (Computer Science and Information Technology), vol. 5, no. 2, pp. 483–492, Sep. 2024, doi: https://doi.org/10.37859/coscitech.v5i2.7270.

Muhammad Arsal, Bheta Agus Wardijono, and D. Anggraini, “Face Recognition Untuk Akses Pegawai Bank Menggunakan Deep Learning Dengan Metode CNN,” Jurnal Nasional Teknologi dan Sistem Informasi, vol. 6, no. 1, pp. 55–63, Jun. 2020, doi: https://doi.org/10.25077/teknosi.v6i1.2020.55-63.

E. N. F. Dewi, G. N. Tarempa, A. N. Rachman, and A. Febriansyah, “Sistem Presensi Perkuliahan Mahasiswa Berbasis Face Recognition dengan Metode Liveness Detection,” Indonesian Journal Computer Science, vol. 4, no. 2, pp. 118–126, Oct. 2025, doi: https://doi.org/10.31294/ijcs.v4i2.9876.

N. Selwyn, C. O’Neill, G. Smith, M. Andrejevic, and X. Gu, “A necessary evil? The rise of online exam proctoring in Australian universities,” Media Int. Aust., vol. 186, no. 1, pp. 149–164, 2023, doi: 10.1177/1329878X211005862

M. Pooshideh, “A novel active solution for two-dimensional face presentation attack detection,” arXiv preprint, arXiv:2212.06958, 2022. Available: https://arxiv.org/abs/2212.06958

W. Yaqub, M. Mohanty, and B. Suleiman, “Image-hashing-based anomaly detection for privacy-preserving online proctoring,” arXiv preprint, arXiv:2107.09373, 2021. Available: https://arxiv.org/abs/2107.09373

Z. Boulkenafet, J. Komulainen, and A. Hadid, “Face Anti-Spoofing Based on Color Texture Analysis,” arXiv preprint, arXiv:1511.06316, 2015. Available: https://arxiv.org/abs/1511.06316

X. Tan, Y. Li, J. Liu, and L. Jiang, “Face liveness detection from a single image with sparse low rank bilinear discriminative model,” in Proc. Eur. Conf. Comput. Vis. (ECCV), Crete, Greece, 2010, pp. 504–517, doi: 10.1007/978-3-642-15567-3_37

G. Pan, L. Sun, Z. Wu, and S. Lao, “Eyeblink-based anti-spoofing in face recognition from a generic webcamera,” in Proc. IEEE Int. Conf. Comput. Vis. (ICCV), Rio de Janeiro, Brazil, 2007, pp. 1–8, doi: 10.1109/ICCV.2007.4409068

O. Nikisins, A. Mohammadi, A. Anjos, and S. Marcel, “On effectiveness of anomaly detection approaches against unseen presentation attacks in face anti-spoofing,” in Proc. Int. Conf. Biometrics (ICB), Gold Coast, Australia, 2018, pp. 75–81, doi: 10.1109/

ICB2018.2018.00022

Y. Liu, A. Jourabloo, and X. Liu, “Learning deep models for face anti-spoofing: Binary or auxiliary supervision,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Salt Lake City, UT, USA, 2018, pp. 389–398, doi: 10.1109/CVPR.2018.00048

R. A. Saragih, T. D. Sunoto, D. Setiadikarunia, and E. Moses, “Model Deep Learning untuk Face Anti-Spoofing dalam Mengatasi Domain Generalization dengan Depth Estimation dan Generative Adversarial Network,” Jurnal Telematika, vol. 20, no. 1, pp. 1–12, Aug. 2025, doi: 10.61769/telematika.v20i1.730. Available: https://journal.ithb.ac.id/index.php/telematika/article/view/730

Dzikri Maulana, Nur Salamah Azzahrah, Reiza Alithian Syach, Sopian Syauri, and Chaerur Rozikin, “IDENTIFIKASI KONTEN VISUAL BUATAN AI DENGAN RESNET DAN FINE-GRAINED FEATURE EXTRACTION,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 13, no. 3S1, Oct. 2025, doi: https://doi.org/10.23960/jitet.v13i3S1.8056.

I. Made and N. Devi, “Real Time Face Recognition for Mobile Application Based on Mobilenetv2,” Jurnal Multidisiplin Madani, vol. 3, no. 9, pp. 1855–1864, Sep. 2023, doi: https://doi.org/10.55927/mudima.v3i9.5924.

F. A. Jiwani and Bagus Satrio Waluyo Poetro, “SISTEM DETEKSI GAMBAR DEEPFAKE MENGGUNAKAN CNN DENSENET-121 DENGAN WATERMARKING LEAST SIGNIFICANT BIT (LSB),” Jurnal Rekayasa Sistem Informasi dan Teknologi, vol. 2, no. 3, pp. 1157–1170, Feb. 2025, doi: https://doi.org/10.70248/jrsit.v2i3.1939.

G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger, “Densely Connected Convolutional Networks,” 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2261–2269, Jul. 2017, doi: 10.1109/CVPR.2017.243

J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “ImageNet: A large-scale hierarchical image database,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Miami, FL, USA, 2009, pp. 248–255, doi: 10.1109/CVPR.2009.5206848

N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: A simple way to prevent neural networks from overfitting,” J. Mach. Learn. Res., vol. 15, no. 1, pp. 1929–1958, 2014. Available: https://jmlr.org/papers/v15/srivastava14a.html

K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Las Vegas, NV, USA, 2016, pp. 770–778, doi: 10.1109/CVPR.2016.90

I. Loshchilov and F. Hutter, “Decoupled weight decay regularization,” in Proc. Int. Conf. Learn. Represent. (ICLR), New Orleans, LA, USA, 2019. Available: https://arxiv.org/abs/1711.05101

D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in Proc. Int. Conf. Learn. Represent. (ICLR), San Diego, CA, USA, 2015. Available: https://arxiv.org/abs/1412.6980

A. Paszke et al., “PyTorch: An imperative style, high-performance deep learning library,” in Adv. Neural Inf. Process. Syst. (NeurIPS), Vancouver, BC, Canada, 2019, pp. 8024–8035. Available: https://arxiv.org/abs/1912.01703

A. Anwar and A. Raychowdhury, “Masked face recognition for secured authentication,” arXiv preprint, arXiv:2008.11104, 2020. Available: https://arxiv.org/abs/2008.11104

A. Dosovitskiy et al., “An image is worth 16x16 words: Transformers for image recognition at scale,” in Proc. Int. Conf. Learn. Represent. (ICLR), Virtual, 2021. Available: https://arxiv.org/abs/2010.11929

M. Tan and Q. V. Le, “EfficientNet: Rethinking model scaling for convolutional neural networks,” in Proc. Int. Conf. Mach. Learn. (ICML), Long Beach, CA, USA, 2019, pp. 6105–6114. Available: https://arxiv.org/abs/1905.11946

C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking the inception architecture for computer vision,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Las Vegas, NV, USA, 2016, pp. 2818–2826, doi: 10.1109/CVPR.2016.308

S. D. Thepade, M. Dindorkar, P. Chaudhari, and S. Bang, “Face presentation attack identification optimization with adjusting convolution blocks in VGG networks,” Intell. Syst. Appl., vol. 16, 2022, Art. no. 200107, doi: 10.1016/j.iswa.2022.200107

Submitted

2026-07-03

Accepted

2026-08-20

Published

2026-08-26

How to Cite

[1]
S. N. Zildjian, D. Nurdiana, and F. Leviany, “Implementation of Transfer Learning Using DenseNet121 for Detecting Presentation Attacks in Face Images”, TEKNOSI, vol. 12, no. 2, pp. 266–275, Aug. 2026.

Similar Articles

1 2 3 4 5 6 7 8 > >> 

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