# A Deep Learning-Based System for Automatic License Plate Recognition Using YOLOv12 and PaddleOCR
## 4 Detection and Classification Method
### Training YOLOv12 for Vehicle License Plate Detection  
As previously presented, the YOLOv12 model was used for training. It is the most recent development in the YOLO series and currently provides the best results (Figure 5). Table 2 presents the parameters used for training the model. These parameters are essential for the correct configuration and training of the YOLO model, playing a key role in optimizing performance and adapting the learning process to the specific task of license plate detection. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Parameter** & **Value** & **Description** \\ \hline task & detect & Task of the model: object detection \\ model & yolo12s.pt & Pretrained YOLO model used as a base \\ data & config.yaml & Dataset configuration (Figure 4) \\ epochs & 20 & Total number of training epochs \\ batch & 16 & Batch size \\ imgsz & 640 & Input image resolution \\ optimizer & auto & Automatic optimizer selection \\ pretrained & true & Uses pretrained weights \\ patience & 100 & Early stopping if no improvement occurs \\ val & true & A validation set is used \\ lr0 & 0.01 & Initial learning rate \\ mosaic & 1.0 & Mosaic augmentation enabled \\ momentum & 0.937 & Momentum for optimization \\ auto\_augment & randaugment & Automatic augmentation technique \\ weight\_decay & 0.0005 & L2 regularization penalty \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Configuration parameters used for YOLOv12s training. Figure 6: Overview of YOLOv12 process: from images to vehicle type and license plate recognition. One of the most important parameters used in training the YOLO model is auto_augment, which in this work is set to RandAugment. This value represents a key data augmentation technique that significantly contributes to improving the performance and generalization ability of the detection model. RandAugment stands out by randomly applying two different transformations to each image in the dataset, with each transformation having a controlled level of intensity. This approach simplifies the augmentation process compared to more complex techniques and significantly helps prevent overfitting, making the model more adaptable to varying environmental conditions. During the training process, data augmentation techniques such as RandAugment apply random transformations to the images in the training set. These transformations can be seen in files like train_batch0, train_batch1, and other batches generated throughout training (Figure 7). These images reflect the effects of the augmentations applied, which include random rotations, color adjustments, object translations, flips, and other distortions. By analyzing these images, one can observe how augmentations modify the original data, helping the model become more robust and recognize objects (in our case, license plates) under a wider range of visual conditions. The original images are stored and used during training, but the augmented images are generated on-the-fly and not saved, which keeps storage requirements low while increasing data variability. Although the initial dataset contains only 744 images, the use of RandAugment during training results in multiple variations of each image being seen at every epoch. During the 20 training epochs considered, the model is exposed to approximately 14,880 virtual samples (images), which effectively enhances the training process by incorporating uncertainty factors such as camera angle, visibility conditions, and lighting variations. Examples of augmentation types that can be observed in Figure 7 include the following:  
Figure 7: Example of training batch (no. 215) illustrating the application of various augmentation techniques, such as scaling, color transformations, and flips.