Real-time digital recognition method, system and device based on target detection and OCR fusion

This real-time digital recognition method, which integrates target detection and OCR, solves the problems of poor robustness of OCR and insufficient semantic understanding of target detection schemes in existing technologies. It achieves high accuracy and stability recognition under complex conditions and is suitable for industrial inspection and real-time camera scenarios.

CN123142007APending Publication Date: 2026-11-20HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611253552.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies exhibit poor robustness in OCR recognition when dealing with complex images such as uneven lighting, noise interference, blurred images, or incomplete characters. Furthermore, target detection-based schemes lack sufficient sequential semantic understanding of continuous digit strings, leading to decreased recognition accuracy and wasted computing resources.

Method used

A real-time digital recognition method based on the fusion of object detection and OCR is adopted. Differentiated cropping is performed by distinguishing whether the digital position is fixed or not, generating multiple versions of image preprocessing, and a complementary recognition system is formed by using the YOLO digital recognition model and the OCR recognition model to perform result fusion and judgment.

Benefits of technology

It improves the robustness of OCR under complex conditions and the accuracy of character-level recognition, reduces the false recognition rate and the missed recognition rate, and improves recognition stability and computational efficiency, meeting the high reliability requirements of industrial inspection and real-time camera scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123142007A_ABST
    Figure CN123142007A_ABST
Patent Text Reader

Abstract

The application provides a real-time digital recognition method, system and device based on target detection and OCR fusion, which comprises determining a digital candidate region of an image to be recognized; judging whether the digital position of the digital candidate region is fixed; when the digital position is fixed, cutting a target candidate region from the image to be recognized according to preset ROI coordinates; when the digital position is not fixed, positioning a digital region from the image to be recognized as the target candidate region by using a target detection model; performing image preprocessing on the target candidate region to generate a plurality of images of different preprocessing versions; inputting the images of different preprocessing versions into an OCR recognition model for recognition respectively to obtain OCR recognition results of each version; performing digital category recognition on the image to be recognized or the digital candidate region by using a YOLO digital recognition model to obtain YOLO recognition results; judging the effectiveness of the OCR recognition results according to preset rules, and fusing the OCR recognition results and the YOLO recognition results to output optimal digital recognition results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and in particular to a real-time digital recognition method, system and device based on the fusion of target detection and OCR. Background Technology

[0002] With the rapid development of industrial automation and intelligent vision inspection technologies, real-time digital recognition has been widely used in fields such as industrial instrument reading, logistics sorting, workpiece coding, and robot vision navigation. Currently, digital recognition mainly relies on two types of solutions: optical character recognition (OCR) technology and deep learning-based target detection technology.

[0003] However, pure OCR recognition schemes exhibit poor robustness when handling complex images with uneven lighting, noise interference, blurred images, or incomplete characters, easily leading to misidentification, missed identification, or overidentification. Furthermore, OCR is sensitive to character arrangement; accuracy drops significantly when digit regions are tilted, distorted, or have complex backgrounds. On the other hand, while object detection-based schemes (such as YOLO) can effectively locate digit regions, their sequential semantic understanding of continuous digit strings is insufficient, making it difficult to replace OCR's advantages in fine-grained character-level recognition. Moreover, existing schemes lack adaptability in mixed scenarios with fixed and variable digit positions, lacking differentiated processing strategies for different scenarios, resulting in wasted computational resources or low region recall rates. Summary of the Invention

[0004] This invention provides a real-time digital recognition method, system, and device based on the fusion of target detection and OCR, aiming to solve at least one of the technical problems existing in the prior art.

[0005] The technical solution of this invention is a real-time digital recognition method based on the fusion of target detection and OCR, which includes: Acquire an image to be identified and determine the digital candidate regions of the image to be identified; Determine whether the position of the digit in the candidate region is fixed. If the position is fixed, crop the target candidate region from the image to be identified according to the preset ROI coordinates. If the position is not fixed, use the target detection model to locate the digit region from the image to be identified as the target candidate region. The target candidate region is preprocessed to generate several different preprocessed versions of the image; The images with different preprocessing versions are input into the OCR recognition model for recognition to obtain the OCR recognition results for each version; The YOLO digit recognition model is used to identify the digit category of the image to be recognized or the digit candidate region to obtain the YOLO recognition result; The validity of the OCR recognition result is determined according to preset rules, and the OCR recognition result is fused with the YOLO recognition result to output the optimal digit recognition result.

[0006] According to some embodiments of the present invention, the step of determining the validity of the OCR recognition result according to preset rules includes: The text recognized by OCR is standardized by removing whitespace characters and converting full-width characters to half-width characters. The standardized text is filtered for characters based on a preset character whitelist. Use preset regular expressions to perform full string matching and validation on the filtered text; Perform length validation on the matched text to determine whether its character length is within the preset length range; The confidence level of the OCR recognition results is verified, and the overall confidence level of the OCR is output. The validity level of the OCR recognition result is determined based on the comprehensive confidence level of the OCR. If the validity level is greater than the preset level, the OCR recognition result is determined to pass the validity judgment.

[0007] According to some embodiments of the present invention, the step of fusing the OCR recognition result with the YOLO recognition result to output the optimal digit recognition result includes: When there is an OCR recognition result that passes the validity determination, the OCR recognition result shall be used as the optimal digit recognition result for the current frame. When there is no OCR recognition result that passes the validity determination, it is determined whether the YOLO recognition result meets the preset backoff condition. If it does, the YOLO recognition result is used as the optimal digital recognition result for the current frame.

[0008] According to some embodiments of the present invention, it further includes: When the OCR recognition result and the YOLO recognition result are consistent, the fusion confidence score is calculated. The formula for calculating the fusion confidence score is as follows: Cf = 0.6*Cocr + 0.4*Cy Where Cocr is the overall confidence score of OCR, and Cy is the confidence score of YOLO recognition; When the fusion confidence is not lower than the preset fusion threshold, the number jointly indicated by the OCR recognition result and the YOLO recognition result is taken as the valid result of the current frame; When the OCR recognition result is inconsistent with the YOLO recognition result, if the difference between the OCR comprehensive confidence score and the YOLO recognition confidence score is not less than a preset difference threshold, the one with the higher confidence score is retained as a low-weight candidate; if the difference in confidence scores is less than the preset difference threshold, no digit recognition result is output.

