Software implementation of the algorithm for recognizing protective elements on the face

No Thumbnail Available



Journal Title

Journal ISSN

Volume Title


Lviv Politechnic Publishing House


The quarantine restrictions introduced during COVID-19 are necessary to minimize the spread of coronavirus disease. These measures include a fixed number of people in the room, social distance, wearing protective equipment. These restrictions are achieved by the work of technological control workers and the police. However, people are not ideal creatures, quite often the human factor makes its adjustments. That is why in this work we have developed software for determining the protective elements on the face in real time using the Python scripting language, the open software libraries OpenCV v4.5.4, TensorFlow v2.6.0, Keras v2.6.0 and MobileNetV2 using the camera. The training program uses a prepared set of photos from KAGGLE – with a mask and without a mask. This set has been expanded by the authors to include different types of masks and their location. Using TensorFlow, Keras, MobileNetV2, a model is created to study the neural net work by analyzing images. The generated neural network uses a model to determine the masks. You can preview the learning result of the network – it is presented as a graphic file. A program that uses the connected camera is then launched and the user can test the operation. This model can be easily deployed on embedded systems such as Raspberry Pi, Google Coral, and become a hardware and software automated system that can be used in crowded places – airports, shopping malls, stadiums, government agencies and more.



Computer Vision, Deep Learning, TensorFlow, OpenCV, Keras, MobileNetV2, KAGGLE


Voloshyn M. Software implementation of the algorithm for recognizing protective elements on the face / Mykola Voloshyn, Yevhenii Vavruk // Advances in Cyber-Physical Systems. – Lviv : Lviv Politechnic Publishing House, 2021. – Volume 6, № 2. – P. 155–160 . – Bibliography: 13 titles.