## 2 Suggested Techniques
### Bounding Box
#### 2.1.2 Merging and Expanding Bounding Boxes
Finally, as a condition for ending the merge and expand phase, the BB List information is checked to determine whether the iteration should continue or end. The behavior for merging and expanding BBs is shown in Algorithm 1. The hyperparameter definitions used in this algorithm are tabulated in Section 4. ```
Input: Bounding Box set \(BB=\{bb_{1},...,bb_{t}\}\), m_factor \(\alpha\), IoU Threshold \(\tau_{threshold}\), max_factor \(S_{max}=(W_{max},H_{max})\) Output: updated Bounding Box set \(BB^{*}=\{bb_{1},...,bb_{t^{*}}\}\), doRepeat \(\leftarrow\) False; IoU \(\leftarrow\) getIoU(\(BB\)); \(BBSizeCheck\leftarrow\{i|BB_{i,w}<W_{max}\mathbf{a}\mathbf{a}\mathbf{b}B_{i,h}<H_{max},i=1,2,...,t\}\); mergedBBIdx \(\leftarrow\) {}; Initialize BB^{*}\); foriter \(\leftarrow\) 1 to \(|BB|\)do if\(BB_{iter,w}<W_{max}\)and\(BB_{iter,h}<H_{max}\)then doRepeat \(\leftarrow\) True; \(I=\{i|IoU_{iter,i}>\tau_{threshold},i=1,2,...,t\}\); \(BBMergeCheck\gets BBSizeCheck\cap I\); if\(iter\
otin mergedBBIIdx\)and\(0<|BBMergeCheck|\)then \(BBMergeCheck_{iter}\leftarrow\) True; \(mergedBBIIdx\gets mergedBBIIdx\cup BBMergeCheck\); \(l_{new}\gets min\{BB_{i,}|BBMergeCheck_{i}=True,i=1,2,...,t\}\); \(m_{new}\gets min\{BB_{i,m}|BBMergeCheck_{i}=True,i=1,2,...,t\}\); \(w_{new}\gets max\{BB_{i,l}+BB_{i,w}|BBMergeCheck_{i}=True,i=1,2,...,t\}\); \(h_{new}\leftarrow max\{BB_{i,m}+BB_{i,h}|BBMergeCheck_{i}=True,i=1,2,...,t\}\); \(D_{new}\leftarrow\{D_{i}^{\prime}|BBMergeCheck_{i}=True,i=1,2,...,t\}\); \(BB^{*}\gets BB^{*}\cup\{(l_{new},m_{new},w_{new}-l_{new},h_{new}-m_{new},D_{new}^{\prime})\}\); else if\(|BBMergeCheck|<0\)then \(mergedBBIIdx\gets mergedBBIIdx\cup(iter\)); \(w_{new}\gets\alpha BB_{iter,w}\); \(h_{new}\gets\alpha BB_{iter,h}\); \(l_{new}\gets BB_{iter,1}+\frac{BB_{iter,w}-w_{new}}{2}\); \(m_{new}\gets BB_{iter,m}+\frac{BB_{iter,h}-h_{new}}{2}\); \(BB^{*}\gets BB^{*}\cup\{(l_{new},m_{new},w_{new},h_{new},D_{new}^{\prime})\}\);  end if  end if \(BB^{*}\gets BB^{*}\cup\{BB_{i}|i\
otin BBSSizeCheck,i=1,2,...,t\}\); End
```  
**Algorithm 1****Combination bounding box Algorithm**  
```
Input: Bounding Box set \(BB=\{bb_{1},...,bb_{t}\}\), m_factor \(\alpha\), IoU Threshold \(\tau_{threshold}\), max_factor \(S_{max}=(W_{max},H_{max})\), max_factor \(S_{max}=(W_{max},H_{max})\) Output: updated Bounding Box set \(BB^{*}=\{bb_{1},...,bb_{t^{*}}\}\), doRepeat \(\leftarrow\) False; IoU \(\leftarrow\) getIoU(\(BB\)); \(BBSizeCheck\leftarrow\{i|BB



### Cell Division

After the BBs are combined and extended, a grouping operation is required to show their proximity to each other in a clustered form. To do this, neighboring BBs are clustered into cells, and each cell lays the foundation for the generation of path information. YOLO's grid cell refers to a box that predefines the shape and size of the predicted BBs. We initially represented the entire coordinate plane of the data points as a single cell, and then divide the cell into sub-cells for clustering the BBs. In other words, we used cell for clustering BBs. Let \(C=\{c_{1},\ldots,c_{r}\}\) be a cell, and for each state j, denote the cell information by \(c_{j}=\left(l_{j},m_{j},w_{j},h_{j}\right)\). The minimum size of the cell is called min_factor and is represented by \(S_{min}=\left(W_{min},H_{min}\right)\). Let \(W_{min}\) be the minimum width and \(H_{min}\) the minimum height of the cell. The variable for limiting the number of BBs per direction within a cell is max_overlap_factor, letting \(\beta\) be the number of BBs. This allows the initialization of the first cell to be \(C=\{c_{1}\}\) and c1 to be equal to Equation (5). \[c_{1}=\left(min(Y_{:,j}),min(Y_{:,m}),max(Y_{:,l})-min(Y_{:,l}),max(Y_{:,m})- min(Y_{:,m}),BB\right) \tag{5}\]

Cells are used to cluster BBs because BBs have overlapping regions in neighboring cells or the IoU value between BBs is 0. In other words, if BBs are independent and not overlapping, it is difficult to generate adjacency information between BBs based on BBs alone.