Information code recognition method and device and computer readable storage medium

By using an information code detection network to determine the recognition difficulty level and perform targeted processing, the problem of time-consuming information code recognition in video stream applications is solved, and recognition efficiency and accuracy are improved.

CN116050446BActive Publication Date: 2026-05-29ZHEJIANG DAHUA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-12-27
Publication Date
2026-05-29

Smart Images

  • Figure CN116050446B_ABST
    Figure CN116050446B_ABST
Patent Text Reader

Abstract

The application discloses an information code recognition method and device and a computer readable storage medium. The method comprises the following steps: acquiring a to-be-processed image; determining an information code region in the to-be-processed image, and determining a recognition difficulty level of the information code region; and according to the recognition difficulty level, using a corresponding recognition method to recognize the information code region to obtain an information code recognition result. In this way, the application can save the time for information code recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition, and in particular to information code recognition methods, apparatus and computer-readable storage media. Background Technology

[0002] In some video streaming applications, information code images (such as QR codes or barcodes) are continuously sent to the algorithm for recognition at a certain frame rate. However, some of the images actually captured have problems such as motion blur or missing information code information, which require more time to recognize or are simply undecodeable. Summary of the Invention

[0003] This application provides an information code recognition method, apparatus, and computer-readable storage medium, which solves the problem of long recognition time in the prior art.

[0004] To address the aforementioned technical problems, the first aspect of this application provides an information code recognition method, comprising: acquiring an image to be processed; determining an information code region in the image to be processed, and determining a recognition difficulty level of the information code region; and, based on the recognition difficulty level, using a corresponding recognition method to recognize the information code region to obtain an information code recognition result.

[0005] Optionally, determining the information code region in the image to be processed and determining the recognition difficulty level of the information code region includes: processing the image to be processed using an information code detection network to determine the confidence level of at least one candidate box, a set number of corner coordinates, and a recognition difficulty level; using candidate boxes with a confidence level greater than a set confidence threshold as initial candidate boxes; determining target candidate boxes in the initial candidate boxes; using the target candidate box region as the information code region, and using the set number of corner coordinates and the recognition difficulty level corresponding to the target candidate box as the set number of corner coordinates and the recognition difficulty level of the information code region, respectively.

[0006] Optionally, the set confidence threshold is 0.5.

[0007] Optionally, before processing the image to be processed using the information code detection network to determine the confidence level of at least one candidate box, set corner coordinates, and recognition difficulty level, the method further includes: acquiring a training image set, the training image set including information code images, the information code images having recognition difficulty level labels, corner coordinate labels, and whether it is a target label; using the information code detection network to detect each information code image in the training image set to obtain a detection result for each information code image; determining a recognition difficulty classification loss, a target confidence loss, and a localization loss based on the detection results; and jointly updating the network parameters of the information code detection network according to the recognition difficulty classification loss, the target confidence loss, and the localization loss.

[0008] Optionally, the step of identifying the information code region using a corresponding identification method based on the identification difficulty level includes: if the identification difficulty level is relatively difficult, then performing shape correction on the information code region based on the set corner coordinates to obtain a regularly shaped information code image; sequentially using each pixel of the regularly shaped information code image as a pixel to be processed, updating the pixel value of the pixel to be processed using the minimum pixel value among the pixel to be processed and its neighboring pixels to obtain the filtered information code; the neighboring pixels are those adjacent to the pixel to be processed in the same row and column; and identifying the filtered information code to obtain the information code identification result.

[0009] Optionally, the step of correcting the shape of the information code region based on the set corner coordinates includes: calculating the perspective transformation matrix of the information code region based on the set corner coordinates; and calculating the information code image with the regular shape based on the perspective transformation matrix.

[0010] Optionally, the step of using a corresponding recognition method to recognize the information code area according to the recognition difficulty level further includes: if the recognition difficulty level is difficult, then the information code area is not recognized, and a corresponding prompt is issued.

[0011] Optionally, the step of using a corresponding recognition method to recognize the information code region according to the recognition difficulty level includes: if the recognition difficulty level is simple, not filtering the information code region, but directly recognizing the information code to obtain the information code recognition result.

[0012] To address the aforementioned technical problems, a second aspect of this application provides an information code recognition device, the device comprising a processor and a memory coupled to each other; the memory stores a computer program, and the processor executes the computer program to implement the information code recognition method as provided in the first aspect above.

[0013] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program data, which, when executed by a processor, implements the information code recognition method provided in the first aspect.