[0009] According to some embodiments of the present invention, it further includes: The image to be recognized is acquired and the digit candidate region is identified according to a preset time interval. When the time difference between the current frame and the last recognition time is less than the preset time interval, the recognition process of the current frame is skipped. Store the most recent valid recognition results into a sliding window; The confidence-weighted voting is performed on each digit recognition result within the sliding window; When a number appears a certain number of times within the sliding window reaches a stable threshold and the average confidence level is not lower than the first confidence threshold, the number is output as a stable recognition result. Calculate the intersection-union ratio (IUGR) of the candidate boxes in the current frame and the candidate boxes in the previous identification time. If the IUGR is not less than a preset association threshold, they are determined to be the same target. If the IUGR is less than the preset association threshold, calculate the distance between the center points of the two candidate boxes. If the distance between the center points is less than a preset proportion of the width of the previous detection box, they are also determined to be the same target. Set up independent identification caches and voting windows for each target identified as the same objective; After a stable identification result is output, the original stable result is allowed to be replaced only if another number appears consecutively within the sliding window to the replacement threshold and the average confidence level is not lower than the second confidence level threshold.

[0010] According to some embodiments of the present invention, the image preprocessing of the target candidate region to generate several different preprocessed versions of the image includes: The target candidate region is converted to grayscale to generate a grayscale image; The grayscale image is sharpened to generate a sharpened image; The grayscale image is subjected to global thresholding to generate a global threshold image; The grayscale image is subjected to adaptive thresholding to generate an adaptive threshold image.

[0011] According to some embodiments of the present invention, it further includes: After scanning multiple target candidate regions, verify whether the set of identification numbers of each target candidate region meets the preset uniqueness requirement; When there are duplicate or missing numbers, the target candidate region with the lowest confidence is selected for re-identification until the preset uniqueness requirement is met. Establish a mapping relationship between identification numbers and actual locations.

[0012] According to some embodiments of the present invention, the step of locating a digital region from the image to be identified as a target candidate region using a target detection model includes: The digital candidate region is expanded by extending the original width by a first preset proportion in the left and right directions and by extending the original height by a second preset proportion in the up and down directions. When the width or height of the digital candidate region is less than the preset pixel value, an interpolation algorithm is used to enlarge the digital candidate region so that the short side is not less than the target pixel value. Perspective correction is performed on the digital candidate region, the largest quadrilateral contour of the digital candidate region is extracted, the four corner points are sorted and then a perspective transformation is performed to generate a front view, thus obtaining the target candidate region.

[0013] This invention also provides a real-time digital recognition system based on the fusion of target detection and OCR, used to perform the real-time digital recognition method based on the fusion of target detection and OCR as described in the above embodiments, comprising: The image input module is used to acquire the image to be recognized and determine the digital candidate region of the image to be recognized; The region localization module is used to determine whether the position of the digit in the digit candidate region is fixed. When the position of the digit is fixed, the target candidate region is cropped from the image to be identified according to the preset ROI coordinates. When the position of the digit is not fixed, the digit region is located from the image to be identified as the target candidate region using the target detection model. The image preprocessing module is used to preprocess the target candidate region to generate several different preprocessed versions of the image; The OCR recognition module is used to input the images of several different preprocessed versions into the OCR recognition model for recognition, and obtain the OCR recognition results of each version; The YOLO digit recognition module is used to perform digit category recognition on the image to be recognized or the digit candidate region using the YOLO digit recognition model, and obtain the YOLO recognition result. The validity determination module is used to determine the validity of the OCR recognition result according to preset rules. The fusion determination module is used to fuse the OCR recognition result with the YOLO recognition result and output the optimal digit recognition result.

[0014] The present invention also relates to a computer device, including a memory and a processor, wherein the processor performs the above-described method when executing a computer program stored in the memory.

[0015] The present invention also relates to a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the above-described method.

[0016] The real-time digit recognition method, system, and device based on target detection and OCR fusion provided in this invention embodiment possess at least one of the following advantages or technical effects: It determines whether the digit position of the candidate digit region in the image to be recognized is fixed. When the digit position is fixed, it uses preset ROI coordinates for cropping; when the digit position is not fixed, the position is located using a target detection model. By distinguishing whether the digit position is fixed and adopting a differentiated cropping strategy, it reduces computational redundancy in fixed scenarios while ensuring region recall in variable scenarios, achieving a good balance between inference efficiency and positioning accuracy. Simultaneously, it performs multi-version image preprocessing on the target candidate region, generating multiple enhanced versions of the input OCR recognition results. This effectively mitigates the impact of uneven lighting, noise interference, and image quality fluctuations on recognition accuracy in actual industrial scenarios, significantly improving the robustness of OCR under complex conditions and character-level recognition accuracy.

[0017] By introducing the YOLO digital recognition model and the OCR recognition model to form a complementary recognition system, and based on preset rules to determine the validity of the OCR results and the fusion of the two, the system prioritizes the use of the valid OCR recognition result to ensure recognition accuracy, and automatically reverts to the YOLO recognition result when the OCR recognition result fails to ensure recall. This can effectively suppress the misidentification, omission, and overidentification phenomena that the OCR recognition model may produce in blurry, incomplete, or complex background images, and eliminate the systematic bias of a single model in specific scenarios.

[0018] Through the aforementioned multi-model fusion and rule verification mechanism, the fine-grained sequence features of OCR and the global semantic features of YOLO are combined, effectively reducing the false recognition rate and the missed recognition rate, improving the recognition stability and robustness in real-time camera scenarios, while taking into account both recognition accuracy and computational efficiency.

