## 3 Proposed Three-Perspective Adaptive Paperless Online Cheating Detection System
### Cheating Tool Detection Model Based on Lightweight-YOLOv5-CA Network  
In paperless online exams, common cheating tools include books, paper, mobile phones, and people. Due to the significant differences in appearance characteristics of these tools from different perspectives, the proposed cheating tool detection model includes object detection models from two perspectives. These are the horizontal and the overhead perspective abnormal object detection model. The training dataset of the horizontal perspective abnormal object detection model includes books, paper, mobile phones, and people. The overhead perspective abnormal object detection model includes books, paper, and mobile phones.  
To achieve fast and accurate object detection, we propose a lightweight object detection network Lightweight-YOLOv5-Coordinate Attention (Lightweight-YOLOv5-CA) model based on Group Fast Spatial Pyramid Pooling (GFSPP). As shown in Figure 5, Coordinate Attention (CA) [38] and GFSPP are introduced successively at the end of the YOLOv5  
Figure 4: Structure of gaze direction recognition network based on Swin Transformer.  
Figure 3: Examples of gaze directions from face perspective.  
backbone network to expand the receptive field while reducing computation and parameter volume and improving the representation ability of network features. Due to the small size and partial occlusion of the object in cheating tools such as paper and mobile phones, missed and false detection can easily occur. The CA mechanism can improve the representation ability of network features by using the importance of position information. The optimization process is as follows.  
Given feature X, the pooling kernels (\(H\), 1) and (1, \(W\)) are used to obtain horizontal and vertical direction features of channel \(C\), as shown in Formulas (1) and (2),  
\[z_{c}^{h}(h)=\frac{1}{W}\sum_{0\leq i<W}x_{c}(h,i) \tag{1}\]  
\[z_{c}^{w}(w)=\frac{1}{H}\sum_{0\leq i<H}x_{c}(j,w). \tag{2}\]  
Figure 5: Structure of Lightweight-YOLOv5-CA network.  
The features in the two directions are concatenated, and \(1\times 1\) convolution is performed again to obtain the intermediate features, as shown in Formula (3),  
\[f=\delta(F_{1}([z^{h},z^{w}])), \tag{3}\]  
where \(r\) is a reduction factor, and \(\delta\) is a nonlinear activation function. Then, the feature map \(f\) is segmented, and the channels are expanded to obtain the attention weights, as shown in Formulas (4) and (5),  
\[g^{h}=\sigma(F_{h}(f^{h})), \tag{4}\]  
\[g^{w}=\sigma(F_{w}(f^{w})). \tag{5}\]  
The output of the CA model is obtained, as shown in Formula (6),  
\[y_{c}(i,j)=x_{c}(i,j)\times g_{c}^{h}(i)\times g_{c}^{w}(j). \tag{6}\]  
The proposed GFSPP combines the ideas of CSPNet [39] and grouped convolution [40] based on multi-scale pooling structure Spatial Pyramid Pooling Fast (SPPF), which is beneficial for the extraction of the feature information of object details while reducing the computational complexity and parameter volume of the convolution process, as shown in Figure 5.  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Network Output**} & \multicolumn{2}{c}{**Definition of Candidate’s Behavior**} \\ \cline{2-3}  & \multicolumn{2}{c}{**Gaze Direction**} & **Cheating Tools** \\ \hline Y1 (cheating) & Horizontal perspective (upleft/up/upright) & People and paper \\ Y2 (cheating) & Horizontal perspective (upleft/up/upright) & People and book \\ Y3 (cheating) & Horizontal perspective (upleft/up/upright) & People and phone \\ Y4 (normal) & Left/right/downleft/down/downright/center/up/upleft/upright & No \\ \hline \hline \end{tabular}
\end{table}
Table 2: Output of horizontal perspective cheating behavior determination network.  
Figure 6: Cheating behavior determination model from different perspectives based on BP neural network.