A license plate recognition method based on YOLOv8 and lightweight PlateResNet

The license plate recognition method using YOLOv8 and lightweight PlateResNet solves the problem of insufficient robustness of license plate recognition in complex traffic scenarios, and achieves high-precision, low-complexity license plate recognition, which is suitable for the real-time recognition needs of edge devices.

CN122336732APending Publication Date: 2026-07-03WUXI SONGSHAN MING TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI SONGSHAN MING TECHNOLOGY CO LTD
Filing Date
2026-04-21
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing license plate recognition technologies lack robustness in scenarios with complex lighting, angular distortion, occlusion, and low resolution. Furthermore, the detection models are sensitive to small targets, and the recognition networks do not adequately model the structural complexity of Chinese characters, making it difficult to cope with complex scenarios in actual deployment.

Method used

A license plate recognition method using YOLOv8 and the lightweight PlateResNet is proposed. YOLOv8 is used for license plate target detection and localization, and the lightweight residual network PlateResNet is used for license plate recognition. The CTC loss function is used to optimize character sequence recognition, and the cross-entropy loss function is used to achieve multi-task joint training, which enhances feature representation and reduces computational complexity.

Benefits of technology

It achieves high-precision license plate recognition in complex traffic scenarios, improves the model's generalization ability and recognition integrity, adapts to the real-time requirements of edge devices, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122336732A_ABST
    Figure CN122336732A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of license plate recognition technology in traffic scenarios, specifically involving a license plate recognition method based on YOLOv8 and a lightweight PlateResNet. This method is based on the lightweight end-to-end license plate recognition model PlateResNet using YOLOv8 and ResNet. It employs an improved residual network to extract features, combines a connection-time classification (CTC) loss function to solve the input-output sequence alignment problem, and constructs a hybrid dataset based on public datasets and real-world application scenarios such as rain, fog, occlusion, and low light. A multimodal data augmentation strategy is used to improve generalization ability. The model proposed in this invention achieves a character accuracy of 89.66% and a word accuracy of 72.17% on the standard validation set. In tests using data collected in real-world scenarios, it can reach a maximum word accuracy of 93.6%, demonstrating broad application prospects for accurate vehicle identification in the fields of green and low-carbon transportation and mobile source pollution emission control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of license plate recognition technology in traffic scenarios, specifically involving a license plate recognition method based on YOLOv8 and lightweight PlateResNet. Background Technology

[0002] With the rapid development of Intelligent Transportation Systems (ITS), automatic license plate recognition technology, as its core support, plays an irreplaceable role in traffic monitoring, violation capture, parking management, smart cities, green and low-carbon transportation, and mobile source pollution emission control. Traditional license plate recognition methods rely on manual feature and rule matching, which struggles to cope with real-world challenges such as complex lighting, angular distortion, occlusion, and low resolution, limiting recognition accuracy and robustness. In recent years, the rapid development of deep learning technology has provided new pathways for license plate detection and recognition, especially object detection and sequence recognition models based on convolutional neural networks, which have significantly improved practical application performance. However, current mainstream methods mostly adopt a two-stage architecture of "detection + recognition" (such as the YOLO series combined with CRNN or Attention mechanisms), which still suffers from problems such as the detection model's sensitivity to small targets and deformed license plates, insufficient modeling of the complexity of Chinese character structures in the recognition network, and an imbalance between model accuracy and inference efficiency, making it difficult to handle complex scenarios in actual deployment. Summary of the Invention

