# An Evaluation of Image Slicing and YOLO Architectures for Object Detection in UAV Images
## 5 Results and Discussion  
Datasets containing many images of complex scenes with various object categories are frequently used in object detection studies. Training and tests were implemented using a 12 th generation Intel i9 processor, RTX 3090 TI Graphics Processing Unit (GPU), and the Python programming language. The class imbalance problem occurs when classes with fewer samples are learned less effectively than those with many samples, causing an overfitting problem in training deep learning models. To achieve better results requires careful data preparation, model selection, and hyperparameter selection [27]. In this study, we trained a model to detect objects in four classes using a collected dataset. The ISA method was applied as preprocessing in model training. YOLOv7x, YOLOv8x, and YOLOv9-e versions of the YOLO algorithm were analyzed as object detection algorithms. For the crop size optimization in the ISA method, three different crop sizes were determined, and the ISA method was applied separately to the dataset according to the determined crop sizes. The images obtained from three different crop sizes were analyzed separately in the three architectures of the YOLO algorithm. The experimental results revealed that the most suitable slicing size for the ISA method, which is the data preprocessing step, is 1280. The AP values of the object classes are shown in Table 4. The performance of YOLO models, such as YOLOv7, YOLOv8, and YOLOv9, largely depends on the characteristics of the dataset used. In the experiments, the YOLOv7 architecture has generally achieved better results than other architectures. The tests were conducted using a dataset of 20,000 images collected from UAVs. The increase in the slicing size and the decrease in the fragmentation rate of the labels at the overlap points enabled the models to learn about small objects, such as humans, better. The increased overlap reduced the probability of losing objects in the images, allowing the models to improve their object recognition capabilities. Improving the average precision (AP) metric is necessary for detecting small objects in high-resolution images. The FPS values obtained for different architectures of YOLO in the tests performed with the weights obtained from the training with different slice sizes are shown in Table 5. The FPS value is a determining metric for how efficient the models will be in real-time studies. The results show that while increasing the image size reduces the model performance in terms of FPS, it increases the mAP value. A confusion matrix can be used to evaluate the performance of the trained model after testing using test data. The performance of the classification model is summarized in a confusion matrix table. The table contains the predicted and actual class assignments and \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**YOLOv7**} & \multicolumn{3}{c}{**YOLOv8**} & \multicolumn{3}{c}{**YOLOv9**} \\ \hline
**Slicing Size** & **512** & **640** & **1280** & **512** & **640** & **1280** & **512** & **640** & **1280** \\ Vehicle & 82.0 & 85.5 & 93.5 & 56.1 & 62.8 & 56.9 & 83.4 & 67.0 & 94.4 \\ People & 22.2 & 40.9 & 68.1 & 09.4 & 13.5 & 16.1 & 28.4 & 15.6 & 66.0 \\ UAP & 95.5 & 84.7 & 91.7 & 07.4 & 25.6 & 37.3 & 29.3 & 28.0 & 91.2 \\ UAI & 99.2 & 99.4 & 99.3 & 97.2 & 91.4 & 93.4 & 99.4 & 97.2 & 99.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The average precision (AP) values for the classes using the test dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Slicing Size** & **YOLOv7** & **YOLOv8** & **YOLOv9** \\ \hline
**512** & 105.05 & 98.97 & 101.65 \\
**640** & 80.07 & 81.46 & 79.43 \\
**1280** & 28.70 & 23.16 & 26.74 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: FPS values obtained by models trained according to slice sizes. the proportion of correct and incorrect predictions for each class. This study obtained the best performance for training on the ISA and YOLOv7x model implemented with a crop size of 1280.