## 3 Methodologies
### Improved Student Object Detection Algorithm Based on YOLOv8
#### 3.1.3 Wise-IoU  
The default CIoU loss function utilized in YOLOv8 is optimized for the bounding box overlap, centroid distance, and aspect ratio. However, it exhibits limitations in handling both high- and low-quality samples, particularly when the sample distribution is imbalanced. To mitigate this issue, the present paper proposes substituting CIoU with the WIoUv3 loss function [27]. The WIoU (Wise-IoU) family includes WIoUv1, WIoUv2, and WIoUv3 versions, each tailored to optimize the performance across different scenarios. WIoUv1 effectively differentiates between high-quality and low-quality samples by incorporating distance attention. This approach mitigates the over-penalization of low-quality samples and enhances the generalization ability. The expression for WIoUv1 is presented in Equations (2) and (3). \[L_{WIoUv1}=R_{WIoU}L_{IoU} \tag{2}\]  
\[R_{WIoU}=\exp\left(\frac{\left(x-x_{gt}\right)^{2}+\left(y-y_{gt}\right)^{2}}{ \left(W_{g}^{2}+H_{g}^{2}\right)^{*}}\right) \tag{3}\]  
This will significantly enhance the \(L_{IoU}\) of normal-quality anchor frames when \(R_{WIoU}\in[1,\ \ \text{e}]\). It is important to note that \(L_{IoU}\) lies between [0, 1] when the anchor frame exhibits substantial overlap with the target frame. This situation markedly reduces the L\({}_{IoU}\) for high-quality anchor frames, leading to concerns regarding the distance between their centroids. Here, \(W_{g}\) and \(H_{g}\) represent the dimensions of the smallest external frame (Figure 3). WIoUv2, conversely, enhances the model's emphasis on challenging samples by introducing monotonic focusing coefficients. This approach also addresses the issue of slower convergence during the later stages of training, as illustrated in Equation (4). \[L_{WIoUv2}=L_{IoU}^{\gamma*}L_{WIoUv1},\ \ \gamma>0 \tag{4}\] \begin{table}
\begin{tabular}{c c c c c} \hline
**No** & **From** & **N** & **Params** & **Module** & **Arguments** \\ \hline
0 & \(-1\) & 1 & 2320 & Conv & [3, 80, 32] \\
1 & \(-1\) & 1 & 115,520 & Conv & [80, 160, 3, 2] \\
2 & \(-1\) & 3 & 436,800 & C2f & [160, 160, 3, True] \\
3 & \(-1\) & 1 & 461,440 & Conv & [160, 320, 3, 2] \\
4 & \(-1\) & 6 & 3,281,920 & C2f & [320, 320, 6, True] \\
5 & \(-1\) & 1 & 1,844,480 & Conv & [320, 640, 3, 2] \\
6 & \(-1\) & 6 & 9,509,760 (Reduced by 27\%) & C2f\_MCC & [640, 640, 6, True] \\
7 & \(-1\) & 1 & 3,687,680 & Conv & [640, 640, 3, 2] \\
8 & \(-1\) & 3 & 5,165,760 (Reduced by 26\%) & C2f\_MCC & [640, 640, 3, True] \\
9 & \(-1\) & 1 & 1,025,920 & SPPF & [640, 640, 5] \\
10 & \(-1\) & 1 & 0 & Upsample & [None, 2, ’nearest’] \\
11 & \([-1,6]\) & 1 & 0 & Concat & [1] \\
12 & \(-1\) & 3 & 5,575,360 (Reduced by 24\%) & C2f\_MCC & [1280, 640, 3] \\
13 & \(-1\) & 1 & 0 & Upsample & [None, 2, ’nearest’] \\
14 & \([-1,4]\) & 1 & 0 & Concat & [1] \\
15 & \(-1\) & 3 & 1,948,800 & C2f & [960, 320, 3] \\
16 & \(-1\) & 1 & 922,240 & Conv & [320, 320, 3, 2] \\
17 & \([-1,12]\) & 1 & 0 & Concat & [1] \\
18 & \(-1\) & 3 & 5,370,560 (Reduced by 25\%) & C2f\_MCC & [960, 640, 3] \\
19 & \(-1\) & 1 & 3,687,680 & Conv & [640, 640, 3, 2] \\
20 & \([-1,9]\) & 1 & 0 & Concat & [1] \\
21 & \(-1\) & 3 & 5,575,360 (Reduced by 24\%) & C2f\_MCC & [1280, 640, 3] \\
22 & \([15,18,\) & & 8,795,008 & Detect & [80, [320, 640, 640]] \\ \hline \end{tabular}
\end{table} 
Table 2: Parameters of YOLOv8 model with replaced C2f module. Due to the incorporation of the focusing coefficients, the gradient of the WIouv2 backpropagation is also modified, as illustrated in Equation (5). \[\frac{\partial L_{\text{WIouV2}}}{\partial L_{\text{IoU}}}=L_{\text{IoU}}^{\gamma* }\frac{\partial L_{\text{WIouV1}}}{\partial L_{\text{IoU}}},\ \ \gamma>0 \tag{5}\]  
As the reduction in L\({}_{\text{IoU}}\) leads to a corresponding decrease in the gradient gain \(r=L_{\text{IoU}}^{\gamma*}\in\ [0,\,1]\), the convergence rate slows down during the later stages of training. To address this issue, we introduce the mean value of \(L_{\text{IoU}}\) as a normalization factor, as illustrated in Equation (6).