[0014] The beneficial effects of this application are as follows: Unlike existing technologies, this application first determines the information code region in the image to be processed, and then determines the recognition difficulty level of the information code region; based on the recognition difficulty level, an appropriate recognition method is used to recognize the information code region, thereby obtaining the information code recognition result. By refining the recognition difficulty level of the information code in the above manner, different processing methods are used to recognize information codes with different recognition difficulty levels, saving time spent on information code recognition. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating an embodiment of the information code recognition method of this application;

[0017] Figure 2 This is a flowchart illustrating an embodiment of step S12 of this application;

[0018] Figure 3 This is a flowchart illustrating an embodiment of step S12 of this application;

[0019] Figure 4 This is a schematic diagram of an embodiment of the information code image before correction in this application;

[0020] Figure 5 This is a schematic diagram of an embodiment of the corrected information code image of this application;

[0021] Figure 6 This is a schematic diagram of an embodiment of the filter core of this application;

[0022] Figure 7 This is a schematic diagram of a partial region of the information code image according to an embodiment of this application;

[0023] Figure 8 This is a flowchart illustrating an embodiment of the training method for the information code detection network of this application;

[0024] Figure 9 This is a schematic block diagram of the structure of an embodiment of the information code recognition device of this application;

[0025] Figure 10 This is a schematic block diagram of another embodiment of the information code recognition device of this application;

[0026] Figure 11 This is a schematic block diagram of an embodiment of a computer-readable storage medium of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0028] The terms "first" and "second" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0030] Please see Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the information code recognition method of this application. It should be noted that if substantially the same result is obtained, this embodiment is not necessarily identical. Figure 1 The illustrated process sequence is limited. This embodiment includes the following steps:

[0031] Step S11: Obtain the image to be processed.

[0032] The image to be processed can be, for example, an image captured in real time by a mobile device through a camera, an image selected from local storage space, or an image received by the mobile device through a network or Bluetooth.

[0033] The image may include information codes to be identified, such as QR codes, barcodes, or other labels with decoding information.

[0034] Step S12: Determine the information code region in the image to be processed, and determine the recognition difficulty level of the information code region.

[0035] Due to various internal or external reasons, the information code area in the acquired image to be processed may be occluded, undamaged, or blurred. Such information codes are more difficult to recognize, while clear and complete information codes are easy to recognize. Therefore, the information code area can be divided into multiple recognition difficulty levels according to the clarity and completeness of the information code, and different processing can be carried out for different difficulty levels.

[0036] Based on the image quality, the recognition difficulty level can be divided into three levels: easy, relatively difficult, and difficult. Understandably, the higher the image quality, the easier the recognition difficulty level, and the worse the image quality, the more difficult the recognition difficulty level.

[0037] Please see Figure 2 , Figure 2 This is a schematic flowchart of an embodiment of step S12 of this application. It should be noted that if substantially the same result is achieved, this embodiment does not necessarily follow that approach. Figure 2 The illustrated process sequence is limited. Step S12 may further include the following steps:

[0038] Step S21: Use the information code detection network to process the image to be processed, in order to determine the confidence level of at least one candidate box, set the coordinates of each corner point, and the recognition difficulty level.

[0039] The information code detection network proposed in this embodiment is used to identify information code regions and determine the recognition difficulty level of the information code regions.

[0040] Among them, four corner points are set.

[0041] The information code detection network can detect multiple candidate boxes in the image to be processed. Each candidate box outputs a confidence score, set corner coordinates, and recognition difficulty level information.

[0042] Optionally, the basic framework of the information code detection network is YOLOv5, with the backbone network using Darknet19. It includes three output heads for predicting confidence, setting corner coordinates, and determining the recognition difficulty level. It's worth noting that the YOLOv5 framework used here is the polygon version. Since YOLOv5 is designed for detecting horizontal bounding boxes, and the goal here is to accurately detect the information code—specifically, its four corner points—a horizontal bounding box detection approach cannot be used. Therefore, the polygon version of YOLOv5 is chosen, directly regressing the eight coordinate values ​​of the four corner points. The anchor boxes can use the default YOLOv5 values.

[0043] Step S22: Select candidate boxes with a confidence level greater than the set confidence level threshold as initial candidate boxes.

[0044] In one embodiment, the confidence threshold is set to 0.5. In this step, among all candidate boxes, those with a confidence level greater than 0.5 are selected as initial screening candidate boxes.

[0045] Step S23: Determine the target candidate box from the initial candidate box.

[0046] Optionally, a non-maximum suppression method is used to filter out redundant boxes in the initial candidate boxes, leaving the remaining candidate boxes as target candidate boxes. In one embodiment, the cross-union ratio (CUI) threshold for non-maximum suppression is 0.3.