[0003] To address this issue, the present invention provides a license plate recognition method based on YOLOv8 and lightweight PlateResNet, which solves the problems of limited resources in edge computing devices and insufficient robustness of license plate recognition in complex traffic scenarios.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a license plate recognition method based on YOLOv8 and lightweight PlateResNet, comprising: S1: Input vehicle images containing license plate labels and construct a vehicle image dataset; S2: Standardize and preprocess all images in the vehicle image dataset; S3: Perform data augmentation on the preprocessed vehicle images to improve the generalization ability of the trained model; S4: The image dataset processed in S3 is used to train the YOLOv8 network model and the lightweight residual network PlateResNet model in turn. The CTC loss function is used to optimize the license plate character sequence recognition task, and the cross-entropy loss function is combined to realize the multi-task joint training of license plate character and color classification. S5: Based on the trained YOLOv8 network model, the system performs license plate target detection and localization on the input vehicle image and outputs an accurate license plate area image. S6: The obtained license plate area image is cropped and input into the lightweight residual network PlateResNet model for license plate recognition. The model takes a 192×72 resolution image as input, enhances the deep feature representation by embedding residual blocks, and uses high pooling to convert the two-dimensional features into a one-dimensional sequence. Finally, the output is a character feature sequence of length 21, and finally obtains a 7-digit standard license plate number through CTC greedy decoding.

[0005] Furthermore, in S2, the standardization preprocessing specifically involves: using the letterbox algorithm to adapt the size of the original image, scaling it to the target resolution of 192×72 while maintaining the original aspect ratio, and filling the remaining area with gray with a fill pixel value of 128. At the same time, the image is normalized by mapping the pixel values ​​from [0, 255] to the range of [0, 1].

[0006] Furthermore, the YOLOv8 network model's detection head resets the anchor frame based on the license plate's aspect ratio and uses the PANet path aggregation network to fuse deep semantics and shallow detail features, achieving accurate positioning of the license plate area.

[0007] Furthermore, the lightweight residual network PlateResNet model includes a Stem layer, four residual blocks, multi-level max pooling, a sequence transformation layer, and a license plate color classification head; the total number of convolutional layers in the model is controlled to 10, and the channel transformation adopts 1×1 convolution dimensionality reduction to maintain the lightweight structure of the model.

[0008] Furthermore, in S6, the high pooling operation compresses the feature map height to 1, and then extracts sequence features through (1,3) convolution, finally outputting a character sequence with a time step of 21, covering the maximum character length of a standard license plate.

[0009] Furthermore, the CTC greedy decoding process in S6 specifically involves merging consecutively repeated predicted characters in the output 21-bit character feature sequence into a single character, and removing blank characters with a confidence level lower than a preset threshold of 30%, ultimately converging to obtain a 7-digit standard license plate number.

[0010] Furthermore, the data enhancements in S3 include: strong perspective transformation, random resolution degradation, Gaussian motion blur, random erasure occlusion, and HSV color dithering.

[0011] Furthermore, in step 4, during the multi-task joint training: For the license plate sequence task, Connectionist Temporal Classification (CTC) loss is adopted as the core loss function. Mapping rule B is defined to merge consecutive repeating characters and remove whitespace, allowing the network to output the same true label through multiple legitimate paths. The probability sum P(y | x) of all legitimate paths is calculated using the forward algorithm. For the license plate color classification task, a separate color classification branch is set up, and the cross-entropy loss function is used for optimization. The difference between the predicted probability distribution and the true color label is calculated. The cross-entropy loss function is: The total loss function is: Where α and β are adjustable hyperparameters, L CTC For CTC loss, L C-E This represents the cross-entropy loss.

[0012] Furthermore, the model training parameters and strategies are as follows: the Adam optimizer is used, the initial learning rate is set to 0.0005, and a learning rate decay strategy is introduced, which halves the learning rate every 20 epochs; the training batch size is set to 32, the total number of iterations is 50 epochs, the PyTorch built-in DataLoader iterator is used for data loading, multi-process loading is enabled to accelerate I / O throughput, and the training set is randomly shuffled before the start of each epoch to avoid the model memorizing the sample order.

[0013] Furthermore, the residual block embedding mechanism in S6 specifically involves introducing a residual structure containing two 3×3 convolutional layers and skip connections in the critical pooling interval of the PlateResNet model. This residual structure enables the gradient to propagate directly back to the shallow layers of the network, thus solving the gradient vanishing problem in deep networks and enhancing the model's ability to express deep features of blurred, tilted, and occluded license plates. Simultaneously, the total number of convolutional layers in the entire PlateResNet network is controlled to 10, and when the network channel dimension changes, 1×1 convolutions are used for dimension projection. This allows the model to maintain low computational complexity while improving recognition accuracy, thereby meeting the real-time operation requirements of edge devices.