[0019] Furthermore, additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0020] Figure 1 This is a flowchart of the real-time digital recognition method based on the fusion of target detection and OCR provided in the embodiments of the present invention. Figure 2 This is a detailed flowchart of step S600 in the real-time digital recognition method based on target detection and OCR fusion provided in the embodiments of the present invention; Figure 3This is a detailed flowchart of the first embodiment of the real-time digital recognition method based on the fusion of target detection and OCR provided by the present invention. Figure 4 This is a second detailed flowchart of the real-time digital recognition method based on the fusion of target detection and OCR provided in the embodiments of the present invention; Figure 5 This is a detailed flowchart of step S200 in the real-time digital recognition method based on the fusion of target detection and OCR provided in the embodiments of the present invention. Detailed Implementation

[0021] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention.

[0022] It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature, or indirectly fixed or connected to the other feature. The singular forms "a," "described," and "the" used herein are also intended to include the plural forms, unless the context clearly indicates otherwise. Furthermore, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and not for limiting the invention. The term "and / or" as used herein includes any combination of one or more of the associated listed items.

[0023] It should be understood that although the terms first, second, third, etc., may be used to describe various elements in this disclosure, these elements should not be limited to these terms. These terms are used only to distinguish elements of the same type from one another. For example, a first element may also be referred to as a second element without departing from the scope of this disclosure, and similarly, a second element may also be referred to as a first element. Any and all instances or exemplary language (“e.g.,” “such as,” etc.) provided herein are intended only to better illustrate embodiments of the invention and, unless otherwise required, do not impose a limitation on the scope of the invention.

[0024] This invention provides a real-time digital recognition method, system, and device based on the fusion of target detection and OCR, which can combine the advantages of target detection and OCR, balance accuracy and efficiency, and have good robustness and temporal stability.

[0025] Reference Figure 1 As shown, Figure 1This is a general flowchart of the real-time digital recognition method based on the fusion of target detection and OCR provided in this embodiment of the invention. The real-time digital recognition method based on the fusion of target detection and OCR includes, but is not limited to, steps S100 to S600. Specifically, S100: Acquire the image to be recognized and determine the candidate regions for numbers in the image to be recognized; S200: Determine whether the position of the digit in the digit candidate region is fixed. When the position of the digit is fixed, crop the target candidate region from the image to be recognized according to the preset ROI coordinates. When the position of the digit is not fixed, use the target detection model to locate the digit region from the image to be recognized as the target candidate region. S300: Perform image preprocessing on the target candidate region to generate several different preprocessed versions of the image; S400: Input several images with different preprocessing versions into the OCR recognition model for recognition, and obtain the OCR recognition results for each version; S500: Uses the YOLO digit recognition model to identify the digit category of the image or digit candidate region to be recognized, and obtains the YOLO recognition result; S600: Determines the validity of the OCR recognition result according to preset rules, and merges the OCR recognition result with the YOLO recognition result to output the optimal digit recognition result.

[0026] The real-time digit recognition method based on the fusion of target detection and OCR (Optical Character Recognition) provided in this invention firstly, at the image preprocessing and localization level, when the digit position is fixed, it is cropped using preset ROI (Region of Interest) coordinates; when the digit position is not fixed, the position is located using a target detection model. By distinguishing between fixed and non-fixed digit positions and adopting differentiated cropping strategies, computational redundancy in fixed scenarios is reduced while ensuring region recall in variable scenarios, achieving a good balance between inference efficiency and localization accuracy. Simultaneously, multiple versions of image preprocessing (such as different brightness, contrast, binarization methods, etc.) are performed on the target candidate region to generate multiple enhanced versions of the input OCR recognition results. This effectively mitigates the impact of uneven lighting, noise interference, and image quality fluctuations on recognition accuracy in real-world industrial scenarios, significantly improving the robustness of OCR under complex conditions and character-level recognition accuracy.

[0027] Secondly, at the level of recognition result fusion and verification, a complementary recognition system is formed by introducing the YOLO (You Only Look Once, a type of real-time target detection) digital recognition model and the OCR recognition model. Based on preset rules, the validity of the OCR results and the fusion of the two are judged. When the OCR result is valid, it is given priority to ensure recognition accuracy. When the OCR fails, it automatically falls back to the YOLO result to ensure recall. This effectively overcomes the problems of single OCR schemes being susceptible to interference from complex backgrounds and single target detection schemes having insufficient generalization ability for continuous digital strings. It can effectively suppress the misidentification, omission, and overidentification phenomena that OCR may produce in blurry, incomplete, or complex background images, and eliminate the systematic bias of single models in specific scenarios.

[0028] Through the aforementioned multi-model fusion and rule verification mechanism, the fine-grained sequence features of OCR and the global semantic features of YOLO are combined to effectively reduce the false recognition rate and the missed recognition rate, improve the recognition stability and robustness in real-time camera scenarios, and at the same time take into account recognition accuracy and computational efficiency, meeting the high reliability requirements of real-time digital recognition in scenarios such as industrial inspection and instrument reading.

[0029] Reference Figure 2 As shown, Figure 2 This is a detailed flowchart of step S600 in the real-time digital recognition method based on target detection and OCR fusion provided in this embodiment of the invention. In step S600, the validity of the OCR recognition result is determined according to preset rules, including but not limited to steps S610 to S660. Specifically, S610: Perform text standardization processing on the recognized text of the OCR recognition result, remove whitespace characters and convert full-width characters to half-width characters; S620: Filter characters in the standardized text according to a preset character whitelist; S630: Use preset regular expressions to perform full string matching and validation on the filtered text; S640: Perform length validation on the matched text to determine whether its character length is within the preset length range; S650: Performs confidence verification on the OCR recognition results and outputs the overall confidence score of the OCR. S660: Determine the validity level of the OCR recognition result based on the comprehensive confidence level of OCR. If the validity level is greater than the preset level, the OCR recognition result is determined to pass the validity judgment.