[0047] Step S24: Use the target candidate box area as the information code area, and use the set corner coordinates and recognition difficulty level corresponding to the target candidate box as the set corner coordinates and recognition difficulty level of the information code area, respectively.

[0048] This step uses the target candidate box area as the final information code area, the set number of corner coordinates corresponding to the target candidate box as the corner coordinates of the information code, and the recognition difficulty level corresponding to the target candidate box as the recognition difficulty level of the information code.

[0049] Under normal circumstances, the detection of the information code position and the quality analysis of the information code area are performed in two steps. One is to first roughly locate the position of the information code, and then perform quality analysis based on the small image obtained by the rough positioning to determine whether there is an information code in the area. The other is to perform quality analysis first and then position detection, that is, to first detect the characteristics of the information code's back-shaped (i.e., position detection pattern). If there are less than 3 back-shaped patterns, it means that there is no information code in the image. Then, perform corner detection of the information code to obtain the specific position. Compared with traditional image processing technologies, deep learning-based image processing technologies have shown very robust effects in tasks such as object detection, classification, and segmentation, and can extract more critical features of the object, and are less affected by problems such as overexposure, underexposure, blur, dirt, and deformation. This embodiment uses deep learning technology to solve the problem of accurate positioning of information codes, and at the same time realizes the analysis of the quality of information codes, completing the information code position detection and area quality analysis in one step, and the determined recognition difficulty level has a high credibility, which is beneficial to the subsequent rapid operation of information code recognition and improves the efficiency and accuracy of information code recognition.

[0050] Step S13: According to the recognition difficulty level, use the corresponding recognition method to recognize the information code area to obtain the information code recognition result.

[0051] Specifically, for different recognition difficulty levels, the following methods are used to recognize information codes respectively:

[0052] If the recognition difficulty level is simple, do not perform filtering on the information code area, directly recognize the information code, and obtain the information code recognition result. For example, information code decoding libraries such as zbar, zxing, and quirc can be used to recognize the information code. The recognition difficulty level being simple indicates that the image has a high integrity, high clarity, and high overall quality, and can be quickly recognized without filtering.

[0053] If the recognition difficulty level is difficult, do not recognize the information code area and issue a corresponding prompt. The recognition difficulty level being difficult indicates that the image has a low integrity, low clarity, and low overall quality, which means that there is probably information loss and it is difficult to recognize. Then, there is no need to decode, and the recognition can be directly abandoned and the user can be prompted in time, so that the user can adjust the recognition strategy or perform other operations according to the feedback result. The prompt can be, for example, to send a text prompt message "Recognition failed" or "The current image quality is low" on the human-computer interaction interface of the operating device, or it can also be a prompt method of vibrating or flashing the indicator light.

[0054] Please refer to Figure 3 , if the recognition difficulty level is relatively difficult, the following steps can be performed:

[0055] Step S31: According to the set corner coordinates, correct the shape of the information code area to obtain a regularly shaped information code image.

[0056] This step involves calculating the perspective transformation matrix of the information code region based on the coordinates of each corner point, and then calculating the corrected information code region based on the perspective transformation matrix. The method for obtaining the perspective transformation matrix is ​​commonly used and will not be elaborated upon here.

[0057] Please refer to the following: Figure 4 and Figure 5 , Figure 4 To obtain an information code image from a non-direct orientation, perspective transformation is used to convert the information code to a shape similar to... Figure 5 On the new viewing plane shown, it is transformed into a regularly shaped information code image facing the direction, which facilitates decoding.

[0058] Step S32: Take each pixel of the regularly shaped information code image as the pixel to be processed, and update the pixel value of the pixel to be processed by using the minimum pixel value among the pixel to be processed and its neighboring pixels to obtain the filtered information code.

[0059] In this context, adjacent pixels are those that are located in the same row and column as the pixel to be processed.

[0060] Specifically, this step is as follows: Figure 6 The filter check shown is as follows Figure 7 The information code shown is filtered. The filter kernel has a weight of 1 only for the vertical and horizontal directions at the center point, and 0 for all other positions. Using this filter kernel, the pixel value at the center position is calculated by moving it across the information code region shown below: A22 = min{A12,A22,A21,A23,A32}. In this embodiment, when the information code recognition difficulty level is relatively high, a cross-shaped filter based on the information code's own characteristics is used to improve the recognition effect of the information code in blurred conditions and increase the accuracy of information code decoding. In another embodiment, when the recognition difficulty level is relatively high, scaling, equalization, Gaussian filtering, contrast enhancement, and other processing methods can also be used to process the information code to improve the image quality of the information code.

[0061] Step S33: Recognize the filtered information code to obtain the information code recognition result.

