Face Mask Detection Using Haar Cascades Classifier To Reduce The Risk Of Coved-19

: The global epidemic causes extensive damage. Several sectors, including tourism and recreation, have been halted. Since these projects require working together in close contact, it increases the danger of infection. To reduce the spread of COVID-19, keep a safe distance from others and always wear protective clothing. In light of this, we have developed COVID Vision, a system that uses Haar cascades as a classifier for a face mask detector. This will reduce reliance on employees while maintaining COVID-19 criteria. COVID Vision can determine if someone is wearing a mask or covering their lips live. According to the findings, the suggested system correctly displays the output result of human face detection within a range of 0.6 to 1.35 meters away, in lighting conditions ranging from medium to normal, and with facial angles falling within a range of ±40°. If they don't cover the face, face accessories are allowed on targeted photos. In conclusion, this approach may reduce the cost of real-time identity verification labor.


INTRODUCTION
This Word document can be used as a template for papers to be published in EAI Core Proceedings. Follow the text for further instructions on text formatting, tables, figures, citations, and references.
The global impact of COVID-19 has been enormous. Rigorous restrictions and regulations like wearing face masks and keeping at least three feet between people can restart the growth of fields such as agriculture, industry, and finance. For the sake of everyone's safety, the enforcement of these laws and regulations is required, but they are also difficult to accomplish due to the vast number of employees and public support they require [1]. It was determined that an automatic method is necessary to detect people who don't wear the mask in real-time. Our facial recognition system can scan people's faces to see if a mask is present and if it is being worn properly [2]. Image analysis and computer vision present a significant challenge in the detection and recognition of faces [3]. There are a lot of systems in law enforcement, security, and other industries that employ it, and it's been getting a lot of attention in the last few years [4]. To prevent COVID-19 from spreading in public locations, computer-vision-based automatic detection and control systems are simple and cost-effective. Since this system must be quick and real-time to detect infractions and promptly transmit a warning [5]. There must be a way to make people wear face masks before entering public locations to compel the use of facemasks.
Face mask detection detects if someone is wearing a mask. Reverse engineering face detection utilising machine learning algorithms for security, authentication, and surveillance is a difficulty. Face detection is crucial in Computer Vision and Pattern Recognition [6]. Researchers have developed advanced facial detecting systems. There are various face identification algorithms, each with its pros and cons. Some employ skin tones, contours, templates, neural networks, or filters. Both algorithms are computationally intensive. An image is only colour and light intensity values. Because of form and pigmentation changes, analysing pixels for face detection is time-consuming and complex. Pixels need scaling and precise analysis. Researchers from all over the world are working to improve the accuracy and capabilities of this biometric system by developing new components for the face recognition system and expanding its current functionality. This technology presents both the risk and the opportunity of passive customisation, as well as the possibility of an automatic surveillance system with the capability of facial recognition. In the field of face recognition, several algorithms, such as Haar Cascade, Geometry Contour Generation and Matching, Back-Propagation Artificial Neural Network (BP-ANN) ,Histograms of Oriented Gradients, and Convolutional Neural Network, are considered to be among the most effective. Viola and Jones created Haar Classifiers, the mathematical ISSN: 2704-1077 eISSN 2704-1069 International Journal of Mathematics, Statistics, and Computer Science 20 function that is associated with the rectangular shape is denoted by the name "Haar," which comes from the German word for "square." It is utilised to identify things inside a video or still image. To locate an object, this technique consists of four stages: The Haar-like feature, the integral image, the AdaBoost learning, and the Cascade Classifier [7]. Face recognition is a machine learning technique that identifies all faces in a picture or video. It's utilised for crime detection, picture processing, and more. Early face recognition systems used geometric features like eyes, nose, and mouth. Face recognition used properties of these features and their relationships (e.g. locations, distances, angles) [8].
Thus, this research intends to develop a technology that can accurately detect masks worn over the face in public places (like airports, train stations, crowded markets, bus stops, etc.) to prevent the spread of the Coronavirus and, as a result, make a contribution to the improvement of public health. In addition, it is difficult to identify faces in public that are wearing masks or do not have masks because the dataset that is available for identifying masks on human faces is rather small, which makes the training of the model challenging. The suggested work's main contribution is: Develop a real-time object detection system using video streams. II.
Improved linear processing crops facial portions from uncontrolled real-time photos with varying face size, orientation, and backdrop. This helps localise facemask violators in public areas/offices. III.
The proposed approach requires less memory, making it deployable on embedded surveillance systems.
The paper is organized as: Section 2 presents various theories of Haar Cascades. Section 3 introduced the proposed system for face mask detection and Section 4 Our design's results and evaluation were presented. Finally, Section 5 depicts the conclusions.