[0030] In this embodiment of the invention, at the text cleaning and normalization level, by deleting whitespace characters and converting full-width characters to half-width characters, irrelevant symbols and glyph ambiguities introduced by differences in input sources, typesetting interference, or optical distortion are effectively eliminated. This allows subsequent processing to be based on a unified and compact character encoding space, significantly reducing character comparison errors. Furthermore, by introducing a preset character whitelist for filtering, illegal characters (such as letters, punctuation marks, or special symbols) that are impossible to appear in the numeric region can be selectively removed. This suppresses invalid output caused by OCR over-identification or misidentification at the source, significantly improving the signal-to-noise ratio of candidate text.

[0031] At the format and structure verification level, pre-defined regular expressions are used to perform full-string matching verification on the cleaned text, ensuring that the entire recognition result strictly conforms to the numerical arrangement rules of the business scenario (such as fixed-digit numbers, dates, instrument reading formats, etc.), and does not rely solely on local character confidence. Simultaneously, a length verification is added to determine whether the character length is within a pre-defined reasonable range. Together, these two constitute a dual constraint of "format + length," which can quickly eliminate recognition errors that clearly do not conform to physical meaning or encoding standards, avoiding the transmission of invalid results to subsequent fusion stages and effectively reducing the false alarm rate.

[0032] At the confidence assessment and decision-making level, the OCR recognition results are validated and a comprehensive confidence score is output. This comprehensive score integrates character-level confidence, text structure matching degree, and the pass rate of validation rules, and is then mapped to a validity level. Only when the validity level is higher than a preset threshold is the result considered passed. This mechanism provides the system with flexible and adjustable quality gating capabilities, ensuring timely output of high-confidence results while intercepting or triggering re-recognition of low-quality results, thus achieving a balance between recognition rate and reliability.

[0033] In a specific embodiment, the multi-level validity determination method that combines OCR recognition results with digit character rules includes: after the OCR recognition model outputs text, it sequentially performs text standardization, character filtering, regular expression full matching, length verification, character whitelist verification, and confidence verification; when all the above conditions are met, the OCR recognition result is determined to be a valid result; otherwise, it is determined to be an invalid result and the YOLO digit recognition rollback process is initiated.

[0034] Text standardization: Remove spaces, newlines, tabs, and punctuation marks from the OCR recognition model output; convert full-width characters to half-width characters; and retain numeric characters. Character whitelist verification: In the logistics handling competition example, the boxes in the placement area only use the numbers 1 to 5, so the character whitelist is set to {1, 2, 3, 4, 5}, and characters that do not belong to this set are removed; Regular expression validation: The regular expression "^[1-5]$" is used to perform full string matching to ensure that the recognition result contains only a number between 1 and 5.

[0035] Length verification: Set both the minimum and maximum character lengths to 1; when the OCR recognition model outputs multiple characters such as "11" or "15", it is determined to be invalid.

[0036] Confidence verification: When the overall OCR confidence score is not lower than 0.80, it is considered initially valid. When the overall OCR confidence score is not lower than 0.85, the direct OCR recognition result is allowed as the candidate result of the current frame if the YOLO digit recognition model has no valid result. When the overall OCR confidence score is between 0.70 and 0.85, it needs to be consistent with the YOLO recognition result or be output after time-series voting. When the overall OCR confidence score is lower than 0.70, it is considered that the OCR recognition model has failed.

[0037] Handling of abnormal characters: For characters such as letters "I", "l", "S", and "O" that are easily confused with numbers, they are only recorded as suspected results and are not directly converted into numbers; confirmation is required by combining YOLO recognition results or subsequent consecutive frame voting.

[0038] Multiple preprocessing results selection: When the original image, grayscale image, sharpened image, global threshold image and adaptive threshold image respectively obtain OCR recognition results, the recognition confidence of the same number is summarized, and the number that meets all verification rules and has the highest comprehensive score is selected.

[0039] In the competition implementation, a uniqueness check for numbers can also be added. For example, after the robot completes the scanning of the five boxes at positions 4 to 8, it determines whether the numbers 1 to 5 each appear once. When duplicate numbers or missing numbers appear, the box with the lowest confidence level is selected for re-identification instead of directly generating a transport target.

[0040] In the logistics handling competition implementation, the aforementioned multi-level verification mechanism effectively eliminates multi-character, obfuscated characters, and low-confidence outputs through strict filtering using whitelists, regular expressions, length, and confidence levels, ensuring that the identification result for each cargo box accurately falls between 1 and 5. Abnormal characters are only recorded as suspected cases and rely on subsequent fusion to avoid direct misjudgment. Multiple preprocessing versions are selected based on their optimality, and uniqueness is verified through a closed-loop check, further ensuring the integrity and non-repetition of the global digital set. This provides a highly reliable digital basis for handling decisions and significantly reduces the risk of competition task failure due to identification errors.

[0041] In some embodiments of the present invention, after acquiring the image to be identified, the method further includes: The image to be identified is subjected to sharpness detection, and the image sharpness value is calculated using the Laplacian operator; When the image sharpness value is lower than the preset sharpness threshold, the current frame is marked as a blurry frame and the subsequent recognition process is not executed.

[0042] Specifically, keep the camera recognition thread or image reasoning function off; upon receiving the start signal, start the camera and recognition thread to avoid violating the requirement that visual or optical recognition devices must not be started before the start; The camera captures real-time images at 1280×720 pixels and 30 frames per second, and adds a timestamp to each frame. The image to be identified is checked for emptiness, overexposure, or blurriness. The Laplacian operator is used to calculate the image sharpness B. B = Var(∇²I) Wherein, B represents image sharpness; I represents the image to be identified, preferably a grayscale image; ∇² represents the Laplacian operator, used to calculate the second spatial derivative of the image grayscale; ∇²I represents the response map obtained after applying the Laplacian operator to image I; Var(·) represents the variance operation, used to calculate the variance of the response values ​​of each pixel in the response map.

[0043] When the image sharpness B is less than 50, the frame is marked as a blurry frame and is not directly used to generate recognition output.

[0044] By using Laplacian sharpness pre-detection, blurry, overexposed, and empty frames are filtered in advance to avoid invalid calculations, significantly improving the system's real-time performance and resource utilization. Adding a timestamp to each frame ensures that each frame is traceable, guaranteeing that subsequent recognition is based only on clear and reliable images, effectively reducing misidentification and abnormal output.