[0062] This step can use information code decoding libraries such as zbar, zxing, and quirc to recognize the information code and obtain the information code recognition result.

[0063] Unlike existing technologies, this application utilizes an information code detection network to determine the recognition difficulty level of information codes in the image to be processed. For information codes with a simple recognition difficulty level, the recognition algorithm can be directly applied to obtain the recognition result. For information codes with a simple recognition difficulty level, the information code can be filtered before applying the recognition algorithm. For information codes with a difficult recognition difficulty level, which may be unrecognizable due to motion blur or missing information, there is no need to send them to the decoding algorithm; they can be quickly filtered to avoid wasting time. In this way, for different recognition difficulty levels, corresponding methods can be used to select recognition, non-recognition, or recognition after correction filtering, quickly filtering out images with poor quality that cannot be decoded, greatly reducing the overall algorithm time and improving the recognition success rate of blurry information codes.

[0064] Please see Figure 8 , Figure 8 This is a schematic flowchart of an embodiment of the training method for the information code detection network of this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that outcome. Figure 8 The illustrated process sequence is limited. This embodiment includes the following steps:

[0065] S91: Obtain the training image set, which includes information code images. The information code images are labeled with the recognition difficulty level, corner coordinates, and whether they are targets.

[0066] After preprocessing, the training image set is labeled. The recognition difficulty level label is based on the actual recognition difficulty. The information codes are divided into three categories according to the ease of decoding: the first category is simple, indicating complete information codes that can be directly decoded without any image processing; the second category is relatively difficult, indicating complete information codes that require scaling, denoising, filtering, and correction before recognition; and the third category is very difficult, indicating codes that cannot be recognized, including all incomplete codes, severely damaged codes, and blurry codes.

[0067] The corner coordinate labels include the coordinates of the four corner points of the information code. These can be manually labeled or obtained by processing the image using existing, high-performance information code precision location detection algorithms. The recognition difficulty level labels can be obtained using various existing open-source decoding algorithms, such as zbar, zxing, opencv, and quirc. For example, if these algorithms can directly recognize the information code content without any processing, the information code is marked as easy; if these algorithms cannot decode it, but it can be recognized by WeChat, Alipay, or other scanning software, it is marked as difficult; and otherwise, it is marked as hard.

[0068] The images in the training image set underwent data augmentation. Data augmentation primarily aims to reduce the risk of overfitting and increase the model's robustness. This technical solution applies random rotation, cropping, color perturbation, and random noise to the existing training data, enhancing the model's robustness to rotation, scale, lighting, and noise, and improving its generalization ability.

[0069] S92: Use the information code detection network to detect each information code image in the training image set, obtain the detection result of each information code image, and determine the recognition difficulty classification loss, target confidence loss and localization loss based on the detection results.

[0070] The information code detection network structure includes three output heads, which are responsible for predicting the recognition difficulty level, confidence level, and information code corner coordinates for different candidate boxes. The recognition difficulty classification loss is determined based on the recognition difficulty level and the corresponding label. The target confidence loss is determined based on the confidence level and whether it is a target label. The localization loss is determined based on the information code corner coordinates and corner coordinate labels.

[0071] Optionally, the difficulty classification loss and target confidence loss are obtained by using cross-entropy loss, and the localization loss is obtained by using the SmoothL1 loss function.

[0072] S93: The network parameters are jointly updated based on the classification loss for recognition difficulty, the target confidence loss, and the localization loss.

[0073] The sum of the identification difficulty classification loss, target confidence loss, and localization loss can be used as the total loss, and the network parameters of the information code detection network can be updated based on the total loss.

[0074] Please see Figure 9 , Figure 9 This is a schematic block diagram of an embodiment of the information code recognition device of this application. The information code recognition device 100 includes: an acquisition module 110, a segmentation module 120, and a recognition module 130.

[0075] The acquisition module 110 is used to acquire the image to be processed; the segmentation module 120 is used to determine the information code region in the image to be processed and to determine the recognition difficulty level of the information code region; the recognition module 130 is used to recognize the information code region according to the recognition difficulty level and to obtain the information code recognition result.

[0076] For details regarding the specific methods of each step in the processing execution, please refer to the description of each step in the above embodiment of the information code recognition method of this application, which will not be repeated here.

[0077] Please see Figure 10 , Figure 10This is a schematic block diagram of another embodiment of the information code recognition device of this application. The information code recognition device 200 includes a processor 210 and a memory 220 coupled to each other. The memory 220 stores a computer program, and the processor 210 is used to execute the following method steps:

