JITE (Journal of Informatics and Telecommunication Engineering)

The COVID-19 outbreak has hit almost the whole world, including Indonesia which has become a disease outbreak in early 2020. Therefore, currently, various places have enforced regulations to comply with health protocols by using masks. So all South Sumatra must follow health protocols by wearing masks and maintaining distance. So the program for making this Mask Detection System is one way to overcome public awareness, especially among Bina Darma University students about the importance of using masks today. In the case of making this mask detection system program, the researchers used Python and the Haar Cascade Algorithm. From experiments using the Haar Cascade method, this system can detect people who use masks and do not use masks. This test is also done by inputting images or videos. The results of the study that, based on distance and angle, the estimated minimum distance for this mask detection application is 25 cm and the maximum is 150 cm will produce maximum mask detection results and based on distance, the estimated distance is 50 cm to 300 cm, the design of the detection system can recognize the maximum face.


INTRODUCTION
During the COVID-19 pandemic that hit the world, including Indonesia, especially South Sumatra, many people were affected by the disease caused by the spread of the coronavirus.In addition to having an impact on health, this epidemic also affects the economy of the community, especially in Indonesia.In addition to having an impact on the community's economy, the COVID-19 pandemic has also greatly impacted the education sector including students and students (Studi et al., 2022).
The current development of the world is in the digital era, where every human work is related to computer technology (Danuri, 2019).Artificial intelligence is the most interesting and controversial part of computer technology in the modern world (Abidin, 2018).Computer Vision is one of the developments of the branch of Artificial Intelligence, which allows a computer to see objects around it, which later the computer can analyze the image (Rahmad et al., 2020) so that information from the image can be turned into a certain command that can be read.and explained (Alief et al., 2021) The Mask Detection System is a technology from artificial intelligence and computer vision that will be designed and created using the Python tool with the Haar Cascade Algorithm in identifying facial objects (Danuri, 2019), this method is one of the machine learning models that was first applied as a classifier in a pictures and videos (Prathivi & Kurniawati, 2020).This method can detect fast objects using simple enhancements.This method is used to combine complex classifiers in a multilevel structure that can increase the speed of object detection by focusing on only possible image areas.This method has the advantage of being a very fast computation, because it only depends on the number of pixels in a square, not every pixel value of an image.Furthermore, this method is used to identify which areas are found on the human face in an image using Open Computer Vision (Mehedi Shamrat et al., 2021) Furthermore, the design of the mask detection system was built using the Haar Cascade Classifier method in real-time through the camera (Priadana & Habibi, 2019).Then this system will be implemented via a laptop or cellphone webcam in real time to detect a face with a mask or not, followed by the ideal and maximum position, distance and angle to get the expected results.

II. RESEARCH METHOD
The implementation of the research was carried out by following the planning of the research design and carrying out the preparatory stages; 1).System Analysis, The design of this detection system is made using the Python Programming Language using the Open Computer Vision Library (Anggraini et al., 2021), the images that are entered are images and videos that can be obtained from a webcam.
2).Data collection Finding the right dataset is one of the important steps in a machine learning project (Asni b & Dana, 2019).For this study, the author uses his dataset from the capture of a camera, the dataset created is a dataset from the faces of students from Bina Darma University in the Informatics Engineering Study Program.Bina Darma University Palembang conducts online learning, so the author also collects data on an image online through the social media accounts of fellow Bina Darma University students.For the image classifier process, the data needed is an image or object of a person wearing a mask and not wearing a mask.The creation of the dataset requires facial images before when the image is taken, the camera will only take pictures to be detected (PNithish Sriman et al., 2021).The collection of images is taken from the faces of friends from the Informatics Engineering Study Program, and video input it will be done with an open camera which can immediately detect whether the object uses a mask or not using a mask with a bounding box (Jemakmun et al., 2022).
3).Haar Cascade Classifier, Haar Cascade Algorithm is a machine learning model that is often used as the foundation for object detection applications, in an image or video (Prayitna et al., n.d.).This method has the advantage of very fast computation because it only depends on the number of pixels in a square not every pixel value of an image.This method is a method that uses the Classifier statistical model. in the object detection process using the haar cascade method proposed by Viola-Jones, there are several processes carried out before finally producing an output object that is detected in an image or image.4).Training Data, Data training for the dataset section that we train to make predictions or perform functions from an algorithm (Raya et al., 2019).We provide clues through algorithms so that the machine we train can look for correlations on its own or learn patterns from the given data.During data training, all images that have been collected will be studied using the Haar Cascade algorithm 5).Face Detection, When the function of the mask detector is not detected, it will run the function to detect faces.If a face is detected it will output an image with a coloured box in the face area (Kumar et al., 2019).All facial areas can be detected by being marked by square objects around the face, the success of the detection results depends on the position of the face that is straight facing the camera.

