# The Efficiency of YOLOv5 Models in the Detection of Similar Construction Details
## 3 Experimental Investigation
### Results of the Primary Research
To find the best parameter combination, the 50 models have been evaluated using 3300 images. The experiments have been named according to the parameters used in the training process. For example, the name of the model _Yolov5s_320_16_300_DefAugm_ means that the YOLOv5s model has been used and that the parameters are as follows: image \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Name of the Parameter** &
\begin{tabular}{c} **Value of the** \\ **Parameters** \\ \end{tabular} & \multicolumn{1}{c}{**Comment**} \\ \hline Epoch number & 300, 600 & \\ \hline Image size & 320, 640 (pixels) & The results of our previous research [37] have shown that these parameter options allow for the highest object detection results. \\ \hline Batch size & 16, 32 & \\ \hline Layers freeze option & 10 & The layer freeze option [41] is a feature in which the backbone and head layers can be unused in training mode. Primary research has shown that after 10 backbone layers were frozen, training times were reduced by approximately 2 times and construction detail recognition accuracy improved by approximately 1.5 times. \\ \hline Augmentation & 13 options & The different options for data augmentation have been experimentally chosen and analysed [42, 43, 44]: **hsv.h**–HSV-Hue augmentation of the image. **hsv.v**–HSV-Valuge augmentation of the image. **degrees**–rotation (+/ – degrees) of the image. **translate**–shifting or moving the objects within the image. **scale**–resizing the input images to different scales. **shear**–geometric deformations by tilting or skewing the images along the x or y axes. **perspective**–simulates perspective changes. **flipud**–flips the image vertically, the top becomes the bottom, and vice versa. **fliprlr**–flips the image horizontally, the left side becomes the right side, and vice versa. **mosaic**–combines several images to create a single training sample with a mosaic-like appearance. **mixup**–combines pairs of images and their corresponding object labels to create new training examples. **copy_paste**–involves randomly selecting a portion of one image and pasting it onto another image while maintaining the corresponding object labels. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters which were investigated in primary research. Figure 4: A sample of the dataset used to evaluate the best YOLOv5 model, with several dozen details in one image. size--320; batch size--16; epoch number--300; default parameters of data augmentation. The results of the experimental investigation show that, without data augmentation, the detection results are much lower when compared with the results using augmentation. This is true regardless of whether the default or custom options of the data augmentation have been used. Additionally, the first experiments have shown that object detection accuracy increases significantly using the option of 10 backbone layer freeze. The influence of different combinations of data augmentation options has been analysed. The results of the experiment show that the best detection ratio achieved is equal to 0.4 (40% of correct detection). In this case, the highest number of construction details has been detected no matter which background has been used (322 construction details on the mixed (M) background; 509 construction details on the neutral (N) background; 485 construction details on the white (W) background). Overall, results show that almost every model better detects the construction details on a neutral background. However, it is important to mention that the models have been trained with the construction details, which were placed on a white background. During the primary research, the best parameters to allow one to achieve the highest ratio were found, and are presented in Table 3. These parameters will be used in the main research. The results of all of the experiments are presented in Table 4.