Mask Detection App Uses Haar Cascade and Convolutional Neural Network to Alert Comply with Health Protocols

Cahya Rahmad, Nurfaidah Nurfaidah, Supriatna Adhisuwignjo, Mamluatul Hani’ah


This study aims to identify the face of a person whether wearing a mask or not wearing a mask accompanied by an appeal to the importance of wearing a mask. The contribution of this paper to science is to provide an overview of the results of accuracy, precision, recall used by the method used with data that can be accessed by many people, so that it can be developed further or can be compared. This system uses two techniques, namely the classification of whether a person is wearing a mask or not using the Convolutional Neural Network (CNN) model. The architecture used is DenseNet-12 to detect human face objects. The data used has a total of 2332 data sets, 200 of which were retrieved manually as research objects, and the rest were obtained from Kaggle. All data is evaluated using the camera in real-time. The test results show that testing scenario one has the highest score with an accuracy of 85% while testing scenario two gets results of 80%, the precision value in testing scenario one gets results of 75%, and testing scenario two has results of 88%. Scenarios 1 and 2 also have the same recall value of 100%. Based on the data analysis, it can be concluded that the use of the Haar Cascade approach and the Convolutional Neural Network with the DenseNet-121 architecture produces good performance in the case of real-time detection of masked and non-masked facial objects.


Convolutional neural network, haar cascade, mask detection

Full Text:



R. T. Puteri dan F. Utaminingrum, “Deteksi Kantuk Menggunakan Kombinasi Haar Cascade dan Convolutional Neural Network,” J-PTIIK, vol. 4, no. 3, pp. 816–821, Jun 2020.

Y. Religia, M. Ekhsan, M. Huda, and A. D. Fitriyanto, “TOE Framework for E-Commerce Adoption by MSMEs during The COVID-19 Pandemic : Can Trust Moderate ?,” Appl. Inf. Syst. Manage., vol. 6, no. 1, pp. 47–54, 2023, doi: 10.15408/aism.v6i1.30954.

R. P. Sidik and E. Contessa Djamal, "Face Mask Detection using Convolutional Neural Network," 2021 4th International Conference of Computer and Informatics Engineering (IC2IE), Depok, Indonesia, 2021, pp. 85-89, doi: 10.1109/IC2IE53219.2021.9649065.