[0014] The beneficial effects of this invention are: (1) High recognition accuracy: The anchor box is optimized by YOLOv8 network and PANet features are fused to achieve accurate positioning of license plate area. The deep feature expression is enhanced by PlateResNet residual blocks and the CTC loss function is used to solve the problem of character sequence alignment, which greatly reduces the character misrecognition rate. At the same time, character recognition and color classification are realized simultaneously through multi-task joint training, which improves the completeness of recognition. (2) The model is lightweight and efficient. PlateResNet controls the number of convolutional layers and uses 1×1 convolution for dimensionality reduction, balancing performance and lightweight design. Combined with optimized training strategies, it accelerates model convergence, reduces computational resource consumption, adapts to edge device deployment, and meets real-time recognition requirements. (3) It has strong generalization ability. The mixed dataset covers multiple types of license plates and extreme scenarios. Combined with diverse data augmentation strategies, it effectively improves the model's adaptability to complex environments and avoids overfitting. Attached Figure Description

[0015] Figure 1 This is a flowchart of a license plate recognition method based on YOLOv8 and lightweight PlateResNet according to the present invention. Figure 2 The image shows the enhanced performance of a license plate recognition method based on YOLOv8 and lightweight PlateResNet according to the present invention (the license plate area has been anonymized and is only used to demonstrate the detection effect). Figure 3 The images shown are for different levels of classification in Embodiment 2 of the present invention (the license plate area has been desensitized and is only used to demonstrate the detection effect). Figure 4 The test results were obtained using a model without a color classification head in Embodiment 2 of the present invention. Figure 5 The test results are obtained using a model with a color classification head in Embodiment 2 of the present invention. Detailed Implementation

[0016] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] The present invention will be further described below with reference to specific accompanying drawings and embodiments.

[0018] A license plate recognition method based on YOLOv8 and lightweight PlateResNet includes the following steps: S1: Input vehicle images containing license plate labels and construct a vehicle image dataset; S2: Standardize and preprocess all images in the vehicle image dataset; S3: Perform data augmentation on the preprocessed vehicle images to improve the generalization ability of the trained model; S4: The image dataset processed in S3 is used to train the YOLOv8 network model and the lightweight residual network PlateResNet model in turn. The CTC loss function is used to optimize the license plate character sequence recognition task, and the cross-entropy loss function is combined to realize the multi-task joint training of license plate character and color classification. S5: Based on the trained YOLOv8 network model, the system performs license plate target detection and localization on the input vehicle image and outputs an accurate license plate area image. S6: The obtained license plate area image is cropped and input into the lightweight residual network PlateResNet model for license plate recognition. The model takes a 192×72 resolution image as input, enhances the deep feature representation by embedding residual blocks, and uses high pooling to convert the two-dimensional features into a one-dimensional sequence. Finally, the output is a character feature sequence of length 21, and finally obtains a 7-digit standard license plate number through CTC greedy decoding.

[0019] The vehicle image dataset in S1 is constructed using a hybrid strategy combining public datasets and enterprise-owned private data to balance the generalization ability of the model training with its adaptability to industrial scenarios. The training set originates from CBLPRD (China-Balanced-License-Plate-Recognition-Dataset), with 34,000 images randomly selected from its 330,000 images as basic training samples. This set covers various lighting conditions and license plate types to ensure balanced character distribution. The validation set focuses on extreme scenarios scarce in public datasets, including samples from real-world scenarios such as low-light nighttime conditions, daytime license plate overexposure, severe motion blur, and partial occlusion, effectively compensating for the lack of scene diversity in a single public dataset. Furthermore, the dataset considers both license plate number and color. License plate colors are categorized into five types: black license plates, standard yellow plates, standard blue plates, new energy small vehicles, and new energy large vehicles.

[0020] The standardization preprocessing in S2 specifically involves: using the letterbox algorithm to resize the original image, maintaining its original aspect ratio while scaling it to the target resolution of 192×72, and filling the remaining areas with gray (padding value of 128). Threshold normalization is then applied to the image, mapping pixel values ​​from [0, 255] to the [0, 1] range.