[0078] Acquire an image to be processed; determine the information code region in the image to be processed, and determine the recognition difficulty level of the information code region; according to the recognition difficulty level, use the corresponding recognition method to recognize the information code region, and obtain the information code recognition result.

[0079] For a description of each step of the processing, please refer to the description of each step in the above embodiment of the information code recognition method of this application, and it will not be repeated here.

[0080] The memory 220 can be used to store program data and modules. The processor 210 executes various functional applications and data processing by running the program data and modules stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as target segmentation function, information code recognition function, etc.), etc.; the data storage area may store data created based on the use of the information code recognition device 200 (such as image data, corner coordinate data, candidate box confidence data, recognition difficulty level data, etc.). In addition, the memory 220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 220 may also include a memory controller to provide the processor 210 with access to the memory 220.

[0081] In the various embodiments of this application, the disclosed methods and apparatus can be implemented in other ways. For example, the embodiments of the information code recognition device 200 described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical, mechanical, or other forms.

[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0084] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium.

[0085] See Figure 11 , Figure 11 This is a schematic block diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 300 stores program data 310, which, when executed, implements the steps of the information code recognition method embodiments described above.

[0086] For a description of each step of the processing, please refer to the description of each step in the above embodiment of the information code recognition method of this application, and it will not be repeated here.

[0087] The computer-readable storage medium 300 can be any medium capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0088] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An information code recognition method, characterized in that, The method includes: Obtain the image to be processed; Identify the information code region in the image to be processed, and determine the recognition difficulty level of the information code region; Based on the recognition difficulty level, the corresponding recognition method is used to recognize the information code area to obtain the information code recognition result; The process of determining the information code region in the image to be processed and determining the recognition difficulty level of the information code region includes: The image to be processed is processed using an information code detection network to determine the confidence level of at least one candidate box, set the eight coordinates corresponding to the four corner points, and the recognition difficulty level; Candidate boxes with a confidence level greater than a set confidence threshold are used as initial candidate boxes; Determine the target candidate box from the initial candidate box; The target candidate box region is used as the information code region, and the eight coordinates corresponding to the four corner points of the target candidate box and the recognition difficulty level are respectively used as the eight coordinates corresponding to the four corner points of the information code region and the recognition difficulty level. The step of identifying the information code region using a corresponding identification method based on the identification difficulty level includes: If the recognition difficulty level is relatively difficult, then the information code area is shaped and corrected according to the eight coordinates corresponding to the four corner points to obtain a regular-shaped information code image. Each pixel of the information code image with the regular shape is taken as the pixel to be processed in sequence. The pixel value of the pixel to be processed is updated using the minimum pixel value among the pixel to be processed and its neighboring pixels to obtain the filtered information code. The neighboring pixels are those that are located in the same row and column as the pixel to be processed. The filtered information code is then identified to obtain the information code identification result.

2. The method according to claim 1, characterized in that, The set confidence threshold is 0.

5.

3. The method according to claim 1, characterized in that, Before processing the image to be processed using the information code detection network to determine the confidence level of at least one candidate box, set the eight coordinates corresponding to the four corner points, and the recognition difficulty level, the method further includes: Obtain a training image set, which includes information code images, each information code image having a recognition difficulty level label, corner coordinate labels, and a label indicating whether it is a target; The information code detection network is used to detect each information code image in the training image set to obtain the detection result of each information code image; Based on the detection results, the identification difficulty classification loss, target confidence loss, and localization loss are determined. The network parameters of the information code detection network are jointly updated based on the recognition difficulty classification loss, the target confidence loss, and the localization loss.

4. The method according to claim 1, characterized in that, The step of correcting the shape of the information code area based on the eight coordinates corresponding to the four corner points includes: Calculate the perspective transformation matrix of the information code area based on the eight coordinates corresponding to the four corner points; The information code image of the shape rule is calculated based on the perspective transformation matrix.

5. The method according to claim 1, characterized in that, The step of identifying the information code region using a corresponding identification method based on the identification difficulty level further includes: If the recognition difficulty level is "difficult", then the information code area will not be recognized, and a corresponding prompt will be issued.

6. The method according to claim 1, characterized in that, The step of identifying the information code region using a corresponding identification method based on the identification difficulty level includes: If the recognition difficulty level is simple, no filtering is performed on the information code area, and the information code is directly recognized to obtain the information code recognition result.

7. The method according to claim 1, characterized in that, The information code is a QR code or a barcode.

8. An information code recognition device, characterized in that, The apparatus includes a processor and a memory coupled to each other; the memory stores a computer program, and the processor executes the computer program to implement the steps of the method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program data that, when executed by a processor, implements the steps of the method as described in any one of claims 1-7.