Character quality determination methods and apparatus, electronic devices, storage media

CN116453135BActive Publication Date: 2026-05-26SUZHOU MEGAROBO TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU MEGAROBO TECH CO LTD
Filing Date
2023-04-04
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, traditional machine vision character detection algorithms have high requirements for lighting and background conditions, resulting in a high false detection rate and difficulty in effectively recognizing the quality of label characters.

Method used

A deep learning-based character classification and detection model is adopted. By segmenting and classifying training samples, the quality category of single character images is identified. The single character image is segmented using character region and neighborhood heatmap, and the probability of quality category is calculated using logistic regression or softmax function to reduce the false detection rate.

Benefits of technology

It improves the accuracy and robustness of character quality detection, reduces dependence on lighting and background conditions, and significantly reduces the false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116453135B_ABST
    Figure CN116453135B_ABST
Patent Text Reader

Abstract

This invention provides a method for determining character quality, comprising the following steps: inputting a single-character image to be inspected into a character classification and detection model for classification and detection, and obtaining classification and detection results; the character classification and detection model is used to identify the probability that the single-character image to be inspected belongs to different quality categories of each of a plurality of preset characters; determining the target preset character corresponding to the maximum probability value based on the classification and detection results; determining the probability of all quality categories related to the target preset character in the classification and detection results; and determining the character quality of the single-character image to be inspected based on the determined probabilities of all quality categories related to the target preset character. This invention overcomes the problems of high requirements for external conditions and high false detection rate of existing traditional algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and more specifically to a method and apparatus for determining character quality, a storage medium, and an electronic device. Background Technology

[0002] Product labels serve as a product's "business card," significantly reflecting its value. They may contain crucial information such as the product name, specifications, key parameters, and company logo. This information is printed onto the label using methods like inkjet printing. The absence of essential product information on the label can directly impact product usability and customer experience. Therefore, verifying the characters on the label is extremely important.

[0003] Labels are typically applied to the surface of a product using adhesive after the product information has been printed on them by labeling equipment. The material of the label may vary depending on the product, but the types of character defects on the label are generally the same, including: blurred characters, skewed characters, overlapping characters, missing characters, etc.

[0004] The printing quality of characters on labels needs to be differentiated and inspected on the production line. In the current technology, traditional machine vision is usually used to verify characters and evaluate the printing quality. Traditional algorithms have high requirements for external conditions such as lighting and background. In the case of uneven lighting and complex background, it is difficult to effectively extract the area where the characters are located, making it even more difficult to identify and detect. Sometimes, characters are distorted and uneven lighting makes them look bad but they are actually OK. Therefore, the false detection rate is relatively high. Summary of the Invention

[0005] This invention is proposed in view of at least some of the above-mentioned problems. This invention provides a character quality determination method that overcomes the problems of high requirements for external conditions and high false detection rates in existing traditional algorithms.

[0006] This invention provides a method for determining character quality, comprising the following steps:

[0007] The single character image to be inspected is input into the character classification and detection model for classification and detection to obtain the classification and detection results; the character classification and detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of multiple preset characters;

[0008] Based on the classification and detection results, the target preset character corresponding to the maximum probability value is determined;

[0009] In the classification detection results, the probabilities of all quality categories related to the target preset character are determined;

[0010] The character quality of the single-character image to be inspected is determined based on the probability of determining all quality categories associated with the target preset character.

[0011] Preferably, the character classification and detection model includes a first model and multiple second models;

[0012] The step of inputting the image of the single character to be detected into the character classification and detection model for classification and detection to obtain the classification and detection result specifically includes:

[0013] First, the single character image to be inspected is input into the first model to determine the character group category to which the single character image belongs;

[0014] Based on the determined character group category, the single character image to be detected is selected and input into the second model corresponding to the character group category for classification and detection, and the classification and detection result is obtained;

[0015] Each of the second models is used to classify and detect the single-character image to be inspected, so as to infer the probability of the single-character image to be inspected belonging to the different quality categories of each preset character among multiple preset characters of the character group category.

[0016] Preferably, determining the character quality of the single-character image to be inspected based on the probability of determining all quality categories related to the target preset character specifically includes:

[0017] Based on the determined probabilities of all quality categories associated with the target preset character, calculate the probability value of the single character image to be inspected belonging to any quality category;

