## 5 Experimental Setup
### Custom Anchor Boxes for Improved Object Detection  
Another common issue encountered during the study was related to the model's proficiency in recognizing crosswalks, which were frequently overlooked. Upon examining the deep learning parameters in the \"pipeline.config\" file, it became evident that the default aspect ratios of anchor boxes (0.5, 1.0, and 2.0) were insufficient to encompass most crosswalks. To address this, we calculated the aspect ratios of the objects in the entire dataset; Figure 13 illustrates a histogram indicating that the majority of objects in the entire dataset fell within the first three categories: pedestrians (0.5), traffic signs (1 and 1.25), while the pedestrian crossing signs were distributed across several categories. Defining a large number of scales for the algorithm would inevitably slow down both the model training and its execution.  
To address this issue, we defined supplementary intervals, amounting to six in total, and retrained the model with parameters adjusted accordingly to accommodate these intervals (Figure 14).  
Figure 11: Loss comparison: before and after data augmentation.  
Figure 12: Comparison: before and after data augmentation.  
After rerunning the learning algorithm, we obtained a refined model (as demonstrated in Figure 16), that underwent subsequent validation to verify its improved performance.  
We evaluated the model once again on the test images with an IoU threshold of 0.5. Although the numerical results (Figure 15) might not have fully captured it, a significant improvement was observed compared to the previous state of the model, as depicted in Figure 16. The left side represents the previous model state loaded with the default anchor box scales, while the right side illustrates the enhanced performance achieved with the scales defined in this study. Moreover, this approach successfully addressed the problem of the model overlooking pedestrian crossing markings.  
Figure 14: Defining new anchor box aspect ratios for training.  
Figure 15: Comparing of validation results for different optimization methods.  
It is natural to question how improvement could be observed despite the absence of improvement in the chart values. The observed improvement could be attributed to the increase in localization error (by \(1.17\%\)), leading to a decrease in the model's average precision and sensitivity at higher IoU thresholds. As the recall value was averaged over various IoU thresholds (0.50, 0.55, 0.6, \(\ldots\), 0.95) by the code, it is probable that the model's sensitivity had improved for the lower IoU values and degraded for the higher ones. This claim is supported by the fact that for an IoU of 0.75, the accuracy of the neural network declined by 4.4%.  
In the proposed system, the precise localization and framing of objects by the algorithm is not a critical aspect. The primary objective is to accurately classify the objects into their respective categories and avoid any incorrect predictions or neglect. Consequently, the benchmark for the system's performance is based on the achieved characteristics at a coverage threshold of 0.50, which is considered a successful outcome.