• Tidak ada hasil yang ditemukan

Development of Health Mask Identification Using YOLOv5 Architecture

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Membagikan "Development of Health Mask Identification Using YOLOv5 Architecture "

Copied!
8
0
0

Teks penuh

(1)

Development of Health Mask Identification Using YOLOv5 Architecture

Ahmad Fauzi a,1,*, Prasetyo Ajie a,2, Anis Fitri Nur Masruriyah a,3, Deden Wahiddin a,4, Hanny Hikmayanti a,5, April Lia Hananto a,6

a Universitas Buana Perjuangan Karawang

1 afauzi@ubpkarawang.ac.id*; 2if19.prasetyoajie@mhs.ubpkarawang.ac.id; 3 anis.masruriyah@ubpkarawang.ac.id;

4deden.wahiddin@ubpkarawang.ac.id; 5hanny.hikmayanti@ubpkarawang.ac.id; 6aprilia@ubpkarawang.ac.id

* corresponding author

I. Introduction

Coronavirus Disease was first identified in Wuhan, China in 2019. The COVID-19 outbreak has become a pandemic and has caused losses in various countries in the world[1]. The first time the virus was identified was when several cases of acute pneumonia with similar symptoms appeared in Wuhan.

Then this disease was identified by technological genome sequencing as a new form of coronavirus called acute respiratory syndrome or coronavirus 2 (SARS-CoV-2) then the disease was named coronavirus disease 2019 (COVID-19)[2]. An overview of COVID-19 published early 2020[3]Such as fever, cough, fatigue during diarrhea and unnatural dyspnea.

The COVID-19 outbreak has caused several countries to suffer in various aspects, especially health, social and economic[2], [4]. Indonesia is one of the countries affected by the COVID-19 outbreak where the death rate rose to 8.9% at the end of March 2020[5]. The Indonesian government provides policies related to the control and management of the COVID-19 outbreak[6]. Some of the policies stipulated are Large-Scale Social Restrictions (PSBB) and residents with a high level of mobility carry out regular COVID-19 tests. This is expected to reduce the spread of the virus in Indonesia[7]. Until a vaccine for COVID-19 is distributed[8]. The increase in the number of infected with COVID-19 occurs because many residents still ignore health protocols[9]–[12].

Then WHO made an appeal to control the spread of COVID-19 by implementing health protocols that must be obeyed[13]. One of the recommended health protocols is wearing a mask. Using a mask correctly can reduce the transmission of COVID-19 in open areas[14]–[16]. Masks function to minimize transmission of COVID-19 through the air[17], [18]. However, there are still many people who ignore the rules for using masks properly. Because of this, many studies have conducted mask detection in open spaces, including detection using the YOLOv5 model[19]–[23].

In a study conducted by Dadang et al.[19]to identify objects. A study was conducted using Google Colab with YOLOv5 as the method used. In the research conducted, the dataset used was a private dataset and was obtained privately. A total of 1332 vehicle images and divided into 666 image train data and 666 image validation data were used. After the data is collected, the dataset that can be trained is a dataset that has gone through the previous steps and already has a label on each image. This dataset

ARTICLE INFO A B S T R A C T

Article history:

Received 14 May 2022 Revised 6 July 2022 Accepted 13 Sept 2022

Coronavirus Disease 2019 (COVID-19) causes the state to suffer losses, especially in the health sector. WHO calls for controlling COVID-19 with health protocols that must be obeyed, one of which is wearing a mask. The use of masks can reduce the transmission of COVID-19. But there are still many people who ignore the protocol to use masks properly. So a system was created to detect the use of masks properly using the YOLOv5 architecture. Aiming to help regulate the use of masks in public areas or open places. The process of this research begins with data collection in the form of images. The collected image data will later be used as a dataset and model training will be carried out using the YOLOv5s model. The accuracy results obtained from this study reached 90.37%.

Copyright © 2023 International Journal of Artificial Intelegence Research.