BACKGROUND THEORY ABOUT HAAR CASCADES
Facial traits such as length of nose, breadth of eyes, angle of the jaw, prominence of cheekbones, and distance between eyes are commonly used to identify a person's face in face identification systems. Using these numerical values, the system then compares the first image to the second to assess the degree to which the two images are similar. Face recognition images can be derived from a variety of sources, including already taken photos and video feeds. Among the many functions of a facial recognition system are the following: face detection, pre-processing, feature extraction, and feature matching/facial recognition.

OpenCV
There are several uses for OpenCV, an abbreviation for the Open Source Computer Vision Library, which is a free and open-source computer vision and machine learning library. Computer vision techniques and applications can use OpenCV as a common framework. There are a few modules that need to be loaded to get started with face detection technology, like Cv2, Numpy, and Sys [9].

Facial Detection Techniques
The face is key to recognising emotions and communicating. Facial sensory organs include four. Nose, eyes, ears, tongue. The human face ranges from forehead to chin and includes lips, cheeks, and eyes. Face detection systems have problems and benefits [10]. Others use skin tones, contours, templates, neural networks, or filters. They're computationally expensive. An image is pigment and/or light intensity values. Face recognition requires time and effort due to variances in form and colouring. Scaling and precision require periodic pixel reanalysis [11].

Haar Cascades Classifier
A classifier is built using the machine learning technique known as Haar Cascading, which involves the examination of a large number of examples of both positive and negative images. Both Michael Jones and Paul Viola contributed to the development of the algorithm [12]. Classifiers that are implemented for object detection are Haar feature-based cascade classifiers. To categorise photos, Haar-like features (see Figure 1) are utilised, and the associated calculations with integral images are carried out in an exceptionally efficient manner. More than 180,000 unique Haar-like characteristics can be discovered in images with a resolution of 24 by 24 pixels. A machine learning (ML) technique can be used to choose and arrange in a cascade fashion the 6,061 characteristics that are considered to be the most important. The filter chain that was illustrated in the Figure 2 is constructed out of several AdaBoost classifiers linked together in sequence. The relative importance of each result obtained from AdaBoost determines the order in which subsequent filters in the cascade are applied. A candidate is eliminated from consideration by the cascade if it does not pass the initial stage. If the filter weights in the first chain are increased, then the process of removing the image area that does not contain faces will go more quickly. Therefore, a Cascade Classifier that effectively combines a large number of characteristics.

THE PROPOSED METHOD FOR FACE MASK DETECTION
When compared to other forms of biometric identification, the process of face detection and recognition is noticeably less complicated, less expensive, more accurate, and less invasive. The functionality of the system will be broken down into two distinct buckets: face detection and face recognition. There are a variety of approaches to putting face detection into practice, some of which include Haar-like features, Eigen's face, and Fisher-face [13]. Then, numerous face recognition systems offered information by examining the geometric aspects of facial images, such as the distance and placement between the eyes, nose, and mouth among other facial features. Classifiers are used in face detection; these are algorithms that determine whether or not an area of an image contains a face (1) or does not contain a face (0) [14][15]. To achieve a higher level of precision, classifiers have been taught to recognise faces by analysing anywhere from thousands to millions of images. LBP (Local Binary Pattern) and Haar Cascades are the two classes of classifiers that are utilised by OpenCV [16] [17]. The latter classification system will be utilised by the proposed approach. The Haar Wavelet approach is the foundation of the Haar Cascade, which divides the pixels of an image into squares based on their function [18]. This makes use of several machine learning approaches to get a high degree of accuracy from what is referred to as "training data." The "features" that are detected are computed with the help of "integral image" concepts. The Adaboost learning method is utilised by Haar Cascades [19] [20] . This algorithm chooses a small number of significant features from a larger set to provide an effective outcome of classifiers. Figure 3 demonstrates that the Haar-Cascade feature-based face detection was utilised. The process of determining the positions and proportions of human faces in arbitrary (digital) photographs is referred to as face detection. Before a face can be recognised, it must first be determined and isolated, which is accomplished through the process of face detection, which is the first step in face recognition. The Haar algorithm is a technique for detecting faces that makes use of statistical methods. The method makes use of features that are similar to sample Haar-like features. One of the techniques in image processing that is commonly used for face recognition is called the Haar-like feature. This algorithm works by learning to recognise different aspects of the face, such as the eyes, the nose, and the lips. Scanning a window with dimensions W x H allows for the setting of picture regions as well as regions of interest. Edge features, line features, and centre-surround features are the three categories that can be applied to the 'Haar' features that are computed based on the region of interest. It is possible to compute each 'Haar' feature by first aligning it inside the region of interest and then computing the weighted sum of pixels that are contained within the shaded rectangles of the feature. Opposite weights are applied to the various shades of the feature.
The system takes as its input a digital image that has been pieced together frame by frame from the video stream that was captured by the camera. For the Haar-like feature extraction method, the image must first be transformed from its RGB (red-green-blue) colour space into a grayscale image. The face detection procedure is carried out using the grayscale image as the starting point. The Haar-like feature is used as the basis for this process. If no face is found, the system will proceed to use the following frame as its input. In addition, if a face is found in the image, the following step is to crop the image in such a way that it generates a smaller image that only contains facial components. The procedure of recognising facial characteristics, in this case, the mouth, is carried out using the image after it has been cropped. If the system finds these characteristics, it will determine that the target is not wearing a mask and move on to the next step. On the other side, if the algorithm does not find these qualities, it will determine that the target is concealing their identity by donning a mask. Figure 4 illustrates the algorithm's approach for detecting the use of masks by utilising the Haar Like feature method.