[0018] The character quality of the single-character image to be inspected is determined based on the probability value of any quality category calculated.

[0019] Preferably, the step of calculating the probability value of the single character image to be inspected belonging to any quality category based on the determined probabilities of all quality categories related to the target preset character specifically includes:

[0020] Based on the determined probabilities of all quality categories associated with the target preset character, the probability value of the single character image to be inspected belonging to any quality category is calculated using a logistic regression function.

[0021] Preferably, before inputting the image of the single character to be detected into the character classification and detection model for classification and detection to obtain the classification and detection result, the method further includes:

[0022] For characters belonging to the same string on the image to be tested, generate the smallest bounding rectangle of that string;

[0023] Based on a single character in the string and the minimum bounding rectangle, the minimum bounding rectangle is segmented according to the single character to be detected, resulting in the segmented image of the single character to be detected.

[0024] Preferably, before generating the minimum bounding rectangle of characters belonging to the same string on the image to be tested, the following steps are further included:

[0025] The image to be tested is input into a trained character detection network model, and the inference result is derived.

[0026] Based on the reasoning results, multiple characters belonging to the same string are identified.

[0027] Preferably, the step of generating the minimum bounding rectangle of characters belonging to the same string on the image to be tested specifically includes:

[0028] Based on the reasoning results, determine the minimum bounding rectangle of a single character;

[0029] The minimum bounding rectangle of the string is generated by processing the minimum bounding rectangle of all the characters in the string.

[0030] Preferably, determining the multiple characters belonging to the same string based on the reasoning result specifically includes:

[0031] Based on the reasoning results, a character region heatmap and a neighborhood heatmap are generated;

[0032] Based on the character region heatmap and the neighborhood heatmap, multiple characters belonging to the same string are identified.

[0033] Preferably, determining the minimum bounding rectangle of a single character based on the reasoning result specifically includes:

[0034] The minimum bounding rectangle of a single character is generated based on the heatmap of the character region.

[0035] Preferably, the step of segmenting the minimum bounding rectangle according to individual characters to obtain the segmented single-character image to be detected specifically includes:

[0036] A region growing algorithm is applied to a single character to generate a boundary line between two adjacent characters;

[0037] The minimum bounding rectangle is segmented according to the dividing line to obtain the segmented image of the single character to be inspected.

[0038] This invention also provides a character quality determination device, comprising:

[0039] The input module is used to input the single character image to be inspected into the character classification and detection model for classification and detection, and to obtain the classification and detection result; wherein, the character classification and detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of a plurality of preset characters;

[0040] The target preset character determination module is used to determine the target preset character corresponding to the maximum probability value based on the classification detection results.

[0041] The probability determination module is used to determine the probability of all quality categories related to the target preset character from the classification detection results.

[0042] The character quality determination module is used to determine the character quality of the single character image to be inspected based on the probability of determining all quality categories related to the target preset character.

[0043] The present invention also provides an electronic device, including the character quality determination device described above.

[0044] The present invention also provides a storage medium on which program instructions are stored, the program instructions being used, when running, to employ the character quality determination method provided above.

[0045] The character quality determination method provided by this invention actually uses deep learning to determine the printing quality of a single character. Compared with the traditional detection algorithms used in the prior art, it not only has lower requirements for external conditions, but also, because the deep learning method can learn the features of the character itself to classify it, and then determine the score of the quality category, eliminating the possibility of false detection, thus the false detection rate is relatively low. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0047] Figure 1a A flowchart of a character quality determination method provided in an embodiment of the present invention;

[0048] Figure 1b for Figure 1a Flowchart of step S40;

[0049] Figure 1c for Figure 1a Flowchart of step S10;

[0050] Figure 1d A flowchart preceding step S10 provided in this embodiment of the invention;

[0051] Figure 1e for Figure 1d Flowchart of step S02;

[0052] Figure 1f for Figure 1d Flowchart of step S1;

[0053] Figure 2 To adopt Figure 1a An example diagram illustrating the character quality determination method is shown below;

[0054] Figure 3 This is a schematic diagram illustrating the segmentation of each string in the entire image under test into individual character images.

[0055] Figure 4 A comparison of character region heatmaps and character neighborhood heatmaps;

[0056] Figure 5 for Figure 3 A schematic diagram illustrating the process of segmenting an example string into a single-character image to be tested;