All rights reserved.

Keywords:

Computer Vision COVID-19 Deep Learning Identification Image Processing

(2)

can be used in Google Colab with YOLOv5 as the method used. In this study the accuracy obtained has a high value reaching 90%. Then, Hikamudin[20]perform human detection using YOLOv5. The dataset used uses the Common Objects in Context (COCO) dataset. This data set contains more than 200,000 images labeled with 80 different classes, including the human class. Testing was carried out using an Android smartphone camera connected to a laptop using the DroidCam application. The system managed to achieve an accuracy of 83.28%.

Next up is Vinay Sharma[21]also did face mask detection using YOLOv5. The process that is carried out first is to collect data, the data collected is used for training models. After the train model is created, model testing is carried out, the process uses OpenCV. The research was conducted with two variants of the YOLOv5 model, namely YOLOv5s and YOLOv5x, with similar results in both techniques, except that YOLOv5s performs a faster process. The accuracy obtained is 67.7%.

Furthermore, research for mask detection using YOLOv5 was also carried out by Yang[22]. The dataset used in this study uses a dataset from Github with a total of 7,959 face mask annotation data.

Where used 92% of the data to be trained and 8% of the data to be tested. This study obtained an accuracy of 97.9%, but this study was only for mask detection. Even if you use a mask incorrectly such as showing your nose, the system will detect wearing a mask. Furthermore, in the research conducted by Walia[23], Mask detection was also carried out with a dataset of 3846. The data collection process was obtained from CCTV recordings. Then in the augmentation section the dataset used has low-resolution images. The number of datasets is 1916 masked images and 1930 non-masked images. Then classify the masks using Stacked ResNet-50. The final results in this study get an accuracy of 85%.

Previously, research was carried out on the topic of mask detection using the CNN algorithm with the MobileNetv2 architecture[24]. The process in previous studies began by creating a training model from several images. The model that has been made is used as a reference for identification using CNN. The results of the research accuracy reached "0.9935%. So this study modified the method used, namely by modeling mask detection using the YOLOv5 architecture.

II. Methods

A. Ingredient

The research conducted utilized images sourced from the Kaggle website. The data taken was in the form of a collection of images of 580 human faces wearing masks and 580 images of human faces without wearing masks. Then the pictures are arranged in the appropriate folder structure. The image data is then labeled with the help of a web application, namely makesense.ai. After all the images have been labeled, export the results in .txt format, then the labeling results are inserted into the YOLO folder structure that was created earlier. The YOLO folder structure created can be seen in.

B. Method

This research uses the YOLOv5 method or architecture. YOLO is an acronym for You Only Look Once, is a model designed as a direct object detector and divides the image into a grid system. Each cell in the grid is responsible for detecting objects within itself. The model is applied to an image at several scales and locations[25]. The image area that is considered for detection is given the highest score. By using YOLO, the system only looks once at the image to predict what the object is and where it is[26]. YOLO is one of the famous object detection models for its speed and accuracy.

YOLOv5 released in April 2020 is the fifth generation object detection model. The architecture of the YOLOv5 model is generally not very different from previous YOLO generations. YOLOv5 uses the Python programming language, unlike the previous version which used the C language[27]. YOLOv5 has five models that can be used as shown in figure 1. It is illustrated that the higher the direction of the model graph, the better the map will be, then the further to the left, the faster the detection. The Training Model type in YOLOv5 uses COCO data with a size of 640 pixels.

(3)

Fig. 1. Models from YOLOv5 C. Research Procedure

Fig. 2. Research procedure

The research procedure carried out was in the form of data collection, create datasets, create labels, organize directories, select models, and train, as illustrated in Figure 2. The data used in this research is a collection of images or facial images of a person wearing a mask and not wearing a mask. The data is obtained from the Kaggle website. The data used is 1160 and divided into two classes. The first class has 580 pictures of faces using masks shown in Figure 3. And the second class has 580 pictures of faces without using masks shown in Figure 4.

