Implementation of Face Mask Detection Using Phyton Programming Language


    Yo Ceng Giap( 1 ) Erviana( 2 )

    (1) Universitas Buddhi Dharma
    (2) Universitas Buddhi Dharma



Computer vision, Face mask, Masks, Phyton, Yolo


Since the beginning of the pandemic in 2019, people in Indonesia have been required to wear masks. Although until now the pandemic has ended, the need to use masks is still very much needed such as to maintain health, avoid air pollution and others. In detecting mask users, an application is needed that can help human work. Currently, the Python programming language is widely used to build applications in the field of computer vision, one of which is this face mask detection application. This application will detect mask users, whether they are wearing a mask or not. This developed application uses the Yolo model using the Face Mask Detection dataset developed by Larxel, where the Yolo model can work on the dataset provided. The test results show that the Yolo model can recognize mask users with an accuracy value above 90%. The second experiment was carried out to detect several faces of mask users, the Yolo model can recognize mask users or not with an average accuracy value of 91.75%. For future research, it is also expected to use other models besides Yolo and make comparisons of several models and make improvements to the problems that exist in each model and use real time data.


Download data is not yet available.


V. Balotra, A., Maity, M., Naik, “An empirical evaluation of the COTS air pollution masks in a highly polluted real environment,” International Conference on Communication Systems & Networks (COMSNETS), pp. 842–848, 2019. DOI:

U. C. McDonald, F., Horwell, C.J., Wecker, R., Dominelli, L., Loh, M., Kamanyire, R., “Facemask use for community protection from air pollution disasters: an ethical overview and framework to guide agency decision making,” Int. J. Disaster Risk Reduct, p. 43, 2020. DOI:

E. Tanjung, “Presiden Jokowi Minta Masyarakat Pakai Masker Lagi Meski Covid-19 Indonesia di Level Aman,” 2022.

C. Gian Asmara, “Jokowi yang Kembali Minta Warga Pakai Masker di Luar Ruangan,” 2022. Jokowi yang Kembali Minta Warga Pakai Masker di Luar Ruangan (accessed Jul. 22, 2022).

J. Prasad, A. Jain, D. Velho, and S. Kumar K S, “COVID vision: An integrated face mask detector and social distancing tracker,” International Journal of Cognitive Computing in Engineering, vol. 3, no. April, pp. 106–113, 2022, doi: 10.1016/j.ijcce.2022.05.001. DOI:

N. Ullah, A. Javed, M. Ali Ghazanfar, A. Alsufyani, and S. Bourouis, “A novel DeepMaskNet model for face mask detection and masked facial recognition,” Journal of King Saud University - Computer and Information Sciences, no. xxxx, 2022, doi: 10.1016/j.jksuci.2021.12.017. DOI:

S. Kumar, D. Yadav, H. Gupta, M. Kumar, and O. P. Verma, “Towards smart surveillance as an aftereffect of COVID-19 outbreak for recognition of face masked individuals using YOLOv3 algorithm,” Multimed Tools Appl, vol. 82, no. 6, pp. 8381–8403, Mar. 2023, doi: 10.1007/s11042-021-11560-1. DOI:

M. Li, Z. Zhang, L. Lei, X. Wang, and X. Guo, "Agricultural greenhouses detection in high-resolution satellite images based on convolutional neural networks: Comparison of faster R-CNN, YOLO v3 and SSD," Sensors (Switzerland), vol. 20, no. 17, pp. 1-14, Sep. 2020, doi: 10.3390/s20174938. DOI:

S. Singh, U. Ahuja, M. Kumar, K. Kumar, and M. Sachdeva, “Face mask detection using YOLOv3 and faster R-CNN models: COVID-19 environment,” Multimed Tools Appl, vol. 80, no. 13, pp. 19753–19768, May 2021, doi: 10.1007/s11042-021-10711-8. DOI:

Y. Li, J. Wang, J. Huang, and Y. Li, “Research on Deep Learning Automatic Vehicle Recognition Algorithm Based on RES-YOLO Model,” Sensors, vol. 22, no. 10, May 2022, doi: 10.3390/s22103783. DOI:

T. Liu, B. Pang, S. Ai, and X. Sun, “Study on visual detection algorithm of sea surface targets based on improved yolov3,” Sensors (Switzerland), vol. 20, no. 24, pp. 1–14, Dec. 2020, doi: 10.3390/s20247263. DOI:

O. M. Alsaydia, N. R. Saadallah, F. L. Malallah, and M. A. S. AL-Adwany, “Limiting Covid-19 Infection By Automatic Remote Face Mask Monitoring And Detection Using Deep Learning With Iot,” Eastern-European Journal of Enterprise Technologies, vol. 5, no. 2–113, pp. 29–36, 2021, doi: 10.15587/1729-4061.2021.238359. DOI:

A. H. L. L. J. A. R. K. Maranto, “Implementasi Machine Learning Sebagai Pengenal Nominal Uang Rupiah dengan Metode YOLOv3,” Satin, vol. 8, pp. 12–22, 2022, [Online]. Available: DOI:

H. Zhang, F. Shao, X. He, Z. Zhang, Y. Cai, and S. Bi, “Research on Object Detection and Recognition Method for UAV Aerial Images Based on Improved YOLOv5,” Drones, vol. 7, no. 6, p. 402, Jun. 2023, doi: 10.3390/drones7060402. DOI:

A. D. M. C. M. R. D. S. E. R. Swedia, “Aplikasi Face Mask Detection Menggunakan Neural Network Mobilenetv2 Berbasis Android,” Sebatik STMIK Widya Cipta, vol. 25, pp. 382–389, 2021. DOI:

Syafriani, “Mengenal Jenis-Jenis Masker,” 2020. (accessed Jul. 20, 2022).

S. GUPTA, “Understanding Image Recognition and Its Uses,” 2019. (accessed Jul. 22, 2022).

S. I. W. A. Y. W. R. Soelaiman, “Klasifikasi Citra Menggunakan Convolutional Neural Network (CNN) pada Caltech 101,” Jurnal Teknik ITS, pp. A65–A69, 2016.

R. J. S. D. R. G. A. Farhad, “You Only Look Once: Unified, Real-Time Object Detection.",” Machine Learning 10, 2016.

D. G. E. Y. P. Y. V. Via, “Identifikasi Penggunaan Masker Menggunakan Algoritma CNN YOLOv3-Tiny,” Seminar Nasional Informatika Bela Negara, vol. 1, 2020. DOI:




How to Cite

Y. Ceng Giap and Erviana, “Implementation of Face Mask Detection Using Phyton Programming Language”, bit-Tech, vol. 6, no. 1, pp. 51–58, Aug. 2023.



Abstract views: 67 / PDF downloads: 86