[0045] In some embodiments of the present invention, step S600 involves fusing the OCR recognition result with the YOLO recognition result to output the optimal digit recognition result, including but not limited to steps S670 to S680. Specifically, S670: When there is an OCR recognition result that has passed the validity determination, the OCR recognition result shall be used as the optimal digit recognition result for the current frame. S680: When there is no OCR recognition result that passes the validity determination, determine whether the YOLO recognition result meets the preset backoff condition. If it does, then use the YOLO recognition result as the optimal digital recognition result for the current frame.

[0046] In this embodiment of the invention, OCR recognition results that have passed validity checks are prioritized, fully preserving the accuracy advantage of OCR in fine-grained character recognition. The results, after multiple verifications, possess high reliability, ensuring optimal output in typical scenarios. When no valid OCR is available, YOLO recognition results are used as a fallback solution. Leveraging its global discrimination capability for the overall shape of numbers, it provides effective supplementation when OCR fails due to blurring, occlusion, or abnormal lighting. Simultaneously, strict control is exercised through preset fallback conditions (such as confidence thresholds) to prevent the misuse of low-quality YOLO results. This decision-making mechanism implements a two-level fusion strategy of prioritizing high-confidence and backing down to low-confidence results. This ensures recognition accuracy in high-confidence scenarios while improving the success rate in complex scenarios, effectively reducing the system's empty judgment rate, and guaranteeing the stability and consistency of continuous frame recognition results, enhancing fault tolerance and practicality.

[0047] In some embodiments of the present invention, the real-time digital recognition method based on the fusion of target detection and OCR further includes: When the OCR recognition result and the YOLO recognition result are consistent, the fusion confidence score is calculated. The formula for calculating the fusion confidence score is: Cf = 0.6*Cocr + 0.4*Cy Where Cocr is the overall confidence score of OCR, and Cy is the confidence score of YOLO recognition; When the fusion confidence is not lower than the preset fusion threshold, the number jointly indicated by the OCR recognition result and the YOLO recognition result is taken as the valid result of the current frame; When the OCR recognition result is inconsistent with the YOLO recognition result, if the difference between the OCR comprehensive confidence score and the YOLO recognition confidence score is not less than the preset difference threshold, the one with the higher confidence score is retained as a low-weight candidate; if the difference in confidence scores is less than the preset difference threshold, no digit recognition result is output.

[0048] Understandably, the fusion judgment strategy fully leverages the heterogeneous and complementary advantages of the dual models (OCR recognition model + YOLO digit recognition model) to achieve refined result screening and output control. When the OCR recognition result is consistent with the YOLO recognition result, a weighted fusion confidence score is adopted (where the overall confidence score of OCR accounts for 60%, and the confidence score of YOLO recognition accounts for 40%). This retains the high sensitivity of OCR to character details while incorporating the global discrimination power of YOLO for the overall digit, resulting in a more robust and reliable confidence score. The result is only output when the fusion confidence score reaches a preset threshold, ensuring the accuracy and credibility of the output result and effectively reducing the risk of false alarms. When the OCR recognition result is inconsistent with the YOLO recognition result, a confidence score difference comparison mechanism is introduced: if the difference is large, the one with the higher confidence score is retained as a low-weight candidate, providing a reference for subsequent time-series fusion or manual review; if the difference is small, it indicates that both lack certainty, and the output is directly rejected to avoid forcibly pushing erroneous results. This fusion-based decision-making strategy ensures high recall while strictly controlling output quality, thus enhancing decision-making security in ambiguous and fuzzy scenarios.

[0049] In one embodiment, when the OCR recognition result is the same as the YOLO recognition result, a fusion confidence score Cf is calculated. If the fusion confidence score Cf ≥ 0.75, it is taken as the valid result of the current frame. When the OCR comprehensive confidence score Cocr ≥ ​​0.85, the OCR recognition result is directly adopted; when 0.70 ≤ OCR comprehensive confidence score Cocr < 0.85, it is taken as a low-weight candidate and awaits confirmation by YOLO consensus or temporal voting. When the OCR recognition model has no valid output and Cy ≥ 0.70, the YOLO recognition result is used as a backoff candidate.

[0050] When the OCR recognition result differs from the YOLO recognition result and the confidence difference is not less than a preset difference threshold (e.g., the preset difference threshold is 0.15), the one with higher confidence is retained as a low-weight candidate; when the difference is less than the preset difference threshold (e.g., 0.15), no digit recognition result is output in this frame.

[0051] Reference Figure 3 As shown, Figure 3 This is a detailed flowchart of the first embodiment of the real-time digital recognition method based on the fusion of target detection and OCR provided by the present invention. The real-time digital recognition method based on the fusion of target detection and OCR also includes, but is not limited to, steps S700 to S760. Specifically, S700: Performs image acquisition and recognition operations according to a preset time interval and identifies digit candidate regions. When the time difference between the current frame and the last recognition time is less than the preset time interval, the recognition process of the current frame is skipped. S710: Store the most recent valid recognition results into a sliding window; S720: Performs confidence-weighted voting on the recognition results of each digit within the sliding window; S730: When the number of times a certain number appears in the sliding window reaches a stable threshold and the average confidence level is not lower than the first confidence threshold, the number is output as a stable recognition result. S740: Calculate the intersection-union ratio (IU / R) of the candidate boxes in the current frame and the candidate boxes in the previous recognition time. If the IU / R is not less than the preset association threshold, they are determined to be the same target. If the IU / R is less than the preset association threshold, calculate the distance between the center points of the two candidate boxes. If the distance between the center points is less than the preset ratio of the width of the previous detection box, they are also determined to be the same target. S750: Sets up independent identification cache and voting window for each target identified as the same target; S760: After a stable recognition result is output, the original stable result is allowed to be replaced only if another number appears consecutively within the sliding window a number that reaches the replacement threshold and the average confidence level is not lower than the second confidence level threshold.