Fig. 3. Faces without masks

(4)

Fig. 4. Faces with masks

After the data is collected, the next process is dataset creation, YOLOv5 has a pre-trained default dataset, namely the Common Objects in Context (COCO) dataset. COCO dataset is a collection of data for object recognition, segmentation and labeling[20]. In this study, the dataset was created by modifying the configuration of the coco128.yaml file. be custom data that is adjusted to the data that will be used. The custom data is shown in Figure 5. with the configuration address of the training image directory, the number of existing classes, and the name of the class used.

Fig. 5. Custom Datasets

Next is the labeling process, where at this stage all images in the dataset are labeled as identities so that they can contain image names. The labeling process is done by creating a class name and bounding box for each image object. Make labels on image data that will be used for training using the makesense.ai tool and export in .txt format. Then the labeling results are inserted into the YOLO folder structure.

At the organize directories stage. Image data and previous labeling results are organized and divided into YOLO folder structures. The goal is for training and validation needs. YOLOv5 places labels automatically for each image by replacing the last instance of /images/ in each image with /labels/. The YOLO folder structure used can be seen in Figure 6.

Fig. 6. YOLO Folder Structure

(5)

After the model structure is created, the next process is to select the model variant to be used.

There are 5 variant models in YOLOv5, in this study the model to be used is a variant of the YOLOv5s model. The YOLOv5s model has light parameters so that detection and computation processes can be carried out more quickly with good mAP (mean-average precision) accuracy. Types and comparison of YOLOv5 model variants can be seen in Figure 7

Fig. 7. Pretrained Models

The next process is to conduct model training. Train a YOLOv5 model on coco128 by specifying the dataset, batch size, image size, and YOLOv5 model or –weights. The data training process is carried out on Google Colab because Google Colab provides a GPU of 12 GB with the help of Nvidia so that the data training process can be carried out quickly[28]. in this study the model used is yolov5s.pt. All training results are saved to run/train/ with an incrementing run directory, i.e.

run/train/exp2, run/train/exp3 etc. The training process is carried out with 20 epochs. The training results that appear will be the best result (best.pt) and the last result (last.pt).

III. Result and Discussion

A. Tagging Results (labelling)

The training and testing process is carried out based on the stages previously mentioned. The training process that has been carried out will produce weights that will later be used in the testing process. Image data that has been grouped into folders and the labeling process will produce an image with the class name and bounding box as shown in Figure 8. The purpose of this labeling is to function as YOLO training and the computer can recognize the object. The results of the object that has been given this label will be used for model training.

Fig. 8. Label Results B. Test result

After the data has a label, the next process is training. At the training stage, the model will be trained and validated using data testing, after training it will display a report on the results of the training accuracy value and training loss value. Train results can be seen via the Tensorboard on the Google Collab. The resulting accuracy value is shown in Figure 9. Where there is a mAP value of 0.8773, a precision value of 0.9037 and a recall value of 0.8076. Then the training loss value results are shown in Figure 10. Where there is a box_loss value of 0.02405, a cls_loss value of 1.8187e-3, and an obj_loss value of 0.01856. The training was conducted with 20 epochs.

(6)

Fig. 9. Metrics train accuracy

Fig. 10. Metrics train loss C. Model Testing Results

After carrying out the training process and having produced the best model, the next step is to test the model to determine the performance of this model. Testing will be carried out on several images with several conditions. The test results have been able to detect the use of masks properly as seen in Figure 11. Where the detection results can distinguish between those who wear masks and those who do not use masks properly.

Fig. 11. Model Test Results.

IV. Conclusion

This study utilizes data on facial objects with masks and without masks. It has been proven that

(7)

