13 | International Journal of Informatics Information System and Computer Engineering 2(1) (2021) 13-22 Crowd Detection Using YOLOv3-Tiny Method and Viola-Jones Algorithm at Mall Selvia Lorena Br Ginting*, Hanhan Maulana**, Riffa Alfaridzi Priatna***, Deran Deriyana Fauzzan****, Devidli Setiawan***** *Center for Artificial Intelligence Technology, Universitas Kebangsaan Malaysia, Malaysia ** Japan Advanced Institute of Science and Technology ***,****,*****Departemen Teknik Informatika, Universitas Komputer Indonesia, Indonesia E-mail: *selvialorena@yahoo.com A B S T R A C T S A R T I C L E I N F O Indonesia is one of the countries affected by Covid-19 which is spreading quite fast. Lately, the surge in Covid- 19 cases in Indonesia is quite high, due to the lack of public awareness of the current health protocols, such as avoiding crowds and keeping a distance. The purpose of this study is to reduce crowds that occur in places with a high risk of crowding, for example in mall. Detection is done by using Closed Circuit Television (CCTV) in the mall and using the YOLOv3-Tiny method and the Viola- Jones Algorithm to detect the crowd. To support the research, we use the method of literature study and field observation at Cimahi Mall as one of the malls in the area of Bandung Raya. The results show that to reduce the number of crowds that occur in the mall, crowd detection must be carried out using the YOLOv3-Tiny method and the Viola-Jones Algorithm, and a warning system is given if a crowd is detected in the place. The main concept of this system is crowd detection and warning if there is a crowd located on CCTV in the Mall. In our opinion, when this system is running in malls that occur in Indonesia, the number of positive cases of COVID-19 in Indonesia will decrease because there are no crowds. It can be concluded that this system exists as a precaution against the crowds that often occur today at the mall. Prevention is done by detecting crowds and giving warnings if there is a crowd so that positive cases of COVID-19 in Indonesia will be reduced. Article History: ___________________ Keywords: Crowd, Detection, YOLOv3-Tiny, Viola-Jones. International Journal of Informatics, Information System and Computer Engineering Journal homepage: http://ejournal.upi.edu/index.php/ijost/ International Journal of Informatics Information System and Computer Engineering 2(2) (2021) 13-22 Received 10 Nov 2021 Revised 20 Nov 2021 Accepted 25 Nov 2021 Available online 26 Dec 2021 Selvia et al. Crowd Detection Using YOLOv3-Tiny Method...| 14 1. INTRODUCTION Covid-19, also known as the deadly coronavirus, has already taken half of China's life. Sars-CoV-2 or 2019-nCoV was first detected in the city of Wuhan, China in December 2019 since the disease has spread exponentially. While COVID- 19 patients on 28 February 2020 were 86,604 and 858,361 on 31 March 2020, the number increased to 2,086,477 on 15 April 2020 (Huang et al., 2020). The government itself has notified Indonesian citizens to self-isolate.Covid-19, also known as the deadly coronavirus, has already taken half of China's life. Sars-CoV-2 or 2019- nCoV was first detected in the city of Wuhan, China in December 2019 since the disease has spread exponentially. While COVID-19 patients on 28 February 2020 were 86,604 and 858,361 on 31 March 2020, the number increased to 2,086,477 on 15 April 2020 (Huang et al., 2020). In Indonesia itself, this virus was first entered in March 2020 and the steps taken by the government were to enforce the policy of Pemberlakuan Pembatasan Kegiatan Masyarakat (PPKM) (Nasution et al., 2020). Then, in addition to PPKM, the government also provides education and several measures to prevent the spread of Covid-19 to the public, including maintaining hand hygiene by washing hands, respiratory etiquette, and using masks, then implementing social distancing such as closing schools and universities, banning schools and universities. organizing large events and mass gatherings, restricting travel and public transportation, making the public aware of the dangers, being required to stay at home, and implementing self- isolation (Aquino et al., 2020). However, there are still many Indonesians who don't wear masks, don't keep their distance, hold big events. That way, more and more people congregate in one place. Therefore, we need a technology to detect the distance in a crowd on Closed Circuit Television (CCTV). Previous research said that social distancing is one of the steps to reduce the spread of Covid-19 (Courtemanche et al., 2020). To prevent crowds, object detection in the form of humans is carried out to detect whether they keep their distance or not by comparing the pixel values between two or more objects (Parameswaran et al., 2021). Detection is carried out using the YOLOv3 method to obtain stable FPS and accurate results (Punn et al., 2020). YOLOv3-Tiny is used to provide lightening the performance of the processing device used so that it can be used in the long term (Li et al., 2020). The Viola-Jones algorithm is strong enough to detect objects in real-time so that the results produced are also quite fast (Jadhav & Lahudkar, 2021). Therefore, from this research, we can see that by preventing crowds, we can reduce the spread of Covid-19, especially in Indonesia. From this research, we can also combine the YOLOv3-Tiny method and the Viola-Jones Algorithm to produce fast, accurate data processing, stable FPS, but not consuming large hardware resources. The purpose of this study is to reduce crowds that occur in places with a high risk of crowding, for example in malls. Detection is done by using CCTV in the Mall and using the YOLOv3-Tiny method and the Viola-Jones Algorithm to detect the crowd. To support the research, we use the method of literature study and field observation at Cimahi Mall as one of the malls in the area of Bandung Raya. 15 | International Journal of Informatics Information System and Computer Engineering 2(1) (2021) 13-22 2. METHOD The method used in this research is the descriptive quantitative method, which is a method used to provide an overview of the actual situation (Jalinus, N., & Risfendra, 2020). The data collection technique that we use is passive observation, namely by observing every crowd that occurs within CCTV coverage at Cimahi Mall. To perform the detection, we use the YOLOv3-Tiny method and the Viola-Jones Algorithm because these methods and algorithms can be used in the long term, giving the best and fast results (Punn et al., 2020; Li et al., 2020; Jadhav & Lahudkar, 2021). However, for the initial version and because the pandemic is still ongoing, we are prototyping the tool that we will build. The prototype is made so that it can reflect the expected results of this system if later it has been implemented in malls in Indonesia (Günther et al., 2021). 3. RESULTS AND DISCUSSION 3.1. System Design This crowd detection system will use several hardware devices such as CCTV in the Mall as input for this detection system. Raspberry Pi 4 as a tool to process input from CCTV and detect objects in the form of humans. Then, the system will decide whether there are two or more objects that are close to each other or not, if there are objects that are close to each other, the Raspberry Pi will issue an output through the Buzzer and Speaker which will be placed under the CCTV to give a warning to the object that is close to each other. In addition to providing output through the Buzzer and Speaker, the Raspberry Pi will also be directly connected to the Monitor in the CCTV Monitoring area and will provide a display of object detection. The circuit of the detection system is shown in Fig. 1. For the output on the monitor that located at the CCTV Monitoring area, the system will indicate which a Human object with a box is. The system will distinguish which objects do not keep their distance by giving two or more objects with a red box, whereas if the objects keep their distance well, the system will give the object a green box. The display on the monitor is shown in Fig. 2. Fig. 1. Circuit of the Detection System Selvia et al. Crowd Detection Using YOLOv3-Tiny Method...| 16 Fig. 2. Detection Result in Monitor 3.2 Developing the Initial Prototype In the early part of the prototyping process, we performed detection using the webcam on the laptop and immediately ran the detection program on the laptop as well. For the prototype of this detection system, it will only provide a warning in the form of output in the Terminal of the Visual Studio Code application. The detection display on the laptop is the same as the one that will appear on the monitor in the CCTV Monitoring area. However, the difference lies in the output given, the following is the output given during this prototyping (Fig. 3). Fig. 3. Detection Result in Visual Studio Code Terminal 3.3 Testing the Prototype The test results are still carried out with a prototype. Tests are carried out to find out how effective this detection system is to detect Humans and to check whether there are two or more Humans who are close to each other. If there is such a condition, the system will warn the two or more Humans to immediately keep their distance, and if they do not comply with the order, they will be followed up by the Covid-19 Officer Unit at the Mall. After testing 40 times on prototype that was made only using the Viola-Jones algorithm, the detection results show that 93.24% can detect humans and 75% of them keep their distance from each other. The detection is said to be successful if it can detect an object in the form of a human being in the camera area, while the detection is said to fail if there is an object in the form of a human in the camera area, but the detection system cannot detect it. Accuracy is obtained from the comparison of the number of successful detections with the number of successful and failed detections. The processing time results are obtained from how long the system can detect several objects in 1 image. The result of whether the object keeps its distance or not is obtained from the detection between several objects. If there are 2 or more objects that are detected close to each other, then the result is that a violation of social distancing is detected. The test results only with the Viola-Jones algorithm are shown in Table 1. Table 1. Result Test only using Viola-Jones Algorithm [7] No Image Count human an image Accuracy Processing Time (second) Is Maintain a Distance? Success Failure 1 Image 1 8 - 100% 10.2 Yes 2 Image 2 6 - 100% 2.7 Yes 3 Image 3 4 - 100% 4.2 Yes 17 | International Journal of Informatics Information System and Computer Engineering 2(1) (2021) 13-22 No Image Count human an image Accuracy Processing Time (second) Is Maintain a Distance? Success Failure 4 Image 4 5 - 100% 3.1 Yes 5 Image 5 11 - 100% 4.2 Yes 6 Image 6 24 3 88.88% 12.2 No 7 Image 7 30 1 93.70% 13.6 No 8 Image 8 3 - 100% 3.6 Yes 9 Image 9 2 - 100% 2.4 Yes 10 Image 10 8 2 80% 14.5 Yes 11 Image 11 12 - 100% 3.7 Yes 12 Image 12 36 2 94% 5.9 No 13 Image 13 5 - 100% 3.3 Yes 14 Image 14 4 - 100% 2.4 Yes 15 Image 15 12 - 100% 3.7 Yes 16 Image 16 8 - 100% 2.9 Yes 17 Image 17 5 - 100% 2.3 Yes 18 Image 18 24 3 88.88% 4.5 No 19 Image 19 3 - 100% 2.3 Yes 20 Image 20 24 1 96% 4.9 No 21 Image 21 4 - 100% 1.4 No 22 Image 22 - - 0% 1.2 Yes 23 Image 23 5 - 100% 1.5 Yes 24 Image 24 1 - 100% 2.4 Yes 25 Image 25 3 - 100% 7 Yes 26 Image 26 1 - 100% 1.3 Yes 27 Image 27 - - 0% 1.2 Yes Selvia et al. Crowd Detection Using YOLOv3-Tiny Method...| 18 No Image Count human an image Accuracy Processing Time (second) Is Maintain a Distance? Success Failure 28 Image 28 5 - 100% 1.4 No 29 Image 29 1 - 100% 22.2 Yes 30 Image 30 3 - 100% 3.3 Yes 31 Image 31 1 - 100% 1.8 Yes 32 Image 32 1 - 100% 1.4 Yes 33 Image 33 5 - 100% 2.2 Yes 34 Image 34 3 - 100% 1.1 Yes 35 Image 35 10 - 100% 11.5 Yes 36 Image 36 50 1 98% 31.5 No 37 Image 37 2 - 100% 2.1 Yes 38 Image 38 31 1 96.80% 13.3 No 39 Image 39 1 - 100% 1.7 Yes 40 Image 40 28 2 93.30% 4.9 No Accuracy = 93.24% 75% After combining the YOLOv3-Tiny method and the Viola-Jones algorithm, the results obtained from this test show that 96.32% can detect Humans and 85% of them keep their distance from each other. The detection is said to be successful if it can detect an object in the form of a human being in the camera area, while the detection is said to fail if there is an object in the form of a human in the camera area, but the detection system cannot detect it. Accuracy is obtained from the comparison of the number of successful detections with the number of successful and failed detections. The processing time results are obtained from how long the system can detect several objects in 1 image. The result of whether the object keeps its distance or not is obtained from the detection between several objects. If there are 2 or more objects that are detected close to each other, then the result is a violation of social distancing. The test results using the YOLOv3-Tiny method and the Viola-Jones algorithm are shown in Table 2. 19 | International Journal of Informatics Information System and Computer Engineering 2(1) (2021) 13-22 Table 2. Result Test using YOLOv3-Tiny Method and Viola-Jones Algorithm No Image Count human an image Accuracy Processing Time (second) Is Maintain a Distance? Success Failure 1 Image 1 8 - 100% 8.2 Yes 2 Image 2 6 - 100% 1.4 Yes 3 Image 3 4 - 100% 3.7 Yes 4 Image 4 5 - 100% 2.6 Yes 5 Image 5 11 - 100% 3.1 Yes 6 Image 6 26 1 96.30% 11.2 No 7 Image 7 31 - 100 % 13.6 No 8 Image 8 3 - 100% 2.4 Yes 9 Image 9 2 - 100% 2.1 Yes 10 Image 10 9 1 90% 12.5 Yes 11 Image 11 12 - 100% 3.3 Yes 12 Image 12 36 2 94% 5.9 No 13 Image 13 5 - 100% 3.3 Yes 14 Image 14 4 - 100% 2.4 Yes 15 Image 15 12 - 100% 3.7 Yes 16 Image 16 8 - 100% 2.9 Yes 17 Image 17 4 1 80% 4.3 Yes 18 Image 18 26 1 96.30% 3.2 No 19 Image 19 3 - 100% 2.3 Yes 20 Image 20 24 1 96% 4.2 No 21 Image 21 4 - 100% 1.1 No 22 Image 22 2 - 100% 1.5 Yes 23 Image 23 5 - 100% 1.8 Yes Selvia et al. Crowd Detection Using YOLOv3-Tiny Method...| 20 No Image Count human an image Accuracy Processing Time (second) Is Maintain a Distance? Success Failure 24 Image 24 1 - 100% 2.4 Yes 25 Image 25 3 - 100% 7 Yes 26 Image 26 1 - 100% 1.3 Yes 27 Image 27 - - 0% 1.2 Yes 28 Image 28 5 - 100% 1.4 No 29 Image 29 1 - 100% 22.2 Yes 30 Image 30 3 - 100% 3.3 Yes 31 Image 31 1 - 100% 1.8 Yes 32 Image 32 1 - 100% 1.4 Yes 33 Image 33 5 - 100% 2.2 Yes 34 Image 34 3 - 100% 1.1 Yes 35 Image 35 10 - 100% 11.5 Yes 36 Image 36 51 - 100% 31.5 No 37 Image 37 2 - 100% 2.1 Yes 38 Image 38 32 - 100% 13.3 No 39 Image 39 1 - 100% 1.7 Yes 40 Image 40 30 - 100% 4.9 No Accuracy = 96.32% 85% The process of producing Al2O3 nanoparticles using the precipitation method is carried out with several instruments using industrial scales that can be obtained commercially and economically. Suppose the production is carried out 960 times a year. In that case, 6.9 tons of Al2O3 nanoparticles will be produced, requiring 33.00 tons of aluminum chloride hexahydrate, 60.48 tons of ammonium hydroxide, 12.21 tons of Tween-80, and 200 tons of ethanol. The total price required in a year for production is 203,364.31 USD with annual sales of 348,000.00 USD, resulting in a profit of 144,635.69 USD per year. 21 | International Journal of Informatics Information System and Computer Engineering 2(1) (2021) 13-22 These advantages will be shown in an economic evaluation, and the value of the project will be shown over 20 years 4. CONCLUSION This crowd detection system was created as a precautionary measure to prevent crowds and to reduce crowd levels that occur in places with a high risk of crowding, such as in malls. This system runs according to its purpose, which is to reduce the crowds that occur in malls so that the number of Covid-19 cases in Indonesia will continue to decrease so that later there will be no more Covid-19 cases in Indonesia. REFERENCES Aquino, E. M., Silveira, I. H., Pescarini, J. M., Aquino, R., Souza-Filho, J. A. D., Rocha, A. D. S., ... & Lima, R. T. D. R. S. (2020). Social distancing measures to control the COVID-19 pandemic: potential impacts and challenges in Brazil. Ciencia & saude coletiva, 25, 2423-2446. Courtemanche, C., Garuccio, J., Le, A., Pinkston, J., & Yelowitz, A. (2020). Strong Social Distancing Measures In The United States Reduced The COVID-19 Growth Rate: Study evaluates the impact of social distancing measures on the growth rate of confirmed COVID-19 cases across the United States. Health Affairs, 39(7), 1237- 1246. Günther, S., Müller, F., Hübner, F., Mühlhäuser, M., & Matviienko, A. (2021, June). ActuBoard: An Open Rapid Prototyping Platform to integrate Hardware Actuators in Remote Applications. In Companion of the 2021 ACM SIGCHI Symposium on Engineering Interactive Computing Systems (pp. 70-76). Huang, C., Wang, Y., Li, X., Ren, L., Zhao, J., Hu, Y., ... & Cao, B. (2020). Clinical features of patients infected with 2019 novel coronavirus in Wuhan, China. The lancet, 395(10223), 497-506. Jadhav, R. R., & Lahudkar, S. L. (2021). Implementing a Real Time Human Detection and Monitoring Social Distancing for Covid-19 Using VJ algorithm and OpenCV. International Journal, 10(2). Jalinus, N., & Risfendra, R. (2020). Analisis Kemampuan Pedagogi Guru SMK Yang Sedang Mengambil Pendidikan Profesi Guru Dengan Metode Deskriptif Kuantitatif Dan Metode Kualitatif. INVOTEK: Jurnal Inovasi Vokasional Dan Teknologi, 20(1), 37-44. Li, T., Ma, Y., & Endoh, T. (2020). A systematic study of tiny YOLO3 inference: Toward compact brainware processor with less memory and logic gate. IEEE Access, 8, 142931-142955. Nasution, D. A. D., Erlina, E., & Muda, I. (2020). Dampak pandemi Covid-19 terhadap perekonomian Indonesia. Jurnal Benefita, 5(2), 212-224. Parameswaran, B., & SB, B. (2021). Crowd Detection for Social Distancing and Safety Violation Alert based on Image Processing. Selvia et al. Crowd Detection Using YOLOv3-Tiny Method...| 22 Punn, N. S., Sonbhadra, S. K., Agarwal, S., & Rai, G. (2020). Monitoring COVID-19 social distancing with person detection and tracking via fine-tuned YOLO v3 and Deepsort techniques. arXiv preprint arXiv:2005.01385.