[0052] Understandably, by setting a minimum time interval to skip frequent frames, repeated invalid identification of the same target is effectively avoided, significantly reducing the computational load. The most recent valid identification results are stored in a sliding window, and confidence-weighted voting is used. A stable result is only output when a number appears a certain number of times within the window reaches a stable threshold and the average confidence meets the requirements. This effectively filters out abnormal jumps caused by occasional noise in a single frame or momentary occlusion, ensuring the temporal consistency and robustness of the output results. Simultaneously, by combining the intersection-over-union ratio (IoU) and center point distance criteria, accurate tracking of the same target is achieved. Even if the target undergoes slight displacement or scale changes, it can still effectively correlate preceding and following frames. An independent identification cache and voting window are maintained for each target to prevent cross-contamination of identification results between multiple targets. Finally, after the stable result is output, replacement is only allowed when a new number appears consecutively within the sliding window a certain number of times and the average confidence is not low. This mechanism effectively suppresses frequent result jumps caused by short-term fluctuations, further improving the stability and anti-interference capability of the system output. The aforementioned temporal stability and target tracking mechanisms significantly improve the reliability and consistency of digital recognition results in multi-frame continuous recognition scenarios.

[0053] In this embodiment of the invention, the preset time interval is 0.20 seconds. When a certain number appears in the sliding window at least 3 times out of 5 times, the first confidence threshold is 0.75, the preset association threshold is 0.50, the preset ratio is 0.5 times, the replacement threshold is the number appearing 3 times consecutively in the sliding window, and the second confidence threshold is 0.85. Those skilled in the art can set these values ​​according to the actual situation.

[0054] In some embodiments of the present invention, step S300 of the real-time digital recognition method based on the fusion of target detection and OCR involves image preprocessing of the target candidate region to generate several different preprocessed versions of the image, including but not limited to steps S310 to S340. Specifically, S310: Convert the target candidate region to grayscale to generate a grayscale image; S320: Sharpen the grayscale image to generate a sharpened image; S330: Perform global thresholding on the grayscale image to generate a global thresholded image; S340: Perform adaptive thresholding on the grayscale image to generate an adaptive threshold image.

[0055] Understandably, grayscale processing of the target candidate region reduces the dimensionality of the color image to single-channel brightness information, effectively reducing subsequent computation while preserving digital texture details. Sharpening enhances high-frequency components at the edges, making character outlines clearer and helping the OCR recognition model more accurately capture stroke boundaries. Global thresholding generates high-contrast binary images, suitable for uniformly lit scenes, simplifying character segmentation. Adaptive thresholding dynamically adjusts binarization parameters based on local lighting differences, effectively handling non-uniform lighting environments such as shadows and gradient light. These four preprocessing versions complement each other, highlighting digital features from different angles, providing diverse and high-quality inputs for subsequent multi-version OCR recognition, improving the quality and adaptability of the target candidate region, and enhancing its anti-interference capability and recognition robustness under complex imaging conditions.

[0056] Reference Figure 4 As shown, Figure 4 This is a second detailed flowchart of the real-time digital recognition method based on the fusion of target detection and OCR provided in this embodiment of the invention. The real-time digital recognition method based on the fusion of target detection and OCR also includes, but is not limited to, steps S800 to S820. Specifically, S800: After scanning multiple target candidate regions, verify whether the set of identification numbers of each target candidate region meets the preset uniqueness requirement; S810: When there are duplicate or missing numbers, select the target candidate region with the lowest confidence and re-identify until the preset uniqueness requirement is met. S820: Establish a mapping relationship between identification numbers and actual locations.

[0057] By verifying whether the set of identified digits in each candidate region meets the preset uniqueness (e.g., no duplicates, no missing numbers), the system avoids invalidating the final data set due to local misjudgments. When duplicates or missing numbers are found, the target candidate region with the lowest confidence is selected for re-identification, and computing resources are allocated to the least reliable identification result to drive the overall set to converge to the uniqueness requirement at the lowest cost. The iteration loop continues until the verification is passed, effectively eliminating random errors and occasional misidentifications in a single identification, and improving the completeness and accuracy of multi-target digit identification. A mapping relationship between the identified digits and their actual physical locations is established, providing a structured index for subsequent data storage, querying, and traceability, facilitating the association of upstream and downstream information, and greatly enhancing the system's practicality and management efficiency in scenarios such as logistics sorting, multi-instrument monitoring, and workpiece coding. The above multi-target verification and iterative correction mechanism significantly improves the global accuracy and consistency in batch identification scenarios.

[0058] Reference Figure 5 As shown, Figure 5 This is a detailed flowchart of step S200 in the real-time digital recognition method based on target detection and OCR fusion provided in this embodiment of the invention. Step S200 includes, but is not limited to, steps S210 to S230. Specifically, S210: Expand the boundaries of the digital candidate region by expanding the original width by a first preset ratio in the left and right directions and by expanding the original height by a second preset ratio in the up and down directions. S220: When the width or height of the digital candidate region is less than the preset pixel value, an interpolation algorithm is used to enlarge the digital candidate region so that the short side is not less than the target pixel value. S230: Perform perspective correction on the digital candidate region, extract the largest quadrilateral outline of the digital candidate region, sort the four corner points and perform perspective transformation to generate a front view, thus obtaining the target candidate region.

[0059] Understandably, the target candidate region fine-tuning process effectively improves the quality and standardization of the input image. First, boundary expansion reserves peripheral space in the left-right and top-bottom directions, effectively preventing digit edge cropping, preserving key contextual information, and providing more complete structural support for subsequent feature extraction. Second, for candidate regions that are too small, interpolation is used to enlarge them to the target pixel value, ensuring that the short side is not lower than the minimum resolution, effectively solving the feature sparsity problem caused by distant or small targets, and enhancing the model's ability to recognize tiny digits. Finally, perspective correction extracts the largest quadrilateral contour and performs a frontal view transformation, accurately correcting trapezoidal distortion caused by the tilt of the shooting angle, making the digit region a regular frontal rectangle, greatly reducing the interference of geometric deformation on the character shape. These three processes work synergistically to optimize the original cropped region into a high-quality, standardized input from three dimensions: scale, boundary, and orientation. This significantly reduces recognition errors caused by poor imaging conditions, providing a reliable and consistent data foundation for subsequent OCR recognition models and YOLO digit recognition models, and is particularly suitable for complex application environments such as non-frontal viewpoints and multi-scale targets in industrial settings.

