Detection of the Use of Masks as an Effort to Prevent Covid-19 Using Gray Level Co-Occurrence Matrix (GLCM) Based on Learning Vector Quantization (LVQ)

ABSTRACT


Introduction
In the 21st century, two types of highly pathogenic HCoV, namely severe acute respiratory syndrome coronavirus (SARS-CoV) and Middle East respiratory syndrome coronavirus (MERS-CoV) emerged from certain animals and infect humans (Parwanto, 2020). On December 31, 2019, the regional office of the World Health Organization (WHO) in Beijing had received a report of a group of patients suffering from pneumonia of unknown cause from the city. Another type of pathogenic HCoV was recognized which was later called 2019 novel coronavirus (2019-nCoV) and the disease was called coronavirus disease-19 . This virus caused a pandemic and many deaths all over the world. After further research, it was discovered that this virus was the result of a mutation from SARS-CoV, so that it was named SARS-CoV-2 (Paules et al., 2020).
There are two main ways of spreading the Covid-19 virus, namely through respiratory droplets and direct contact (Larasati & Haribowo, 2020). Respiratory tract droplets are released when a person coughs or sneezes. The transmission of this disease is very fast and difficult to avoid because many daily activities require interaction with other people (Atmojo et al., 2020). Therefore, the use of masks is mandatory during the Covid-19 pandemic. An automatic checking system for the use of masks will be very helpful as a tool or control for monitoring and controlling the rules for using masks. With the application of the system as a medium for monitoring and controlling, it can also become a more interactive medium for the process of adapting the use of masks in everyday life.
Extraction of digital image features will be a very important data collection in building a learning system. Digital image feature extraction is the process of taking features from digital images such as texture features, shape features, and color features (Sutarno et al., 2017). One of the texture feature extraction methods is Gray Level Co-occurrence Matrix (GLCM). Several studies have stated that the GLCM feature is a good textural feature. The GLCM method is very good as a feature extraction method to represent the pattern or texture characteristics of a digital image (Sholihin et al., 2017).
Learning Vector Quantization (LVQ) is a classification algorithm that utilizes vectors that are interconnected and work competitively and are guided in solving a problem (Suderajad et al., 2015). There is only one winning neuron in the competition process. LVQ is superior in terms of speed, compared to other artificial neural networks (Lin & Irsyad, 2021). The LVQ method is widely used for pattern recognition and data classification. This method is simple but very effective for the classification process. LVQ can perform well, without fear of dealing with possible dataset over fitting, and must determine the appropriate level of learning. In general, it is a much simpler algorithm with a higher level of generalization performance (Alharbi, 2018).
Based on the explanation presented above, this research focuses on the classification of digital images using masks as an effort to prevent the transmission of Covid-19. Using the Gray Level Co-occurrence Matrix (GLCM) method as texture feature extraction from digital images using masks. And implement the Learning Vector Quantization (LVQ) method as a classification method.

Method
The method used in this research is the Gray Level Co-occurrence Matrix (GLCM) method as a feature extraction method and the Learning Vector Quantization (LVQ) method as a classification method. The dataset obtained from Kaggle is 890 images consisting of 445 digital images of faces using masks and 445 digital images of faces without masks. The epoch analysis process and learning rate (alpha) will be applied in three comparison compositions for training data and testing data of 70:30, 80:20, and 90:10. The following is a sample image from the image dataset using and not using the mask shown in figure 1.
(a) (b) Figure 1. Dataset sample (a) face using a mask (b) face not using a mask Before applying the GLCM method to extract image features, it is necessary to pre-process the dataset by changing the dimensions of the image to 240 × 240 pixels and converting it to a grayscale image. After obtaining a new dataset containing the results of image feature extraction, the next process applies the LVQ method for the classification. The following is a research method for processing training data and test data shown in figure 2.