[0057] Figure 6 To adopt this Figure 3 and Figure 5 A comparison diagram showing the provided segmentation steps and when they were not used;

[0058] Figure 7 This is a schematic block diagram of the character quality determination device provided in an embodiment of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.

[0060] To at least partially solve the above-mentioned technical problems, embodiments of the present invention provide a method for determining character quality, which is described below in conjunction with... Figures 1a to 1f and Figure 2 The method is described by the following steps:

[0061] S10, the single character image to be inspected is input into the character classification detection model for classification detection, and the classification detection result is obtained; wherein, the character classification detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of the multiple preset characters.

[0062] The character classification and detection model is trained and requires classifying and labeling individual characters segmented from training samples. The categories are set based on the actual categories and the customer's judgment criteria. For example, if the actual characters to be recognized are digits 0-9 (i.e., the preset characters include 0-9), and the customer's judgment criteria only include OK and NG (where OK and NG are different quality categories), then 20 categories can be set, such as digit 0-OK, digit 0-NG, ..., digit 9-OK, digit 9-NG. Of course, in practical applications, the customer's judgment criteria can be set according to the actual situation, such as 0-Excellent, 0-Pass, and 0-Fail (where Excellent, Pass, and Fail belong to different quality categories).

[0063] like Figure 2 As shown, the character classification and detection model presets characters including digits 0-9, 26 letters, and punctuation marks, with quality categories including OK and NG. The current single character image to be inspected is the digit "2," which has broken strokes. When the digit "2" is input into the character classification and detection model, the probability of it belonging to each category (i.e., the confidence level in the figure) is obtained. The probability of belonging to 0-OK is 0.002, the probability of belonging to 0-NG is 0.002, ..., the probability of belonging to 2-OK is 0.3, the probability of belonging to 2-NG is 0.2, ..., and the sum of the probabilities of all categories is 1. Although 0.3 is the maximum probability among all probabilities, as the number of categories increases, the maximum probability value may become relatively small. Therefore, using the maximum probability (0.3 for 2-OK) to express print quality is actually meaningless. For this reason, this patent adopts the following step S20.

[0064] S20, based on the classification detection results, determine the target preset character corresponding to the highest probability value. Specifically, such as... Figure 2 As shown, since the maximum probability value is 0.3, the corresponding category is 2-OK. Therefore, the target preset character is determined to be the number 2.

[0065] S30, in the classification detection results, determine the probability of all quality categories related to the target preset character. Specifically, all categories related to the number 2 include 2-OK and 2-NG, where the probability of the 2-OK category is 0.3 and the probability of the 2-NG category is 0.2.

[0066] S40, determine the character quality of the single character image to be inspected based on the probability of determining all quality categories related to the target preset character.

[0067] like Figure 1b As shown, step S40 specifically includes:

[0068] S401, based on the determined probabilities of all quality categories related to the target preset character, calculate the probability value of the single character image to be inspected belonging to any quality category. Specifically, based on the probability of 2-OK category being 0.3 and the probability of 2-NG category being 0.2, calculate the probability value of the quality category of the single character image to be inspected being OK. A more specific and simpler calculation method is a linear regression function, for example, 0.3 / (0.3+0.2)=0.6, which calculates the probability value of the quality category of the single character image to be inspected being OK to be 0.6.

[0069] Of course, in practical applications, the probability of the quality category of the single-character image 2 being NG can also be calculated based on the probability of 2-OK being 0.3 and 2-NG being 0.2. A more specific and simple calculation method is: 0.2 / (0.3+0.2)=0.4, which means the probability of the quality category of the single-character image 2 being NG is calculated to be 0.4.

[0070] Additionally, in S401, based on the determined probabilities of all quality categories associated with the target preset character, a logistic regression function can be used to calculate the probability value of the single character image to be inspected belonging to any quality category. The logistic regression function includes softmax, and finally, based on the probabilities of 2-ok and 2-NG, another softmax is applied to obtain the score of the single character belonging to a quality category. The score is: score = exp(0.3) / [exp(0.2)+exp(0.3)] = 0.53, where 0.53 represents the score or probability that the quality category of the input single character 2 is OK.

[0071] The definition of the Softmax function is given below (taking the output of the i-th node as an example):

[0072] Where z i Let C be the output value of the i-th node, and C be the number of output nodes, i.e., the number of categories. The Softmax function can be used to convert the output values ​​of multi-class classification into a probability distribution ranging from [0, 1] to 1.

