# An Evaluation of Image Slicing and YOLO Architectures for Object Detection in UAV Images
## 3 Materials and Methods
### ISA Algorithm  
Object detection algorithms have a fixed input size during training and inference. This requires resizing the images when the image resolution is larger than the input size of the model. However, resizing images results in significant pixel losses [5]. With pixel loss comes the risk of losing critical features of the objects. This poses a challenge for object detection algorithms to learn objects accurately and effectively. Techniques such as random cropping or scaling attempt to improve the model's performance by increasing the dataset's size. However, with existing cropping methods, the objects in the image may need to be cropped appropriately, which may cause the models to learn incorrectly. Therefore, using such techniques can negatively affect the accuracy of object detection, even though it increases the data size. ISA is designed to solve pixel loss problems and improve object detection accuracy [5]. The ISA algorithm has a dynamic slicing dimension structure and a sliding and overlapping structure. Slicing is based on the dimensions of the original image and the slicing dimensions required by the model. The overlap ratio used during slicing is automatically adjusted according to the width and height dimensions of the image and the slicing size [5]. Each image is broken into overlapping fragments, as shown by Figure 3.  
In this study, the effect of slicing dimensions on object detection when applying ISA is investigated. Slicing sizes of 512, 640, and 1280 were applied to the images. Overlap rates vary according to the slicing size. This directly affects the cropping structure of the objects corresponding to the edge points in the slicing step. At the same time, an excessively high overlap rate causes an object in the same image to appear in multiple images. Having too many of the same images in the datasets poses the risk of model memorization. Determining the optimum slicing size by analyzing all these conditions is a very important issue for the data preprocessing step. When cropping an image of size \(I\times I\) to size \(C\times C\), we calculate the number of patches needed across the width and height of the image using Equations (1) and (2):  
\[n_{w}=\left\lceil\frac{I}{C}\right\rceil \tag{1}\]  
\[n_{h}=\left\lceil\frac{I}{C}\right\rceil \tag{2}\]  
Here, \(n_{w}\) and \(n_{h}\) represent the number of patches along the width and height, respectively. Figure 2: Some samples from the experimental dataset. Next, we calculate the padding required along the width and height to ensure the image can be evenly divided into patches of size \(C\times C\). The padding calculations are given in Equations (3) and (4):  
\[p_{w}=n_{w}\cdot C-I \tag{3}\]  
\[p_{h}=n_{h}\cdot C-I \tag{4}\]  
The padded image dimensions are then computed as given in Equations (5) and (6):  
\[W_{p}=I+p_{w} \tag{5}\]  
\[H_{p}=I+p_{h} \tag{6}\]  
These equations ensure that the original image dimensions \(I\times I\) are expanded to the padded dimensions \(W_{p}\times H_{p}\), dividing the image into patches of size \(C\times C\) without losing any object labels at the edges. This approach helps to maintain the integrity of the labeled objects in the training data and ultimately improves the performance of the object detection model. The overall resolution of the images that make up the dataset is 2720 \(\times\) 1530. Table 2 shows the number of new images and overlap rates obtained from a sample image according to 512, 640, and 1280 slicing sizes. As shown in Table 2, each slicing size has different image counts and overlap amounts. This directly affects the labeling of objects in the images. This study analyzes the results of three different slicing sizes, which are usually used as input-output sizes in object detection