License plate recognition result credible output method and system
Patent Information
- Application Number
- CN202611507333.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0008]为了解决背景技术中提出的现有车牌识别系统在真实车道连续视频流场景中采用单帧孤立处理,缺乏对同一车辆在视频流中的多帧识别候选车牌进行整合、评估与输出的决策机制,导致车牌识别准确率和可信度不足的技术问题,本发明提供了一种车牌识别结果可信输出方法及系统
本发明通过获取连续多帧视频帧,识别其候选车牌,并以车牌类型一致性、车牌字符串差异度和车牌目标框位置形成三维条件,将连续多帧视频帧中属于同一车辆的候选车牌的视频帧归集为同一车辆事件轨迹,改变了现有技术将视频流割裂为互不关联静态图像的处理架构;进而通过在同一车辆事件轨迹内统计各候选车牌的支持帧数和平均车牌识别分数;并以支持帧数为第一优先级、平均车牌识别分数为第二优先级决策出最佳候选车牌,避免了单帧偶发误识别仅凭最高分直接输出;在此基础上,对最佳候选车牌执行稳定性判定,当赢家占比不足或领先帧数不足时,将最佳候选车牌标记为弱赢家,同时输出次优候选车牌,解决了在弱赢家场景下,次优候选车牌与最佳候选车牌相近但相互冲突易误覆盖可能正确车牌的缺陷。上述技术特征有机组合,形成了从输入获取、车辆事件轨迹归集、多帧统计、优先级择优决策、稳定性判断、冲突解决到可信车牌结果输出的完整闭环,对连续视频流中不同视频帧可能输出多个相近但相互冲突的候选车牌进行聚合统计判断后决策输出,显著提高了真实车道连续视频流场景下车牌识别结果的可信度,降低了单帧误识别和弱赢家误覆盖风险。
Smart Images

