## 5 Performance Comparison  
The accuracy of the model is evaluated using the F1 score, mean average precision (mAP), and the Precision x Recall curve. It is essential to examine the outcomes of both the classification (confusion matrix) and localization (using the IoU of bounding boxes in the image) metrics of the model. **Intersection over Union (IoU)** is employed while detecting objects. IoU computes an intersection over the union of the two bounding boxes: the bounding box for the ground truth and the predicted bounding box. When the IoU is 1, it implies that the bounding boxes for predicted and ground truth overlap totally. A bounding box is rendered around an object only if the IoU is greater than the set threshold value. In this application, a threshold of IoU is set to be 0.4. As a result, when IoU > 0.4, the detection is considered true positive (TP), whereas if IoU < 0.4, it is classified as false positive (FP). If the model fails to detect the object in the image despite having ground truth, it is classified as false negative (FN). An image's true negative (TN) is any portion where no object can be predicted. It does not help detect objects. Therefore, TN is ignored in Equation (1). \[IoU=\frac{Area\ f\ Overlap}{(Area\ f\ Union)} \tag{1}\]  
**Precision**, according to the definition, is the proportion of positive samples correctly classified to all positive samples (whether correctly or incorrectly classified). It measures how accurate a model is at classifying a sample as positive, as mentioned in Equation (2). The comparison among the various precision curves is illustrated in Figures 10 and 11. \[Precision=\frac{TP\times 100}{(TP+FP)} \tag{2}\]  
Figure 10: Precision curve of (**a**) YOLOv3 model without the pretrained weights, (**b**) YOLOv3 model with the pretrained weights. **Recall** is calculated by taking the ratio of the number of positive samples correctly classified as positive to the total number of positive samples. This recall indicates how well the model detects positive samples and is quoted in Equation (3). The comparison of recall curves with respect to the ADAS application is pictured in Figures 12 and 13. \[Recall(Sensitivity)=\frac{TP\times 100}{(TP+FN)} \tag{3}\]  
Figure 11: Precision curve of (**a**) YOLOv5 model without the pretrained weights; (**b**) YOLOv5 model with the pretrained weights. Figure 12: Recall curve of (**a**) YOLOv3 model without the pretrained weights; (**b**) YOLOv3 model with the pretrained weights. **F1 score** is calculated from the precision and recall of each observation. A score of 1 indicates maximum accuracy, which is depicted using Equation (4). The comparison among various models for the ADAS application is presented in Figures 14 and 15. \[F1\ Score=\frac{2\times(Recall\times Precision)}{(Recall+Precision)} \tag{4}\]  
Figure 14: F1-Score curve of (**a**) YOLOv3 model without the pretrained weights; (**b**) YOLOv3 model with the pretrained weights. Figure 13: Recall curve of (**a**) YOLOv5 model without the pretrained weights; (**b**) YOLOv5 model with the pretrained weights. The _mAP_**score** is determined by comparing the ground truth bounding box to the detected box. The higher the score, the better the model's detection. This is mathematically illustrated in Equation (5). \[ \begin{split}\sum\
olimits_{Q}&\to AP(q)\\ mAP&=\frac{q-1}{Q}\end{split}  \tag{5}\]  
**PR-Curve** Precision decreases as recall increases. When the number of positive samples increases (high recall), the accuracy of identifying the sample decreases (low precision). It is possible to determine where precision and recall are high by looking at the precision-recall curve. The main factor that contributes to picking the model with the right trade-off between precision and recall is pictured in Figures 16 and 17. Here, TP denotes the number of true positive cases, TN is the number of true negative cases, FP indicates the number of false positive cases, FN is the number of false negative cases, and Q denotes the number of queries [19].