## 4 Methods and Experiment
### Keyframe Extraction
Xn means that the same block is repeated n-time. Figure 7: Pretrained architecture for feature extraction from the keyframe augmentation. Xn means that the same block is repeated n-time. from 1000 object classes [40]. According to [PERSON] and [PERSON] (2019) [42], EfficientNet models outperform other CNN models in terms of accuracy while being faster and smaller. The EfficientNet-B7 module performed feature extraction with the transfer learning technique. Each input keyframe with dimensions of 224 \(\times\) 224 \(\times\) 3 is processed through a stack of 810 layers, without fully connected layers, responsible for making the final classification predictions for feature extraction. EfficientNet generates an output of feature descriptors with 2560 dimensions for each keyframe. These feature descriptors are input to the BiLSTM model for video representation and classification. EfficientNet-B7 is a pretrained model that is good at extracting features from optical flow keyframes, which contain information about the student's movements. It is a relatively efficient model, which means that it can extract features from optical flow keyframes quickly and without using a lot of resources. This pretrained model is also the strongest for extracting the features, even with a few color differences [43]. We apply this pretrained model to extract the features from the optical flow keyframe [44]. The architecture of the feature extraction model for optical flow is shown in Figure 9.

### BiLSTM-AT Deep Neural Network

RNNs are effective at modeling sequential patterns in time-series data such as video clips. However, the vanishing gradient problem can hinder RNN training. To overcome this issue, two RNN variations have been introduced: long short-term memory (LSTM) and gated recurrent units. The LSTM network has the same structure as RNNs but with an additional \"memory cell\" unit that maintains information for longer periods, helping to overcome the vanishing gradient problem. LSTM networks are used in a variety of applications, including video classification. However, LSTMs have a limitation in that they only capture past context. To fully understand any video, it is essential to consider both past and future contexts. Thus, bidirectional LSTMs (BiLSTMs) are a better option for video classification. BiLSTMs preserve information in both directions, allowing them to learn long-term dependencies in the data more effectively [45,46]. The BiLSTM model is highly efficient and more powerful when integrated with an attention mechanism for video classification tasks [47]. The BiLSTM model consists of two hidden layers: the forward hidden layer \(\left(h_{t}^{f}\right)\) and the backward hidden layer \(\left(h_{t}^{b}\right)\). The forward hidden layer processes the input vector \(x_{t}\) in ascending order, with \(t\) values ranging from 1 to \(T\). Conversely, the backward hidden layer processes the input vector in descending order, with \(t\) values ranging from \(T\) to 1. The output \(y_{t}\) is generated by combining the results of \(h_{t}^{f}\) and \(h_{t}^{b}\). Our work employs the BiLSTM-AT network, which comprises two modules: the BiLSTM and the attention mechanism. This network combines the current target forward \(h_{t}^{f}\) and backward \(h_{t}^{b}\) hidden layer with the context vector \(C_{t}\) to generate an attention vector output for classifying student behavior. The structure of BiLSTM-AT is illustrated in Figure 4:0

We implement the BiLSTM-AT model to classify student behavior [47]. After preprocessing the video to extract keyframes, we employ feature fusion to concatenate the keyframe extraction features from Inception-V3, ResNet50-V2, VGG-16, and EfficientNet-B7 to create a fused feature vector, denoted by \(X_{F}=\left[F_{inception},\ F_{resnet},F_{vgg},\ F_{efficientnet}\right]\) for frame \(F\). The sequence of feature vectors \(X=\left[X_{1},X_{2},X_{3},\ldots,X_{max\_sequence}\right]\), represented by the vector \(X_{max\_sequence}\), denote the length of a keyframe in each video clip.