Implementation of Transfer Learning Using DenseNet121 for Detecting Presentation Attacks in Face Images
DOI:
https://doi.org/10.25077/TEKNOSI.v12i2.2026.266-275Keywords:
Presentation Attack Detection, DenseNet121, Face Anti-Spoofing, Transfer Learning, Image ClassificationAbstract
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
Accepted
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Jurnal Nasional dan Sistem Informasi

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Hak cipta untuk artikel ini ditransfer ke Jurnal Nasional Teknologi dan Sistem Informasi (TEKNOSI) jika dan ketika artikel diterima untuk publikasi. Yang bertanda tangan di bawah ini dengan ini mentransfer setiap dan semua hak di dalam dan ke kertas termasuk tanpa batasan semua hak cipta untuk TEKNOSI. Yang bertanda tangan di bawah ini dengan ini menyatakan dan menjamin bahwa makalah tersebut asli dan bahwa ia adalah pembuat makalah, kecuali untuk bahan yang secara jelas diidentifikasi sebagai sumber aslinya, dengan pemberitahuan izin dari pemilik hak cipta jika diperlukan. Yang bertanda tangan di bawah ini menyatakan bahwa ia memiliki kekuatan dan wewenang untuk membuat dan melaksanakan penugasan ini.
Kami menyatakan bahwa:
- Makalah ini belum diterbitkan dalam bentuk yang sama di tempat lain.
- Makalah ini tidak akan dikirimkan di tempat lain untuk publikasi sebelum penerimaan/penolakan oleh Jurnal ini
- Izin hak cipta diperoleh untuk materi yang diterbitkan di tempat lain dan yang memerlukan izin ini untuk reproduksi.
Selanjutnya, Saya/kami dengan ini mentransfer hak publikasi yang tidak terbatas dari makalah yang disebutkan di atas secara keseluruhan kepada TEKNOSI. Transfer hak cipta mencakup hak untuk mereproduksi dan mendistribusikan artikel, termasuk cetak ulang, terjemahan, reproduksi foto, mikroform, bentuk elektronik (offline, online) atau reproduksi lain yang serupa.
Penulis yang sesuai menandatangani dan menerima tanggung jawab untuk merilis materi ini atas nama setiap dan semua penulis bersama. Perjanjian ini harus ditandatangani oleh setidaknya salah satu penulis yang telah memperoleh persetujuan dari rekan penulis jika berlaku. Setelah pengajuan perjanjian ini ditandatangani oleh penulis yang sesuai, perubahan kepengarangan atau dalam urutan penulis yang tercantum tidak akan diterima.
Hak / Syarat dan Ketentuan yang dipertahankan :
- Penulis memiliki semua hak kepemilikan dalam setiap proses, prosedur, atau artikel manufaktur yang dijelaskan dalam Karya ini.
- Penulis dapat mereproduksi atau mengotorisasi orang lain untuk mereproduksi karya ini atau karya turunannya untuk penggunaan pribadi penulis atau untuk penggunaan perusahaan, dengan ketentuan bahwa sumber dan menyatakan hak cipta dimiliki TEKNOSI, salinan tidak digunakan dengan cara apa pun yang menyiratkan pengesahan TEKNOSI atas suatu produk atau layanan dari pihak mana pun, dan salinannya sendiri tidak ditawarkan untuk dijual.
- Meskipun penulis diizinkan untuk menggunakan kembali semua atau sebagian dari karya ini dalam karya lain, ini tidak termasuk mengabulkan permintaan pihak ketiga untuk mencetak ulang, menerbitkan ulang, atau jenis penggunaan ulang lainnya.













