## 2 Theory and Methods
### Model Improvements
#### 2.2.3 WIMIoU  
We combine the ideas of Wiselou, Innerlou, and MPDIoU to propose a new loss function that allows the improved model to obtain a lossless accuracy improvement, which we call WIMIoU. The derivation of this loss function is as follows:  
MPDIoU is defined as  
\[\text{MPDIoU}=\frac{B_{\text{gt}}\cap B_{\text{prd}}}{B_{\text{gt}}\cup B_{ \text{prd}}}-\frac{d_{1}^{2}}{w^{2}+h^{2}}-\frac{d_{2}^{2}}{w^{2}+h^{2}} \tag{1}\]  
\[d_{1}^{2}=\left(x_{1}^{\text{gt}}-x_{1}^{\text{prd}}\right)^{2}+\left(y_{1}^{ \text{gt}}-y_{1}^{\text{prd}}\right)^{2},d_{2}^{2}=\left(x_{\text{r}}^{\text{ gt}}-x_{\text{r}}^{\text{prd}}\right)^{2}+\left(y_{\text{b}}^{\text{gt}}-y_{ \text{b}}^{\text{prd}}\right)^{2} \tag{2}\]  
Figure 3: Structure of P2-LSDSBD. where \(B_{\text{\it{mid}}}\) and \(B_{\text{\it{gt}}}\) represent the prediction frame and target frame, respectively, and \(x_{1}^{\text{gt}},x_{x}^{\text{gt}},y_{t}^{\text{gt}},y_{b}^{\text{gt}},x_{1}^{ \text{prd}},x_{\text{\it{r}}}^{\text{prd}},y_{\text{\it{t}}}^{\text{prd}},J_{ \text{\it{b}}}^{\text{prd}},d_{1},d_{2}\) represent the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate of the target frame, the left horizontal coordinate, right horizontal coordinate, upper vertical coordinate, lower vertical coordinate of the prediction frame, the upper-left distance of the target frame and the prediction frame, and the lower-right distance of the prediction frame, respectively; \(w\) and \(h\) denote the width and the height of the input image, respectively. As illustrated in Equation (1), the first term corresponds to the standard IoU, which quantifies the overlap region between bounding boxes, while the subsequent terms penalize corner misalignments by normalizing positional deviations. This normalization mechanism harmonizes sensitivity across targets of varying scales. After defining the MDIIoU, its corresponding loss can be defined as follows:  
\[L_{\text{MPDIoU}}=1-\text{MPDIoU} \tag{3}\]  
The following obtains the matrix frame information that can encompass the entire target frame and the prediction frame:  
\[x_{\text{c}}^{\text{gt}}=\frac{x_{1}^{\text{gt}}+x_{\text{\it{r}}}^{\text{gt} }}{2},y_{\text{\it{c}}}^{\text{gt}}=\frac{y_{\text{\it{t}}}^{\text{gt}}+y_{ \text{\it{b}}}^{\text{gt}}}{2},x_{\text{c}}^{\text{prd}}=\frac{x_{1}^{\text{ prd}}+x_{\text{\it{r}}}^{\text{prd}}}{2},y_{\text{\it{c}}}^{\text{prd}}=\frac{y_{ \text{\it{t}}}^{\text{prd}}+y_{\text{\it{b}}}^{\text{prd}}}{2} \tag{4}\]  
\[w_{\text{gt}}=x_{\text{\it{r}}}^{\text{gt}}-x_{1}^{\text{gt}},h_{\text{gt}}= y_{\text{\it{t}}}^{\text{gt}}-y_{\text{\it{b}}}^{\text{gt}},w_{\text{prd}}=x_{ \text{\it{r}}}^{\text{prd}}-x_{1}^{\text{prd}},h_{\text{prd}}=y_{\text{\it{t}}} ^{\text{prd}}-y_{\text{\it{b}}}^{\text{prd}} \tag{5}\]  
where \(x_{\text{\it{c}}}^{\text{gt}},y_{\text{\it{c}}}^{\text{gt}},x_{\text{\it{c}}}^ {\text{prd}},y_{\text{\it{c}}}^{\text{prd}},w_{\text{gt}},h_{\text{\it{gt}}},w_ {\text{prd}},h_{\text{\it{prd}}}\) represent the center horizontal coordinate and center vertical coordinate of the target box, the center horizontal coordinate and center vertical coordinate of the prediction box, the width and height of the target box, and the width and height of the prediction box, respectively.