# An Optimized CNN Model for Engagement Recognition in an E-Learning Environment
## 1 Introduction  
The pandemic that has gripped the world for more than two years has significantly impacted the education sector. Online video-based teaching that was introduced during the pandemic has become more and more common. The influence of online education on learning efficiency has become an important question worth exploring, because many real-life conditions restrict online teaching when compared with traditional face-to-face education. Therefore, to understand the effects of online education on learning in detail, detecting and obtaining learners' engagement is quite essential for subsequent studies. Since learner engagement has always been a key topic in the field of education, some studies have indicated that learner engagement can be improved through appropriate instructional interventions, good study design and instant feedback [1]. To measure the engagement of learners, the human face is one of the starting points. Facial expression are a very common, natural and universal way for humans to express their emotions. Earlier face-recognition methods use a face dataset to recognize one or more faces in a scene through static images. With improvements in camera performance and cost reduction in this technology in recent years, face recognition is widely used in games, mobile payments, video surveillance and many other areas. Consequently, a large amount of video data is generated, and the demand for processing faces in the video format is on the rise. At the end of the last century and the beginning of this century, mainly traditional algorithms and machine learning algorithms were used for facial recognition. Common examples are Eigenfaces [2], Fisherfaces [3], Bayesian face [4], support vector machine(SVM) [5], Boosting [6] and Metaface [7]. However, facial recognition systems that are based on these algorithms work well only when they operate in a relatively controlled environment [8]. As more variables are introduced in the video streaming data, such as resolution, motion blur and illumination, the technical challenges increase. Around 2010, thanks to the rapid development of GPU performance and the fast growth in the number of real-world datasets, researchers gradually began to use deep learning methods for facial recognition. The most classic and popular example of this is the use of convolutional neural networks (CNNs) [9]. Other instances are long short-term memory (LSTM) [10], recurrent neural networks (RNNs) [11], 3D convolutions (C3 Ds) [12] and so on. The results show that deep learning algorithms have achieved better recognition accuracy and greatly surpassed methods based on traditional machine learning [13]. Deep learning is a machine-learning technique used to build and simulate the ways the human brain analyzes, learns and interprets data. Deep learning uses a multi-layer network called a neural network, which is inspired by the human brain. It iteratively analyzes the data layer-by-layer and continuously extracts features to obtain the essential characteristics of the original data. When compared to traditional classification methods, deep learning shows better results solving classification problems. The most-notable applications of deep learning are computer vision and natural language processing [14,15]. In recent years, there have been many novel neural network structural models applied in various fields of computer vision [16,17]. However, there are limited studies and applications of engagement recognition based on videos in an e-learning environment. Sometimes, students prefer distance education to be carried out on a mobile terminal or a device with limited memory. Therefore, a real-time engagement-recognition model needs to consider speed and delay in particular. Although a typical neural network structure such as VGGNet [18] can have better performance of engagement recognition, it brings efficiency problems. This study proposes a lightweight CNN model with acceptable accuracy to detect student engagement in an online-education environment.