[0021] In S3, data augmentation of vehicle images specifically includes: strong perspective transformation, random resolution degradation, Gaussian motion blur, random erasure of occlusion, and HSV color dithering. These techniques enhance the geometric transformation, image quality simulation, image occlusion simulation, and illumination change simulation of the images, thereby improving the generalization boundary of the training model.

[0022] (1) Geometric transformation enhancement introduces strong perspective transformation. By randomly offsetting the four corner points of the image (the offset is controlled within 10% of the width and height), a perspective transformation matrix is ​​constructed, thereby more realistically simulating the nonlinear deformation of the license plate of a vehicle under complex angle shooting. This strategy is applied dynamically with a probability of 40%, and is combined with a 1.3x pre-magnification and boundary filling strategy to effectively avoid information clipping during the transformation process.

[0023] (2) Image quality simulation enhancement: A random degradation module (trigger probability 30%) was designed to randomly select one of the following two operations with equal probability: one is resolution degradation, which randomly scales the image to 0.4 to 0.9 times the original image and then restores it to simulate the effect of a low-definition camera; the other is motion blur simulation, which uses a square Gaussian kernel for convolution, with the kernel size randomly selected from 3×3 or 5×5 (standard deviation σ adaptive), to restore the blur artifacts caused by high-speed motion or inaccurate focus.

[0024] (3) Image occlusion simulation enhancement: a rectangular occlusion area is randomly generated in the image with a 30% probability. The occlusion area accounts for 5% to 20% of the total area. The fill color is randomly selected as black, gray or white to simulate license plate stains, damage or strong light reflection.

[0025] (4) The illumination change simulation enhancement is to perturb the HSV color space with a 30% probability, where the brightness (Value) and saturation (Saturation) are randomly scaled within the range of 0.5 to 1.5 times, and the hue (Hue) is shifted within the range of ±10, so as to cover backlight, overexposure and different color temperature illumination conditions.

[0026] In S4, The specific training method using the YOLOv8 network model is as follows: As the foundational architecture for license plate detection, the detection head design adjusts the preset proportions of the anchor boxes to better match the aspect ratio of license plates, which are typically long, narrow rectangles and small in size. This improves the sensitivity to locating small targets. Simultaneously, the model fully utilizes YOLOv8's built-in multi-scale feature fusion mechanism, effectively integrating deep semantic information with shallow detail features through the Path Aggregation Network (PANet). This multi-scale feature fusion strategy significantly enhances the model's feature extraction capabilities under different resolutions and complex backgrounds, effectively mitigating the problem of missed detections of small targets caused by changes in vehicle distance, and providing high-quality license plate region cropping images for subsequent recognition modules.

[0027] Based on the improved ResNet, the license plate recognition network PlateResNet addresses the challenges of license plate images with their significant aspect ratios and dense character arrangement. This invention designs a lightweight residual network, PlateResNet, specifically optimized for a 192×72 input resolution. The model input uses 192×72 pixels, a size that preserves key texture details of the license plate characters while conforming to the inherent aspect ratio of the license plate, avoiding image distortion caused by traditional square cropping. Combined with a front-end letterbox preprocessing strategy, the original image is scaled and filled to this fixed size while maintaining the aspect ratio. This ensures that the spatial distribution of the feature maps entering the network is highly consistent with the actual license plate structure, laying a geometric foundation for subsequent convolutional layers to extract effective features.

[0028] PlateResNet introduces a residual structure consisting of two 3×3 convolutional layers and skip connections in the critical pooling region of the network. This design allows gradients to propagate directly back to shallow layers, effectively solving the gradient vanishing problem in deep networks and significantly enhancing the model's ability to represent deep features of blurred, tilted, and occluded license plates. Meanwhile, by controlling the total number of convolutional layers in the entire network to 10 and using 1×1 convolutions for dimensionality projection when the channels change, the model maintains low computational complexity while improving accuracy, meeting the real-time requirements of edge devices.

