Students Engagement Detection in Online Learning During Covid-19 Pandemic Using R Programming Language

Nowadays, Covid-19 is a serious issue, which is outspread all over the world. As, this is a contagious illness, so people maintaining social distance to prevent it. Government of every country announced lockdown to the respective countries to stop its rapid spread. For this reason, most of the sectors especially the education sector is going through a crisis. Students cannot go to their institution because of this pandemic. Therefore, Government of every country decided to start online class in this pandemic situation. It is very much tough to continue study through online rather than intuitional class. Not only students but also the teachers also faced many problems to do the online class properly because this is a new process for both of them. In online class, teachers have to identify that the students are present or not. If the students turn on their webcam, then the teachers can take their attendance easily. In this research, researchers tried to develop a prototype using R programming language and machine learning tools that can detect and recognize students’ face easily that might help teachers to take attendance without any hassle. Researchers took help of Artificial Intelligence as well as used Machine Learning tools to complete this research. People using artificial intelligence because people do mistake but machine cannot do mistake so the in here the error rate is low. Machine learning is also important because it is time consuming, this machine have to trained up so that it is act as human and solve all the problems easily. That is why various types of programming language are needed to train up the machine. In here, Researchers mainly used OpenCV that is a built-in package of R programming language, which is used for real time face detection and so on. Keyword: Face Detection, Face Recognition, R Programming Language, Artificial Intelligence (AI), Machine Learning, OpenCV DOI: 10.24818/issn14531305/25.3.2021.03


Introduction
The research is about face detection and how face detection algorithm works which was implemented by R programming language. Face detection can be used for various purposes such as Class monitoring, Class attendance, Office uses, Government uses etc. Specially, In Covid-19 pandemic, face detector can also be used to develop facemask detector. For completing this research, researchers have used some methods of Machine Learning and Artificial Intelligence (AI) such as neural network to create our face detector model. Nowadays it can be seen huge amount of uses of Machine Learning and AI. Firstly, researchers need to train our machine to develop face detector model. As everybody knows that Machine does not understand human language, to interact with machine, researchers need programming language. As previously mentioned, researchers have used R programming language and its libraries to develop our model.
In this research, researchers have used 'OpenCV' and 'Psych', libraries of R programming language. OpenCV defines as Open Computer Vision, mainly used for developing models about face detection and recognition. It is used in many programming languages such as Python and R as it is one of the fastest and cost-free libraries.
The primary objectives of this research are: • To develop a face detector prototype using R programming language • To detect students' face and its location • To monitor and take attendance of the students in online class • To reduce effort and time for an instructor to conduct online class • To gather knowledge about Machine Learning and its components • To learn about real-life usage of OpenCV in R programming language The limitations of this research are: • As it is a prototype, its outcome is not always accurate • As researchers did not have enough resources, they could not work properly • As researchers are new in this field, they have limited knowledge • Researchers faced some software issues regarding R studio • If there is lack of clarity, this model suffers to detect face

Literature Review
The key part of this research is Machine learning and AI. There are some other factors like Deep Learning, Neural Network, OpenCV, R programming language etc. which are also related with this topic. The researchers have been discussed all those factors consecutively.

R Programming Language
R is a programming language that makes surfing its packages and libraries easier for non-coders too. So, beginners also can analyze and visualize data easily using R [1]. R is a free and open-source programming language which is user-friendly and flexible. It is a complex but powerful as well as useful programming language [2]. R programming language is a developed version of S programming language. It is built with the help of the syntax of S. Because S was a powerful language for computational analysis tool of that time [3]. R programming can also be used in big data analysis such as sentiment analysis, word cloud analysis, text analysis and so on. It is also possible to make chart, graph and plots in R programming language [4]. R is a computing software system that can be used on Macs, PCs and Linux systems and is a functional and object-oriented programming. Its code is simple and easier and also faster execution than other programming languages codes [5]. R programming can be used to extract data from social media as well as visualize them to analyze sentiment of the users, both destructive and positive data [6]. R, a public domain implementation which is a de facto standard among professional statisticians. Automation of analyses and development of new tools it necessary for the existing language features' extension so that anyone can use the functions. Users don't need to save them each time because it automatically all the data of each session. It also saves command history [7].