[0060] In one embodiment, the first preset ratio is 10%, the second preset ratio is 15%, the preset pixel value is 64 pixels, and the target pixel value is 128 pixels. The coordinates of the digit candidate region (ROI) are read as (x, y, w, h), where x is the horizontal coordinate, y is the vertical coordinate, w is the width, and h is the height. It is checked whether x≥0, y≥0, x+w≤W, and y+h≤H are satisfied. Then, the digit candidate region is cropped from the image to be recognized. The image to be recognized is scaled and filled to 640×640 pixels and input into the YOLO digit recognition model to detect the white digit sticker or the entire digit area on the side of the cargo box. The detection confidence threshold is set to 0.35, and the non-maximum suppression IoU threshold is set to 0.45. Detection boxes with a width or height less than 20 pixels, exceeding the image boundary, or with abnormal area are removed; a maximum of 10 candidate boxes are retained per frame.

[0061] The detection box is expanded by 10% of its original width horizontally and 15% of its original height vertically. The expanded coordinates are then cropped to fit within the original image area to be recognized. When the width or height of the digit candidate region is less than 64 pixels, bicubic interpolation is used to enlarge it, ensuring the shorter side is no less than 128 pixels. The largest quadrilateral outline of the white sticker is extracted from the digit candidate region. After sorting the four corner points, a perspective transformation is performed to correct the tilted sticker to a 160×160 pixel front view, thus obtaining the target candidate region.

[0062] By employing precise ROI cropping, adaptive expansion and interpolation amplification, and perspective correction, the problems of small targets, tilting, and inconsistent sizes are effectively solved. Combined with reasonable YOLO thresholding and box filtering, high recall and low false detection are ensured, providing stable and high-quality candidate regions for subsequent recognition.

[0063] The corrected digit candidate region is scaled to 224×224 pixels and input into the digit classification model, or scaled to 320×320 pixels and input into the digit detection model; the model categories are set to {1, 2, 3, 4, 5}, and the output is Y=(dy, cy, by), where dy is the digit category, cy is the confidence score, and by is the detection box; when cy is less than 0.60, it is marked as low confidence; when cy is not less than 0.70, it is allowed as a fallback candidate when the OCR recognition model has no effective results.

[0064] The present invention also provides a real-time digital recognition system based on the fusion of target detection and OCR, for performing the real-time digital recognition method based on the fusion of target detection and OCR as described in the above embodiments, comprising: The image input module is used to acquire the image to be recognized and determine the digit candidate region of the image to be recognized; The region localization module is used to determine whether the position of the digit in the digit candidate region is fixed. When the position of the digit is fixed, the target candidate region is cropped from the image to be recognized according to the preset ROI coordinates. When the position of the digit is not fixed, the digit region is located from the image to be recognized as the target candidate region using the target detection model. The image preprocessing module is used to preprocess the target candidate region and generate several different preprocessed versions of the image; The OCR recognition module is used to input several pre-processed versions of images into the OCR recognition model for recognition, and obtain the OCR recognition results for each version. The YOLO digit recognition module is used to identify the digit category of an image or digit candidate region using the YOLO digit recognition model, and obtain the YOLO recognition result. The validity determination module is used to determine the validity of OCR recognition results according to preset rules. The fusion judgment module is used to fuse and judge the OCR recognition results with the YOLO recognition results and output the optimal digit recognition result.

[0065] This real-time digital recognition system, based on the fusion of object detection and OCR, achieves a highly reliable and adaptive recognition process through modular collaboration. The image input module and region localization module flexibly switch between fixed ROI cropping and object detection localization according to the scene, balancing efficiency and versatility. The image preprocessing module generates multiple versions of enhanced images, improving the robustness of OCR to complex lighting conditions. The validity and fusion judgment module combines OCR character-level fine-grained judgment with YOLO global morphological discrimination, effectively suppressing single-model misidentification through multi-level verification and confidence-weighted decision-making. The entire system balances real-time performance and accuracy, improving the stability and fault tolerance of digital recognition.

[0066] It should be understood that the method steps in the embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can use standard programming techniques. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if necessary, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).

[0067] Furthermore, the procedures described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by the context. The procedures described herein (or variations and / or combinations thereof) may be executed under the control of one or more computer systems configured with executable instructions, and may be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program comprises a plurality of instructions executable by one or more processors.

[0068] Furthermore, the method can be implemented in any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices, etc. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques described in the invention, the invention may also include the computer itself.

[0069] A computer program can be applied to input data to perform the functions described herein, thereby transforming the input data to generate output data stored in non-volatile memory. The output information can also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including specific visual depictions of physical and tangible objects generated on the display.

[0070] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention, as long as they achieve the technical effects of the present invention by the same means, should be included within the scope of protection of the present invention. Within the scope of protection of the present invention, the technical solutions and / or implementation methods can have various modifications and variations.

Claims

1. A real-time digital recognition method based on the fusion of target detection and OCR, characterized in that, include: Acquire an image to be identified and determine the digital candidate regions of the image to be identified; Determine whether the position of the digit in the candidate region is fixed. If the position is fixed, crop the target candidate region from the image to be identified according to the preset ROI coordinates. If the position is not fixed, use the target detection model to locate the digit region from the image to be identified as the target candidate region. The target candidate region is preprocessed to generate several different preprocessed versions of the image; The images with different preprocessing versions are input into the OCR recognition model for recognition to obtain the OCR recognition results for each version; The YOLO digit recognition model is used to identify the digit category of the image to be recognized or the digit candidate region to obtain the YOLO recognition result; The validity of the OCR recognition result is determined according to preset rules, and the OCR recognition result is fused with the YOLO recognition result to output the optimal digit recognition result.

