*2.6. Model Evaluation Index*

The model loss of YOLOv5 consists of bounding box loss, object loss and classification loss, which can be used to test the target prediction performance of the model. Precision (Pre) and recall (Rec) can intuitively reflect the accuracy of target prediction, which are calculated by the ratio of the number of *TP*, *FP*, *TN*, and *FN* [25], where *TP* represents the number of correctly detected positive samples, and FP represents the error Number of negative samples detected, *FN* indicates the number of positive samples not detected. The *F*1 score is the weighted average of precision and recall. The AP value of each class is the area composed of the label P-R map of that class. The mean average precision (*mAP*) is the average of the *AP* values of various labels; thus, it can represent the global detection performance of the model.

$$Loss = l\_{bbox} + l\_{object} + l\_{classification} \tag{3}$$

$$Pre = \frac{TP}{(TP + FP)}\tag{4}$$

$$\text{Rec} = \frac{TP}{(TP + FN)}\tag{5}$$

$$F\_1 = \frac{2 \times Pre \times Rec}{Pre + Rec} \tag{6}$$

$$AP = \int\_0^1 \operatorname{Pre}(\operatorname{Rec}) d\operatorname{Rec} \tag{7}$$

$$mAP = \frac{1}{|Q\_R|} \sum\_{q=Q\_R} AP(q) \tag{8}$$