[0073] Using the softmax function, end-to-end training can be achieved.

[0074] S402, determine the character quality of the single character image to be inspected based on the calculated probability value of any quality category. Specifically, directly use the calculated probability value of the OK category as its first character quality, or directly use the calculated probability value of the NG category as its second character quality.

[0075] In the subsequent process, it can be determined whether the quality of the first type of character exceeds the first threshold. If it does, the quality of the single character to be inspected formed by printing or other methods is considered to be qualified. For example, if the first threshold is 0.5, the quality is considered to be qualified regardless of which calculation method is used in step S401. It can also be determined whether the quality of the second type of character is less than the second threshold. If it is less than the second threshold, the quality of the single character to be inspected formed by printing or other methods is considered to be qualified. If the second threshold is 0.3, compared with 0.4 calculated by the linear regression function in step S401, the quality is considered to be unqualified.

[0076] In summary, it can be understood that the character quality determination method provided in this embodiment of the invention actually uses deep learning to determine the printing quality of a single character. Compared with the traditional detection algorithms used in the prior art, it not only has lower requirements for external conditions, but also, because the deep learning method can learn the features of the character itself to classify it, and then determine the score of the quality category, eliminating the possibility of false detection, thus the false detection rate is relatively low.

[0077] In this embodiment, further, as Figure 1c As shown, the character classification and detection model described above includes a first model and multiple second models; in this case, S10 specifically includes:

[0078] S101: First, the single-character image to be inspected is input into the first model to determine the character group category to which the single-character image belongs. Specifically, the character group categories include: number category, letter category, and symbol category. In this step, the character group category of the single-character image to be inspected is first determined.

[0079] S102, based on the determined character group category, select the single character image to be inspected and input it into the second model corresponding to the character group category for classification detection to obtain the classification detection result. Each second model is used to classify and detect the single character image to be inspected in order to infer the probability of the single character image to be inspected belonging to the different quality categories of each preset character among multiple preset characters of the character group category.

[0080] Specifically, if the current single-character image to be inspected is determined to be a number, then the image is input into the second model corresponding to the number category. This second model is only used to identify the probability that the input image is a different number. If the current single-character image to be inspected is determined to be a letter, then the image is input into the second model corresponding to the letter category. This second model is only used to identify the probability that the input image is a different uppercase or lowercase letter. If the current single-character image to be inspected is determined to be a symbol, then the image is input into the second model corresponding to the symbol category. This second model is only used to identify the probability that the input image is a different symbol.

[0081] It should be noted that by using the above steps S101 and 102, the problem of model convergence difficulty caused by too many categories can be avoided.

[0082] It should be noted that, as Figure 1d As shown, before step S10 above, the following steps are also included:

[0083] S1 generates the smallest bounding rectangle of the string that belongs to the same string on the image to be tested.

[0084] S2, based on a single character in the string and the minimum bounding rectangle, the minimum bounding rectangle is segmented according to the single character to be inspected, resulting in the segmented single-character image.

[0085] Please see Figure 3 The image to be tested is a real photograph of the label on the entire product. On this label, characters belonging to the same string are divided into multiple single-character images. For example, for "Random", the minimum bounding rectangle of "Random" is generated. Based on the 6 letters in "Random", the minimum bounding rectangle is divided into 6 single-character images of the same height, located on the same bottom and top surface. Each single-character image is processed as described in S10 to S40.

[0086] like Figure 1d As shown, for step S1, to determine the characters belonging to the same string on the image to be tested, the following steps are used, that is, before step S1, the following steps are also included:

[0087] S01, input the image to be tested into the trained character detection network model and infer the inference result.

[0088] Specifically, character detection networks such as CRAFT and Mask Text Spotter currently have the ability to detect individual characters. For each training sample, each character position needs to be accurately labeled. When the model regresses, the confidence of the pixel position closer to the center of the character is higher, and the confidence of the pixel position at the edge is lower.

[0089] S02, Based on the reasoning results, identify multiple characters belonging to the same string.

[0090] Specifically, such as Figure 1e As shown, step S02 includes the following steps:

[0091] S02A, based on the reasoning results, generates a character region heatmap and a neighborhood heatmap.