2. The real-time digital recognition method based on target detection and OCR fusion according to claim 1, characterized in that, The step of determining the validity of the OCR recognition result according to preset rules includes: The text recognized by OCR is standardized by removing whitespace characters and converting full-width characters to half-width characters. The standardized text is filtered for characters based on a preset character whitelist. Use preset regular expressions to perform full string matching and validation on the filtered text; Perform length validation on the matched text to determine whether its character length is within the preset length range; The confidence level of the OCR recognition results is verified, and the overall confidence level of the OCR is output. The validity level of the OCR recognition result is determined based on the comprehensive confidence level of the OCR. If the validity level is greater than the preset level, the OCR recognition result is determined to pass the validity judgment.

3. The real-time digital recognition method based on target detection and OCR fusion according to claim 2, characterized in that, The step of fusing the OCR recognition result with the YOLO recognition result and outputting the optimal digit recognition result includes: When there is an OCR recognition result that passes the validity determination, the OCR recognition result shall be used as the optimal digit recognition result for the current frame. When there is no OCR recognition result that passes the validity determination, it is determined whether the YOLO recognition result meets the preset backoff condition. If it does, the YOLO recognition result is used as the optimal digital recognition result for the current frame.

4. The real-time digital recognition method based on the fusion of target detection and OCR according to claim 3, characterized in that, Also includes: When the OCR recognition result and the YOLO recognition result are consistent, the fusion confidence score is calculated. The formula for calculating the fusion confidence score is as follows: Cf = 0.6*Cocr + 0.4*Cy Where Cocr is the overall confidence score of OCR, and Cy is the confidence score of YOLO recognition; When the fusion confidence is not lower than the preset fusion threshold, the number jointly indicated by the OCR recognition result and the YOLO recognition result is taken as the valid result of the current frame; When the OCR recognition result is inconsistent with the YOLO recognition result, if the difference between the OCR comprehensive confidence score and the YOLO recognition confidence score is not less than a preset difference threshold, the one with the higher confidence score is retained as a low-weight candidate; if the difference in confidence scores is less than the preset difference threshold, no digit recognition result is output.

5. The real-time digital recognition method based on target detection and OCR fusion according to claim 4 further includes: The image to be recognized is acquired and the digit candidate region is identified according to a preset time interval. When the time difference between the current frame and the last recognition time is less than the preset time interval, the recognition process of the current frame is skipped. Store the most recent valid recognition results into a sliding window; The confidence-weighted voting is performed on each digit recognition result within the sliding window; When a number appears a certain number of times within the sliding window reaches a stable threshold and the average confidence level is not lower than the first confidence threshold, the number is output as a stable recognition result. Calculate the intersection-union ratio (IUGR) of the candidate boxes in the current frame and the candidate boxes in the previous identification time. If the IUGR is not less than a preset association threshold, they are determined to be the same target. If the IUGR is less than the preset association threshold, calculate the distance between the center points of the two candidate boxes. If the distance between the center points is less than a preset proportion of the width of the previous detection box, they are also determined to be the same target. Set up independent identification caches and voting windows for each target identified as the same objective; After a stable identification result is output, the original stable result is allowed to be replaced only if another number appears consecutively within the sliding window to the replacement threshold and the average confidence level is not lower than the second confidence level threshold.

6. The real-time digital recognition method based on target detection and OCR fusion according to claim 1, characterized in that, The step of preprocessing the target candidate region to generate several different preprocessed versions of the image includes: The target candidate region is converted to grayscale to generate a grayscale image; The grayscale image is sharpened to generate a sharpened image; The grayscale image is subjected to global thresholding to generate a global threshold image; The grayscale image is subjected to adaptive thresholding to generate an adaptive threshold image.

7. The real-time digital recognition method based on target detection and OCR fusion according to claim 1, characterized in that, Also includes: After scanning multiple target candidate regions, verify whether the set of identification numbers of each target candidate region meets the preset uniqueness requirement; When there are duplicate or missing numbers, the target candidate region with the lowest confidence is selected for re-identification until the preset uniqueness requirement is met. Establish a mapping relationship between identification numbers and actual locations.

8. The real-time digital recognition method based on target detection and OCR fusion according to claim 1, characterized in that, The step of locating digital regions from the image to be identified as candidate target regions using a target detection model includes: The digital candidate region is expanded by extending the original width by a first preset proportion in the left and right directions and by extending the original height by a second preset proportion in the up and down directions. When the width or height of the digital candidate region is less than the preset pixel value, an interpolation algorithm is used to enlarge the digital candidate region so that the short side is not less than the target pixel value. Perspective correction is performed on the digital candidate region, the largest quadrilateral contour of the digital candidate region is extracted, the four corner points are sorted and then a perspective transformation is performed to generate a front view, thus obtaining the target candidate region.

9. A real-time digital recognition system based on the fusion of target detection and OCR, used to execute the real-time digital recognition method based on the fusion of target detection and OCR as described in any one of claims 1 to 8, characterized in that, include: The image input module is used to acquire the image to be recognized and determine the digital candidate region of the image to be recognized; The region localization module is used to determine whether the position of the digit in the digit candidate region is fixed. When the position of the digit is fixed, the target candidate region is cropped from the image to be identified according to the preset ROI coordinates. When the position of the digit is not fixed, the digit region is located from the image to be identified as the target candidate region using the target detection model. The image preprocessing module is used to preprocess the target candidate region to generate several different preprocessed versions of the image; The OCR recognition module is used to input the images of several different preprocessed versions into the OCR recognition model for recognition, and obtain the OCR recognition results of each version; The YOLO digit recognition module is used to perform digit category recognition on the image to be recognized or the digit candidate region using the YOLO digit recognition model, and obtain the YOLO recognition result. The validity determination module is used to determine the validity of the OCR recognition result according to preset rules. The fusion determination module is used to fuse the OCR recognition result with the YOLO recognition result and output the optimal digit recognition result.

10. A computer device comprising a memory and a processor, characterized in that, The processor performs the method as described in any one of claims 1 to 8 when executing a computer program stored in the memory.