Marking identification method and related device
By detecting and text recognition of the height limit mark image, the area is gradually reduced, and the problem of low accuracy of the height limit mark recognition is solved, achieving higher recognition accuracy.
Patent Information
- Application Number
- CN202110997519.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when identifying height limit signs in autonomous driving and assisted driving, there is a problem of low recognition accuracy. This is mainly due to the diverse content of height limit signs, which requires a large number of training samples and easily lead to misclassification.
By detecting the image to be detected, the identification area to be detected is determined, the text area is extracted, and the area is gradually reduced by using feature extraction and text recognition technology to improve the accuracy of identification information detection. Specific steps include object recognition, feature extraction, text area recognition and correction to ensure accurate acquisition of identification information.
It improves the accuracy of height limit sign recognition, reduces misclassification, and enhances the ability to accurately obtain identification information.
Smart Images

Figure CN113705449B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an identification method and related devices. Background Art
[0002] Identification of traffic signs (such as height limit traffic signs, etc.) is a very important function in autonomous driving / assisted driving. Correct identification of height limit signs can remind the driver in advance of the height limit of the current road section, preventing the vehicle from exceeding the height limit and violating traffic regulations.
[0003] Taking height limit signs as an example, the recognition of height limit signs is mainly carried out through detection + classification. However, the content of height limit signs is diverse. For example, there are thousands of types such as xx m, x.xx m, xx M, etc. If they are directly recognized through detection + classification, a huge amount of training samples are required, and misclassification is often easily caused, resulting in reduced recognition accuracy. Summary of the invention
[0004] The embodiments of the present application provide a method for identifying a logo and a related device, which can improve the accuracy of logo identification.
[0005] A first aspect of an embodiment of the present application provides a method for identifying an identifier, the method comprising:
[0006] Detecting the image to be detected, and determining a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected;
[0007] Detecting the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area;
[0008] Text recognition is performed on the image of the text area to obtain information indicated by the mark to be detected in the mark to be detected area.
[0009] In this example, by detecting the image to be detected, the identification area to be detected in the image to be detected is determined, the identification area to be detected includes the identification to be detected, the image of the identification area to be detected is detected, and the text area in the identification area to be detected is obtained, and text recognition is performed on the image of the text area to obtain the information indicated by the identification to be detected in the identification area to be detected. Therefore, the identification area can be extracted from the image to be detected, and the text area can be identified in the identification area, and then text recognition is performed on the text area to obtain the information indicated by the identification to be detected. The identification information can be detected in a manner of gradually reducing the area, thereby improving the accuracy of identification detection.
[0010] In combination with the first aspect, in a possible implementation manner, detecting the image to be detected and determining the identification area to be detected in the image to be detected includes:
[0011] Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area;
[0012] A reference identification area of the target category is determined as the identification area to be detected.
[0013] In this example, by referring to the category information of the identification area, the identification area to be detected is determined from at least one reference identification area, so the accuracy of determining the identification area to be detected can be improved.
[0014] In combination with the first aspect, in a possible implementation manner, detecting the image of the to-be-detected identification area to obtain the text area in the to-be-detected identification area includes:
[0015] Extracting features from the image of the mark area to be detected to obtain feature data;
[0016] Obtaining the marker contour information of the marker area to be detected according to the feature data;
[0017] The text area of the to-be-detected logo is determined according to the logo outline information.
[0018] In this example, the text region of the to-be-detected logo is determined by using the logo contour information, and the text region may include all the logo contours, thereby improving the accuracy of determining the text region.
[0019] In combination with the first aspect, in a possible implementation manner, determining the text area of the to-be-detected logo according to the logo outline information includes:
[0020] Determining the contour category of the to-be-detected marker according to the marker contour information;
[0021] According to the contour category, a text area of the mark to be detected is determined.
[0022] In combination with the first aspect, in a possible implementation manner, detecting the image of the to-be-detected identification area to obtain the text area in the to-be-detected identification area includes:
[0023] The text region of the mark to be detected is identified by performing text region recognition on the image of the mark to be detected through a preset text region detection network to obtain the text region of the mark to be detected.
[0024] In combination with the first aspect, in a possible implementation manner, the method further includes:
[0025] Acquire first position information of the to-be-detected identification area in the to-be-detected image;
[0026] Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area;
[0027] Obtaining category information of the text correction area;
[0028] If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area;
[0029] The information indicated by the to-be-detected mark is corrected according to the text information in the text correction area to obtain a correction result.
[0030] A second aspect of an embodiment of the present application provides an identification recognition device, the device comprising:
[0031] A determination unit, configured to detect the image to be detected and determine a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected;
[0032] A first recognition unit is used to detect the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area;
[0033] The second recognition unit is used to perform text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark area to be detected.
[0034] In conjunction with the second aspect, in a possible implementation manner, the determining unit is used to:
[0035] Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area;
[0036] A reference identification area of the target category is determined as the identification area to be detected.
[0037] In conjunction with the second aspect, in a possible implementation manner, the first identification unit is used to:
[0038] Extracting features from the image of the mark area to be detected to obtain feature data;
[0039] Obtaining the marker contour information of the marker area to be detected according to the feature data;
[0040] The text area of the to-be-detected logo is determined according to the logo outline information.
[0041] In conjunction with the second aspect, in a possible implementation manner, in determining the text area of the to-be-detected logo according to the logo outline information, the first recognition unit is configured to:
[0042] Determining the contour category of the to-be-detected marker according to the marker contour information;
[0043] According to the contour category, a text area of the mark to be detected is determined.
[0044] In conjunction with the second aspect, in a possible implementation manner, the first identification unit is used to:
[0045] The text region of the mark to be detected is identified by performing text region recognition on the image of the mark to be detected through a preset text region detection network to obtain the text region of the mark to be detected.
[0046] In conjunction with the second aspect, in a possible implementation manner, the device is further used for:
[0047] Acquire first position information of the to-be-detected identification area in the to-be-detected image;
[0048] Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area;
[0049] Obtaining category information of the text correction area;
[0050] If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area;
[0051] The information indicated by the to-be-detected mark is corrected according to the text information in the text correction area to obtain a correction result.
[0052] A third aspect of an embodiment of the present application provides a terminal, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiment of the present application.
[0053] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiments of the present application.
[0054] A fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 paying creative work.
[0056] Figure 1 A schematic diagram of an application scenario of a method for identifying an identity is provided for an embodiment of the present application;
[0057] Figure 2A A flowchart of a method for identifying an identity is provided for an embodiment of the present application;
[0058] Figure 2B A schematic diagram of an image to be detected, an image of a logo area to be detected, and an image of a text area is provided for an embodiment of the present application;
[0059] Figure 2C A schematic diagram of a text area box is provided for an embodiment of the present application;
[0060] Figure 3 A flowchart of another identification method is provided for an embodiment of the present application;
[0061] Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0062] Figure 5 A structural schematic diagram of an identification recognition device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 are within the scope of protection of this application.
[0064] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0065] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0066] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a method for identifying a logo is provided for an embodiment of the present application. Figure 1 As shown, the identification recognition method can be applied to electronic devices that require identification recognition, such as self-driving cars. Here, a car is used as an example for explanation. When the car is driving, it can obtain the signboard on the road it is driving on, and obtain the sign information by identifying the sign in the signboard. The signboard can be, for example, a height limit signboard (such as a height limit of 3.5m, etc.). When performing identification recognition, the image to be detected can be first obtained, and the image to be detected includes the signboard. The identification area to be detected is identified for the image to be detected, and the identification area to be detected includes the identification to be detected (such as a height limit sign). Text recognition is performed on the identification area to be detected to obtain the text area of the identification to be detected, and then text recognition is performed on the text area to obtain the information indicated by the identification to be detected in the identification area to be detected, thereby obtaining the information indicated by the identification to be detected, such as a height limit of 3.5m, etc. Therefore, in this example, the logo area can be extracted from the image to be detected, and the text area can be identified in the logo area. Then, text recognition can be performed on the text area to obtain the information indicated by the logo to be detected. The logo information can then be detected by gradually reducing the area, thereby improving the accuracy of logo detection.
[0067] See also Figure 2A , Figure 2A A flowchart of a method for identifying an identity is provided for an embodiment of the present application. Figure 2A As shown, the identification recognition method is applied to an electronic device, and the identification recognition method includes:
[0068] 201. Detect an image to be detected and determine a marker region to be detected in the image to be detected, where the marker region to be detected includes a marker to be detected.
[0069] The electronic device can obtain the image to be detected through a camera, etc. The image to be detected can be an image of a signboard on the road, and the signboard can be a height limit signboard, a speed limit signboard, a weight limit signboard, a road indication signboard, etc. Of course, a signboard can include multiple signs, for example, a signboard includes a height limit sign, a weight limit sign, etc. The sign to be detected can be the sign included in the signboard.
[0070] The method for obtaining the identification area to be detected in the image to be detected may be to perform target recognition on the image to be detected, obtain at least one reference identification area, and determine the identification area to be detected from the at least one reference identification area according to the category of the reference identification area. Target recognition may be a rough identification, for example, only identifying whether there is a logo.
[0071] 202. Detect the image of the to-be-detected logo area to obtain a text area in the to-be-detected logo area.
[0072] The text area can be understood as an area including text information to be detected. Figure 2B As shown, Figure 2B , an image to be detected, an image of a mark region to be detected, and an image of a text region are shown. Here, the image of the mark region to be detected is an image obtained by extracting the mark region to be detected in the image to be detected. The text region image is an image obtained by extracting the text region in the image of the mark region to be detected.
[0073] The method for performing text region recognition on the mark region to be detected may be to determine the text region based on contour information determined according to feature information of the mark region to be detected.
[0074] The method for performing text region recognition on the mark region to be detected may also be to perform recognition through a preset text region detection network to obtain the text region.
[0075] 203. Perform text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark to be detected area.
[0076] The method for performing text recognition on the text area can refer to the text recognition method in the existing solution to perform text recognition, so as to obtain the information indicated by the mark to be detected. The information indicated by the mark to be detected is the text information corresponding to the mark to be detected, which is used to indicate the specific meaning of the mark to be detected.
[0077] In this example, by detecting the image to be detected, the identification area to be detected in the image to be detected is determined, the identification area to be detected includes the identification to be detected, the image of the identification area to be detected is detected, and the text area in the identification area to be detected is obtained, and text recognition is performed on the image of the text area to obtain the information indicated by the identification to be detected in the identification area to be detected. Therefore, the identification area can be extracted from the image to be detected, and the text area can be identified in the identification area, and then text recognition is performed on the text area to obtain the information indicated by the identification to be detected. The identification information can be detected in a manner of gradually reducing the area, thereby improving the accuracy of identification detection.
[0078] In a possible implementation, a possible method for detecting an image to be detected and determining a marked area to be detected in the image to be detected includes:
[0079] A1 detects the image to be detected to obtain at least one reference identification area and the category of each reference identification area;
[0080] A2 determines the reference identification area of the target category as the identification area to be detected.
[0081] When performing target recognition on the image to be detected, a general target recognition algorithm may be used to perform target recognition, thereby obtaining at least one reference identification area. Alternatively, recognition may be performed using a pre-trained target recognition model to obtain at least one reference identification area. The reference identification area is an area including an identification. This area may refer to the aforementioned Figure 2B The marked area to be detected is shown in .
[0082] The method for classifying at least one reference identification area may be to classify the reference identification area using a general classification algorithm, etc., to obtain a category of the reference identification area. The target category may be a pre-set category, and the pre-set category may be set according to actual detection requirements. Here, a traffic sign is used as an example for explanation, and the category information may be, for example, a weight limit category, a height limit category, a speed limit category, etc.
[0083] The category information of the reference identification area can be subjected to keyword extraction to obtain a keyword corresponding to the category information of the reference identification area, and the keyword can be compared with a keyword of a pre-set category to obtain a keyword that matches the keyword of the pre-set category, and the category corresponding to the keyword that matches the keyword of the pre-set category can be determined as the target category.
[0084] In this example, by referring to the category of the identification area, the identification area to be detected is determined from at least one reference identification area, so the accuracy of determining the identification area to be detected can be improved.
[0085] In a possible implementation, a method for performing text area recognition on the to-be-detected mark area to obtain the text area of the to-be-detected mark includes:
[0086] B1, extracting features from the image of the mark area to be detected to obtain feature data;
[0087] B2. Obtaining the marker contour information of the marker area to be detected according to the feature data;
[0088] B3. Determine the text area of the logo to be detected according to the logo outline information.
[0089] The feature data may be grayscale values, RGB values, etc., and the method for extracting features from the identification area to be detected may be: local binary pattern, directional gradient histogram, second-order Laplace-Gaussian edge extraction algorithm, etc.
[0090] The marker contour information can be determined based on the area where the grayscale value in the feature data jumps. The marker contour information can be understood as the outer contour of the marker. A possible method for determining the text area can be: the maximum distance between the horizontal and vertical vertices of the marker can be determined through the marker contour information, and a text area frame is determined based on the maximum distance, and the area within the text area frame is determined as the text area, and the text area frame envelops all the text information of the marker to be detected, such as Figure 2C shown.
[0091] In this example, the text region of the to-be-detected logo is determined by using the logo contour information, and the text region may include all the logo contours, thereby improving the accuracy of determining the text region.
[0092] In a possible implementation, another possible method for determining the text area of the to-be-detected mark according to the mark outline information includes:
[0093] C1. Determine the contour category of the to-be-detected mark according to the mark contour information;
[0094] C2. Determine the text area of the mark to be detected according to the contour category.
[0095] According to the identification contour information, the method for determining the contour category may be: there are multiple contour categories, the identification contour information corresponds to the contour category, and different identification contour information has corresponding contour categories. For example, if the contour indicated by the identification contour information is the contour of a number and the contour of an English letter, then the contour category may be the first contour category; if the contour indicated by the identification contour information is the contour of a number, then the contour category may be the second contour category, and so on.
[0096] Different contour categories correspond to different contour boxes, and the area within the contour box is the text area. For example, the contour box corresponding to the first contour category is a rectangular contour box, and the contour box corresponding to the second contour category is an elliptical contour box, etc. The contour box is the smallest contour box that encompasses the text.
[0097] In a possible implementation, another possible method of performing text area recognition on the to-be-detected mark area to obtain the text area of the to-be-detected mark includes:
[0098] The text region of the mark to be detected is identified by a preset text region detection network to obtain the text region of the mark to be detected.
[0099] The preset text region detection network is a pre-trained text region detection network, and its training sample set may be an image of a region to be detected that includes text region annotations.
[0100] In a possible implementation, the present application embodiment further provides a method for correcting text information, which is as follows:
[0101] D1. Obtaining first position information of the to-be-detected identification area in the to-be-detected image;
[0102] D2. Determine second position information in the image to be detected according to the first position information, where the area indicated by the second position information is a text correction area;
[0103] D3, obtaining category information of the text correction area;
[0104] D4. If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, then obtaining text information of the text correction area;
[0105] D5. Correct the information indicated by the to-be-detected mark according to the text information in the text correction area to obtain a correction result.
[0106] The first position information may be used to indicate the position of the to-be-detected area in the to-be-detected image, and may be specifically expressed as position coordinates or the like.
[0107] In a sign, there may be multiple pieces of information indicating the same content information. For example, a sign may be indicated by a sign+text, such as Figure 2B As shown in the figure, the height limit sign "3m" on the sign and the text "height limit 3 meters" on the sign both indicate the same sign content "height limit 3 meters". Figure 2BFor example, the height limit sign "3m" corresponds to the first position information, and the height limit sign "height limit 3 meters" corresponds to the second position information. The second position information in the image to be detected can be determined based on the first position information. Since the position indicated by the first position information and the position indicated by the second position information are relatively fixed, Figure 2B As shown, the position indicated by the first position information is on the left side of the image to be detected, then the position at a preset distance to the right of the position indicated by the first position information can be determined as the second position. The text correction area is the smallest area that includes the text in the text correction area.
[0108] The text correction region may be classified to obtain the category of the text correction region. For details, reference may be made to the method for obtaining category information in the above-mentioned embodiment.
[0109] The method for correcting the information indicated by the mark to be detected based on the text information in the text correction area may be to compare the text information in the text correction area with the information indicated by the mark to be detected. If the comparison result is the same, the correction result is the information indicated by the mark to be detected; if they are different, the lower value of the text information in the text correction area and the information indicated by the mark to be detected can be determined as the correction result, where the lower value is the lower value of the numerical value in the text information. Here, the height limit mark is used as an example for explanation. For example, if the text information in the text correction area is a height limit of 3 meters, and the text recognition result is a height limit of 3.5 meters, the height limit of 3 meters is determined as the correction result.
[0110] In this example, the information indicated by the to-be-detected mark is corrected according to the text information in the text correction area to obtain a correction result, thereby improving the accuracy of mark recognition.
[0111] See also Figure 3 , Figure 3 The present invention provides another flow chart of a method for identifying a logo. Figure 3 As shown, applied to an electronic device, the identification recognition method includes:
[0112] 301. Detect an image to be detected and determine a mark region to be detected in the image to be detected, where the mark region to be detected includes a mark to be detected;
[0113] The electronic device can obtain the image to be detected through a camera, etc. The image to be detected can be an image of a sign on the road, and the sign can be a height limit sign, a speed limit sign, a weight limit sign, a road sign, etc. Of course, a sign can include multiple signs, for example, a sign includes a height limit sign, a weight limit sign, etc.
[0114] 302. Detect the image to be detected to obtain at least one reference identification area and a category of each reference identification area;
[0115] 303. Determine the reference identification area of the target category as the identification area to be detected;
[0116] Wherein, the mark area to be detected includes the mark to be detected.
[0117] 304. Detect the image of the to-be-detected mark area to obtain a text area in the to-be-detected mark area;
[0118] 305 . Perform text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark to be detected area.
[0119] In this example, by referring to the category of the identification area, the identification area to be detected is determined from at least one reference identification area, so the accuracy of determining the identification area to be detected can be improved.
[0120] For the above embodiments, please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present application, as shown in the figure, includes a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for executing the following steps;
[0121] Detecting the image to be detected, and determining a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected;
[0122] Detecting the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area;
[0123] Text recognition is performed on the image of the text area to obtain information indicated by the mark to be detected in the mark to be detected area.
[0124] In a possible implementation, detecting the image to be detected and determining the identified area to be detected in the image to be detected includes:
[0125] Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area;
[0126] A reference identification area of the target category is determined as the identification area to be detected.
[0127] In a possible implementation, detecting the image of the to-be-detected identification area to obtain the text area in the to-be-detected identification area includes:
[0128] Extracting features from the image of the mark area to be detected to obtain feature data;
[0129] Obtaining the marker contour information of the marker area to be detected according to the feature data;
[0130] The text area of the to-be-detected logo is determined according to the logo outline information.
[0131] In a possible implementation, determining the text area of the to-be-detected logo according to the logo outline information includes:
[0132] Determining the contour category of the to-be-detected marker according to the marker contour information;
[0133] According to the contour category, a text area of the mark to be detected is determined.
[0134] In a possible implementation, detecting the image of the to-be-detected identification area to obtain the text area in the to-be-detected identification area includes:
[0135] The text region of the mark to be detected is identified by performing text region recognition on the image of the mark to be detected through a preset text region detection network to obtain the text region of the mark to be detected.
[0136] In a possible implementation, the method further includes:
[0137] Acquire first position information of the to-be-detected identification area in the to-be-detected image;
[0138] Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area;
[0139] Obtaining category information of the text correction area;
[0140] If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area;
[0141] The information indicated by the to-be-detected mark is corrected according to the text information in the text correction area to obtain a correction result.
[0142] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the terminal includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0143] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0144] In line with the above, see Figure 5 , Figure 5 A schematic diagram of the structure of an identification device is provided for an embodiment of the present application. Figure 5 As shown, the device comprises:
[0145] An acquisition unit 501 is used to detect the image to be detected and determine a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected;
[0146] A first recognition unit 502 is used to detect the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area;
[0147] The second recognition unit 503 is used to perform text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark to be detected area.
[0148] In a possible implementation, the determining unit 501 is used to:
[0149] Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area;
[0150] A reference identification area of the target category is determined as the identification area to be detected.
[0151] In a possible implementation, the first identification unit 502 is configured to:
[0152] Extracting features from the image of the mark area to be detected to obtain feature data;
[0153] Obtaining the marker contour information of the marker area to be detected according to the feature data;
[0154] The text area of the to-be-detected logo is determined according to the logo outline information.
[0155] In a possible implementation, in determining the text area of the to-be-detected logo according to the logo outline information, the first recognition unit 502 is configured to:
[0156] Determining the contour category of the to-be-detected marker according to the marker contour information;
[0157] According to the contour category, a text area of the mark to be detected is determined.
[0158] In a possible implementation, the first identification unit 502 is configured to:
[0159] The text region of the mark to be detected is identified by performing text region recognition on the image of the mark to be detected through a preset text region detection network to obtain the text region of the mark to be detected.
[0160] In a possible implementation, the device is further used for:
[0161] Acquire first position information of the to-be-detected identification area in the to-be-detected image;
[0162] Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area;
[0163] Obtaining category information of the text correction area;
[0164] If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area;
[0165] The information indicated by the to-be-detected mark is corrected according to the text information in the text correction area to obtain a correction result.
[0166] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any identification method recorded in the above method embodiments.
[0167] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any identification method recorded in the above method embodiments.
[0168] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0173] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0174] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0175] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for identifying a logo, characterized in that: The method comprises: Detecting the image to be detected, and determining a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected; Detecting the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area; Performing text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark area to be detected; The method further comprises: Acquire first position information of the to-be-detected identification area in the to-be-detected image; Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area; Obtaining category information of the text correction area; If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area; The information indicated by the to-be-detected identifier is corrected according to the text information in the text correction area to obtain a correction result; if the comparison result between the text information in the text correction area and the information indicated by the to-be-detected identifier is the same, the correction result is the information indicated by the to-be-detected identifier; if the comparison result between the text information in the text correction area and the information indicated by the to-be-detected identifier is different, the correction result is the lower value between the text information in the text correction area and the information indicated by the to-be-detected identifier.
2. The method according to claim 1, characterized in that The detecting the image to be detected and determining the marked area to be detected in the image to be detected includes: Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area; A reference identification area of the target category is determined as the identification area to be detected.
3. The method according to claim 1 or 2, characterized in that: The detecting the image of the to-be-detected mark area to obtain the text area in the to-be-detected mark area includes: Extracting features from the image of the mark area to be detected to obtain feature data; Obtaining the marker contour information of the marker area to be detected according to the feature data; The text area of the to-be-detected logo is determined according to the logo outline information.
4. The method according to claim 3, characterized in that The step of determining the text area of the to-be-detected logo according to the logo outline information includes: Determining the contour category of the to-be-detected marker according to the marker contour information; According to the contour category, a text area of the mark to be detected is determined.
5. The method according to claim 1 or 2, characterized in that: The detecting the image of the to-be-detected mark area to obtain the text area in the to-be-detected mark area includes: The text region of the mark to be detected is identified by performing text region recognition on the image of the mark to be detected through a preset text region detection network to obtain the text region of the mark to be detected.
6. A marking recognition device, characterized in that: The device comprises: A determination unit, configured to detect the image to be detected and determine a mark region to be detected in the image to be detected, wherein the mark region to be detected includes the mark to be detected; A first recognition unit is used to detect the image of the to-be-detected identification area to obtain a text area in the to-be-detected identification area; A second recognition unit is used to perform text recognition on the image of the text area to obtain information indicated by the mark to be detected in the mark area to be detected; The device is also used for: Acquire first position information of the to-be-detected identification area in the to-be-detected image; Determine, according to the first position information, second position information in the image to be detected, wherein the area indicated by the second position information is a text correction area; Obtaining category information of the text correction area; If the category indicated by the category information of the text correction area is the same as the category of the mark area to be detected, acquiring the text information of the text correction area; The information indicated by the to-be-detected identifier is corrected according to the text information in the text correction area to obtain a correction result; if the comparison result between the text information in the text correction area and the information indicated by the to-be-detected identifier is the same, the correction result is the information indicated by the to-be-detected identifier; if the comparison result between the text information in the text correction area and the information indicated by the to-be-detected identifier is different, the correction result is the lower value between the text information in the text correction area and the information indicated by the to-be-detected identifier.
7. The device according to claim 6, characterized in that The determining unit is used for: Detecting the image to be detected to obtain at least one reference identification area and a category of each reference identification area; A reference identification area of the target category is determined as the identification area to be detected.
8. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method for Recognizing Traffic Signs
US20140119605A1
KR20200001338A