Figure 3. Object Detection Flowchart
This flowchart interprets the road structure of the Mask Detection System, the start of the net starts with the start followed by inputting images in real-time with a straight face position facing the camera, then the image is processed on the image to determine the area to be detected using the Haar cascade classifier algorithm (Baay et al., 2021), then from determining the area to be detected the author can find out whether or not an object is detected, if the result is Yes, then proceed with the results of the object being detected using a mask, and if the result is not detected, the image process will be carried out again from determining the area.which is detected.

III. RESULT AND DISCUSSION
The results in Figures 4 and 5 below are the results of collecting datasets for this research trial.The data using the mask is shown in Figure 4. which is stored in the data with a folder, while the dataset that does not use the mask is shown in Figure 5 which is stored under another folder name.First, testing the internal components of the laptop, namely the webcam for real-time detection, can run well.For testing using several webcams/handy cams, the results can be seen in Figure 6.And picture 7. is the result of a test that was executed by taking the detection of two faces simultaneously, one was detected using a mask and the other face image was detected not using a mask, the test was carried out in real-time using a laptop camera or an internal camera.in the evening shooting conditions.In addition to the results of the webcam test, the researchers also tried it in real-time with two face objects.

A. Test Results Based on Distance and Angle
The test is carried out by being influenced by 2 conditions, namely distance and angle (Adani et al., 2016).First the distance of the object to the webcam camera, which is from 20 cm to 100 cm.The test is carried out with 5 variations of the object's angular position when taking pictures as follows: 1.The object is perpendicular to the camera.2. The object is shifted 45° tilted to the right.3. The object is shifted 45° tilted to the left.4. The object is shifted 15° up. 5. Object shifted 15° up

B. Test Results Based on Distance
Based on table 1, it can be concluded that this mask detection application can detect masks well based on the distance and also the position of the object.It can also be concluded that the estimated minimum distance for this mask detection application is 25 cm and a maximum is 150 cm will produce maximum mask detection results, while the estimated more than 150 cm the application cannot detect masks again perfectly.

-Not
It can be seen from the test results table, that the estimated distance is 50 cm to 300 cm, the design of the detection system can recognize a maximum face at an estimated distance of 350 cm it cannot recognize faces perfectly ( et al., 2022) Based on the table, it can be concluded that the results of this mask detection system can detect objects with masks and not masks properly, based on the distance and position of the face.The minimum distance for this mask detecting application is 20 cm and the maximum distance is 150 cm.If the distance exceeds 150 cm, the application will not be able to detect the mask.

IV. CONCLUSION
Based on the test results of the resulting application system, the system is able to detect faces with masks or not wearing masks using the Haar Cascade Classifier method, the application can run well using the internal or external camera.The Haarcascade method can be applied to an object detection application by first training the data.
Functional test results show 100% results, meaning that all program features can run according to their functions even in different browsers.Based on testing, the application can recognize the mask object from a video/image obtained directly from the webcam by recognizing the feature value that has been tried with an estimated minimum distance of 50 cm and a maximum of 300 cm, and based on distance and angle, an estimate of 25 cm and a maximum of 150 cm. will produce maximum mask detection results, while estimates of more than 150 cm the application cannot detect masks again perfectly.
The position of the object greatly affects the detection results, the object should be in a position perpendicular to the source of the image.Light intensity plays an important role in detecting objects, good lighting will result in good detection.The distance of the object from the source of image capture affects the detection process, a distance that is too close or too far will reduce the detection result Do the right lighting to improve the accuracy of masked and non-masked face recognition, because light greatly affects the image.Future developers could record and save videos so it's easier to see foreigners who aren't wearing masks.

Figure 1 .
Figure 1.Face Detection6).Mask Detection, If the mask is detected, the square box will not appear, because the entire face cannot be detected.So the results obtained from face detection using a mask are the opposite of the face detection results(Asana et al., 2022).

Figure 2 .
Figure 2. Mask Detection Object Detection System, Flowchart in Figure 3.This describes the operation of the Haar Cascade Classifier algorithm.

Figure 6 .
Figure 6.Laptop Webcam In the picture above, Figure 6 is the result of the execution of real-time detection of the internal components of the, namely the webcam in the afternoon conditions.

Figure
Figure 7. Trial

Table 1 .
Testing Based on Distance and Angle

Table 2 .
Effect of Distance