Gray Level Co-occurrence Matrix (GLCM)
GLCM is defined as the probability starting from a pixel point with a gray level i and continuing with a gray level j where all estimated values can be expressed in the form of a matrix (Gao, 2021). GLCM is a technique for obtaining second-order statistical values (Sudibyo et al., 2018). Where the first step is to create a framework or matrix work area and determine the value of the angle and the closest distance. GLCM can reflect comprehensive information about the angular direction, adjacent intervals, and the range of variations in the gray level of the image. This shows that GLCM has a good effect as a feature extraction method.
GLCM has three main parameters, namely the direction of the angle (0˚, 45˚, 90˚, 135˚), pixel adjacency distance and level of gray (gray tone). There are several features that can be calculated through GLCM, namely contrast, dissimilarity, homogeneity, angular second moment (ASM), energy, and correlation (Simanungkalit et al., 2021). These features are calculated using the following formula (Putriany et al., 2021).
1. Contrast is used to measure how much the intensity of a pixel differs from its neighboring pixels in all image pixels, which is defined in equation 1. ( Dissimilarity is a measure of the dissimilarity of an image. The value will be high if the image has random pixels, which is defined in equation 2. ( Homogeneity is a value that indicates how close the intensity of a pixel is to its neighboring pixels, which is defined in equation 3. (5) = 6. Correlation is the value of the linear dependence of the gray level between pixels in two different directions, which is defined in equation 6.

Learning Vector Quantization (LVQ)
LVQ is a training method for conducting learning in a supervised competitive layer (supervised learning) whose network architecture has a single layer (Kusumaningtias, 2019). The LVQ method begins with determining the initial weight (initialization) and the required parameters. The following are the steps of the LVQ method (Agustinus et al., 2018). a. Initialize the initial weight (W) and LVQ parameters, namely the maximum number of iterations (maxEpoch), learning rate or alpha (α), alpha subtracting constant (dec α), and minimum alpha (min α). b. Enter the input data (X) and the target class (T).

Results and Discussion
The GLCM method in this study uses 4 angle directions, namely 0˚, 45˚, 90˚, 135˚and the neighboring pixel distance is 1 pixel. The feature parameters used are statistical calculations of contrast, dissimilarity, homogeneity, angular second moment (ASM), energy, and correlation. The results of GLCM feature extraction are grouped into two classes or categories, namely the "Wearing" and "Not Wearing" classes which represent the use of masks. After grouping the results, they form a new dataset in the form of statistical values that have been labeled which will be used for the classification process using the LVQ method.
The LVQ classification process was analyzed based on the parameters of the number of epochs and learning rate (alpha) with three compositions of comparison between training data and testing data of 70:30, 80:20, dan 90:10. For testing analysis in this study, the minimum value alpha parameter (min α) is ignored so that the condition can be analyzed by determining the number of epochs and the value of the alpha subtracting constant (dec α) is 0.1.

Testing Datasets with a Comparison of 70 : 30
In the comparison of training data and testing data of 70:30, obtained the highest percentage of accuracy at the 10 epoch for the value of α = 0.001 is 76.03%. The following is a graph of LVQ testing with a comparison of training data and testing data of 70:30 which is shown in figure 3.

Testing Datasets with a Comparison of 90:10
In the comparison of training data and testing data of 90:10, obtained the highest percentage of accuracy at the 10 epoch for the value of α = 0.001 is 83.15%. The following is a graph of LVQ testing with a comparison of training data and testing data of 90:10 which is shown in figure 5. From the overall LVQ test with a comparison composition of training data and testing data of 70:30, 80:20, and 90:10, the best percentage of accuracy for the first rank is 83.15% in the comparison composition of 90:10. Furthermore, the percentage of accuracy for the second rank is 76.03%. on the composition ratio of 70:30 and the third rank is 72.47% on the composition of the ratio of 80:20. This shows that the composition of the more training data does not guarantee the achievement of a higher percentage of accuracy.
In the three LVQ test graphs, each learning rate (alpha) value has the same graphic pattern, namely for the alpha = 0.1 the accuracy percentage graph will experience an up and down phase, for the alpha = 0.01, the accuracy percentage graph tends to rise, and for the alpha = 0.01, the percentage accuracy graph tends to decrease. The three patterns both stop at the maximum optimal number of epochs. The following are the results of the LVQ classification analysis presented in table 1.

Conclusion
The results of GLCM extraction are able to provide a representation of the characteristics of each facial image using and not using a mask and make a good contribution to this study. The LVQ method provides classification results with a good percentage of accuracy.
In each test for comparison of training data and testing data of 70:30, 80:20, and 90:10, it shows that there is an optimal maximum number of epochs where the number of epochs that exceeds the optimal number of epochs will not experience a change in the percentage of accuracy.
For each value the learning rate (alpha) can give the results of the percentage of accuracy with different graphic patterns. For an alpha = 0.1 the LVQ chart pattern goes up and down, for an alpha = 0.01 the LVQ chart will tend to rise, and for an alpha = 0.001 the LVQ chart will tend to fall. The three patterns will stop at the optimal maximum number of epochs. Percentage of accuracy and epoch has a training pattern that depends on the alpha value.
The results of the best percentage accuracy for the first rank are 83.15% in the composition ratio of 90:10. Furthermore, the percentage of accuracy for the second rank is 76.03% at the composition ratio of 70:30 and the third rank is 72.47% at the composition ratio of 80:20. This indicates that the composition more training data does not guarantee the level of achievement of a higher percentage of accuracy.