Target recognition confidence coefficient determination method and device, electronic equipment and medium
By combining the recognition results of target characters and image features, the comprehensive confidence of target recognition is determined, and the problem of poor recognition effect in complex scenarios in the prior art is solved, and a more accurate confidence evaluation is achieved.
Patent Information
- Application Number
- CN202311421344.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
When existing target recognition technology encounters complex scenes such as rain and snow, backlight, exposure, large angles, image occlusion, etc., the recognition effect is poor, and it is difficult to accurately determine the confidence of target recognition.
By identifying the target image, the first confidence of the target character is determined, and the extended confidence is determined based on the position characteristics of the target character in the image, the attribute characteristics of the target, and the brightness characteristics of the image, and finally the comprehensive confidence is determined based on the two.
The confidence accuracy of target recognition is improved, so that the comprehensive confidence can more accurately and comprehensively reflect the accuracy of target character recognition.
Smart Images

Figure CN119919923A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, electronic device and medium for determining target recognition confidence. Background Art
[0002] With the rapid development of image acquisition and processing technology, image acquisition and processing technology is being used in more and more scenarios for automated target recognition and capture. For example, in the field of traffic monitoring, intelligent monitoring equipment is set up on the road to collect and recognize images of vehicles, license plates, traffic signs, etc. However, the current target recognition technology still faces many challenges. When encountering some difficult-to-recognize scenes, such as rainy and snowy weather, backlighting, exposure, large angles, image occlusion, etc., it will bring greater difficulty to target recognition, and the recognition effect will also encounter a large bottleneck. In addition, there are many types of targets, which may include multiple colors, fonts, multiple characters, etc., and the accuracy of recognition using the same algorithm is limited. In this case, it is necessary to accurately determine the confidence of target recognition and determine the trade-offs of recognition results based on the confidence.
[0003] Currently, the recognition results are evaluated based on the confidence level obtained by the algorithm recognition, but this confidence level only considers a single feature of the image and has a low accuracy rate. In addition, the scheme of determining the confidence level based on the image quality is difficult to evaluate based on a single factor, resulting in a low confidence level accuracy rate. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and medium for determining the confidence of target recognition, so as to more comprehensively and accurately determine the confidence of target recognition.
[0005] According to one aspect of the present application, a method for determining target recognition confidence is provided, the method comprising:
[0006] Recognize the target image to obtain the target character, and determine the first confidence level of the target recognition according to the recognition result of the target character;
[0007] Determining the extended confidence of target recognition according to at least one of a position feature of the target character in the target image, a location feature of the target, and a brightness feature of the target image;
[0008] The comprehensive confidence of target recognition is determined according to the first confidence and the extended confidence.
[0009] According to one aspect of the present application, a device for determining target recognition confidence is provided, the device comprising:
[0010] A first confidence determination module, used to recognize the target image to obtain the target character, and determine a first confidence of the target recognition according to the recognition result of the target character;
[0011] An extended confidence determination module, used to determine the extended confidence of target recognition according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image;
[0012] A comprehensive confidence determination module is used to determine the comprehensive confidence of target recognition based on the first confidence and the extended confidence.
[0013] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the target recognition confidence determination method of any embodiment of the present application.
[0017] According to another aspect of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the target recognition confidence determination method of any embodiment of the present application when executed.
[0018] The technical solution of the embodiment of the present application is to identify the target image to obtain the target character, and determine the first confidence of the target recognition according to the recognition result of the target character; determine the extended confidence of the target recognition according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image; and determine the comprehensive confidence of the target recognition according to the first confidence and the extended confidence. The above scheme determines the extended confidence according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image, and more comprehensively considers the influence of the extended feature of the target on the recognition confidence, and determines the comprehensive confidence in combination with the first confidence output by the target character recognition, so that the comprehensive confidence can more accurately and comprehensively reflect the accuracy of the target character recognition.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a method for determining target recognition confidence provided in accordance with Embodiment 1 of the present application;
[0022] Figure 2 is a target character schematic diagram provided according to Embodiment 1 of the present application;
[0023] Figure 3 is a flow chart of a method for determining target recognition confidence provided in accordance with Embodiment 2 of the present application;
[0024] Figure 4 This is a schematic diagram of a dividing line provided according to Embodiment 2 of the present application;
[0025] Figure 5 is a flow chart of a method for determining target recognition confidence provided in Example 3 of the present application;
[0026] Figure 6 is a flow chart of a method for determining target recognition confidence provided in accordance with Embodiment 4 of the present application;
[0027] Figure 7 This is a schematic diagram of target key points provided according to Embodiment 4 of the present application;
[0028] Figure 8 is a schematic diagram of a regional image provided according to Embodiment 4 of the present application;
[0029] Fig. 9 is a flow chart of a method for determining target recognition confidence provided in Example 5 of the present application;
[0030] Fig.10 It is a structural schematic diagram of a device for determining target recognition confidence provided according to Embodiment 6 of the present application;
[0031] Fig.11 It is a structural diagram of an electronic device provided according to Embodiment 7 of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first", "second", "third", "fourth", "actual", "preset", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] Embodiment 1
[0035] Figure 1 This is a flow chart of a method for determining the confidence level of target recognition provided in the first embodiment of the present application. The present embodiment of the present application can be applied to the case of determining the confidence level of target recognition results. The method can be executed by a device for determining the confidence level of target recognition. The device for determining the confidence level of target recognition can be implemented in the form of hardware and / or software. The device for determining the confidence level of target recognition can be configured in an electronic device. Figure 1 As shown, the method includes:
[0036] S110, recognizing a target image to obtain a target character, and determining a first confidence level of target recognition according to a recognition result of the target character.
[0037] The target image may be an image acquired in real time by an image collector, or an image uploaded by a user or other terminal. The target image may be a color image or a grayscale image. The target character may be a glyph-like unit or symbol, such as Chinese characters, letters, numbers, operation symbols, punctuation marks, etc.
[0038] Exemplarily, the target image can be identified based on a preset algorithm to determine the target characters contained in the target image. Exemplarily, in the case where the target image is a license plate image, the license plate image is input into a license plate recognition network based on CTC (Connectionist Temporal Classification, neural network temporal classification) decoding to obtain the recognition result of the target character and the first confidence level corresponding to the recognition result, such as Figure 2 As shown, the target image is recognized to obtain the target characters included in the target image, wherein ~ indicates that the recognition result is a null value. For the recognition result of each target character, a first confidence level for target recognition of the target image can be determined. Specifically, the first confidence level can be determined based on the following formula:
[0039] First confidence = (exp(maxFeature1) / exp(totalFeature1)+…+exp(maxFeatureN) / exp(totalFeatureN)) / N;
[0040] Wherein, N represents the number of target characters, maxFeature represents the maximum feature value of the target character, maxFeature1 represents the maximum feature value of the first target character, maxFeatureN represents the maximum feature value of the Nth target character, totalFeature represents the sum of the feature values of the target characters, totalFeature1 represents the sum of the feature values of the first target character, totalFeatureN represents the sum of the feature values of the Nth target character, and exp represents an exponential function with the natural constant e as the base.
[0041] In the embodiment of the present application, the first confidence level may also be determined in other ways, specifically, based on the adaptability of the recognition algorithm of the target image. The recognition algorithm may directly output the target image after recognizing it.
[0042] S120, determining an extended confidence level of target recognition according to at least one of a position feature of the target character in the target image, a location feature of the target, and a brightness feature of the target image.
[0043] Among them, the position feature may include the position of the target character in the target image, the rotation angle of the target character in the target image, the flip angle of the target character, and other features, for example, whether the target character is located in the middle of the two dividing lines of the target image, if the target character is arranged from left to right, whether the target character is located in the middle of the upper edge and the lower edge of the target image, if the target character is arranged from top to bottom, whether the target character is located in the middle of the left edge and the right edge of the target image, whether the rotation angle and flip angle of the target character in the target image meet the conventional display angle of the target character, etc. The target is the physical target corresponding to the target image.
[0044] The location feature of the target may be the region to which the target theoretically belongs determined by recognizing the target image. For example, assuming that the target characters obtained by recognizing the license plate image include Ji, it can be determined that the location of the license plate entity corresponding to the license plate image is Hebei; assuming that the target characters obtained by recognizing the packaging bag image include Jin or Tianjin, it can be determined that the location of the packaging bag entity corresponding to the packaging bag image is Tianjin.
[0045] The brightness characteristics of the target image may include the absolute brightness and / or relative brightness of the target image. The absolute brightness is the actual brightness value, and the brightness of the target image can be evaluated by comparing the actual brightness value with the brightness value of the best image quality. The relative brightness can be the brightness of one area in the target image relative to the brightness of other areas, reflecting the brightness uniformity in the target image.
[0046] Exemplarily, the position feature of the target character in the target image is related to the recognition accuracy when the target character is recognized, the consistency of the recognition result of the target location and the result obtained by other methods reflects the recognition accuracy of the target character, and the brightness feature of the target image is related to the recognition credibility when the target character is recognized. Determining the extended confidence of target recognition based on at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image can reflect the influence of at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image on the recognition accuracy of the target character, thereby evaluating the recognition accuracy of the target character from other extended aspects.
[0047] S130. Determine a comprehensive confidence of target recognition according to the first confidence and the extended confidence.
[0048] Exemplarily, the first confidence and the extended confidence may be combined to determine a comprehensive confidence of target recognition, so as to comprehensively and fully evaluate the confidence of target recognition through the comprehensive confidence, thereby improving the accuracy of the target recognition confidence.
[0049] Specifically, the first confidence and the extended confidence can be combined with a preset algorithm to determine the comprehensive confidence of target recognition, and the preset algorithm can be an addition, subtraction, multiplication, division, etc. For example, if both the first confidence and the extended confidence are positively correlated with the target recognition accuracy, the preset algorithm can be addition or multiplication, and if one of the first confidence and the extended confidence is positively correlated with the target recognition accuracy and the other is negatively correlated with the target recognition accuracy, the preset algorithm can be subtraction.
[0050] In an embodiment of the present application, determining the comprehensive confidence of target recognition according to the first confidence and the extended confidence includes:
[0051] Determining weights of the first confidence and the extended confidence;
[0052] The first confidence and the extended confidence are weightedly summed to determine a comprehensive confidence of target recognition.
[0053] Exemplarily, the weights of the first confidence and the extended confidence may be determined according to actual conditions, and the first confidence and the extended confidence may be weighted and summed according to the corresponding weights to obtain a comprehensive confidence of target recognition.
[0054] The technical solution of the embodiment of the present application is to identify the target image to obtain the target character, and determine the first confidence of the target recognition according to the recognition result of the target character; determine the extended confidence of the target recognition according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image; and determine the comprehensive confidence of the target recognition according to the first confidence and the extended confidence. The above scheme determines the extended confidence according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image, and more comprehensively considers the influence of the extended feature of the target on the recognition confidence, and determines the comprehensive confidence in combination with the first confidence output by the target character recognition, so that the comprehensive confidence can more accurately and comprehensively reflect the accuracy of the target character recognition.
[0055] Embodiment 2
[0056] Figure 3 This is a flow chart of a method for determining the confidence level of target recognition provided in the second embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 3 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0057] S210, recognizing a target image to obtain a target character, and determining a first confidence level of target recognition according to a recognition result of the target character.
[0058] S220. For each target character, determine a preset feature point of the target character; wherein the preset feature point includes at least one of a center point, a centroid point, and a contour point of the target character.
[0059] In an embodiment of the present application, the extended confidence includes a second confidence. Exemplarily, the second confidence of target recognition is determined based on the positional features of the target character in the target image. Specifically, for each target character identified, a preset feature point on the target character can be determined. The preset feature point can be determined based on actual conditions, for example, it can be at least one of the center point, centroid point, and contour point of the target character, and the preset feature point can also be the center point of an external figure such as a circumscribed rectangle, a circumscribed circle, or a circumscribed rhombus of the target character.
[0060] Taking the preset feature point as the centroid point as an example, the process of determining the preset feature point is explained: the contour of the target character is recognized and the coordinates of the contour point are determined. The position of the centroid point of the target character is determined based on the following formula: i represents the i-th contour point, x represents the abscissa of the i-th contour point, and y represents the ordinate of the i-th contour point. Represents the mean of the horizontal coordinates of all contour points, Represents the mean of the ordinates of all contour points. array(x,y) is the pixel matrix corresponding to the point (x,y). In the process of detecting contour points, contour points of multiple connected areas may be detected, and multiple centroid points may be calculated. In this case, the contour points of the area with the largest connected domain are selected to calculate the centroid point of the target character. Before recognizing the contour points, the target image can also be preprocessed. Specifically: determine the character color of the target image. If the character color is white, perform inversion processing, that is, swap the background and character colors, and subtract the grayscale value of the current pixel from 255. If the character color is non-white, grayscale processing is performed on the target image to make the background of the target image white and the characters black to facilitate contour point recognition.
[0061] The same is true for the case where the preset feature points are in other forms, that is, the contour points of the target character can be identified, and the coordinates of the preset feature points can be determined according to the coordinates of the contour points.
[0062] S230: Determine a second confidence level according to a distance from a preset feature point to a segmentation line adjacent to the target character.
[0063] In the embodiment of the present application, after the target character is identified from the target image, the segmentation line of the target character can also be determined in the target image. For example, Figure 4Specifically, the process of determining the segmentation line of the target character includes: determining the total number T of target characters and null values obtained by recognizing the target image. Determining the sequence number of the recognized non-continuous and repeated target characters in the total number T, for example, Figure 2 As shown, the identified target characters include H6P2290, and the identified null value is ~. The total number of identified target characters and null values is 22, of which the target character H ranks third in the 22 recognition results (counting from left to right), the target character 6 ranks seventh in the 22 recognition results, and the serial number of the continuously repeated target character 2 is the serial number of the first appearance of the target character in the 22 recognition results, that is, 13. And so on. The target characters are arranged horizontally in the target image, so take the length W of the target image in the horizontal direction, then the position of the dividing line between the i-th target character and the i+1-th target character is: the position at a distance of W*(ti / T) from the left boundary of the target image, where ti represents the serial number of the i-th target character.
[0064] The segmentation lines adjacent to the target character are the segmentation line between the target character and the previous target character and the segmentation line between the target character and the next target character. Figure 4 As shown, the segmentation lines adjacent to the target character "P" are the segmentation line between the target character "P" and the target character "6", and the segmentation line between the target character "P" and the target character "2".
[0065] Exemplarily, the distance from the preset feature point to the dividing line adjacent to the target character can reflect the position of the target character between the two dividing lines. The closer the target character is to the middle of the two dividing lines, the higher the accuracy of target character recognition. Therefore, the second confidence level can be determined based on the distance from the preset feature point to the dividing line adjacent to the target character, reflecting the accuracy of target character recognition.
[0066] Determining a second confidence level according to a distance between a preset feature point and a segmentation line adjacent to the target character includes:
[0067] For each target character, determining a ratio of the first distance to the second distance;
[0068] The average value of the ratios corresponding to the target characters is taken as the second confidence level;
[0069] The first distance is the smaller value of the distances between the preset feature point and the segmentation line adjacent to the target character, and the second distance is the larger value of the distances between the preset feature point and the segmentation line adjacent to the target character;
[0070] If the preset feature point is a contour point, the dividing line adjacent to the target character includes a first dividing line and a second dividing line; the distance from the preset feature point to the dividing line adjacent to the target character includes the distance from the first dividing line to the contour point in the target character closest to the first dividing line, and the distance from the second dividing line to the contour point in the target character closest to the second dividing line.
[0071] For example, there are generally two segmentation lines adjacent to the target character, such as Figure 4 As shown, the segmentation line adjacent to the target character "P" is the segmentation line between the target character "P" and the target character "6", and the segmentation line between the target character "P" and the target character "2". The segmentation line adjacent to the target character "H" is the segmentation line between the target character "H" and the target character "6", and the segmentation line between the target character "H" and the target character "Liao". If there are no other target characters or segmentation lines before or after the target character, the edge of the target image that is parallel to the segmentation line and closest to the target character is used as the segmentation line adjacent to the target character.
[0072] If the preset feature point is the center point, centroid point or center point of the circumscribed figure of the target character, the smaller value of the distance from the preset feature point to the dividing line adjacent to the target character is taken as the first distance, and the larger value of the distance from the preset feature point to the dividing line adjacent to the target character is taken as the second distance. For each target character, the ratio of the corresponding first distance to the second distance is determined.
[0073] If the preset feature point is a contour point of the target character, the distance from the first segmentation line of the two segmentation lines to the contour point of the target character closest to the first segmentation line, and the distance from the second segmentation line to the contour point of the target character closest to the second segmentation line are determined, and the smaller of the two distances is used as the first distance, and the larger value is used as the second distance. For each target character, the ratio of the corresponding first distance to the second distance is determined.
[0074] The average value of the ratio of the first distance to the second distance corresponding to all target characters in the target image is used as the second confidence level of target recognition.
[0075] In an embodiment of the present application, the extended confidence of target recognition is determined according to the position feature of the target character in the target image, including:
[0076] If no preset feature point is detected during the detection of the preset feature point of the target character, the second confidence level is determined as a first preset value: wherein the first preset value is a value greater than or equal to 0 and less than 1.
[0077] If the preset feature point is not detected during the feature point detection process of the target character due to reasons such as being blocked, contaminated, overexposed, underexposed, etc., in this case, the second confidence level can be determined as the first preset value, and the first preset value is greater than or equal to 0 and less than 1. Specifically, if the preset feature point is not detected, it means that there is an obstacle in the recognition process of the target character, and it can be determined that the recognition accuracy of the target character is low. The second confidence level can be directly determined to be 0, indicating that the recognition accuracy of the target character is low in this case, or the second confidence level can be determined to be a value greater than 0 and less than 0.5, indicating that the recognition accuracy of the target character is low in this case.
[0078] S240. Determine a comprehensive confidence of target recognition according to the first confidence and the extended confidence.
[0079] The embodiment of the present application provides a method for determining the confidence of target recognition, and for each target character, the preset feature point of the target character is determined; wherein the preset feature point includes at least one of the center point, the centroid point, and the contour point of the target character; and the second confidence is determined according to the distance between the preset feature point and the segmentation line adjacent to the target character. The above scheme determines the preset feature point of the target character and the distance between the preset feature point and the segmentation line adjacent to the target character, thereby reflecting the position of the target character between the two segmentation lines, and calculates the second confidence to reflect the accuracy of the recognition of the target character, and determines the comprehensive confidence of the target recognition in combination with the first confidence, so as to more comprehensively and accurately judge the accuracy of the target recognition, and improve the reference of the comprehensive confidence in the selection of the target character recognition results.
[0080] Embodiment 3
[0081] Figure 5 This is a flow chart of a method for determining target recognition confidence provided in Example 3 of the present application. The present application example is optimized based on the above example. For solutions not described in detail in the present application example, see the above example. Figure 5 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0082] S310, recognizing a target image to obtain a target character, and determining a first confidence level of target recognition according to a recognition result of the target character.
[0083] S320: Determine the location of the target according to the region represented by the target character.
[0084] Exemplarily, after the target character is recognized, the region represented by the target character can be determined according to the meaning of the target character. For example, assuming that the target image is a license plate image and the recognized target characters include "Ji", it can be determined that the region represented by the target character is Hebei, and accordingly, the place of origin of the target is determined to be Hebei. If the recognized target characters include adjacent "Ji" and "B", since "Ji" represents Hebei and "B" represents Tangshan in the license plate, the place of origin of the target is determined to be Tangshan, Hebei.
[0085] S330. Determine the third confidence level of the target recognition according to the matching result between the place of origin of the target and the actual area where the target is located.
[0086] Among them, the actual area where the target is located can be the information input by the user, or the acquisition location of the target image can be used as the actual area where the target is located, or the location information detected and uploaded by the positioning device associated with the target can be used to determine the actual area where the target is located. Exemplarily, the place of origin of the target can be matched with the actual area where the target is located, so as to reflect whether the place of origin of the target determined by the recognition of the target image is consistent with the actual area where the target is located. The third confidence level of the target recognition is determined according to the matching result, reflecting the accuracy of the recognition of the target image.
[0087] In the embodiment of the present application, determining the third confidence level of the target recognition according to the matching result between the place of origin feature of the target and the actual area where the target is located includes:
[0088] For the first-level place of origin and the second-level place of origin in the place of origin feature, if the first recognized place of origin matches the actual area where the target is located, the confidence parameter is determined to be the second preset value;
[0089] If the first recognized place of origin does not match the actual area where the target is located, the confidence parameter is determined to be the third preset value; or,
[0090] If the first recognized place of origin does not match the actual area where the target is located and the second recognized place of origin matches the actual area where the target is located, the confidence parameter is determined to be the fourth preset value;
[0091] If the second recognized place of origin does not match the actual area where the target is located, the confidence parameter is determined to be the third preset value; where the first recognized place of origin is the place of origin corresponding to the recognition result with the largest probability when recognizing the same target character, and the second recognized place of origin is the place of origin corresponding to the recognition result with the second largest probability when recognizing the same target character;
[0092] Determine the third confidence level of the target recognition according to the confidence parameter corresponding to the first-level place of origin and the confidence parameter corresponding to the second-level place of origin.
[0093] Among them, the first-level place of attribution can be a place of attribution representing the upper-level administrative region, and the second-level place of attribution can be a place of attribution representing the lower-level administrative region. For example, the first-level place of attribution can be a province, and the second-level place of attribution can be a city. The first recognition place of attribution is the place of attribution corresponding to the recognition result with the highest probability when recognizing the same target character, and the second recognition place of attribution is the place of attribution corresponding to the recognition result with the second highest probability when recognizing the same target character. Exemplarily, the probability of the recognition result R1 obtained by recognizing a target character in the target image is 70%, the probability of the recognition result R2 is 25%, and the probability of the recognition result R3 is 5%. Then the first recognition place of attribution is the place represented by R1, and the second recognition place of attribution is the place represented by R2.
[0094] In the embodiment of the present application, for the first-level place of attribution and the second-level place of attribution in the place of attribution feature, the following processes are respectively performed: if the first identified place of attribution matches the actual area where the target is located, the confidence parameter is determined to be the second preset value; if it does not match, the confidence parameter is determined to be the third preset value. Among them, the second preset value and the third preset value can be determined according to actual conditions, the second preset value is greater than the third preset value, and the confidence represented by the second preset value is greater than the confidence represented by the third preset value. If the first identified place of attribution matches the actual area where the target is located, it means that the accuracy of the identified target character is high; if it does not match, it means that the accuracy of the identified target character is low, so the confidence represented by the second preset value is greater than the confidence represented by the third preset value.
[0095] Alternatively, if the first identification location matches the actual location of the target, the confidence parameter is determined to be the second preset value. If not, the second identification location is matched with the actual location of the target. If they match, the confidence parameter is determined to be the fourth preset value. If not, the confidence parameter is determined to be the third preset value. The fourth preset value can be determined according to the actual situation, and the confidence represented by the fourth preset value is less than the confidence of the third preset value. If the actual location of the target does not match the first identification location, but matches the second identification location, and the probability of the first identification location is greater than the probability of the second identification location, it can be reflected that the recognition result of the target character is low in accuracy, and the reliability of the recognition result with the highest probability is poor, so a smaller fourth preset value can be set as the confidence parameter. If the actual location of the target does not match the first identification location and the second identification location, it means that the target recognition accuracy may be low, or the location of the target is actually inconsistent with the location, and it is not simply the low accuracy of the target recognition. Therefore, the third preset value can be set as the confidence parameter, and the confidence represented is greater than the confidence parameter of the fourth preset value. Exemplarily, the second preset value may be 1, the third preset value may be 0.8, and the fourth preset value may be 0.5.
[0096] In the embodiment of the present application, a matching scheme can also be determined based on the probability of the recognition results of each target character. For example, the place of origin corresponding to the recognition result with the highest probability is used as the first recognition place of origin, and the first recognition place of origin is matched with the actual area where the target is located. If there is no match, and the probability of the second recognition place of origin corresponding to the recognition result with the second highest probability is greater than the preset probability threshold, the second recognition place of origin is matched with the actual area where the target is located, and the above scheme of determining the confidence parameter based on the matching result is executed. The preset probability threshold can be determined according to the actual situation, for example, it can be 30%.
[0097] The third confidence level may be determined based on the confidence parameter corresponding to the first-level location and the confidence parameter corresponding to the second-level location. For example, assuming that the confidence parameter corresponding to the first-level location is α and the confidence parameter corresponding to the second-level location is β, α*β may be used as the third confidence level, or the first confidence level*α*β may be used as the third confidence level.
[0098] S340: Determine a comprehensive confidence of target recognition according to the first confidence and the extended confidence.
[0099] The embodiment of the present application provides a method for determining the confidence of target recognition, which determines the place of origin of the target according to the region represented by the target character; and determines the third confidence of target recognition according to the matching result between the place of origin of the target and the actual region where the target is located. The above scheme determines the accuracy of the target character recognition reflected by the third confidence based on the consistency of the place of origin obtained by recognition and the actual region where the target is located, thereby more comprehensively and accurately combining the first confidence to determine the comprehensive confidence of target recognition, improving the referenceability of the target recognition confidence, so as to more accurately screen the recognition results according to the comprehensive confidence.
[0100] Embodiment 4
[0101] Figure 6 This is a flow chart of a method for determining target recognition confidence provided in the fourth embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, see the above embodiment. Figure 6 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0102] S410, recognizing a target image to obtain a target character, and determining a first confidence level of target recognition according to a recognition result of the target character.
[0103] S420: Divide the target image into a preset number of regional images.
[0104] Exemplarily, the target image may be divided to obtain a preset number of regional images. The preset number may be at least one. Specifically, the target image may be divided by a dividing line to obtain a preset number of regional images. Exemplarily, the target image may be divided into four regional images by two diagonal lines of the target image, or the midpoints of opposite sides of the target image may be connected to obtain four regional images. The target image may also be divided in other ways.
[0105] In the embodiment of the present application, the target image is divided into a preset number of regional images, including:
[0106] Performing key point recognition on the target image to determine the target key points; wherein the target key points include four vertices and midpoints of two opposite sides of the target image;
[0107] Connecting the midpoints of two opposite sides to divide the target image into two sub-images;
[0108] For each sub-image, non-adjacent target key points are connected to divide the sub-image into at least two region images.
[0109] For example, Figure 7 As shown, the key points of the target image can be identified to determine the target key points, such as Figure 7 The four vertices of the target image and the midpoints of the two opposite sides in . Connect the midpoints of the two opposite sides and divide the target image into two sub-images. For each sub-image, connect the non-adjacent target key points and divide the sub-image into two regional images, that is, divide the target image into four regional images, such as Figure 8 The above-mentioned regional image segmentation method can make each regional image contain multiple characters and occupy the vertical width range of the target image, so that the brightness of the regional image can reflect the brightness of the entire vertical width range, making the brightness representative.
[0110] S430: Determine a fourth confidence level of target recognition according to the brightness of each area image and the brightness of the target image.
[0111] Among them, the brightness of the regional image can be calculated according to the grayscale value of the pixels in the regional image, and the brightness of the target image can be calculated according to the grayscale value of the pixels of the entire target image. For example, the brightness of the regional image and the target image can be determined according to the formula L=(0.299*R)+(0.587*G)+(0.114*B). L represents brightness, R represents the grayscale value of the R channel of the pixel, G represents the grayscale value of the G channel of the pixel, and B represents the grayscale value of the B channel of the pixel. The fourth confidence level is determined based on the comparison between the brightness of the regional image and the brightness of the target image. In theory, the smaller the difference between the brightness of the regional image and the brightness of the entire target image, the higher the corresponding fourth confidence level.
[0112] In the embodiments of the present application, determining a fourth confidence level for target recognition according to the brightness of each regional image and the brightness of the target image includes:
[0113] For each regional image, determining a brightness ratio of the brightness of the regional image to the brightness of the target image;
[0114] Based on the correlation between a preset brightness ratio interval and a preset confidence parameter, determining a target confidence parameter corresponding to the brightness ratio as the target confidence parameter corresponding to the regional image;
[0115] Determining a confidence product of the brightness ratio corresponding to each regional image and the target confidence parameter, and determining an average value of the confidence products corresponding to each regional image as the fourth confidence level for target recognition.
[0116] Exemplarily, for each regional image, a brightness ratio of the brightness of the regional image to the brightness of the target image can be determined to reflect the brightness of the regional image relative to the entire target image. The correlation between a preset brightness ratio interval and a preset confidence parameter is determined in advance. For example, if a1 < Ldiff < a2, γ = b1; if a3 < Ldiff < a1 or Ldiff > a2, γ = b2; if Ldiff < a3 or Ldiff > a4, γ = b3... The values of a1, a2, a3, a4, b1, b2, b3 can be determined according to actual situations. For example, a = 0.8, a2 = 1.2, a3 = 0.5, a4 = 2, b1 = 1, b2 = 0.8, b3 = 0.5. Ldiff represents the brightness ratio, and γ represents the preset confidence parameter. The brightness ratio can be compared with the preset brightness ratio interval to determine the preset brightness ratio interval where the brightness ratio is located, and the preset confidence parameter corresponding to the preset brightness ratio interval is used as the target confidence parameter corresponding to the brightness ratio, that is, the target confidence parameter corresponding to the regional image. For each regional image, the brightness ratio is multiplied by the target confidence parameter to obtain a confidence product, and the average value of the confidence products corresponding to each regional image is calculated as the fourth confidence level for target recognition, so as to evaluate the accuracy of target recognition according to the brightness.
[0117] In the embodiments of the present application, determining a fourth confidence level for target recognition according to the brightness of each regional image and the brightness of the target image includes:
[0118] If the first confidence level of the target character is less than a preset confidence threshold, determining the regional image where the target character is located, and for this regional image, determining a fourth confidence level for target recognition according to the brightness of the regional image and the brightness of the target image;
[0119] Otherwise, determining the fourth confidence level for target recognition as a fifth preset value.
[0120] Exemplarily, it can be determined whether to determine the fourth confidence with reference to the brightness feature based on the first confidence of the target character. If the first confidence of the target character is less than the preset confidence threshold, it means that the recognition accuracy of the target character is low, and the fourth confidence of the target recognition can be further determined based on the brightness of the image of the area where the target character is located and the brightness of the target image, and the determination process is consistent with the above scheme. If the first confidence of the target character is greater than or equal to the preset confidence threshold, it means that the recognition result of the target character has a high credibility, and the fourth confidence of the target recognition can be determined to be the fifth preset value. The preset confidence threshold and the fifth preset value can be determined according to actual conditions. For example, the preset confidence threshold can be set to 0.8, and the fifth preset value can be 1.
[0121] S440: Determine a comprehensive confidence of target recognition according to the first confidence and the extended confidence.
[0122] The embodiment of the present application provides a method for determining the confidence of target recognition, which divides the target image into a preset number of regional images; and determines the fourth confidence of target recognition based on the brightness of each regional image and the brightness of the target image. The consistency between the brightness of the regional image and the brightness of the target image reflects whether the brightness is uniform, and then reflects the degree of influence of the brightness on the recognition of the target characters, determines the fourth confidence of the target character recognition, and evaluates the accuracy of the target character recognition. The comprehensive confidence of target recognition is determined by combining the first confidence and the fourth confidence, so as to evaluate the confidence of target recognition more comprehensively and accurately, and improve the reference of the confidence in the selection of recognition results.
[0123] Embodiment 5
[0124] Fig. 9 This is a flowchart of a method for determining the confidence level of target recognition provided in Embodiment 5 of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, see the above embodiment. Fig. 9 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0125] S510: Recognize the target image to obtain the target character, and determine a first confidence level of the target recognition according to the recognition result of the target character.
[0126] S520: Determine a second confidence level of target recognition according to position features of the target character in the target image.
[0127] S530: Determine a third confidence level of target identification according to the location characteristics of the target.
[0128] S540: Determine a fourth confidence level of target recognition according to a brightness feature of the target image.
[0129] S550: Perform weighted summation on the first confidence level, the second confidence level, the third confidence level, and the fourth confidence level to determine a comprehensive confidence level of target recognition.
[0130] In the embodiment of the present application, the first confidence of target recognition is determined according to the recognition result of the target character, the second confidence of target recognition is determined according to the position feature of the target character in the target image, the third confidence of target recognition is determined according to the location feature of the target, and the fourth confidence of target recognition is determined according to the brightness feature of the target image. The specific determination process of the first confidence, the second confidence, the third confidence and the fourth confidence is shown in the above embodiment. The weights corresponding to the first confidence, the second confidence, the third confidence and the fourth confidence are determined respectively, and the first confidence, the second confidence, the third confidence and the fourth confidence are weighted and summed according to the weights to obtain the comprehensive confidence of target recognition. For example, comprehensive confidence = c1*first confidence + c2*second confidence + c3*third confidence + c4*fourth confidence. Among them, c1 is the weight corresponding to the first confidence, c2 is the weight corresponding to the second confidence, c3 is the weight corresponding to the third confidence, and c4 is the weight corresponding to the fourth confidence. The values of the weights can be determined according to actual conditions, for example, c1=0.5, c2=0.3, c3=0.1, c3=0.1.
[0131] The embodiment of the present application provides a method for determining the confidence of target recognition, which determines the first confidence of target recognition according to the recognition result of the target character, determines the second confidence of target recognition according to the position characteristics of the target character in the target image, determines the third confidence of target recognition according to the characteristics of the location of the target, determines the fourth confidence of target recognition according to the brightness characteristics of the target image, and performs weighted summation of the first confidence, the second confidence, the third confidence, and the fourth confidence to determine the comprehensive confidence of target recognition. The above scheme comprehensively considers the influence of the position characteristics of the target character in the target image, the characteristics of the location of the target, and the brightness characteristics of the target image on target recognition, and determines the comprehensive confidence in combination with the first confidence, so as to more comprehensively and accurately evaluate the accuracy of target recognition, improve the reference of the confidence of target recognition, and facilitate users to more accurately filter the recognition results according to the comprehensive confidence.
[0132] Embodiment 6
[0133] Fig.10 This is a schematic diagram of the structure of a device for determining the confidence level of target recognition provided in Embodiment 6 of the present application. The device can execute the method for determining the confidence level of target recognition provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. Fig.10 As shown, the device comprises:
[0134] A first confidence determination module 610, configured to recognize a target image to obtain a target character, and determine a first confidence of target recognition according to a recognition result of the target character;
[0135] An extended confidence determination module 620, configured to determine an extended confidence of target recognition according to at least one of a position feature of a target character in a target image, a location feature of the target, and a brightness feature of the target image;
[0136] The comprehensive confidence determination module 630 is used to determine the comprehensive confidence of target recognition according to the first confidence and the extended confidence.
[0137] In the embodiment of the present application, the extended confidence level includes a second confidence level;
[0138] Accordingly, the extended confidence determination module 620 includes:
[0139] A preset feature point determination unit, used to determine the preset feature point of each target character; wherein the preset feature point includes at least one of the center point, the centroid point and the contour point of the target character;
[0140] The second confidence determination unit is used to determine the second confidence according to the distance between the preset feature point and the segmentation line adjacent to the target character.
[0141] In the embodiment of the present application, the second confidence determination unit includes:
[0142] a ratio determination subunit, for determining, for each target character, a ratio of the first distance to the second distance;
[0143] an average value determination subunit, used for taking the average value of the ratios corresponding to the target characters as the second confidence level;
[0144] The first distance is the smaller value of the distances between the preset feature point and the segmentation line adjacent to the target character, and the second distance is the larger value of the distances between the preset feature point and the segmentation line adjacent to the target character;
[0145] If the preset feature point is a contour point, the dividing line adjacent to the target character includes a first dividing line and a second dividing line; the distance from the preset feature point to the dividing line adjacent to the target character includes the distance from the first dividing line to the contour point in the target character closest to the first dividing line, and the distance from the second dividing line to the contour point in the target character closest to the second dividing line.
[0146] In the embodiment of the present application, the extended confidence determination module 620 includes:
[0147] A preset feature point detection unit is used to determine the second confidence as a first preset value if the preset feature point is not detected during the preset feature point detection process of the target character: wherein the first preset value is a value greater than or equal to 0 and less than 1.
[0148] In the embodiment of the present application, the extended confidence level includes a third confidence level;
[0149] Accordingly, the extended confidence determination module 620 includes:
[0150] an attribution determination unit, used to determine the attribution of the target according to the region represented by the target character;
[0151] The third confidence determination unit is used to determine the third confidence of the target identification according to the matching result between the location of the target and the actual location of the target.
[0152] In the embodiment of the present application, the third confidence determination unit includes:
[0153] A second preset value determination subunit is used for, for the first level of the place of origin and the second level of the place of origin in the place of origin feature, if the first identified place of origin matches the actual location of the target, determining the confidence parameter to be a second preset value;
[0154] A third preset value determination subunit is used to determine the confidence parameter as a third preset value if the first identified location does not match the actual location of the target; or,
[0155] a fourth preset value determination subunit, configured to determine the confidence parameter to be a fourth preset value if the first identified location does not match the actual location of the target, and the second identified location matches the actual location of the target;
[0156] A confidence parameter determination subunit, for determining the confidence parameter to be a third preset value if the second identification location does not match the actual location of the target; wherein the first identification location is the location corresponding to the recognition result with the highest probability when recognizing the same target character, and the second identification location is the location corresponding to the recognition result with the second highest probability when recognizing the same target character;
[0157] The confidence combining subunit is used to determine the third confidence of the target recognition according to the confidence parameter corresponding to the first level of attribution and the confidence parameter corresponding to the second level of attribution.
[0158] In the embodiment of the present application, the extended confidence level includes a fourth confidence level;
[0159] Accordingly, the extended confidence determination module 620 includes:
[0160] An image division unit, used for dividing the target image into a preset number of regional images;
[0161] The fourth confidence determination unit is used to determine a fourth confidence of target recognition according to the brightness of each area image and the brightness of the target image.
[0162] In an embodiment of the present application, the image division unit includes:
[0163] A target key point determination subunit is used to perform key point recognition on the target image and determine the target key points; wherein the target key points include four vertices and midpoints of two opposite sides of the target image;
[0164] A midpoint connection subunit, used for connecting the midpoints of two opposite sides to divide the target image into two sub-images;
[0165] The key point connection subunit is used to connect non-adjacent target key points for each sub-image, and divide the sub-image into at least two regional images.
[0166] In the embodiment of the present application, the fourth confidence determination unit includes:
[0167] A brightness ratio determination subunit, used to determine, for each regional image, a brightness ratio between the brightness of the regional image and the brightness of the target image;
[0168] A target confidence parameter determination subunit is used to determine the target confidence parameter corresponding to the brightness ratio based on the association relationship between the preset brightness ratio interval and the preset confidence parameter, as the target confidence parameter corresponding to the image of the area;
[0169] The product mean calculation subunit is used to determine the confidence product of the brightness ratio corresponding to each regional image and the target confidence parameter, and determine the mean of the confidence products corresponding to each regional image as the fourth confidence level of target recognition.
[0170] In the embodiment of the present application, the fourth confidence determination unit includes:
[0171] A first confidence judgment subunit is used to determine the regional image where the target character is located if the first confidence of the target character is less than a preset confidence threshold, and for the regional image, determine the fourth confidence of target recognition according to the brightness of the regional image and the brightness of the target image;
[0172] The fourth preset value determination subunit is used to determine that the fourth confidence level of the target recognition is a fifth preset value otherwise.
[0173] In the embodiment of the present application, the comprehensive confidence determination module 630 includes:
[0174] A weight determination unit, used to determine the weights of the first confidence and the extended confidence;
[0175] A weighted summation unit is used to perform weighted summation on the first confidence and the extended confidence to determine a comprehensive confidence of target recognition.
[0176] A target recognition confidence determination device provided in an embodiment of the present application can execute a target recognition confidence determination method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
[0177] Embodiment 7
[0178] Fig.11 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0179] like Fig.11 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0180] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0181] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a target recognition confidence determination method.
[0182] In some embodiments, the target recognition confidence determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the target recognition confidence determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the target recognition confidence determination method in any other appropriate manner (e.g., by means of firmware).
[0183] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0184] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable target identification confidence determination device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0185] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0186] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0187] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0188] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0189] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the information expected by the technical solution of this application can be achieved, and this document is not limited here.
[0190] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for determining target recognition confidence, characterized in that: The method comprises: Recognize the target image to obtain the target character, and determine the first confidence level of the target recognition according to the recognition result of the target character; Determining the extended confidence of target recognition according to at least one of a position feature of the target character in the target image, a location feature of the target, and a brightness feature of the target image; The comprehensive confidence of target recognition is determined according to the first confidence and the extended confidence.
2. The method according to claim 1, characterized in that The extended confidence level includes a second confidence level; Accordingly, according to the position characteristics of the target character in the target image, the extended confidence of the target recognition is determined, including: For each target character, determine a preset feature point of the target character; wherein the preset feature point includes at least one of a center point, a centroid point, and a contour point of the target character; The second confidence level is determined according to the distance from the preset feature point to the segmentation line adjacent to the target character.
3. The method according to claim 2, characterized in that Determining a second confidence level according to a distance between a preset feature point and a segmentation line adjacent to the target character includes: For each target character, determining a ratio of the first distance to the second distance; The average value of the ratios corresponding to the target characters is taken as the second confidence level; The first distance is the smaller value of the distances between the preset feature point and the segmentation line adjacent to the target character, and the second distance is the larger value of the distances between the preset feature point and the segmentation line adjacent to the target character; If the preset feature point is a contour point, the dividing line adjacent to the target character includes a first dividing line and a second dividing line; the distance from the preset feature point to the dividing line adjacent to the target character includes the distance from the first dividing line to the contour point in the target character closest to the first dividing line, and the distance from the second dividing line to the contour point in the target character closest to the second dividing line.
4. The method according to claim 1, characterized in that: The extended confidence level includes a third confidence level; Accordingly, according to the characteristics of the target's location, the extended confidence of target identification is determined, including: Determine the location of the target according to the region represented by the target character; A third confidence level of target identification is determined based on a matching result between the location of the target and the actual location of the target.
5. The method according to claim 4, characterized in that Determining a third confidence level of target identification according to a matching result between the location feature of the target and the actual location of the target includes: For the first-level location and the second-level location in the location feature, if the first identified location matches the actual location of the target, determining the confidence parameter to be a second preset value; If the first identified location does not match the actual location of the target, the confidence parameter is determined to be a third preset value; or, If the first identified location does not match the actual location of the target, and the second identified location matches the actual location of the target, determining the confidence parameter to be a fourth preset value; If the second identification location does not match the actual location of the target, the confidence parameter is determined to be a third preset value; wherein the first identification location is the location corresponding to the recognition result with the highest probability when recognizing the same target character, and the second identification location is the location corresponding to the recognition result with the second highest probability when recognizing the same target character; A third confidence level of target recognition is determined based on the confidence parameter corresponding to the first level attribution and the confidence parameter corresponding to the second level attribution.
6. The method according to claim 1, characterized in that The extended confidence level includes a fourth confidence level; Accordingly, according to the brightness characteristics of the target image, the extended confidence of target recognition is determined, including: Dividing the target image into a preset number of regional images; A fourth confidence level of target recognition is determined according to the brightness of each area image and the brightness of the target image.
7. The method according to claim 6, characterized in that Determining a fourth confidence level of target recognition according to the brightness of each area image and the brightness of the target image includes: For each regional image, determining a brightness ratio between the brightness of the regional image and the brightness of the target image; Based on the correlation between the preset brightness ratio interval and the preset confidence parameter, determine the target confidence parameter corresponding to the brightness ratio as the target confidence parameter corresponding to the image of the area; The confidence product of the brightness ratio corresponding to each regional image and the target confidence parameter is determined, and the mean of the confidence products corresponding to each regional image is determined as the fourth confidence level of target recognition.
8. The method according to claim 6 or 7, characterized in that: Determining a fourth confidence level of target recognition according to the brightness of each area image and the brightness of the target image includes: If there is a target character whose first confidence is less than a preset confidence threshold, determine the regional image where the target character is located, and for the regional image, determine the fourth confidence of target recognition according to the brightness of the regional image and the brightness of the target image; Otherwise, the fourth confidence level of the target recognition is determined to be a fifth preset value.
9. The method according to claim 1, characterized in that: Determining a comprehensive confidence level of target recognition according to the first confidence level and the extended confidence level includes: Determining weights of the first confidence and the extended confidence; The first confidence and the extended confidence are weightedly summed to determine a comprehensive confidence of target recognition.
10. A device for determining target recognition confidence, characterized in that: The device comprises: A first confidence determination module, used to recognize the target image to obtain the target character, and determine a first confidence of the target recognition according to the recognition result of the target character; An extended confidence determination module, used to determine the extended confidence of target recognition according to at least one of the position feature of the target character in the target image, the location feature of the target, and the brightness feature of the target image; A comprehensive confidence determination module is used to determine the comprehensive confidence of target recognition based on the first confidence and the extended confidence.
11. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target recognition confidence determination method described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the target recognition confidence determination method described in any one of claims 1-9 when executed.