[0092] Specifically, the inference results include a probability distribution map of each pixel at the character position and a probability distribution map in the character's neighborhood. For the probability distribution map of the character's neighborhood, the probability represents the probability of belonging to a region adjacent to the character. For example... Figure 4 As shown, Figure 4 The image illustrates the difference between a character region heatmap and a character neighborhood heatmap. Figure 4 The rendering method shown is JET, where the closer to 1 is to red, and the closer to 0 is to blue.

[0093] S02B, multiple characters belonging to the same string are determined based on the character region heatmap and the neighborhood heatmap. Specifically, in this embodiment, firstly, a threshold for the maximum character spacing is set, for example, 50 pixels. Since the character region heatmap for each character has already been obtained through the model, i.e., the "boundary" of each character, the pixel distance between characters can be calculated. If the distance between two adjacent characters in the same row exceeds 50 pixels, they are considered not to be the same string. Secondly, if the calculated character pixel distance is less than 50 pixels, it is checked whether there is a highlighted area (red area) between the two adjacent characters in the neighborhood heatmap. If not, it indicates that they are still not the same character; otherwise, they are considered to be the same character.

[0094] Understandably, using S02A and S02B to identify multiple characters belonging to the same string is not only simple but also highly accurate.

[0095] like Figure 1f As shown, step S1 specifically includes:

[0096] S1A, Based on the reasoning results, determine the minimum bounding rectangle of a single character. Specifically, in this embodiment, since a character region heatmap was generated based on the reasoning results above, the minimum bounding rectangle of a single character is generated based on the character region heatmap, as follows: Figure 5 (2) Each character, number, and even symbol has its own corresponding minimum bounding rectangle. More specifically, the "Watershed Algorithm" is used to obtain the minimum bounding rectangle of each character in the character region heatmap.

[0097] Of course, the present invention is not limited to this. In practical applications, it also directly uses a probability distribution map and sets a threshold (hyperparameter) to consider regions with probability values ​​greater than the threshold as characters, and then obtains the region of each character by finding connected components, thereby generating the bounding rectangle of the region.

[0098] S1B, Generate the minimum bounding rectangle of the string based on the minimum bounding rectangle of all characters in the string. In this embodiment, specifically, it can be done by merging the minimum bounding rectangles of all individual characters belonging to the same string to generate the minimum bounding rectangle of each string. Of course, additional operations can be added during or after merging, such as morphological operations, to ensure that all strokes of the complete character are within the minimum bounding rectangle of the string, as follows: Figure 5 (2) The outermost rectangle.

[0099] S1C uses a region growing algorithm to generate boundaries between adjacent characters. Specifically, the Region Growing Algorithm first grows each character region vertically, then intersects it with the smallest bounding rectangle of the entire string, and finally grows it horizontally. Ultimately, there will be only one clear boundary between any two characters.

[0100] S1D divides the smallest bounding rectangle according to the dividing line to obtain the segmented character region of a single character, which serves as the image of the single character to be detected. For example... Figure 5 As shown in (3), the height of a single character, the bottom and top are the same, that is, a single character has the relevant information features of the whole string.

[0101] Please see Figure 6 , Figure 6 In the left-hand image, each character in the string is segmented individually by its own bounding rectangle. Therefore, the missing lower half of the digit "1" is not preserved. Consequently, the model cannot recognize this missing part, meaning it cannot detect the missing character. This is because the digit "1" is ultimately fed into the classification model as a complete unit, only appearing larger. Figure 6 The left side of the image uses Figure 3 and Figure 5 The method shown divides the string into individual characters, so that the height of the number "1" is the height of the string, the bottom is the bottom of the entire string, and the top is the top of the string. The missing lower half of the features of the number "1" is preserved. Therefore, when the number "1" with missing lower half features is input into the character classification and detection model, it can be accurately identified by the character classification and detection model.

[0102] Therefore, based on the above character quality determination method, the individual characters of each string segmented in step S1 are used as the single character image to be inspected. Since the single character image to be inspected has the information features of the entire string (i.e., the true boundary of a single character is obtained), when the single character image to be inspected is subsequently input into the character classification detection model for classification, the classification accuracy can be improved for similar characters, such as uppercase and lowercase O, o, and 0. In scenarios where there are local missing parts at the character edge but it does not affect character recognition (such as the above scenario of the number "1"), the defect classification and recognition can be accurately performed, further reducing the false detection rate.