Machine Learning
Machine learning is a key part of Artificial intelligence. It is spread-out all over in science and technology especially in face detection, computer vision, robot control etc. It reduces human effort by doing it automatically. Machine learning method is widely used in many sectors because of the low-cost computation and data availability [8]. It can be seen that computational models of learning in the development of Machine learning. Nowadays, a huge amount of uses of machine learning in various sectors like computer science, statistics, philosophy, information theory, biology etc. Basically, machine learning helps a machine to improve its performance by computational learning. It also helps the process of developing computers that will learn from experience and modify their activity [9]. For achieving better desired task, machine learning algorithms is a simple and easily adaptable than other algorithms. There are three types of machine learning, supervised learning, unsupervised algorithm and semisupervised learning. This algorithm configures by its own that it can produce both desired outcome and new outcome from it. As good algorithm can process new data, so this learning exists for a long time [10]. Data mining is one of the essential parts of machine learning that helps storing meaningful data into database. By transforming these data, it is possible to develop an artificial intelligence in action by using the machine learning tools [11].

Artificial Intelligence
Artificial Intelligence helps machines to interact with human easily. By using artificial intelligence, people can reduce human effort as well as increase productivity. Nowadays people are mostly depended on machines. As machines only understand binary, AI helps to develop programs so that machines can understand human command [12]. To train any machine, it is important to develop intelligent behavior into them with the help of Artificial Intelligence, which helps to set both long-term engineering and scientific goals to develop a machine so that it can imitate human behavior. Another goal of Artificial Intelligence is to differentiate human behavior from other animals [13].

Deep Learning
Deep learning is a part of machine learning. Researchers face some problem in using conventional machine learning techniques. But deep learning resolves these problems and helps to work more accurately, efficiently and effectively. Deep learning especially helps in image processing, big data analysis, speech recognition etc. [14]. It is necessary to develop computational model in multiple processing layers so that machine can learn representations of data with multiple levels of abstraction and deep learning made it possible. Components like speech recognition, visual object recognition, object detection and so on has been improved with the help of deep learning methods. As deep learning needs lower engineering knowledge, it has a possibility to achieve more success in near future. Therefore, it is possible to increase the computational and data availability for the advantages of deep learning methods [15]. Deep learning is one of the most important components of artificial intelligence and machine learning technologies, which develops computer vision, speech and face recognition, machine translation, AI games, driverless cars, and other applications. To contact in social media and google services, there is a high possibility that people are using deep learning system. To extract and identify data pattern from a large database and to learn from the complex big data, usage of deep learning is significantly growing [16]. It can be seen the multiple usage of multiprocessing layers in developing data structures and pattern, deep learning and neural networks methods has been using since long. Every layer has been develop depending on the subsequent layers and higher level is necessary to abstract more complex data from a large dataset. However, deep learning does not depend on prior data processing and automatically extracts features and it does not create any value in the context of big data, as it extracts high-level information from very large volumes of data [17].

Face Detection
Face detection helps to recognize face and its shape, position, location, gesture-posture and so on. OpenCV helps in experimental and real-time face detection. Though face detection technology has some issues, it helps a lot in the field of face detection and recognition [18]. To recognize a face, developing a face detection model is important as it is necessary to extract the face location from the background. Face detection model also has some components such as content-based image retrieval, video coding, video conferencing, crowd surveillance, and intelligent human computer interfaces. It is difficult to detect the face for computer vision as human face is a dynamic object and has a high degree of variability in its appearance [19]. Face detection technique is an essential and difficult component of face recognition that interact with users visually. To develop a visual object detector with the help of machine learning and artificial intelligence tools, there are three main issues. First of all, there are different variations of images of objects like fighting, occlusion, pose, facial expression, and identity. It is necessary to train the face detection algorithm in all the possible variation so that it provides the most accurate result. Moreover, it is also necessary to develop multiple neural networks to differentiate all the objects from non-objects. Lastly, it is important to develop a single model by combining all the neural networks to achieve the potential outcome [20]. Face detection is one of the most important components in using applications like video surveillance, human computer interface, face recognition, and image database management. It is also necessary to develop models to track and detect faces like skin color with complex backgrounds, variations and lighting conditions, which is a component of colorbased approaches [21].

