## 2 Materials and Methods
### Object Detection Algorithm
#### 2.2.3 Ota  
In the YOLO series of models, label assignment refers to the process of allocating each ground truth box (\(Gt\)) to the anchor box (_Anchor_) that best matches it. During the label assignment phase in YOLOv5, the intersection over union (_IO_U) metric is used to measure the degree of overlap between the anchor boxes and the actual bounding boxes. The formula for calculating _IO_U is as follows:  
\[IOU=\frac{Anchor\cap Gt}{Anchor\cup Gt} \tag{1}\]  
The label assignment in YOLOv5 involves determining if the _IO_U value exceeds a predefined threshold. This process identifies the anchor box that best matches the current ground truth box, designating it as the reference anchor box for label assignment. Although this principle is straightforward and efficient, it relies solely on the distance relationship between the anchor box and the ground truth box, specifically the overlapping ratio. This singular metric can lead to misjudgments in cases of overlapping and occluded targets. Additionally, for smaller objects, the lower _IO_U values may result in failure to assign the correct label to the corresponding anchor box. To address the aforementioned challenges, we have incorporated the optimal transport (OT) problem into the label assignment process of object detection algorithms. The OT problem involves a scenario with \(m\) goods suppliers and \(n\) goods recipients. Each supplier \(i\) possesses \(s_{i}\) units of goods, while each recipient \(j\) requires \(d_{j}\) units. The transportation cost per unit of goods from supplier \(i\) to recipient \(j\) is denoted as \(c_{ij}\). The crux of this problem is to devise a transportation plan \(\pi^{*}=\left\{\pi_{ij}\middle|i=1,2,\ldots m,j=1,2,\ldots n\right\}\) such that goods from all suppliers are transported to all recipients at the lowest possible cost. The mathematical expression for this problem is as follows:  
\[ \begin{array}{l}\min\limits_{\pi}\sum\limits_{i=1}^{m}\sum\limits_{j=1}^{n}c _{ij}\pi_{ij}.\\ s.t.\sum\limits_{i=1}^{m}\pi_{ij}=d_{j},\quad\sum\limits_{j=1}^{n}\pi_{ij}=s_{ i},\\ \sum\limits_{i=1}^{m}s_{i}=\sum\limits_{j=1}^{n}d_{j},\\ \pi_{ij}\geq 0,i=1,2,\ldots m,j=1,2,\ldots n.\end{array}  \tag{2}\]  
Figure 5: GSConv module structure. In the context of a high-speed highway image requiring detection, let us consider a scenario with \(m\) ground truth boxes and \(n\) anchor boxes. Each ground truth box is conceptualized as a supplier possessing \(k\) positive labels, while each anchor box is viewed as a demander in need of one label. The transportation cost \(c^{/g}\) for transferring a positive label from a ground truth box to an anchor box is defined as the weighted sum of their classification and regression losses. The formula for this cost is expressed as follows:  
\[c_{ij}^{fg}=L_{cls}\Big{(}P_{j}^{cls}(\theta),G_{i}^{cls}\Big{)}+\alpha L_{ reg}\Big{(}P_{j}^{box}(\theta),G_{i}^{box}\Big{)} \tag{3}\]  
In Formula (3), \(1\leq i\leq h\), \(1\leq j\leq h\), \(\theta\) is the model parameter, \(P_{j}^{cls}(\theta)\) and \(P_{j}^{box}(\theta)\), respectively, represent the prediction score and bounding box of the anchor box \(a_{j}\) classification, \(G_{i}^{cls}\) and \(G_{i}^{box}\), respectively, represent the real box \(gt_{i}\) category and bounding box, \(L_{cls}\) represents cross entropy loss and IOU loss, and \(\alpha\) is the balance coefficient. In the task of detecting abnormal conditions on high-speed road surfaces, a critical aspect involves not only utilizing some anchor boxes as positive samples but also designating others as negative samples. To effectively manage this, the concept of 'background' is introduced as an additional supplier, exclusively tasked with providing negative labels. The calculation method for the transportation cost \(c_{j}^{bg}\) of conveying a negative label from the background to a specific anchor box \(a_{j}\) is as follows:  
\[c_{j}^{bg}=L_{cls}\Big{(}P_{j}^{cls}(\theta),\O\Big{)} \tag{4}\]  
In Formula (4), the \(\O\) represents the background class.