[0103] As another embodiment of the present invention, such as Figure 7 As shown, the present invention also provides a character quality determination device, including: an input module 601, a target preset character determination module 602, a probability determination module 603, and a character quality determination module 604.

[0104] The input module 601 is used to input the single character image to be inspected into the character classification detection model for classification detection, and obtain the classification detection result; wherein, the character classification detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of a plurality of preset characters.

[0105] The target preset character determination module 602 is used to determine the target preset character corresponding to the maximum probability value based on the classification detection results.

[0106] The probability determination module 603 is used to determine the probability of all quality categories related to the target preset character in the classification detection result.

[0107] The character quality determination module 604 is used to determine the character quality of the single character image to be inspected based on the probability of determining all quality categories related to the target preset character.

[0108] Preferably, the character classification and detection model includes a first model and multiple second models; the input module 601 specifically includes: a first input module 6011 and a second input module 6012. Wherein,

[0109] The first input module 6011 is used to first input the single character image to be inspected into the first model to determine the character group category to which the single character image belongs;

[0110] The second input module 6012 is used to select and input the single character image to be inspected into the second model corresponding to the character group category for classification detection according to the determined character group category, and obtain the classification detection result; wherein, each of the second models is used to perform classification detection on the single character image to be inspected, so as to infer the probability of the single character image to be inspected belonging to the different quality categories of each preset character among multiple preset characters of the character group category.

[0111] Preferably, the character quality determination module 604 is specifically used to calculate the probability value of the single character image to be inspected belonging to any quality category based on the determined probabilities of all quality categories related to the target preset character; and to determine the character quality of the single character image to be inspected based on the calculated probability value of any quality category.

[0112] More preferably, the character quality determination module 604 is further configured to calculate the probability value of the single character image to be inspected belonging to any quality category based on the determined probabilities of all quality categories related to the target preset character using a logistic regression function.

[0113] The aforementioned character quality determination device further includes a segmentation module 605. Before the input module operates, the segmentation module 605 generates the minimum bounding rectangle of characters belonging to the same string in the image to be tested; based on a single character in the string and the minimum bounding rectangle, the minimum bounding rectangle is segmented according to the single character to be tested, resulting in the segmented image of the single character to be tested.

[0114] The segmentation module 605 is further specifically used to input the image to be tested into a trained character detection network model before generating the minimum bounding rectangle of the string for characters belonging to the same string in the image to be tested, and to infer the probability of each pixel in the image to be tested belonging to a character; based on the inference result, to determine multiple characters belonging to the same string.

[0115] The segmentation module 605 is further specifically used to determine the minimum bounding rectangle of a single character based on the reasoning result; and to process the minimum bounding rectangles of all characters in the string to generate the minimum bounding rectangle of the string.

[0116] The segmentation module 605 is further configured to generate a character region heatmap and a neighborhood heatmap based on the inference result; and to determine multiple characters belonging to the same string based on the character region heatmap and the neighborhood heatmap.

[0117] The segmentation module 605 is also specifically used to generate the minimum bounding rectangle of a single character based on the character region heatmap.

[0118] The segmentation module 605 is also specifically used to perform a region growing algorithm on a single character to generate a boundary line between two adjacent characters; and to segment the minimum bounding rectangle according to the boundary line to obtain the segmented image of the single character to be inspected.

[0119] Since this character quality determination device is a virtual product embodiment corresponding to the above-mentioned character quality determination method, each module will not be elaborated in detail here. Please refer to the above for details.

[0120] The present invention also provides an electronic device, including the character quality determination device provided in the above embodiments.

[0121] The present invention also provides a storage medium on which program instructions are stored, the program instructions being used to execute the character quality determination method provided in the above embodiments when running.

[0122] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of 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 device, or some features may be ignored or not executed.

[0124] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0125] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, this approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0126] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus so disclosed can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0127] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.

[0128] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the beverage preparation parameter configuration system or beverage preparation equipment according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0129] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0130] The above description is merely a specific embodiment of the present invention or an explanation of that embodiment. The scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.

[0131] As described above, the current transmission of high-resolution image data is achieved by changing the hardware of the sending and receiving ends, which not only wastes resources but also incurs a lot of modification costs.

Claims