value obtained at 90.37%. Wearing a mask correctly can protect people from the spread of COVID- 19. A number of things that need to be considered when using a mask are covering the nose and mouth to the maximum. It is known that droplets can enter through the nose and mouth when communicating directly. In addition, for future research, it is possible to carry out tests using other algorithms or variants of the YOLOv5 model to seek higher accuracy values..

References

[1] M. Khanet al., “COVID-19: A Global Challenge with Old History, Epidemiology and Progress So Far,”

Molecules, vol. 26, no. 1, pp. 1–25, 2020, doi: 10.3390/molecules26010039.

[2] D. Kumar, “Corona Virus: A Review of COVID-19,”Eurasian J.Med. Oncol., no. March, 2020, doi:

10.14744/ejmo.2020.51418.

[3] M. Signs, R. Communication, and C. Engagement, “Pre-symptomatic and Mild Signs and Symptoms of COVID-19 Risk Communication and Community Engagement messages.”

[4] F. Di Gennaroet al., “Coronavirus diseases (COVID-19) current status and future perspectives: A narrative review,” Int. J.Environ. Res. Public Health, vol. 17, no. 8, 2020, doi: 10.3390/ijerph17082690.

[5] S. Setiati and MK Azwar, “COVID-19 and Indonesia,” no. April, 2020.

[6] U. Enri and EP Sari, “GOVERNMENT POLICIES MODELING IN CONTROLLING INDONESIA 'S COVID-19 CASES USING DATA MINING,” pp. 67–72, 2021.

[7] A. Abidah, HN Hidaayatullaah, RM Simamora, D. Fehabutar, and L. Mutakinati, “The Impact of Covid- 19 to Indonesian Education and Its Relation to the Philosophy of 'Freedom to Learn,'”Studs. Philos. sci.

educ., vol. 1, no. 1, pp. 38–49, 2020, doi: 10.46627/sipose.v1i1.9.

[8] T. Aven and F. Bouder, “The COVID-19 pandemic: how can risk science help?,”J.Risk Res., vol. 23, no.

7–8, pp. 849–854, 2020, doi: 10.1080/13669877.2020.1756383.

[9] J. Pandey, S. Chakraborty, I. Chakraborty, P. Ghosal, N. Singh, and S. Majumdar, “CAN DEVELOPING COUNTRIES HANDLE the MENTAL BURDEN DUE to the LOCKDOWN SITUATION?

UNDERSTANDING the UNCERTAINTY and MANAGEMENT of COVID-19 PANDEMIC,”Asia Pacific J. Heal. Manag., vol. 15, no. 3, pp. 1–8, 2020, doi: 10.24083/APJHM.V15I3.401.

[10] THES Observer, “THE COVID-19 PANDEMIC : SOCIOLOGICAL REFLECTIONS,” vol. 1, no. 1.

[11] KP Wasdani and A. Prasad, “The impossibility of social distancing among the urban poor: the case of an Indian slum in the times of COVID-19,”LocalEnvirons., vol. 25, no. 5, pp. 414–418, 2020, doi:

10.1080/13549839.2020.1754375.

[12] E. Chuang, PA Cuartas, T. Powell, and MN Gong, “'We're Not Ready, But I Don't Think You're Ever Ready.' Clinician Perspectives on Implementation of Crisis Standards of Care,”AJOB Empire. Bioeth., vol. 11, no. 3, pp. 148–159, 2020, doi: 10.1080/23294515.2020.1759731.

[13] WHO, “Infection Prevention and Control guidance for Long-Term Care Facilities in the context of COVID-19. Retrieved march 29, 2020 From https://www.who.int,”InterimGuid. WorldHeals. Organ., no. March, pp. 1–5, 2020.

[14] OS Ilesanmi, AA Afolabi, A. Akande, T. Raji, and A. Mohammed, “Infection Prevention and Control during COVID-19 Pandemic: Realities from Healthcare Workers in a North Central State in Nigeria,”Epidemioles. infected., 2021, doi: 10.1017/S0950268821000017.