EXPERIMENTAL RESULTS
Experiments for this work were carried out in a laptop equipped with an Intel Core i7-5600U processor operating at 2.60 GHz, an internal memory capacity of 16 gigabytes, and an NVidia GeForce 840M 2GB graphics processing unit, and the maximum laptop camera reach 0.9 MP (1280x720). This work was carried out in an anaconda python 3.7 as a software tool, which also included the libraries OpenCV and NumPy, both of which were recently released. The Haar cascade classifier was constructed and made to run in real-time for face detection. The detection result of the person's face was shown automatically, as shown in the Figure 5. During this procedure, the system presented continuously the live footage that it had taken. After the camera identified and took a picture of a human face, a box was drawn around the face in the shape of a rectangle. In the experimentation carried out in real-time, the model is accurate to a hundred per cent. If an individual covers their lips with their hands, it will indicate that a mask has not been identified. Also, the face detection time is 0.9sec and the draw box around the face. This test is carried out to establish how well the detection process for the utilisation of masks by the system that has been created is. To complete the process of testing, both the masked face and the unmasked face are presented to the camera in front of the same conditions. Several influences were also taken into account to determine the response and performance of the proposed system, like the Effect of light, angle, distance, and face accessories.
Firstly, the experiment on the light intensity effect illustrates how the amount of light present in an image has a significant impact on how it is processed. The low light intensity can cause areas of an image to be blurry. This test was carried out to ascertain the influence of light intensity on the ability to recognise a face and mask. A lux metre is a tool that is used to measure the amount of light that is present. The testing procedure is positioning the face in front of the camera at a distance of 60cm, with the light intensity ranging from 10 lux to 140 lux, as depicted in the Secondly, experiments on face angle confronting the camera were undertaken to investigate the influence on detection and recognition. Some face angles are depicted in Figure 7. Based on figure 7, several samples of faces posing at varied angles toward the camera were tested for detection and recognition. These findings reveal that the detection face angle was within 0-45°, otherwise, it was considered out of face angle, can bot detection correctly. Next, this research was done to determine the maximum distance a camera can detect and recognise a face. The system's limitations are dependent on its algorithm and camera. Figure 8   Lastly, tests continued with different face accessories. In these test scenarios, the targeted face wore sunglasses, and a hat cap (Figure 9). In conclusion, most of the testing conditions were able to detect and recognise the face identity, depending on the accessory as long as it did not cover the face form, and mask.

CONCLUSIONS
Several steps need to be taken to slow the progression of the COVID-19 pandemic. The sequential model of the Haar cascade classifier has been effectively implemented into the construction of a face mask detector. Because our system was able to reach high levels of performance, the results were encouraging; as a result, we can conclude that the code is efficient and that it may be used for real-time monitoring. This approach is adaptable and can be used in a variety of locations, such as shopping centres, other high-traffic places, and, airports, to identify and quarantine those who are not adhering to safety precautions and therefore limiting the transmission of disease. To guarantee the reliability and precision of the detection process, the system was subjected to a series of tests that varied the light conditions, face expressions, accessories, and distances. Some of the system's limitations have been identified; these include low lighting conditions, facial angles that are greater than ±45o, accessories that cover the face structure, and distances that are greater.