1. A method for determining character quality, characterized in that, Includes the following steps: The single character image to be inspected is input into the character classification and detection model for classification and detection to obtain the classification and detection results; the character classification and detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of multiple preset characters; Based on the classification and detection results, the target preset character corresponding to the maximum probability value is determined; In the classification detection results, the probabilities of all quality categories related to the target preset character are determined; The character quality of the single-character image to be inspected is determined based on the probability of determining all quality categories associated with the target preset character.

2. The method as described in claim 1, characterized in that, The character classification and detection model includes a first model and multiple second models; The step of inputting the image of the single character to be detected into the character classification and detection model for classification and detection to obtain the classification and detection result specifically includes: First, input the single character image to be inspected into the first model to determine the character group category to which the single character image belongs; Based on the determined character group category, the single character image to be detected is selected and input into the second model corresponding to the character group category for classification and detection, and the classification and detection result is obtained; Each of the second models is used to classify and detect the single-character image to be inspected, so as to infer the probability of the single-character image to be inspected belonging to the different quality categories of each preset character among multiple preset characters of the character group category.

3. The method as described in claim 1, characterized in that, The step of determining the character quality of the single-character image to be inspected based on the probability of determining all quality categories related to the target preset character specifically includes: Based on the determined probabilities of all quality categories associated with the target preset character, calculate the probability value of the single character image to be inspected belonging to any quality category; The character quality of the single-character image to be inspected is determined based on the probability value of any quality category calculated.

4. The method as described in claim 3, characterized in that, The step of calculating the probability value of the single character image to be inspected belonging to any quality category based on the determined probabilities of all quality categories related to the target preset character specifically includes: Based on the determined probabilities of all quality categories associated with the target preset character, the probability value of the single character image to be inspected belonging to any quality category is calculated using a logistic regression function.

5. The method as described in claim 1, characterized in that, Before inputting the image of the single character to be detected into the character classification and detection model for classification and detection, and obtaining the classification and detection result, the method further includes: For characters belonging to the same string on the image to be tested, generate the smallest bounding rectangle of that string; Based on a single character in the string and the minimum bounding rectangle, the minimum bounding rectangle is segmented according to the single character to be detected, resulting in the segmented image of the single character to be detected.

6. The method as described in claim 5, characterized in that, Before generating the minimum bounding rectangle of characters belonging to the same string on the image to be tested, the following steps are also included: The image to be tested is input into a trained character detection network model, and the inference result is derived. Based on the reasoning results, multiple characters belonging to the same string are identified.

7. The method as described in claim 6, characterized in that, The process of generating the minimum bounding rectangle of characters belonging to the same string on the image under test specifically includes: Based on the reasoning results, determine the minimum bounding rectangle of a single character; The minimum bounding rectangle of the string is generated by processing the minimum bounding rectangle of all the characters in the string.

8. The method as described in claim 7, characterized in that, The step of determining multiple characters belonging to the same string based on the reasoning result specifically includes: Based on the reasoning results, a character region heatmap and a neighborhood heatmap are generated; Based on the character region heatmap and the neighborhood heatmap, multiple characters belonging to the same string are identified.

9. The method as described in claim 8, characterized in that, Determining the minimum bounding rectangle of a single character based on the reasoning result specifically includes: The minimum bounding rectangle of a single character is generated based on the heatmap of the character region.

10. The method as described in claim 5, characterized in that, The step of segmenting the minimum bounding rectangle according to individual characters to obtain the segmented single-character image to be detected specifically includes: A region growing algorithm is applied to a single character to generate a boundary line between two adjacent characters; The minimum bounding rectangle is segmented according to the dividing line to obtain the segmented image of the single character to be inspected.

11. A character quality determination device, characterized in that, include: The input module is used to input the single character image to be inspected into the character classification and detection model for classification and detection, and to obtain the classification and detection result; wherein, the character classification and detection model is used to identify the probability that the single character image to be inspected belongs to different quality categories of each of a plurality of preset characters; The target preset character determination module is used to determine the target preset character corresponding to the maximum probability value based on the classification detection results. The probability determination module is used to determine the probability of all quality categories related to the target preset character in the classification detection results; The character quality determination module is used to determine the character quality of the single character image to be inspected based on the probability of determining all quality categories related to the target preset character.

12. An electronic device, characterized in that, Includes the character quality determination device as described in claim 11.

13. A storage medium, characterized in that, The storage medium stores program instructions that, when executed, perform the character quality determination method as described in any one of claims 1 to 10.