G. A. Anarki, K. Auliasari, and M. Orisa, “Penerapan Metode Haar Cascade pada Aplikasi Deteksi Masker,” JATI (Jurnal Mhs. Tek. Inform., vol. 5, no. 1, pp. 179–186, March 2021.

K. Suresh, M. B. Palangappa, and S. Bhuvan, “Face Mask Detection by using Optimistic Convolutional Neural Network,” in Proceedings of the 6th International Conference on Inventive Computation Technologies, ICICT 2021, Jan. 2021, pp. 1084–1089. doi: 10.1109/ICICT50816.2021.9358653.

B. Dimas Nugraraga, H. Fitriyah, and D. Syauqy, “Deteksi Orang Bermasker Medis Menggunakan Metode Convolutional Neural Network Berbasis Raspberry Pi,” J-PTIIK, vol. 5, no. 6, pp. 2600-2609, Jun 2021.

F. L. Ahmad, A. Nugroho, and A. F. Suni, “Deteksi Pemakai Masker Menggunakan Metode Haar Cascade Sebagai Pencegahan COVID 19,” Edu Elektr. J., pp. 13–18, 2021, doi: 10.15294/eej.v10i1.47861.

Z. Li, F. Liu, W. Yang, S. Peng and J. Zhou, "A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects," in IEEE Transactions on Neural Networks and Learning Systems, vol. 33, no. 12, pp. 6999-7019, Dec. 2022, doi: 10.1109/TNNLS.2021.3084827.

N. Awalia, “Identifikasi Penyakit Leaf Mold Pada Daun Tomat Menggunakan Model Densenet121 Berbasis Transfer Learning,” J. Ilm. Ilmu Komput., vol. 8, no. 1, pp. 49–52, 2022, doi: 10.35329/jiik.v8i1.212.

M. Syarif, “Deteksi kedipan mata dengan haar cascade classifier dan contour untuk password login sistem,” Techno.COM, vol. 14, no. 4, Nov pp. 242-249, 2015.

G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger, “Densely connected convolutional networks,” Proc. - 30th IEEE Conf. Comput. Vis. Pattern Recognition, CVPR 2017, vol. 2017-Janua, pp. 2261–2269, 2017, doi: 10.1109/CVPR.2017.243.

W. S. Eka Putra, “Klasifikasi Citra Menggunakan Convolutional Neural Network (CNN) pada Caltech 101,” J. Tek. ITS, vol. 5, no. 1, 2016, doi: 10.12962/j23373539.v5i1.15696.

M. B. Tamam, M. Walid, J. Freitas, and A. Bernardo, “Classification of Sign Language in Real Time Using Convolutional Neural Network,” Appl. Inf. Syst. Manage., vol. 6, no. 1, pp. 39–46, 2023, doi: 10.15408/aism.v6i1.29820.

A. Rohim, Y. A. Sari, and Tibyani, “Convolution neural network (cnn) untuk pengklasifikasian citra makanan tradisional,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 3, no. 7, pp. 7038–7042, 2019, [Online]. Available:

M. Fennell, C. Beirne, and A. C. Burton, “Use of object detection in camera trap image identification: Assessing a method to rapidly and accurately classify human and animal detections for research and application in recreation ecology,” Glob. Ecol. Conserv., vol. 35, p. e02104, 2022, doi: 10.1016/j.gecco.2022.e02104.

T. Saito and M. Rehmsmeier, “The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets,” PLoS One, vol. 10, no. 3, p. e0118432, 2015, doi: 10.1371/journal.pone.0118432.

A. Waheed and J. Shafi, “Successful Role of Smart Technology to Combat COVID-19,” in Proceedings of the 4th International Conference on IoT in Social, Mobile, Analytics and Cloud, ISMAC 2020, 2020, pp. 772–777. doi: 10.1109/I-SMAC49090.2020.9243444.

B. A. Kumar and M. Bansal, “Face Mask Detection on Photo and Real-Time Video Images Using Caffe-MobileNetV2 Transfer Learning,” Appl. Sci., vol. 13, no. 2, p. 935, 2023, doi: 10.3390/app13020935.

D. Tyas Purwa Hapsari, C. Gusti Berliana, P. Winda, and M. Arief Soeleman, “Face Detection Using Haar Cascade in Difference Illumination,” in Proceedings - 2018 International Seminar on Application for Technology of Information and Communication: Creative Technology for Human Life, iSemantic 2018, 2018, pp. 555–559. doi: 10.1109/ISEMANTIC.2018.8549752.

L. Zhu, T. D. Ha, Y. H. Chen, H. Huang, and P. Y. Chen, “A Passive Smart Face Mask for Wireless Cough Monitoring: A Harmonic Detection Scheme With Clutter Rejection,” IEEE Trans. Biomed. Circuits Syst., vol. 16, no. 1, pp. 129–137, 2022, doi: 10.1109/TBCAS.2022.3148725.

DOI: Abstract - 0 PDF - 0


  • There are currently no refbacks.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


Department of Information Systems, Faculty of Science and Technology,
Universitas Islam Negeri (UIN) Syarif Hidayatullah Jakarta
Faculty of Science and Technology Building, 3rd Floor, 1st Campus, Universitas Islam Negeri (UIN) Syarif Hidayatullah Jakarta
Jl. Ir. H. Juanda No.95, Ciputat Timur, Kota Tangerang Selatan, Banten 15412, Indonesia.
Tlp/Fax: +62 21 74019 25/ +62 749 3315, Handphone: +6282114627822.
E-mail:, Website:

Creative Commons Licence
Applied Information System and Management (AISM) by the Department of Information Systems, Faculty of Science and Technology, Universitas Islam Negeri (UIN) Syarif Hidayatullah Jakarta, Indonesia is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at