Figure CN123016415A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image recognition and intelligent transportation technology, specifically to a method and system for reliable output of license plate recognition results. Background Technology
[0002] License Plate Recognition (LPR) is one of the core technologies of intelligent transportation systems, widely used in scenarios such as parking management, electronic toll collection, traffic flow monitoring, and traffic violation capture. With the rapid development of deep learning technology, license plate recognition systems based on object detection and optical character recognition (OCR) have become the mainstream technical solution.
[0003] Currently, mainstream license plate recognition systems typically employ the following processing flow: Input images are acquired through video streaming or image capture; object detection algorithms (such as YOLO object detectors) are used to detect and locate the license plate region in the input image; OCR recognition is performed on the located license plate region to extract the license plate number string; finally, the optimal license plate recognition result is output based on the confidence level of the recognition result. This processing architecture achieves relatively ideal recognition results in application scenarios such as static images, clear snapshots, or single-shot accurate recognition.
[0004] However, license plate recognition technology based on single-frame object detection and OCR focuses on improving license plate localization, color recognition, or character recognition in a single frame image, but usually only outputs the highest score result in a single instance. This approach fragments the video stream into unrelated static images, and the recognition results between frames of the video stream lack an effective correlation and fusion mechanism, and there is a lack of integration of candidate license plates for the same vehicle passing by continuously.
[0005] In real-world lane environments, the same vehicle may appear sequentially across multiple consecutive video frames. Due to various factors such as low-light conditions (nighttime, heavy fog, etc.), motion blur, occlusion, reflections, video compression loss of fidelity, changes in license plate tilt angle, interference from nearby vehicles, and camera installation conditions, the highest-scoring recognition result in a single frame may not represent the most reliable license plate result for the same vehicle passing through. When the image quality of a frame is poor, even image enhancement techniques only repair and correct a single frame, failing to overcome the inherent flaw of single-frame recognition being prone to misidentification.
[0006] Furthermore, the imaging quality of the same vehicle varies significantly across different video frames, leading to the potential output of multiple similar but conflicting candidate license plates when extracting different video frames. However, existing solutions lack effective technical means to resolve conflicts between recognition results from different frames.
[0007] In summary, existing technical solutions lack a mechanism for integrating, evaluating, and outputting candidate license plates for the same vehicle across multiple frames in a video stream, thus failing to guarantee the reliability of the final license plate recognition results. Summary of the Invention
[0008] To address the technical problem mentioned in the background art, existing license plate recognition systems in real-world continuous video stream scenarios employ isolated single-frame processing and lack a decision-making mechanism for integrating, evaluating, and outputting multiple candidate license plates for the same vehicle across multiple frames in the video stream, resulting in insufficient accuracy and reliability of license plate recognition, this invention provides a method and system for reliable output of license plate recognition results.
[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A method for reliable output of license plate recognition results includes the following steps: S1. Obtain the current video frame from the continuous video stream of the lane; S2. Perform target detection on the current video frame to obtain the license plate target box and license plate type of the current video frame. Perform optical character recognition on the license plate target box area to obtain the license plate string and license plate recognition score; wherein, the license plate type and license plate string are used as candidate license plates. S3. Compare the current video frame with the video frames in the existing vehicle event trajectory; If the current video frame meets the inclusion criteria, the current video frame will be included in the existing vehicle event trajectory; if the current video frame does not meet the inclusion criteria, a new vehicle event trajectory will be created for it. S4. Repeat S1 to S3 until the license plate target box of the current video frame exceeds the target detection area or the number of frames of the current video frame reaches the set frame number threshold, to obtain the same vehicle event trajectory containing multiple video frames. S5. Within the same vehicle event trajectory, aggregate and statistically analyze the candidate license plates of the above multiple video frames: if the statistical result shows only one candidate license plate, then take that candidate license plate as the best candidate license plate; if the statistical result shows multiple candidate license plates, then obtain the number of supported frames and the average license plate recognition score for each candidate license plate. S6. Prioritize the number of supported frames as the first priority and the average license plate recognition score as the second priority, sort the candidate license plates, and select the candidate license plate ranked first as the best candidate license plate; at the same time, select the candidate license plate ranked second as the second best candidate license plate. S7. Determine the stability of the above best candidate license plates, and mark the best candidate license plates as strong winners or weak winners based on their stability. S8. Output reliable license plate results: If the best candidate license plate is marked as a strong winner, then the best candidate license plate will be output as the reliable license plate result. If the best candidate license plate is marked as a weak winner, then the best candidate license plate will be output as the reliable license plate result, and the second best candidate license plate will be output as a supplementary result.
[0010] Further, S7 includes: S71. Calculate the proportion of the number of supporting frames of the best candidate license plate to the total number of frames of all candidate license plates in the same vehicle event trajectory, and use it as the winner proportion; determine whether the winner proportion is less than the preset proportion threshold; if so, mark the best candidate license plate as a weak winner; if not, execute S72. S72. Calculate the difference in the number of supported frames between the best candidate license plate and the second best candidate license plate, and use it as the leading frame number; determine whether the leading frame number is less than the preset difference threshold. If yes, mark the best candidate license plate as a weak winner; otherwise, execute S73. S73. When the winner's percentage is greater than or equal to a preset percentage threshold and the leading frame count is greater than or equal to a preset difference threshold, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner.
[0011] Furthermore, S7 also includes: S74. Determine whether the best candidate license plate and the second-best candidate license plate, which are marked as weak winners, only have a difference in province characters. If they do, mark the best candidate license plate as having a province conflict; if they do not, do not mark it. S75. Determine whether the best candidate license plate and the second-best candidate license plate, which are marked as weak winners, have similar numbers / letters in the same character position. If they do, mark the best candidate license plate as having a similar character conflict; if they do not, do not mark it.
[0012] Further, S1 includes: S11. Obtain the current video frame from the continuous video stream of the lane; S12. Perform a sharpness detection on the current video frame to determine whether the sharpness score of the current video frame is higher than the preset sharpness threshold. If the resolution score of the current video frame is higher than the preset resolution threshold, then the current video frame will be output. Otherwise, the current video frame is used as a candidate blurred video frame, and S11 is repeated until the clarity of the current video frame is higher than the preset clarity threshold; or, if the number of candidate blurred video frames reaches the preset number of skipped frames, the frame with the highest clarity score among the candidate blurred video frames is used as the current video frame for output.
[0013] Furthermore, in S3: The inclusion criteria are: the license plate type is the same, the difference between the license plate strings is lower than the preset difference threshold, and the target box of the license plate is located within the preset area.
[0014] Furthermore, it also includes S9, special handling for vehicles without license plates: S91. When the license plate type in S2 is "unlicensed vehicle", the special handling for unlicensed vehicles is triggered: S92. Repeat S1 and S2 to obtain multiple consecutive video frames. The license plate type is "unlicensed". Confirm that the current vehicle is an unlicensed vehicle. Mark the license plate type and license plate string of the current vehicle as the default license plate type and default license plate string. Save the current video frame with the highest resolution as a backup image of the current vehicle without a license plate. S93. Invoke the side camera of the lane controller to capture the image of the current vehicle's temporary license plate; S94. Perform target detection on the current vehicle temporary license plate image to obtain the license plate target bounding box and license plate type of the vehicle temporary license plate image. Perform optical character recognition on the license plate target bounding box region of the vehicle temporary license plate image to obtain the license plate string. Use the above license plate type and license plate string as the current vehicle temporary license plate. Update the current vehicle's default license plate type and default license plate string to the current vehicle temporary license plate type and license plate string. Output the current vehicle temporary license plate as the reliable license plate result. S95. Combine the above-mentioned image of the current vehicle's temporary license plate with the above-mentioned backup image of the current vehicle without a license plate to form the evidence image of the current vehicle's temporary license plate.
[0015] Furthermore, S93 also includes: If no temporary license plate image of the current vehicle is detected within the first set time period, the lane controller microphone is invoked to collect the temporary license plate entered by voice recognition. If no temporary license plate entered through voice recognition is detected within the second set time period, manual intervention will be required.
[0016] Furthermore, while outputting the credible license plate result, structured evidence is generated, which includes: The best candidate license plate marked as a strong winner and the corresponding video frame; Alternatively, the best and second-best candidate license plates marked as weak winners, and the video frames corresponding to the best candidate license plates marked as weak winners; Alternatively, a temporary license plate and an image of evidence of the temporary license plate.
[0017] Meanwhile, based on the above-mentioned reliable output method for license plate recognition results, this application also provides a reliable output system for license plate recognition results, including a current video frame acquisition module, a license plate target detection module, a license plate character recognition module, a vehicle event trajectory module, a best candidate decision module, a license plate stability judgment module, and a reliable license plate output module; The current video frame acquisition module is used to acquire the current video frame from the continuous video stream of the lane; The license plate target detection module is used to perform target detection on the current video frame to obtain the license plate target box and license plate type; The license plate character recognition module is used to perform optical character recognition on the target area of the license plate to obtain the license plate string and the license plate recognition score; The vehicle event trajectory module is used to assign the current video frame to an existing vehicle event trajectory or a newly created vehicle event trajectory based on whether the assignment criteria are met. The best candidate decision module is used to count the number of supporting frames and the average license plate recognition score of each candidate license plate within the same vehicle event trajectory, and to decide the best and second-best candidate license plates from the candidate license plates in the same vehicle event trajectory according to the number of supporting frames and the average license plate recognition score of each candidate license plate. The license plate stability judgment module is used to determine the stability of the best candidate license plate. When the winning percentage of the best candidate license plate is insufficient, or when the leading frame number of the best candidate license plate is insufficient, the best candidate license plate is marked as a weak winner; otherwise, it is marked as a strong winner. The trusted license plate output module is used to output the best candidate license plate marked as a weak winner as a trusted license plate result, while the second-best candidate license plate is output as a supplementary result along with the trusted license plate result; or, the best candidate license plate marked as a strong winner is output as a trusted license plate result.
[0018] Furthermore, the license plate stability judgment module includes a winner data statistics unit, a winner type marking unit, a similar character conflict marking unit, and a province conflict marking unit; The winner data statistics unit is used to calculate the winner percentage and leading frame count of the best candidate license plate; The winner type marking unit is used to determine whether the winner percentage is greater than or equal to a preset percentage threshold and whether the leading frame number is greater than or equal to a preset difference threshold. If so, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner. The province conflict marking unit is used to determine whether the best candidate license plate and the second best candidate license plate marked as weak winners only have a difference in province characters. If so, the best candidate license plate is marked as a province conflict. The similar character conflict marking unit is used to determine whether the best candidate license plate and the second best candidate license plate, which are marked as weak winners, have similar numbers / letters in the same character position. If they do, the best candidate license plate is marked as having a similar character conflict.
[0019] In summary, the present invention has the following beneficial technical effects: This invention acquires multiple consecutive video frames, identifies candidate license plates, and uses three-dimensional conditions—license plate type consistency, license plate string difference, and license plate target box position—to group video frames of candidate license plates belonging to the same vehicle into a single vehicle event trajectory. This changes the existing processing architecture that fragments the video stream into unrelated static images. Furthermore, it calculates the number of supporting frames and the average license plate recognition score for each candidate license plate within the same vehicle event trajectory. The optimal candidate license plate is determined with the number of supporting frames as the first priority and the average license plate recognition score as the second priority, avoiding the problem of occasional misidentification in a single frame and directly outputting the highest score. Based on this, a stability judgment is performed on the optimal candidate license plate. When the winner's percentage is insufficient or the leading frame count is insufficient, the optimal candidate license plate is marked as a weak winner, and a second-best candidate license plate is output. This solves the problem in weak winner scenarios where the second-best candidate license plate is similar to the optimal candidate license plate but conflicts with it, easily overwriting potentially correct license plates. The above-mentioned technical features are organically combined to form a complete closed loop from input acquisition, vehicle event trajectory collection, multi-frame statistics, priority selection decision, stability judgment, conflict resolution to reliable license plate result output. After aggregating and statistically judging multiple similar but conflicting candidate license plates that may be output in different video frames in a continuous video stream, the decision output is made, which significantly improves the reliability of license plate recognition results in real lane continuous video stream scenarios and reduces the risk of single-frame misidentification and weak winner miscovery. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the process of obtaining the current video frame; Figure 3 This is a flowchart illustrating the process of determining the weak winner; Figure 4 This is a flowchart illustrating the weak winner character conflict marking process; Figure 5 This is a schematic diagram of the emergency handling procedure for unlicensed vehicles; Figure 6 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0021] The technical solution of the present invention will be further explained and described below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the embodiments described below.
[0022] Example 1 Figure 1 This is a flowchart of the reliable output method for license plate recognition results according to the present invention. The method includes the following steps: S1. Obtain the current video frame from the continuous video stream of the lane, including: S11. Obtain the current video frame from the continuous video stream of the lane; S12. Perform a sharpness detection on the current video frame to determine whether the sharpness score of the current video frame is higher than the preset sharpness threshold. If the resolution score of the current video frame is higher than the preset resolution threshold, then the current video frame will be output. Otherwise, use the current video frame as a fuzzy candidate video frame and repeat S11 until the clarity of the current video frame is higher than the preset clarity threshold, or the number of fuzzy candidate video frames reaches the preset number of skipped frames; then output the frame with the highest clarity score among the fuzzy candidate video frames as the current video frame.
[0023] For details, please refer to Figure 2 : In S11, the current video frame in the continuous video stream of the lane is obtained from the lane-front camera (in practice, a network camera located at the lane entrance or exit that supports the RTSP protocol) or other continuous image sources. In practice, the lane-front camera can display a maximum of two vehicles in its field of view.
[0024] In S12, the sharpness detection includes: First, the current color video frame is converted to a grayscale image to reduce the impact of color variations, headlight colors, or license plate background colors on sharpness assessment. Then, the area where the license plate might appear is extracted from the grayscale image. Since the current vehicle appears in the center and lower half of the image, and the next vehicle appears in the upper half, the sharpness evaluation value of the area from 1 / 4 to 3 / 4 of the current video frame's height is used as the current video frame's sharpness score.
[0025] Subsequently, the Laplacian operator is applied to the region from 1 / 4 to 3 / 4 of the current video frame's image height to obtain the second-order gradient of pixel grayscale changes in this region, and the Laplacian variance of this gradient map is calculated. A larger variance indicates clearer image edges, character strokes, and license plate outlines; a smaller variance indicates that the image has been weakened by motion blur, out-of-focus, or compression smoothing. To avoid the influence of image edges, sky, ground, or irrelevant backgrounds on the judgment, different weights are assigned to the edge and center regions of the image as the current video frame's sharpness score. For example, if the edge region score is 98 and the center region score is 95, and license plates typically appear in the center region, then 95 is taken as the frame's sharpness score. This sharpness score is not a license plate recognition confidence level, nor does it indicate whether the license plate is correct; it is only used to determine whether the current video frame is clear enough to provide reliable input for subsequent models, serving as an image quality screening metric before recognition.
[0026] The above sharpness score is compared with a preset sharpness threshold: if the sharpness score is higher than the preset sharpness threshold, the current video frame is output; if the sharpness score is lower than the preset sharpness threshold, the current video frame is added to the continuous blur candidate video frame window as a blur candidate video frame.
[0027] Repeat steps S11 and S12 until the clarity of the current video frame is higher than the preset clarity threshold, or when the number of frames in the continuous blurred candidate video frame window reaches the preset number of skipped frames, select the frame with the highest clarity score in the window (i.e. the fallback identification frame) as the current video frame, and clear the continuous blurred candidate video frame window.
[0028] In one specific implementation, the sharpness threshold can be set to 100, and the preset skip frame count can be set to 3. If excessive skipping causes output lag, the threshold can be lowered or the preset skip frame count can be reduced; if significantly blurred frames enter the recognition process, the threshold can be increased or the preset skip frame count can be increased. The sharpness threshold and preset skip frame count can be adjusted based on the camera installation angle, nighttime lighting, bitstream compression intensity, and on-site vehicle speed. This mechanism reduces the risk of misidentification caused by significantly blurred frame images; simultaneously, even under continuous low-quality image conditions, the relatively clearest frame can still be selected for processing, avoiding the inability to output reliable license plate results due to continuous skipping, thus balancing accuracy and output continuity.
[0029] S2. Perform target detection on the current video frame to obtain the license plate target bounding box and license plate type of the current video frame. Perform optical character recognition on the license plate target bounding box area to obtain the license plate string and license plate recognition score; wherein, the license plate type and license plate string are used as candidate license plates. This includes: S21. Object detection: The license plate target detection model trained based on YOLOv8 is used to detect the current video frame, locate the license plate target box region in the current video frame, and obtain the license plate target box, license plate type (corresponding license plate color) and object detection confidence.
[0030] License plate target box: Represented by two-dimensional coordinates in the image coordinate system, using the form including the coordinates of the center point of the license plate target box (centerX, centerY), and the width w and height h; or including the coordinates of the upper left corner (x1, y1) and the lower right corner (x2, y2).
[0031] License plate types include: The type is represented by the license plate color, outputting the corresponding license plate type code; for example, a blue license plate outputs the type "blue"; a white-green gradient license plate outputs the type "green"; a white license plate outputs the type "white"; a yellow license plate outputs the type "yellow"; a yellow-green dual-color license plate outputs the type "kelly"; a black license plate outputs the type "black"; if no official license plate is displayed, the type "nano" is output; if a temporary license plate is placed on the windshield, the type "occasional" is output.
[0032] When the license plate type nano is detected and the license plate type occasional is not detected, the output is "No license plate". Specifically, "No license plate" means that no formal license plate is detected at the license plate position and no temporary license plate is detected on the windshield.
[0033] Next, optical character recognition is performed on the target area of the license plate to obtain the license plate string and the license plate recognition score.
[0034] The license plate recognition score is calculated as follows: the OCR model outputs the character probability at each sequence position, takes the character with the highest probability, removes blank characters and consecutive repeated characters, calculates the average probability of the remaining characters, and converts the average probability into a percentage score. This part is existing technology and will not be described in detail here.
[0035] S22. After obtaining the license plate target box, license plate type, license plate string and license plate recognition score of the current video frame, preprocess the license plate target box, license plate type and license plate string, including license plate string validity judgment, license plate color standardization and license plate target box normalization.
[0036] The validity check of the license plate string is as follows: it is judged according to the existing license plate format rules, checking whether the province abbreviation exists in the set of Chinese characters for province abbreviation on the license plate, and whether the length of the license plate string meets the requirements of ordinary formal license plates or temporary license plates; valid license plate strings are output, and invalid strings are output as empty.
[0037] License plate target bounding box normalization: This application uniformly converts the license plate target bounding box position output by the model into the center point coordinate (centerX, centerY) expression, which facilitates the subsequent collection of vehicle event trajectories.
[0038] Color standardization: The detected license plate type is uniformly represented by a preset color code (e.g., blue corresponds to 0, yellow corresponds to 1, black corresponds to 2, white corresponds to 3, green corresponds to 4, kelly corresponds to 5, occasional corresponds to 7, nano corresponds to 9).
[0039] Finally, the color-standardized license plate type and the valid license plate string are used as candidate license plates.
[0040] S3. Compare the current video frame with the video frames in the existing vehicle event trajectory; If the current video frame meets the inclusion criteria, it will be included in an existing vehicle event trajectory; if the current video frame does not meet the inclusion criteria, a new vehicle event trajectory will be created for it; specifically: For the current video frame, it is sequentially subjected to inclusion condition judgment with the previous video frames in the existing vehicle event trajectory. When the following three conditions are satisfied at the same time, the current video frame is included in the existing vehicle event trajectory: (1) The license plate types are the same: the license plate type of the current video frame is consistent with the license plate type of the video frame in the vehicle event trajectory; (2) The difference degree of the license plate character string is lower than a preset difference degree threshold: the difference degree D between the license plate character string of the current video frame and the license plate character string of the previous video frame in the vehicle event trajectory t is less than the preset difference degree threshold D0.
[0041] The difference degree is calculated by using the edit distance, that is, the minimum number of insertions, deletions or replacements required to convert one character string into another. For example, the difference degree between "Shan A12345" and "Shan A12346" is 1, and the difference degree between "Shan A12345" and "Su B98765" is 6. In another embodiment, the difference degree may adopt a weighted edit distance introduced with similar character weights, and assign lower difference weights to easily confused characters such as the number 0 and the letter Q, the number 1 and the letter L, the number 5 and the letter S, the number 6 and the letter G, the number 8 and the letter B, and the number 2 and the letter Z, so that candidate license plates that differ only in easily confused characters have a lower difference degree, and thus are more likely to be included in the same vehicle event trajectory; (3) The license plate target frame is located in a preset area: the distance between the normalized center point coordinates (centerX1, centerY1) of the license plate target frame of the current video frame and the normalized center point coordinates (centerX0, centerY0) of the license plate target frame of the previous video frame in the same vehicle event trajectory is within a preset distance threshold. The distance threshold may be preconfigured according to the installation angle of the camera in front of the lane and the lane width.
[0042] The normalized center point coordinates of the license plate target frame described above can reflect whether the vehicle movement trend conforms to the continuous moving direction: the change of the center point coordinates of the license plate target frame of the current video frame relative to the center point coordinates of the license plate target frame of the previous video frame in the same vehicle event trajectory conforms to the continuous movement trend of the vehicle under the viewing angle of the fixed lane camera. The vehicle usually moves from far to near along the picture, and the ordinate of the center point of the license plate target frame generally presents a quasi-linear relationship, and will not suddenly increase significantly to return to a farther position; if the ordinate of the center point of the license plate target frame of the current video frame increases significantly compared with the ordinate of the center point of the license plate target frame of the previous video frame and jumps back to the upper part of the picture, the inclusion into the same vehicle event trajectory is rejected, so as to reduce the situation that a following vehicle is merged into a preceding vehicle.
[0043] If the current video frame and the video frame in an existing vehicle event trajectory simultaneously satisfy all three conditions above, the current video frame is classified into this vehicle event trajectory; if no video frame from any existing vehicle event trajectory simultaneously satisfies all three conditions above with the current video frame, a new vehicle event trajectory is created for the current video frame.
[0044] S4. Repeat S1 to S3 until the license plate target frame of the current video frame exceeds the target detection area or the frame number of the current video frame reaches the set frame number threshold, so as to obtain the same vehicle event trajectory containing multiple video frames.
[0045] When it is detected that the coordinates of the license plate target frame exceed the target detection area, that is, the Y-coordinate of the center point of the license plate target frame exceeds the boundary of the target detection area (below 1 / 4 of the image height of the current video frame), the loop is exited, the acquisition of video frames for the current vehicle is terminated, and subsequent steps are performed; In particular, when the license plate target frame is located in the target detection area of the current video frame, and within a consecutive set number of frames, the distance between the center point coordinates of the license plate target frame of the current video frame and the center point coordinates of the license plate target frame of the previous video frame is less than the set range, it is determined that the vehicle is in a stationary state, the loop is also exited, the acquisition of video frames for the current vehicle is terminated, and subsequent steps are performed; S5. Perform aggregation statistics on the candidate license plates of the multiple video frames within the same vehicle event trajectory: if there is only one candidate license plate in the statistical result, this candidate license plate is taken as the optimal candidate license plate; if there are multiple candidate license plates in the statistical result, the supported frame number and the average license plate recognition score of each candidate license plate are obtained.
[0046] For the current vehicle event trajectory, grouping statistics are performed on multiple video frames. The supported frame number refers to the number of frames in which the same candidate license plate is recognized within this vehicle event trajectory. For example, when the same vehicle passes by, there are recognition results in 8 consecutive frames, among which "Shaanxi A12345" appears 5 times and "Shaanxi A12346" appears 3 times, then the supported frame number of the former is 5, and that of the latter is 3. The average license plate recognition score is the cumulative recognition score divided by the supported frame number (the cumulative recognition score refers to the sum of the license plate recognition scores of the same candidate license plate in each supported frame), which is used to reflect the stable quality of the candidate license plate each time it is recognized, so as to avoid misjudging a candidate license plate as credible just because it appears many times but has a very low score each time.
[0047] S6. With the supported frame number as the first priority and the average license plate recognition score as the second priority, sort the multiple candidate license plates, and take the candidate license plate ranked first as the optimal candidate license plate; meanwhile, take the candidate license plate ranked second as the sub-optimal candidate license plate.
[0048] In one specific implementation, candidates can first be sorted by the number of supported frames in descending order. When two candidate license plates have the same number of supported frames, they can be sorted by the average license plate recognition score in descending order. When both the number of supported frames and the average license plate recognition score are the same, they can be sorted by the highest single-frame recognition score in descending order. Through this priority mechanism, the best candidate license plate is not simply the "highest score in a certain frame," but rather a decision result deduced after integrating evidence from multiple frames within the same vehicle event.
[0049] S7. Determine the stability of the above best candidate license plates, and mark the best candidate license plates as strong winners or weak winners based on their stability.
[0050] Please refer to Figure 3 This step specifically includes: S71. Calculate the proportion of the number of supporting frames of the best candidate license plate to the total number of frames of all candidate license plates in the same vehicle event trajectory, and use it as the winner proportion; determine whether the winner proportion is less than the preset proportion threshold; if so, mark the best candidate license plate as a weak winner; if not, execute S72. S72. Calculate the difference in the number of supported frames between the best candidate license plate and the second best candidate license plate, and use it as the leading frame number; determine whether the leading frame number is less than the preset difference threshold. If yes, mark the best candidate license plate as a weak winner; otherwise, execute S73. S73. When the winner's percentage is greater than or equal to a preset percentage threshold and the leading frame count is greater than or equal to a preset difference threshold, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner.
[0051] Specifically, when a vehicle event trajectory has a total of 10 valid recognition frames, and the first-ranked candidate license plate appears 4 times, the second-ranked candidate license plate appears 3 times, and the third-ranked candidate license plate appears 3 times, then the best candidate license plate is the first-ranked candidate license plate, the second-best candidate license plate is the second-ranked candidate license plate, the winner of the best candidate license plate is 40%, and the leading frame number is 1.
[0052] When the winning percentage of the best candidate license plate is lower than the preset percentage threshold (e.g., 50%), or the leading frame count of the best candidate license plate is lower than the preset difference threshold (e.g., 2 frames), it indicates that although the best candidate license plate ranks first, its advantage is unstable and may come from random fluctuations. The best candidate license plate is marked as a weak winner, while the second-ranked candidate license plate is retained as the second-best candidate license plate.
[0053] Furthermore, it also includes: S74. Determine whether the best candidate license plate and the second-best candidate license plate, which are marked as weak winners, only have a difference in province characters. If they do, mark the best candidate license plate as having a province conflict; if they do not, do not mark it. S75. Determine whether there are similar digit / letter characters at the same character position between the optimal candidate license plate marked as a weak winner and the sub-optimal candidate license plate; if yes, mark the optimal candidate license plate as having a similar character conflict; if no, do not perform the marking.
[0054] The above S74 and S75 are used to perform further conflict judgment on the optimal candidate license plate marked as a weak winner.
[0055] Please refer to Figure 4 , the conflict types include similar character conflict and province conflict: Specifically, the digit / letter similar character groups as shown in Table 1 are pre-constructed, with 0 / Q, 1 / L, 5 / S, 6 / G, 8 / B, and 2 / Z respectively taken as one set of digit / letter similar character groups.
[0056] Table 1 Digit / Letter Similar Character Groups When there is a digit / letter similar character conflict at the same character position between the optimal candidate license plate marked as a weak winner and the sub-optimal candidate license plate in the same vehicle event trajectory, the optimal candidate license plate marked as a weak winner is further marked as having a similar character conflict.
[0057] When only the province character is inconsistent between the optimal candidate license plate marked as a weak winner and the sub-optimal candidate license plate in the same vehicle event trajectory (such as "Jin A12345" and "Hu A12345"), the optimal candidate license plate marked as a weak winner is further marked as having a province conflict. The actual causes of the province conflict are: similar shapes of Chinese characters for province abbreviations, image cropping, blurriness on the left side of the license plate, or OCR province character library confusion, such as "Jin A12345" and "Hu A12345".
[0058] S8. Output a trusted license plate result: If the optimal candidate license plate is marked as a strong winner, the optimal candidate license plate is output as the trusted license plate result; If the optimal candidate license plate is marked as a weak winner, the optimal candidate license plate is output as the trusted license plate result, and at the same time, the sub-optimal candidate license plate is output as a supplementary result.
[0059] For a strong winner, the optimal candidate license plate is directly output as the trusted license plate result. For a weak winner, the optimal candidate license plate is output as the trusted license plate result, and at the same time, the sub-optimal candidate license plate is output as a supplementary result. The optimal candidate license plate marked as a weak winner will not be used to overwrite the sub-optimal candidate license plate blindly. This avoids mistakenly overwriting a potentially correct license plate when the sub-optimal candidate license plate and the optimal candidate license plate are similar but conflict with each other in the weak winner scenario.
[0060] Furthermore, while outputting credible license plate results, structured evidence is generated and written to the verification information field of the local database. The structured evidence includes, but is not limited to: the best candidate license plate marked as a strong winner, the best and second-best candidate license plates marked as weak winners, the number of supported frames for each candidate license plate, the average license plate recognition score for each candidate license plate, similar character conflict markers, province conflict markers, and the video frame image corresponding to the best candidate license plate.
[0061] With structured evidence, business or maintenance personnel can not only see the best candidate license plate (second best candidate license plate) in the final output, but also see which frames and candidate license plates together form the result, thus making the recognition result interpretable, traceable, and regressible for verification.
[0062] Example 2 Based on the technical solution in Embodiment 1 above, Embodiment 2 further includes S9, special handling of unlicensed vehicles, please refer to... Figure 5 : S91. When the license plate type in S2 is "unlicensed vehicle", the special handling for unlicensed vehicles is triggered.
[0063] That is, when it is detected that the current vehicle does not have a formal license plate (the license plate type output by the target detection is nano), and at the same time, no temporary license plate placed on the windshield is detected (the license plate type occasional is not detected by the target detection), the current vehicle is marked as having no license plate, triggering the special handling for vehicles without license plates.
[0064] It should be noted that if a temporary license plate placed on the windshield is detected in the current video frame (temporary license plate placed on the windshield, output corresponding license plate type occasional), the normal recognition process shall be performed according to S3 to S8 above.
[0065] S92. Repeat S1 and S2 to obtain multiple consecutive current video frames. When the license plate type output by the target detection is all "unlicensed", confirm that the current vehicle is an unlicensed vehicle. Mark the license plate type and license plate string of the current vehicle as the default license plate type and default license plate string. Save the current video frame with the highest resolution as a backup image of the current vehicle without a license plate.
[0066] While labeling the current vehicle's license plate type and license plate string with default license plate type and default license plate string, the target detection confidence score of the current video frame is used as the license plate recognition score in the current video frame.
[0067] When confirming that the current vehicle is not displaying a license plate, this determination is based on the detection results of multiple consecutive video frames.
[0068] If it is determined that the current vehicle does not bear a motor vehicle license plate, the following processing is executed: Mark the license plate type and license plate string of the current vehicle as the default license plate type and default license plate string, for example, "No A00000_9", where "No A00000" is the default license plate string, and "9" is the license plate type (default license plate type code), and write or update the event track of the current vehicle.
[0069] S93. Call the side camera of the lane controller to collect the temporary license plate image of the current vehicle; S94. Perform target detection on the temporary license plate image of the current vehicle to obtain the license plate target frame and license plate type of the temporary license plate image of the vehicle, perform optical character recognition on the license plate target frame area of the temporary license plate image of the vehicle to obtain a license plate string, take the above license plate type and license plate string as the temporary license plate of the current vehicle, and update the default license plate type and default license plate string of the current vehicle to the license plate type and license plate string of the temporary license plate of the current vehicle; and output the temporary license plate of the current vehicle as a trusted license plate result.
[0070] That is, target detection and optical character recognition are performed on the collected temporary license plate image of the current vehicle, and the default license plate type and default license plate string in the event track of the same vehicle are updated to the license plate type and license plate string of the actual temporary license plate; for example, updated from "No A00000_9" to "Shaanxi A12345_7".
[0071] S95. Splice the above temporary license plate image of the current vehicle with the above spare image of the current vehicle without a motor vehicle license plate to form a temporary license plate evidence image of the current vehicle.
[0072] In the above S95, when the special situation processing for unlicensed vehicles confirms that the current vehicle is not bearing a motor vehicle license plate, the method further includes generating a picture evidence chain: When switching to the side camera of the lane controller and recognizing the temporary license plate displayed by the driver, the temporary license plate image (the temporary license plate image includes information such as a timestamp and a license plate string) is saved. When the spare image of the current vehicle without a motor vehicle license plate and the temporary license plate snapshot image exist simultaneously in the same vehicle event track, the two are spliced into one temporary license plate evidence image (spliced up and down or left and right).
[0073] Through the picture evidence chain mechanism, a complete evidence chain is formed by "unlicensed vehicle special situation triggering, judging that the current vehicle does not bear a motor vehicle license plate, switching the side camera of the lane controller, the driver displaying the temporary license plate, temporary license plate recognition, and temporary license plate evidence image uploading", which is written into the review information field of the local database, so as to facilitate manual review and verification.
[0074] The above-mentioned S93 also includes: if no temporary license plate image is detected within the first set time period, the lane controller microphone is invoked to collect the temporary license plate entered by voice recognition; If no temporary license plate entered through voice recognition is detected within the second set time period, manual intervention will be required.
[0075] In this application, when recognizing temporary license plates, drivers can show their temporary license plates to the side camera of the lane controller, or they can enter their temporary license plates through voice recognition interaction via the lane controller microphone.
[0076] If the driver fails to display the temporary license plate or enter the license plate via voice recognition within the set time, remote manual intervention will be initiated. Manual intervention means that the driver connects with on-site or back-end staff to enter the license plate information, thereby ending the special procedure and turning off the side camera and microphone of the lane controller to prevent expired or erroneous reissue.
[0077] Specifically, since the default flag for vehicles without license plates is used to indicate the detection of vehicles without license plates, and needs to be processed according to the default license plate type and default license plate string, premature confirmation may mistakenly record temporary obstruction, image blur, angle change, or target detection failure as vehicles without license plates. Therefore, a higher frame threshold can be set for vehicles without license plates than for official license plates, requiring more consecutive frames to support before triggering special handling and temporary license plate recognition and reissue.
[0078] Example 3 Please refer to Figure 6 This is a system block diagram of a reliable license plate recognition result output system provided by the present invention. The system can be deployed on an edge NPU device, a lane-side server, or a combination of both, and includes a current video frame acquisition module, a license plate target detection module, a license plate character recognition module, a vehicle event trajectory module, an optimal candidate decision module, a license plate stability judgment module, and a reliable license plate output module. The data flow between the modules is as follows: Current video frame acquisition module: Acquires the current video frame from the continuous video stream of the lane from the camera in front of the lane, and outputs the current video frame to the license plate target detection module; The license plate target detection module is used to perform target detection on the current video frame to obtain a bounding box containing the license plate target and the license plate type; License plate character recognition module: Performs optical character recognition on the target area of the license plate to obtain a string containing the license plate and a license plate recognition score; Vehicle event trajectory module: Based on the consistency of license plate type, the difference of license plate string, and the position of license plate target box, the current video frame is assigned to an existing vehicle event trajectory or a newly created vehicle event trajectory; Best Candidate Decision Module: Calls video frames within the same vehicle event trajectory, counts the number of supported frames and the average license plate recognition score for each candidate license plate, and decides the best and second-best candidate license plates from the candidate license plates of the same vehicle event trajectory with the number of supported frames as the first priority and the average license plate recognition score as the second priority. License plate stability judgment module: The module judges the stability of the best candidate license plate. If the winning percentage of the best candidate license plate is insufficient, or if the leading frame number of the best candidate license plate is insufficient, the best candidate license plate is marked as a weak winner; otherwise, it is marked as a strong winner. The trusted license plate output module is used to output the best candidate license plate marked as a weak winner as a trusted license plate result, while the second-best candidate license plate is output as a supplementary result along with the trusted license plate result; or, the best candidate license plate marked as a strong winner is output as a trusted license plate result; or, temporary license plates are output as trusted license plate results.
[0079] Specifically: The current video frame acquisition module includes a stream acquisition unit, a frame quality evaluation unit, a fuzzy frame selection unit, and a video frame output unit; specifically: The streaming unit acquires RTSP video streams from the lane camera and maintains the latest frame or short-term buffer to avoid recognition delays caused by the accumulation of old frames.
[0080] Frame quality evaluation unit: Calculates the sharpness score of the current video frame, determines whether the sharpness score of the current video frame is lower than a preset threshold, and sends video frames with a sharpness score higher than the preset threshold to the video frame output unit.
[0081] Fuzzy Frame Selection Unit: Maintains a continuous window of fuzzy candidate video frames. When the number of frames in the window reaches the preset number of skipped frames, the frame with the highest clarity is selected as the current video frame and sent to the video frame output unit. Video frame output unit: Outputs the current video frame.
[0082] The license plate target detection module includes a license plate target detection unit; specifically, it includes: License plate target detection unit: The license plate target detection model trained based on YOLOv8 is used to detect the current video frame and output the license plate target box, license plate type (corresponding license plate color) and target detection confidence.
[0083] The license plate character recognition module includes an optical character recognition unit; specifically, it includes: Optical Character Recognition Unit: Performs optical character recognition on the license plate target area of the current video frame, and outputs the license plate string and the license plate recognition score; the license plate recognition score is the average of the output probabilities of the OCR model at each character sequence position converted into a percentage score.
[0084] Vehicle event trajectory module: includes the current vehicle event trajectory unit, which is used to assign the current video frame to an existing vehicle event trajectory or to a newly created vehicle event trajectory.
[0085] The current vehicle event trajectory unit is used to classify the current video frame into an existing vehicle event trajectory or a newly created vehicle event trajectory based on the consistency of license plate type, the difference of license plate string, and the position of the license plate target box (the distance between the normalized center point (centerX, centerY) of the license plate target box of the current video frame and the normalized center point of the license plate target box of the previous video frame within the vehicle event trajectory).
[0086] The best candidate decision module includes a frame count unit, a license plate recognition score calculation unit, and a license plate decision output unit.
[0087] Supported frame count unit: Counts the number of supported frames for each candidate license plate; License plate recognition score calculation unit: Calculates the cumulative license plate recognition score, and divides the cumulative license plate recognition score by the number of supported frames for each candidate license plate to obtain the average license plate recognition score for each candidate license plate; License plate decision output unit: The best candidate license plate is determined by prioritizing the number of supported frames as the first priority and the average license plate recognition score as the second priority.
[0088] The license plate stability judgment module includes a winner data statistics unit, a winner type marking unit, a similar character conflict marking unit, and a province conflict marking unit.
[0089] Winner data statistics unit: used to calculate the winner percentage and leading frame count of the best candidate license plate; Winner type marking unit: used to determine whether the winner percentage is greater than or equal to a preset percentage threshold and whether the leading frame number is greater than or equal to a preset difference threshold. If so, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner. Province Conflict Marking Unit: Used to determine whether the best candidate license plate and the second best candidate license plate marked as weak winner only have a difference in province characters. If so, the best candidate license plate is marked as having a province conflict. The similar character conflict marking unit is used to determine whether the best candidate license plate and the second best candidate license plate, which are marked as weak winners, have similar numbers / letters in the same character position. If they do, the best candidate license plate is marked as having a similar character conflict.
[0090] Trusted license plate output module: includes a license plate output unit and a structured evidence unit; License plate output unit: Used to output the best candidate license plate marked as a weak winner as a reliable license plate result, while the second best candidate license plate is output as a supplementary result along with the reliable license plate result; or, output the best candidate license plate marked as a strong winner as a reliable license plate result.
[0091] Structured Evidence Unit: The above information, including the best candidate license plate marked as a strong winner, the best candidate license plate marked as a weak winner, the second best candidate license plate, the number of supporting frames for each candidate license plate, the average license plate recognition score for each candidate license plate, the current video frame image, and similar character conflict markers and province conflict markers, is used to generate a structured evidence and write it into the review information field of the local database.
[0092] The aforementioned reliable license plate recognition output system forms a complete closed loop, from input acquisition, vehicle event trajectory aggregation, multi-frame statistics, priority selection decision-making, stability assessment, conflict resolution to reliable license plate result output and structured evidence. It aggregates and statistically judges multiple similar but conflicting candidate license plates that may be output from different video frames in a continuous video stream before making a decision and outputting the result. This significantly improves the reliability of license plate recognition results in real-world continuous lane video stream scenarios and reduces the risk of single-frame misidentification and weak-winner miscovery. Furthermore, the recognition results are interpretable and traceable.
[0093] Example 4 The aforementioned reliable license plate recognition result output system also includes: Unlicensed Vehicle Incident Handling Module: In response to triggered unlicensed vehicle incidents, this module performs valid license plate target determination, access to the lane controller's side camera, access to the lane controller's microphone, temporary license plate recognition, and output of a reliable license plate result. This module works in conjunction with the current video frame acquisition module, license plate character recognition module, and reliable license plate output module, calling these modules to perform recognition during the incident process.
[0094] Image Evidence Chain Module: When the special handling module for unlicensed vehicles confirms that the current vehicle is not displaying a license plate, it saves a backup image of the current vehicle without a license plate. When a temporary license plate is identified, it saves the image of the temporary license plate and combines the two into a temporary license plate evidence image.
[0095] Local Database: This is a locally deployed SQLite database used to store vehicle event trajectories, reliable license plate results, structured evidence, and incident handling records. Structured evidence is stored in the `plateReview` field, which includes the best candidate license plate marked as a strong winner, the best and second-best candidate license plates marked as weak winners, the number of supported frames for each candidate license plate, the average license plate recognition score for each candidate license plate, similar character conflict markers, province conflict markers, and the video frame image corresponding to the best candidate license plate.
[0096] Example 5 The current video frame acquisition module acquires the current video frame in the continuous lane video stream from the lane front camera, the definition threshold is set to 100, and the preset number of skipped frames is set to 3. The frame quality evaluation unit calculates the Laplacian variance at the positions from 1 / 4 to 3 / 4 of the image height for the current video frame, and takes the score of the central area as the definition score. When a vehicle passes by, 10 consecutive frames pass the definition pre-inspection, the target detection module locates the license plate target frame in the video frame, and the license plate character recognition module recognizes the license plate character string and the license plate recognition score.
[0097] The vehicle event trajectory module classifies the 10 candidate license plates into the same vehicle event trajectory according to the consistency of license plate type (same license plate color), the difference degree of license plate character string (the edit distance is not greater than 2), and the position of the license plate target frame (the distance between the normalized center point coordinates (centerX1, centerY1) of the license plate target frame in the current video frame and the normalized center point coordinates (centerX0, centerY0) of the license plate target frame in the previous video frame within the vehicle event trajectory is greater than 0 and less than 0.15).
[0098] The optimal candidate decision module performs statistics: the number of supporting frames for "Shan A12345" is 4, and the average license plate recognition score is 90; the number of supporting frames for "Shan A12346" is 3, and the average license plate recognition score is 88; the number of supporting frames for "Shan A12348" is 3, and the average license plate recognition score is 85. Taking the number of supporting frames as the first priority, "Shan A12345" is selected as the optimal candidate license plate.
[0099] The license plate stability judgment module calculates: the winner proportion is 4 / 10 = 40%, which is lower than the preset proportion threshold of 50%; and the leading frame number is 4-3 = 1, which is lower than the preset difference threshold of 2. Therefore, "Shan A12345" is marked as a weak winner. Further comparison between the optimal candidate license plate and the sub-optimal candidate license plate (the sub-optimal candidate license plate is "Shan A12346") shows that there is no similar character conflict and no province conflict.
[0100] The trusted license plate output module: outputs the optimal candidate license plate "Shan A12345" and the sub-optimal candidate license plate "Shan A12346" as trusted license plate results to the outside, and simultaneously generates structured evidence: optimal candidate license plate "Shan A12345", sub-optimal candidate license plate "Shan A12346", number of supporting frames {"Shan A12345": 4, "Shan A12346": 3}, average license plate recognition score {"Shan A12345": 90, "Shan A12346": 88}, winner proportion 40%, leading frame number 1, weak winner mark true, similar character conflict mark false, province conflict mark false. This piece of structured evidence is written into the plateReview field of the local database.
[0101] Embodiment 6 When a vehicle passes by, statistics are made within the vehicle event trajectory: the supported frame number of "Shaan A12345" is 3, with an average license plate recognition score of 87; the supported frame number of "Shaan A1234S" is 4, with an average license plate recognition score of 85. Taking the supported frame number as the first priority, "Shaan A1234S" is the best candidate license plate.
[0102] The license plate stability judgment module calculates: the winner proportion is 4 / 7 ≈ 57%, which reaches the preset proportion threshold; the leading frame number is 4-3=1, which is lower than the preset difference threshold of 2. Therefore, "Shaan A1234S" is marked as a weak winner. Meanwhile, the best candidate license plate "Shaan A1234S" and the sub-optimal candidate license plate "Shaan A12345" differ only in the last digit, and "5" and "S" are a digit / letter similar character pair. Therefore, "Shaan A1234S" is further marked as a similar character conflict. The best candidate license plate "Shaan A1234S" and the sub-optimal candidate license plate "Shaan A12345" are output to the outside as credible license plate results, and structured evidence is generated at the same time, including: weak winner mark true, similar character conflict mark true.
[0103] Embodiment 7 When the license plate type output by target detection is the unmounted license plate category, the special case processing for unlicensed vehicles is triggered.
[0104] Moreover, when the license plate types output by target detection of 5 consecutive video frames are all the unmounted license plate category, the current vehicle is confirmed as a vehicle without a motor vehicle license plate.
[0105] The system marks the license plate type of the current vehicle as the default license plate type code "9", marks the license plate string as the default license plate string "Wu A00000", that is, the recognized license plate of the current vehicle is marked as "Wu A00000_9", and saves the current video frame as the backup image of the current vehicle without a motor vehicle license plate at the same time.
[0106] Subsequently, the system calls the side camera of the lane controller to prompt the driver to show the temporary license plate. After the driver shows the temporary license plate, the side camera of the lane controller collects and recognizes the temporary license plate "Shaan A12345", with a license plate recognition score of 89. The system saves the temporary license plate image superimposed with the timestamp and the temporary license plate string, updates "Wu A00000_9" to "Shaan A12345_7" in the same vehicle event trajectory, and outputs it to the outside.
[0107] The image evidence chain module vertically splices the backup image of the current vehicle without a motor vehicle license plate and the temporary license plate image captured by the side camera of the lane controller into a temporary license plate evidence image as structured evidence. After that, the system closes the side camera of the lane controller and ends the special case process.
[0108] The above are preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A license plate recognition result reliable output method, characterized in that, Includes the following steps: S1. Obtain the current video frame from the continuous video stream of the lane; S2. Perform target detection on the current video frame to obtain the license plate target box and license plate type of the current video frame. Perform optical character recognition on the license plate target box area to obtain the license plate string and license plate recognition score; wherein, the license plate type and license plate string are used as candidate license plates. S3. Compare the current video frame with the video frames in the existing vehicle event trajectory; If the current video frame meets the inclusion criteria, the current video frame will be included in the existing vehicle event trajectory; if the current video frame does not meet the inclusion criteria, a new vehicle event trajectory will be created for it. S4. Repeat S1 to S3 until the license plate target box of the current video frame exceeds the target detection area or the number of frames of the current video frame reaches the set frame number threshold, to obtain the same vehicle event trajectory containing multiple video frames. S5. Within the same vehicle event trajectory, aggregate and statistically analyze the candidate license plates of the above multiple video frames: if the statistical result shows only one candidate license plate, then take that candidate license plate as the best candidate license plate; if the statistical result shows multiple candidate license plates, then obtain the number of supported frames and the average license plate recognition score for each candidate license plate. S6. Prioritize the number of supported frames as the first priority and the average license plate recognition score as the second priority, sort the candidate license plates, and select the candidate license plate ranked first as the best candidate license plate; at the same time, select the candidate license plate ranked second as the second best candidate license plate. S7. Determine the stability of the above best candidate license plates, and mark the best candidate license plates as strong winners or weak winners based on their stability. S8. Output reliable license plate results: If the best candidate license plate is marked as a strong winner, then the best candidate license plate will be output as the reliable license plate result. If the best candidate license plate is marked as a weak winner, then the best candidate license plate will be output as the reliable license plate result, and the second best candidate license plate will be output as a supplementary result.
2. The license plate recognition result trusted output method according to claim 1, characterized in that, The S7 includes: S71. Calculate the proportion of the number of supporting frames of the best candidate license plate to the total number of frames of all candidate license plates in the same vehicle event trajectory, and use it as the winner proportion; determine whether the winner proportion is less than the preset proportion threshold; if so, mark the best candidate license plate as a weak winner; if not, execute S72. S72. Calculate the difference in the number of supported frames between the best candidate license plate and the second best candidate license plate, and use it as the leading frame number; determine whether the leading frame number is less than the preset difference threshold. If yes, mark the best candidate license plate as a weak winner; otherwise, execute S73. S73. When the winner's percentage is greater than or equal to a preset percentage threshold and the leading frame count is greater than or equal to a preset difference threshold, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner.
3. The license plate recognition result trusted output method according to claim 2, characterized in that, The S7 further includes: S74. Determine whether the best candidate license plate and the second-best candidate license plate, which are marked as weak winners, only have a difference in province characters. If they do, mark the best candidate license plate as having a province conflict; if they do not, do not mark it. S75. Determine whether the best candidate license plate and the second-best candidate license plate, which are marked as weak winners, have similar numbers / letters in the same character position. If they do, mark the best candidate license plate as having a similar character conflict; if they do not, do not mark it.
4. The license plate recognition result trusted output method according to claim 1, characterized in that, S1 includes: S11. Obtain the current video frame from the continuous video stream of the lane; S12. Perform a sharpness detection on the current video frame to determine whether the sharpness score of the current video frame is higher than the preset sharpness threshold. If the resolution score of the current video frame is higher than the preset resolution threshold, then the current video frame will be output. Otherwise, the current video frame is used as a candidate blurred video frame, and S11 is repeated until the clarity of the current video frame is higher than the preset clarity threshold; or, if the number of candidate blurred video frames reaches the preset number of skipped frames, the frame with the highest clarity score among the candidate blurred video frames is used as the current video frame for output.
5. The license plate recognition result trusted output method according to claim 1, characterized in that, In S3: The inclusion criteria are: the license plate type is the same, the difference between the license plate strings is lower than the preset difference threshold, and the target box of the license plate is located within the preset area.
6. The license plate recognition result trusted output method according to claim 4, characterized in that, Also includes S9, special handling for vehicles without license plates: S91. When the license plate type in S2 is "unlicensed vehicle", the special handling for unlicensed vehicles is triggered: S92. Repeat S1 and S2 to obtain multiple consecutive video frames. The license plate type is "unlicensed". Confirm that the current vehicle is an unlicensed vehicle. Mark the license plate type and license plate string of the current vehicle as the default license plate type and default license plate string. Save the current video frame with the highest resolution as a backup image of the current vehicle without a license plate. S93. Invoke the side camera of the lane controller to capture the image of the current vehicle's temporary license plate; S94. Perform target detection on the current vehicle temporary license plate image to obtain the license plate target bounding box and license plate type of the vehicle temporary license plate image. Perform optical character recognition on the license plate target bounding box region of the vehicle temporary license plate image to obtain the license plate string. Use the above license plate type and license plate string as the current vehicle temporary license plate. Update the current vehicle's default license plate type and default license plate string to the current vehicle temporary license plate type and license plate string. Output the current vehicle temporary license plate as the reliable license plate result. S95. Combine the above-mentioned image of the current vehicle's temporary license plate with the above-mentioned backup image of the current vehicle without a license plate to form the evidence image of the current vehicle's temporary license plate.
7. The license plate recognition result trusted output method according to claim 6, characterized in that, S93 further includes: If no temporary license plate image of the current vehicle is detected within the first set time period, the lane controller microphone is invoked to collect the temporary license plate entered by voice recognition. If no temporary license plate entered through voice recognition is detected within the second set time period, manual intervention will be required.
8. The license plate recognition result reliable output method according to claim 1 or 6, characterized in that, Simultaneously with outputting the credible license plate result, structured evidence is generated, which includes: The best candidate license plate marked as a strong winner and the corresponding video frame; Alternatively, the best and second-best candidate license plates marked as weak winners, and the video frames corresponding to the best candidate license plates marked as weak winners; Alternatively, a temporary license plate and an image of evidence of the temporary license plate.
9. A reliable license plate recognition result output system, characterized in that, It includes a current video frame acquisition module, a license plate target detection module, a license plate character recognition module, a vehicle event trajectory module, a best candidate decision module, a license plate stability judgment module, and a reliable license plate output module; The current video frame acquisition module is used to acquire the current video frame from the continuous video stream of the lane; The license plate target detection module is used to perform target detection on the current video frame to obtain the license plate target box and license plate type; The license plate character recognition module is used to perform optical character recognition on the target area of the license plate to obtain the license plate string and the license plate recognition score; The vehicle event trajectory module is used to assign the current video frame to an existing vehicle event trajectory or a newly created vehicle event trajectory based on whether the assignment criteria are met. The best candidate decision module is used to count the number of supporting frames and the average license plate recognition score of each candidate license plate within the same vehicle event trajectory, and to decide the best and second-best candidate license plates from the candidate license plates in the same vehicle event trajectory according to the number of supporting frames and the average license plate recognition score of each candidate license plate. The license plate stability judgment module is used to determine the stability of the best candidate license plate. When the winning percentage of the best candidate license plate is insufficient, or when the leading frame number of the best candidate license plate is insufficient, the best candidate license plate is marked as a weak winner; otherwise, it is marked as a strong winner. The trusted license plate output module is used to output the best candidate license plate marked as the weak winner as the trusted license plate result, while the second best candidate license plate is output as a supplementary result along with the trusted license plate result; Alternatively, the best candidate license plate marked as a strong winner can be output as a reliable license plate result.
10. The reliable output system for license plate recognition results according to claim 9, characterized in that, The license plate stability judgment module includes a winner data statistics unit, a winner type marking unit, a similar character conflict marking unit, and a province conflict marking unit; The winner data statistics unit is used to calculate the winner percentage and leading frame count of the best candidate license plate; The winner type marking unit is used to determine whether the winner percentage is greater than or equal to a preset percentage threshold and whether the leading frame number is greater than or equal to a preset difference threshold. If so, the best candidate license plate is marked as a strong winner; otherwise, the best candidate license plate is marked as a weak winner. The province conflict marking unit is used to determine whether the best candidate license plate and the second best candidate license plate marked as weak winners only have a difference in province characters. If so, the best candidate license plate is marked as a province conflict. The similar character conflict marking unit is used to determine whether the best candidate license plate and the second best candidate license plate, which are marked as weak winners, have similar numbers / letters in the same character position. If they do, the best candidate license plate is marked as having a similar character conflict.
