# Productivity Assessment of the Yolo V5 Model in Detecting Road Surface Damages
## 5 Performance Evaluation of Object Detection Models  
### Performance Evaluation Criteria of Detection Models  
There exist various fundamental criteria for assessing the effectiveness of object detection models within the foundational frameworks of deep learning. This study evaluates two important criteria including:  
Figure 7: Training data diagram of RTI IMS software.  
Assessment of model efficacy based on mean average precision (mAP) and average recall (AR) values: Model accuracy measures the ability to correctly classify and detect objects. This is an important criterion for evaluating the performance of road surface damage image detection models.  
In order to calculate AP (average precision), we need to compute precision and recall.  
\[\text{Precision}:\ \frac{\text{TP}}{\text{TP}+\text{FP}} \tag{1}\]  
\[\text{Recall}:\ \frac{\text{TP}}{\text{TP}+\text{FN}} \tag{2}\]  
With:  
TP (True Positive): The model correctly identifies it as a pothole, and the image indeed contains a pothole.  
FP (False Positive): The model incorrectly identifies it as a pothole, but the actual label is not a pothole (could be a license plate, for example).  
TN (True Negative): The model correctly identifies it as not a pothole, and the image truly does not contain a pothole (car, manhole cover, traffic light, etc.).  
FN (False Negative): The model incorrectly identifies it as not a pothole, but in reality, it is a pothole.  
The calculation of TP, TN, FP, and FN involves a parameter called IoU (Intersection over Union), which is the ratio of the overlapping area of two bounding boxes to the union area of the two bounding boxes. If the IoU threshold is 0.5 and the IoU value for a prediction is 0.7, then we classify the prediction as correct (TP). On the other hand, if the IoU is 0.3, we classify it as a false prediction (FP).  
Intersection and Union:  
\[IoU=\frac{\text{\emph{intersect area}}}{\text{\emph{union area}}} \tag{3}\]  
The AP value represents the area beneath the precision-recall curve, derived from the detections produced by the model. This threshold defines what the model designates as True Positives (TP) based on its class predictions. AP is determined as the mean value across all categories. The mean average precision (mAP) score is then calculated by averaging the AP values across all classes or various Intersection over Union (IoU) thresholds.  
\[\text{mAP}=\frac{1}{n}\sum_{i=1:n}(AP_{i}) \tag{4}\]  
\[\text{AP}=\frac{1}{m}\sum_{r\in\{0,0.1,\ldots,1\}}\mathit{\rhointerp}(r) \tag{5}\]  
\[\begin{array}{c}\mathit{\rhointerp}(r)=\mathop{\sum}\limits_{\widetilde{r}: \widetilde{r}}^{\text{\emph{max}}  
In the context of object detection, evaluation addresses two distinct aspects: (1) recognizing whether an object is present or absent in an image (classification), and (2) locating the position of an object (localization, involving regression).  
Moreover, the datasets encompass multiple layers characterized by unequal distribution. Hence, relying solely on accuracy as a metric could lead to skewed inaccuracies. Therefore, in this study, the central yardstick for comparing the efficacy of different models was the mean average precision (mAP). This metric entails calculating the average of average precision (AP) values for an information retrieval system across a set of n feature layers. The mAP provides a way to assess the propensity for misclassification, employing the \"feature score\" or model score assigned to each bounding box in the context of object detection.