[0029] The training strategy and loss function are described above. The model is trained for a license plate sequence task, and the core loss function is Connectionist Temporal Classification (CTC Loss). CTC introduces whitespace (set as # in the model), and defines mapping rule B to merge consecutive repeating characters and remove whitespace, thus allowing the network to output multiple paths corresponding to the same true label. The probability of all legal paths, P(y | x), is efficiently calculated using a forward algorithm, and the loss function is defined as the negative log-likelihood. The CTC loss effectively solves the alignment problem between the length of the input image feature sequence (21 frames) and the length of the output label (the number of license plate characters is not fixed), and can directly optimize the prediction probability of the entire sequence without pre-segmenting characters.

[0030] For the color classification task, the model optimizes the color classification branch separately using cross-entropy loss. This branch treats license plate color as an independent classification task, calculating the difference between the predicted probability distribution and the true color label using the standard cross-entropy function. The loss function is as follows: The total loss function is a weighted sum of the two: Here, α and β are adjustable hyperparameters used to balance the contribution weights of sequence recognition and color classification tasks in gradient updates. This loss combination strategy enables the network to simultaneously improve the classification accuracy of license plate colors while optimizing the alignment of license plate character sequences, achieving end-to-end joint training for multiple tasks.

[0031] In the specific training optimization strategy, the Adam optimizer is used with an initial learning rate of 0.0005. A learning rate decay strategy is introduced, halving the learning rate every 20 epochs to accelerate convergence and avoid getting trapped in local optima. The training batch size is set to 32, with a total of 50 epochs. Data loading uses PyTorch's built-in DataLoader iterator, enabling multi-process loading to accelerate I / O throughput. The training set is randomly shuffled before the start of each epoch to prevent the model from memorizing the sample order. In addition, an early stopping mechanism is introduced, automatically terminating training when the validation set loss does not decrease for 10 consecutive epochs, selecting the historically best weights as the final model, effectively suppressing overfitting.

[0032] In S6, specifically: To adapt to the sequence output requirements of license plate recognition, a specific dimensionality reduction and mapping structure is designed at the tail of the PlateResNet model. First, the height pooling layer is used to compress the height dimension of the feature map to 1, converting the two-dimensional spatial features into one-dimensional sequence features and eliminating the redundant information in the height direction. Subsequently, through the width output layer, a convolutional operation with a kernel size of (1,3) is adopted to extract local context features without changing the sequence length, and finally, a feature sequence with a time step length of 21 is output. This output length of 21 covers the maximum possible length of the standard Chinese license plate (such as "Beijing A12345" with a total of 7 digits) under the extended character set, ensuring that the model can completely and accurately decode all character information in the license plate. Considering the characteristics of the input resolution of 192×72, a color classification head composed of global average pooling and fully connected layers is introduced after the fourth residual block in the model to achieve synchronous recognition of the license plate color, thus completing the multi-task joint prediction of the license plate character sequence and vehicle color in a single network, improving the overall practicality and environmental perception ability of the license plate recognition system. After the character feature sequence with an output length of 21 from the lightweight residual network PlateResNet, CTC greedy decoding is used to generate a 7-digit standard license plate, specifically including: (1) For the 21-time-step feature sequence output by PlateResNet, the character category with the highest probability is selected at each time step to generate the original prediction sequence, which contains valid characters and blank characters; (2) The adjacent and identical consecutive characters in the original prediction sequence are merged into a single character to eliminate the redundant and repeated features output by the network; (3) All blank characters in the sequence are removed. The blank characters correspond to the invalid outputs with low network recognition confidence, and finally, the refined standard 7-digit license plate is obtained.

[0033] Example 2: In the present invention, the structure configuration of the PlateResNet model is shown in Table 1.

[0034] Table 1 Structure Configuration Table of PlateResNet Model stage Dimensions (length, width, channel) enter 192,72,3 Stem 188,68,32 Block1+ CBR+MaxPool1 94,34,64 Block2+ MaxPool2 47,17,128 Block3+ MaxPool3 23,8,196 Block 4 23,8,256 MaxPool4+CBR(Plate) 21,1,Seq AveragePool+Dropout+Linear(Color) Number of colors (1) Validation set performance: On the constructed standard validation set, the performance of the PlateResNet model is shown in Table 2. The present invention introduces LPRNet for comparison and conducts experiments by appropriately expanding the channels of each layer to increase the number of parameters (referred to as LPRNet-L).

[0035] Table 2 Model Performance on the Validation Set Model character license plate color Parameters computational load LPRNet 98.09% 89.21% \ 0.511 M 0.174 G LPRNet-L 98.42% 94.12% \ 1.778 M 0.665 G PlateResNet (no color) 98.99% 95.73% \ 2.071M 2.669G PlateResNet (with color) 98.81% 94.93% 100.00% 2.072M 2.669G As can be seen from the above table, the experimental data shows that the model achieves a character recognition accuracy of 98.81% With a word recognition accuracy of 94.93% and a color classification accuracy of 100.00%, the PlateResNet architecture significantly optimizes the feature extraction process by embedding residual blocks while maintaining low computational complexity, thereby effectively improving the character discrimination capability in complex scenes.

[0036] (2) Test set performance: The performance of the PlateResNet model on the standard validation set is shown in Table 2. Experimental results show that the model achieves a character accuracy of 89.66% and a word accuracy of 72.17%. While maintaining low computational load, PlateResNet significantly improves the model's generalization performance on different datasets, demonstrating strong robustness. Furthermore, after adding a color branch, it achieves a color accuracy of 87.82% despite a slight decrease in license plate accuracy, achieving a balance between character and color recognition tasks.

[0037] Table 3 Test Set Model Performance Model character license plate color Parameters computational load LPRNet 15.62% 71.31% \ 0.511 M 0.174 G LPRNet-L 20.68% 73.68% \ 1.778 M 0.665 G PlateResNet (no color) 89.66% 72.17% \ 2.071M 2.669G PlateResNet (with color) 89.81% 71.63% 87.82% 2.072M 2.669G (3) Results of the graded test A systematic evaluation was conducted using an 8-level difficulty rating test set. This test set categorizes scenes according to interference levels, from Level 1 (well-lit, unobstructed, high resolution) to Level 8 (extreme rain / fog, severe occlusion, ultra-low resolution). Each dataset contains 125 images. Figure 3 As shown.

[0038] Using the identification method of this invention, test results are obtained using a model without a color classification head, as shown below. Figure 4 As shown, the model performs stably in the low difficulty range (levels 1-3), with a word accuracy of up to 93.6%. As the difficulty increases, the performance shows a gradual downward trend. At the medium difficulty level (level 4, including slight motion blur and tilt), the word accuracy remains at 64.23%. Even at the highest difficulty level (level 8, covering heavy rain and fog occlusion and nighttime noise), the model maintains a word recognition rate of 7.14%.

[0039] like Figure 5 As shown, overall accuracy is measured by the ability to accurately identify both license plates and colors simultaneously. Test results obtained using a model with a color classification head are shown below. Figure 5 As shown, PlateResNet constructs a robust boundary through training on a mixed dataset and a multimodal data augmentation strategy, enabling it to simultaneously perform multi-task recognition of license plate numbers and their colors. It adapts to the full-scene license plate recognition task requirements, from ideal environments to extremely difficult recognition situations, and has the potential for application in edge devices.

Claims

1. A license plate recognition method based on YOLOv8 and lightweight PlateResNet, characterized in that, include: S1: Input vehicle images containing license plate labels and construct a vehicle image dataset; S2: Standardize and preprocess all images in the vehicle image dataset; S3: Perform data augmentation on the preprocessed vehicle images to improve the generalization ability of the trained model; S4: The image dataset processed in S3 is used to train the YOLOv8 network model and the lightweight residual network PlateResNet model in turn. The CTC loss function is used to optimize the license plate character sequence recognition task, and the cross-entropy loss function is combined to realize the multi-task joint training of license plate character and color classification. S5: Based on the trained YOLOv8 network model, the system performs license plate target detection and localization on the input vehicle image and outputs an accurate license plate area image. S6: The obtained license plate area image is cropped and input into the trained lightweight residual network PlateResNet model for license plate recognition. The model takes a 192×72 resolution image as input, enhances the deep feature representation by embedding residual blocks, and uses high pooling to convert the two-dimensional features into a one-dimensional sequence. Finally, the output is a character feature sequence of length 21, and finally obtains a 7-digit standard license plate number through CTC greedy decoding.

2. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, In S2, the standardization preprocessing specifically involves: using the letterbox algorithm to adapt the size of the original image, scaling it to the target resolution of 192×72 while maintaining the original aspect ratio, filling the remaining area with gray with a fill pixel value of 128, and simultaneously performing pixel value normalization processing on the image, mapping the pixel values ​​from [0, 255] to the range of [0, 1].

3. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, The YOLOv8 network model's detection head resets the anchor box based on the license plate's aspect ratio and uses the PANet path aggregation network to fuse deep semantics and shallow detail features, achieving accurate localization of the license plate area.

4. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, The lightweight residual network PlateResNet model includes a Stem layer, four residual blocks, multi-level max pooling, a sequence transformation layer, and a license plate color classification head. The total number of convolutional layers in the model is controlled to 10, and the channel transformation uses 1×1 convolution for dimensionality reduction to maintain the lightweight structure of the model.

5. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, In S6, the high pooling operation compresses the feature map to a height of 1, and then extracts the sequence features through (1,3) convolution, finally outputting a character sequence with a time step of 21, covering the maximum character length of a standard license plate.

6. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, The specific CTC greedy decoding process in S6 is as follows: the continuously repeating predicted characters in the output 21-bit character feature sequence are merged into a single character, and blank characters with confidence levels lower than a preset threshold are removed, finally converging to obtain a 7-digit standard license plate number.

7. The license plate recognition method based on YOLOv8 and lightweight PlateResNet according to claim 1, wherein, The data enhancements in S3 include: strong perspective transformation, random resolution degradation, Gaussian motion blur, random erasure occlusion, and HSV color dithering.

8. The license plate recognition method based on YOLOv8 and lightweight PlateResNet as described in claim 1, characterized in that, In the multi-task joint training of S4: For the license plate sequence task, Connectionist Temporal Classification (CTC) loss is adopted as the core loss function. Mapping rule B is defined to merge consecutive repeating characters and remove whitespace characters, allowing the network to output the same true label through multiple legitimate paths. The probability sum P(y | x) of all legitimate paths is calculated using the forward algorithm. For the license plate color classification task, a separate color classification branch is set up, and the cross-entropy loss function is used for optimization. The difference between the predicted probability distribution and the true color label is calculated. The cross-entropy loss function is: The total loss function is: where, where a and b are tunable hyperparameters, L CTC is the CTC loss, L C-E is the cross-entropy loss.

9. The license plate recognition method based on YOLOv8 and lightweight PlateResNet as described in claim 8, characterized in that, The model training parameters and strategies are as follows: the Adam optimizer is used, the initial learning rate is set to 0.0005, and a learning rate decay strategy is introduced, which halves the learning rate every 20 epochs; the training batch size is set to 32, the total number of iterations is 50 epochs, the data loading uses the PyTorch built-in DataLoader iterator, and multi-process loading is enabled to accelerate I / O throughput. The training set is randomly shuffled before the start of each epoch to avoid the model memorizing the sample order.

10. The license plate recognition method based on YOLOv8 and lightweight PlateResNet as described in claim 1, characterized in that, The residual block embedding mechanism in S6 is as follows: In the critical pooling interval of the PlateResNet model, a residual structure containing two 3×3 convolutional layers and skip connections is introduced. The residual structure enables the gradient to be directly backpropagated to the shallow layers of the network, which is used to solve the gradient vanishing problem in deep networks and enhance the model's ability to express deep features of blurred, tilted, and occluded license plates. At the same time, the total number of convolutional layers in the entire PlateResNet network is controlled to be 10, and when the network channel dimension changes, 1×1 convolution is used for dimension projection, so that the model can improve recognition accuracy while maintaining low computational complexity to meet the real-time operation requirements of edge devices.