Real Time Face-mask Detection with Arduino to Prevent COVID-19 Spreading


  • Saman M. Almufti Department of Computer Science, Nawroz University, Duhok, Iraq
  • Ridwan B. Marqas Department of Information Technology, Duhok Private Technical Institute, Duhok, Iraq
  • Zakiya A. Nayef Department of Computer Science, Nawroz University, Duhok, Kurdistan Region - Iraq
  • Tamara S. Mohamed Computer Science Department / Baghdad College of Economic Sciences University



face mask detection, deep learning, TensorFlow, Keras, OpenCV, Arduino


The rise of COVID-19 pandemic has had a lasting impact in many countries worldwide since 2019. Face-mask detection had been significant progress in the Image processing and deep learning fields studies. Many face detection models have been designed using different algorithms and techniques. The proposed approach in this paper developed to avoid mask-less people from entering to a desired places (i.e. Mall, University, Office, …etc.) by detecting face mask using deep learning, TensorFlow, Keras, and OpenCV and sending a signal to Arduino device that connected to the gate to be open. it detect a face in a real-time and identifies whether the person wear mask or not. The method attains accuracy up to 97.80%. The dataset provided in this paper, was collected from various sources.


Download data is not yet available.


E. Dong, H. Du and L. Gardner, "An interactive web-based dashboard to track COVID-19 in real time", The Lancet Infectious Diseases, vol. 20, no. 5, pp. 533-534, 2020. Available: 10.1016/s1473-3099(20)30120-1 [Accessed 6 April 2021].

P.S. Othman, R.R. Ihsan, R.B. Marqas, S.M. Almufti, "Image Processing Techniques for Identifying Impostor Documents Through Digital Forensic Examination". Image Process. Tech. 2020, 62, 1781–1794.

P. Othman, R. Marqas, D. Abdulqader and S. Almufti, "Effect of Mean Filter on Face Image from Video Frames", 2020 8th International Symposium on Digital Forensics and Security (ISDFS), 2020. Available: 10.1109/isdfs49300.2020.9116277 [Accessed 3 April 2021].

I. Adjabi, A. Ouahabi, A. Benzaoui and A. Taleb-Ahmed, "Past, Present, and Future of Face Recognition: A Review", Electronics, vol. 9, no. 8, p. 1188, 2020. Available: 10.3390/electronics9081188.

R. Ihsan, S. Almufti and R. Marqas, "A Median Filter With Evaluating of Temporal Ultrasound Image for Impulse Noise Removal for Kidney Diagnosis", Journal of Applied Science and Technology Trends, vol. 1, no. 2, pp. 71-77, 2020. Available: 10.38094/jastt1217 [Accessed 3 April 2021].

R. Marqas, “Implementation and Experiments on Fingerprint Based Authentication System (FBAS) Using Delaunay Triangulation and Voronoi Diagram” (2017). [online] Available at: .

R. Rajab Asaad and R. Masoud Abdulhakim, “The Concept of Data Mining and Knowledge Extraction Techniques”, QAJ, vol. 1, no. 2, pp. 17–20, Mar. 2021.

R. Rajab Asaad, "Review on Deep Learning and Neural Network Implementation for Emotions Recognition", Qubahan Academic Journal, vol. 1, no. 1, 2021. Available: 10.48161/qaj.v1n1a25. Available:

S. M. Almufti, "Historical survey on metaheuristics algorithms", International Journal of Scientific World, vol. 7, no. 1, p. 1, 2019. Available: 10.14419/ijsw.v7i1.29497 [Accessed 6 April 2021].

R. Asaad and R. Ali, "Back Propagation Neural Network(BPNN) and Sigmoid Activation Function in Multi-Layer Networks", Academic Journal of Nawroz University, vol. 8, no. 4, p. 216, 2019. Available: 10.25007/ajnu.v8n4a464 [Accessed 6 April 2021].

R. Asaad, "Güler and Linaro et al Model in an Investigation of the Neuronal Dynamics using noise Comparative Study", Academic Journal of Nawroz University, vol. 8, no. 3, p. 10, 2019. Available: 10.25007/ajnu.v8n3a360 [Accessed 6 April 2021].

R. Asaad. “An Investigation of the Neuronal Dynamics Under Noisy Rate Functions”. Thesis (M.S.), Eastern Mediterranean University, Institute of Graduate Studies and Research, Dept. of Computer Engineering, Famagusta. 2014: North Cyprus.

G. Nguyen et al., "Machine Learning and Deep Learning frameworks and libraries for large-scale data mining: a survey", Artificial Intelligence Review, vol. 52, no. 1, pp. 77-124, 2019. Available: 10.1007/s10462-018-09679-z [Accessed 4 April 2021].

D. Someshwar, D. Bhanushali, V. Chaudhari and S. Nadkarni, "Implementation of Virtual Assistant with Sign Language using Deep Learning and TensorFlow", 2020 Second International Conference on Inventive Research in Computing Applications (ICIRCA), 2020. Available: 10.1109/icirca48905.2020.9183179 [Accessed 4 April 2021].

H. Lai and H. Lai, "Real-Time Dynamic Hand Gesture Recognition", 2014 International Symposium on Computer, Consumer and Control, 2014. Available: 10.1109/is3c.2014.177 [Accessed 4 April 2021].

A. Das, M. Wasif Ansari and R. Basak, "Covid-19 Face Mask Detection Using TensorFlow, Keras and OpenCV", 2020 IEEE 17th India Council International Conference (INDICON), 2020. Available: 10.1109/indicon49873.2020.9342585 [Accessed 4 April 2021].

B. Mohammed and H. Ahmad, "Advanced car-parking security platform using Arduino along with automatic license and number recognition", Academic Journal of Nawroz University, vol. 10, no. 1, p. 1, 2021. Available: 10.25007/ajnu.v10n1a996 [Accessed 3 April 2021].

P. Kazarinoff, "Using Python to control an Arduino", Python for Undergraduate Engineers, 2021. [Online]. Available: [Accessed: 05- Apr- 2021].

C. Liechti,"pySerial — pySerial 3.0 documentation",, 2021. [Online]. Available: [Accessed: 05- Apr- 2021].



How to Cite

M. Almufti, S., B. Marqas, R. ., A. Nayef, Z. ., & S. Mohamed, T. . (2021). Real Time Face-mask Detection with Arduino to Prevent COVID-19 Spreading. Qubahan Academic Journal, 1(2), 39–46.