OpenCV
OpenCV known as Open Computer Vision helps programmer with image and video processing and analysis. OpenCV is an opensource library, divided into several modules, each module generally divided for different purposes. There are many functions in OpenCV that help programmer to work fluently and effectively [22]. OpenCV is a library including machine learning libraries, most of the programming languages and operating systems which is developed and designed for computational efficiency. OpenCV can work on real time applications and contains more than 500 functions in the area of computer vision, factory product inspection, user interface, medical imaging, security, camera calibration, robotics and so on [23]. The main goal of OpenCV is to develop functions that provide solution regarding issues of computer vision that contains both low-and high-level image-processing functions and algorithms such as face detection, pedestrian detection, feature matching, and tracking [24]. OpenCV is a computer vision library that provides various applications including image processing and computer vision computing, that helps to develop powerful image processing models that works in real-time. These functions help to decrease human effort in programming codes and difficulty in face detection [25].

Research Methodology
According to Goddard, W., & Melville, S, research is a method to develop way of new invention and discoveries that helps to make human life better and easier [26]. This research is a type of experimental research. Experimental research is focused on cause and effect of an experiment that depends on two variables, independent variable and dependent variable [26]. In this research, the researchers have used picture of a students from an online class, which is basically qualitative data to conduct this research. Firstly, researchers collected this data and developed a program using R programming language. This program contains codes regarding face recognition and detection that help a course instructor to detect the students' face automatically. This research prepared with the help of developing neural network using deep learning and machine learning technologies to develop intelligence for machine that help a machine to understand and recognize human face as well as differentiate human face from another animal.

Data analysis
Firstly, researchers needed to install and import some necessary packages. The packages are: • OPENCV • PSYCH Then researchers needed to run some OpenCV functions to capture our video as shown in figure 1.

Fig. 1. Installing and importing necessary packages and capturing video
Here, if researchers run the code 'ocv_video (ocv_face)', machine will capture our video and detect our face with eyes. The other codes are some variations and related options of ocv_video. Here, the researchers will overlay our face with a plot. For this, researchers need to follow the procedure as shown in Figure 2. Here, researchers defined a variable named, 'test' and stored 'ocv_picture', a function of OpenCV. Here, researchers have printed the variable test. This picture function will help us to capture a still picture of our subject. After that, researchers defined a variable named, 'bitmap' and stored 'ocv_bitmap', a function of OpenCV, and stored the outcome of variable 'test'. Then researchers have printed the variable bitmap. This bitmap function will help us to see the dimensions and the mapping of the picture that researchers got from the variable named test. After that, researchers set the dimension of the picture that researchers  In Figure 5, researchers have set a variable named 'pic' and imported the data that researchers wanted to read. Researchers used face function of OpenCV to detect the faces of our data. Then, researchers have exported the outcome of the analyzed data. After that, researchers have shown some variations of our outcome by some of the OpenCV functions. Finally, researchers have set a variable named 'facemask' to detect the face location of our outcome.
In Figure 6, there are 15 students. Out of them this model detected face of 13 students and could not detect the rest for the lack of clarity 5 Comparison between two analyses In figure 7 there are also 15 students but, in the image, the face detection model was not able to detect only seven faces which is lower than the previous image. The researchers have detected issue behind this.

Fig. 7. Comparison
First of all, the model face issues in blurry and dark images. Also, it cannot detect faces in different body position and gestures. In addition, figure 7 contains images with lower quality and lighting condition.

Conclusion
Covid-19 pandemic spread-out all over the world and it creates big impact on our education system. Students have to continue their study by doing online class. So, it is pretty much tough for the course instructor to monitor the students. As this situation is beyond our control, this model might be helpful for all. Machine learning helps to develop this type of research in a broad category. This research is basically based on build a prototype of a face detection that will help to develop real-life research. Researchers tried to draw a clear picture about how a face detection system works. Machine learning and AI helped to did this research effectively. Researchers can learn some R tools to develop this research. In addition, researchers can go deeper and learn details about face detection and recognition system in this research.

Recommendations and Future Research
Scope While completing this research, some problem has been arisen and from that, future researchers might learn a lot and avoid the barriers. After that, researchers figured out some recommendations for future researchers-• Future researchers should learn deeply about R programming language and its components. • Future researchers should learn more about Machine learning and Artificial Intelligence. • Future researchers should learn more about how face detection and face recognition system work. • Future researchers should learn how to create an accurate prototype.
Sriman Mitra is a business graduate from United International University, Bangladesh, specialized in management information system. He is one of the founders and former president of UIU Management Information Systems Forum as well. During working in the forum, he has organized and attended many workshops and training session relating data and business analytics. He eagerly wants to apply abroad for higher studies in data science and business analytics field. Recently, he has worked on a Scopus indexed research paper about detecting facemask using python and AI tools. Therefore, he has further research interest in fields related with data analysis and visualization, machine learning, business analytics, AI.