# A Deep Learning-Based System for Automatic License Plate Recognition Using YOLOv12 and PaddleOCR
## 5 Results and Validation
### Analysis of Trained Model's Performance  
In addition to the CSV file generated during training, several plots are also created after training is completed. These plots are computed on the validation set and serve to highlight optimal performance points, providing a detailed view of the model's final behavior and its generalization capacity. By analyzing the precision-confidence curve [29], shown in plot (a) of Figure 10, it can be observed that if only predictions with a confidence score above 0.314 are kept, the model will return only correct results for license plates. The plot displays two lines: one for the \"car_plate\" class and a global average, which is automatically shown even in single-class scenarios. This confidence threshold (0.314) represents a safety margin for the model: the closer a prediction's score is to 1, the more confident the model is in having correctly detected  
Figure 9: Loss Over Epochs (training vs. validation). a license plate. By setting this threshold, uncertain predictions are filtered out, reducing the risk of errors. Thus, setting a threshold of 0.314 (or higher) ensures that only high-confidence predictions are retained. For applications where errors are unacceptable (such as issuing fines or automated access control), a confidence threshold of 0.314 or higher is recommended. If the goal is to detect as many license plates as possible, even at the risk of occasional errors, a lower threshold, such as 0.2, may be used. As shown in part (b) of Figure 10, the precision-recall curve [29] indicates that the model provides highly accurate results (precision of 0.979) up to a recall of approximately 0.95. Beyond this point, precision becomes unstable and drops sharply to very low values (below 0.1), especially at high recall levels. This behavior suggests that, in an attempt to maximize recall, the model generates a large number of false positive predictions, thus significantly compromising precision. Plot (a) in Figure 11 shows that the model maintains a high recall, above 0.95, for confidence score values between 0 and 0.6. Beyond this threshold, recall decreases rapidly and reaches zero before the confidence score hits 0.9, remaining at zero up to 1. This trend suggests that although the model performs well at moderate confidence levels, filtering predictions with scores above 0.6 results in the loss of many detections. Therefore, it is recommended to choose a confidence threshold within the 0.2-0.6 range to maintain an optimal balance between precision and recall. The F1 curve [29], shown in plot (b) of Figure 11, indicates that the F1 score starts at approximately 0.25 for low confidence thresholds (near 0.0) and quickly rises to nearly 0.98 for confidence values between 0.0 and 0.2. This high score remains stable up to around the 0.6 threshold, suggesting a good balance between precision and recall (see Formula (5)). Beyond 0.6, the score drops sharply, reaching 0 near the 0.9 mark and staying at zero up to 1. Therefore, confidence thresholds between 0.2 and 0.6 are recommended to maintain optimal model performance and avoid significant detection losses. Figure 10: P_curve and PR_curve for YOLOv12n: (a) P_curve. (b) PR_curve. For model evaluation, an additional analysis was conducted on the test set using the val function with different parameters for conf (confidence threshold) and IoU = 0.5 (the IoU threshold for correct detections) (see Table 4). This process generated relevant metrics such as precision, recall, F1 score, and mAP at both IoU 0.5 and 0.5-0.95. The evaluation of the model across different confidence thresholds (0.3, 0.5, and 0.7) demonstrated stable and accurate performance at lower thresholds. At both 0.3 and 0.5, the model achieved identical precision and recall values, along with high F1 scores, [EMAIL_ADDRESS], and [EMAIL_ADDRESS]:0.95 metrics. These consistent results confirm the model's robustness within the moderate confidence range.