# Influence of Training Parameters on Real-Time Similar Object Detection Using YOLOv5s
## 4 Experimental Investigation
### The Results of Experiments  
Similarly, as in any phase of the training model, many parameters could influence the quality of the model. Therefore, finding the best parameters takes a lot of time and resources. YOLOv5s contains 28 hyperparameters that can be used in the training process. In this experimental investigation, the same hyperparameters as in the related work have been used, which have been obtained using the COCO dataset. In primary research, the influence of the batch size (16, 32, 64, 128), image size (320, 640, 1280), iteration (100, 300, 600), and color has been investigated. To improve the accuracy of the model, mosaic augmentation of the dataset has also been used. To train the YOLOv5s model, the _Google Colab Pro_ (GPU: Tesla P100 16 GB, RAM: 24 GB, CPUs: 2 \(\times\) vCPU) has been used. The results of the primary research using 117 color images are presented in Figure 6 and Table 1. As we can see, the highest accuracy for all models is equal to 0.9950. The lowest accuracy has been obtained when the iteration number is equal to 100. Figure 5: Example of a test dataset. Figure 6: Accuracy results of the model trained on 117 color images of 16 classes. All models have been tested in real-time object detection and divided into models trained in color and greyscale images. In total, 21 images have been fed to the models, which contain a total of 113 construction details in the images. As we can see in Table 1, when the resolution of the training images is equal to 320, the best recognition ratio (0.6637) has been obtained using batch size 32, and the iteration number is equal to 300. Using the same image resolution, the recognition ratio (0.6106) is high when the batch size is equal to 16 and the iteration number is equal to 300, and also, respectively, when the batch size is equal to 16 and the iteration number is equal to 600. The worst results have been obtained when the iteration number is equal to 100 and with any batch size chosen. In this case, some models do not recognize either of the construction details. Therefore, in other models, training with higher image resolution and experimental investigation have not been performed using this iteration number. The models trained using the images with resolutions equal to 640, the best recognition ratio (0.6106) has been obtained when the batch size is equal to 16 and iteration number is equal to 300. In other cases, the results of the recognition ratio are slightly lower (the highest recognition ratio is equal to 0.5221). When the image resolution is set to 1280, the results of the overall recognition ratio are far from the results with a smaller image resolution. It should be mentioned that in some cases, when the batch size has been selected to 64 or 128 and the image resolution is high, experiments have not been performed because of the limitation of the environment. The results of primary research using 117 greyscale images are presented in Figure 7 and Table 2. As for models trained on color images, the lowest accuracy has been obtained when the iteration number is equal to 100. Higher accuracy (0.9950) was obtained when the number of iterations increased.