## 4 Methods and Experiment
### Keyframe Extraction
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layers** & **Type** & **Output Shape** & **Parameters** \\ \hline Layer 1 & Multiple Pretrained Models & (10 \(\times\) 224 \(\times\) 224 \(\times\) 3) & 124,179,959 \\ Layer 2 & Input 1 & (None, 10, 7168) & 0 \\ Layer 3 & Input 2 & (None, 10) & 0 \\ Layer 4 & BiLSTM (unit = 512) & (None, 10, 512) & 15,206,400 \\ Layer 5 & Attention & (None, 10, 512) & 1 \\ Layer 6 & Multiply & (None, 10, 512) & 0 \\ Layer 7 & GlobAveragePooling1D & (None, 512) & 0 \\ Layer 8 & Dropout 1 (value = 0.3) & (None, 512) & 0 \\ Layer 9 & Reshape & (None, 1, 512) & 0 \\ Layer 10 & BiLSTM (unit = 256) & (None, 256) & 656,384 \\ Layer 11 & Dropout 2 (value = 0.3) & (None, 256) & 0 \\ Layer 12 & Dense 1 & (None, 64) & 16,448 \\ Layer 13 & Dropout 3 (value = 0.3) & (None, 64) & 0 \\ Layer 14 & Dense 2 & (None, 5) & 325 \\ \hline \hline \end{tabular} \begin{tabular}{c} Total parameters: (15,879,558) \\ Trainable parameters: (15,879,558) \\ Non-trainable parameters: (0) \\ \end{tabular} \begin{tabular}{c} Activation function (ReLU, softmax) \\ \end{tabular} \begin{tabular}{c} Loss function (sparse categorical cross-entropy) \\ \end{tabular} \begin{tabular}{c} Optimizer (Adam) \\ \end{tabular} \begin{tabular}{c} Epochs (50) \\ \end{tabular} \
\begin{tabular}{c} Batch-Size (64) \\ \end{tabular}
\begin{tabular}{c} Learning rate (0.001) \\ \end{tabular}
\end{table} 
Table 1: The layer configuration of the proposed BiLSTM-AT model for student behavior classification. measures the proportion of correctly identified real positive samples. FN indicates false-negative counts. Accuracy is determined by comparing the number of correct predictions for each class with the total number of predictions for all classes and is expressed as a ratio. The formulae for calculation are [48]:

\[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{8}\]

\[\text{Recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{9}\]

\[\text{F1 Score}=2\frac{\text{Precision}\times\text{Recall}}{\text{Precision}+ \text{Recall}} \tag{10}\]

\[\text{Accuracy}=\frac{\text{Number of correct classifications}}{\text{Total number of classifications attempted}} \tag{11}\]

## 5 Results and Discussion

In this section, we analyze the accuracy of the single-pretrained and multiple-pretrained models with keyframe selection methods and use the BiLSTM-AT to classify the students' behavior. Furthermore, the performance of our overall framework has been evaluated with a large dataset consisting of the HMDB51 [49] and UCF101 [50] public datasets. The results of the single-pretrained model and the multiple-pretrained models are described in Sections 5.1 and 5.2. Finally, the performance evaluation with a large dataset is explained in Section 5.3. A summary of the discussion results is presented in Section 5.4. ### Single Pretrained Model Results with BiLSTM-AT

The BiLSTM-AT network, without the keyframe selection and using single pretrained models, was used for feature extraction; we call this model \"S-BiLSTM-AT.\" The models were compared with Inception-V3, ResNet50-V2, VGG-16, and EfficientNet-B7. The VGG-16 pretrained model has a higher accuracy than the other single pretrained models with different parameters, with an accuracy of 88.89%. However, the single pretrained model cannot obtain the necessary features to identify a similar activity and classify the students' behavior, which is a complex task with our dataset. Nevertheless, the results show that all four models achieve relatively high accuracy, precision, recall, and F1 scores. This suggests that all four models are effective at student behavior recognition, but VGG-16 with BiLSTM-AT is the most effective. The results are displayed in Table 2.

We conducted experiments using BiLSTM-AT with different pretrained models. Specifically, we used two, three, and four pretrained models. The two pretrained models were Inception-V3 and ResNet50-V2. The three pretrained models were Inception-V3, ResNet50-V2, and VGG-16.