[15] F. Bmbm, A. Mdsm, and G. Mam, “Prevention and control measures for neonatal COVID-19 infection:

a scoping review,”Rev. Bras. Enferm., vol. 73, no. suppl 2, pp. 1–10, 2020.

[16] M. Allamet al., “COVID-19 diagnostics, tools, and prevention,” Diagnostics, vol. 10, no. 6, pp. 1–33, 2020, doi: 10.3390/diagnostics10060409.

[17] L. Morawskaet al., “How can airborne transmission of COVID-19 indoors be minimized?,” Environ. Int., vol. 142, no. May, 2020, doi: 10.1016/j.envint.2020.105832.

[18] J. Borak, “Airborne Transmission of COVID-19,”Occup. med. (Chic. Ill)., vol. 70, no. 5, pp. 297–299,

(8)

2020, doi: 10.1093/occmed/kqaa080.

[19] AZ INDRASETYA, W. SUGENG, and TD PUTRI, "Application of Yolo in Converting Scores from Block Notation to Number Notation," pp. 1–12, 2021, [Online]. Available:

https://eproceeding.itenas.ac.id/index.php/fti/article/view/586%0Ahttps://eproceeding.itenas.ac.id/index .php/fti/article/download/586/ 478.

[20] F. Hikamudin Arby and H. Al Amin, “Implementation of YOLO-v5 for a real-time Social Distancing Detection,”J. Appl. Informatics Comput., vol. 6, no. 1, pp. 2548–6861, 2022, [Online]. Available:

http://jurnal.polibatam.ac.id/index.php/JAIC.

[21] Vinay Sharma, “Face Mask Detection using YOLOv5 for COVID-19,” pp. 10–14, 2020, [Online].

Available: https://scholarworks.calstate.edu/downloads/wp988p69r?locale=en.

[22] G. Yanget al., “Face Mask Recognition System with YOLOV5 Based on Image Recognition,” 2020 IEEE 6th Int. Conf. Comput. commun. ICCC 2020, no. January 2020, pp. 1398–1404, 2020, doi:

10.1109/ICCC51575.2020.9345042.

[23] IS Walia, D. Kumar, K. Sharma, JD Hemanth, and DE Popescu, “An integrated approach for monitoring social distancing and face mask detection using stacked Resnet-50 and YOLOv5,”electrons., vol. 10, no.

23, pp. 1–15, 2021, doi: 10.3390/electronics10232996.

[24] RG Nugraha, M. Yoga Wibowo, P. Ajie, HH Handayani, A. Fauzi, and AF Nur Masruriyah,

“Implementation of Deep Learning in Order to Detect Inapposite Mask User,”2021 6th Int. Conf.

Informatics Comput. ICIC 2021, pp. 4–9, 2021, doi: 10.1109/ICIC54025.2021.9632994.

[25] N. Kurniasari and JP Sugiono, "Detection of Broken Paths in Electrical Circuits in PCBs Using the Convolutional Neural Network (Cnn) Method,"Surabaya J. Sist. Intelligent and Engineering, vol. 3, no.

1, pp. 2656–7504, 2021.

[26] KA Shianto, K. Gunadi, and E. Setyati, "Detecting Car Types Using the YOLO Method,"J. Infra, vol. 7, no. 1, pp. 157–163, 2019, [Online]. Available: http://publication.petra.ac.id/index.php/teknik- informatika/article/view/8065.

[27] D. Thuan, “Evolution of Yolo Algorithm and Yolov5: the State-of-the-Art Object Detection Algorithm,”

p. 61, 2021.

[28] VV Pramansah, DI Mulyana, T. Silfia, and RT Jaya, “Automatic Anime Character Creation Using Generative Adversarial Networks,” vol. 4, pp. 21–29, 2022

Referensi

Dokumen terkait

3.4 Optimal Cluster Results From the results of data processing in this study, which was carried out based on the donor transaction dataset using K-Means and K-Medoids, the DBI value