Special-shaped character detection and recognition method, system, device and storage medium

By using a rotating target detection model and an optimal combination algorithm, irregularly shaped strings on medical devices are identified and combined, solving the problems of time-consuming and labor-intensive traditional manual identification and low accuracy of existing technologies, and realizing automated high-precision character detection.

CN116152808BActive Publication Date: 2026-02-27CHENGDU UNION BIG DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211536316.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2026-02-27
Estimated Expiration
2042-12-02

AI Technical Summary

Technical Problem

In applications such as medical devices, traditional manual visual inspection methods result in time-consuming and labor-intensive character recognition. Furthermore, due to the irregular shape of strings, existing OCR detection technologies cannot be effectively applied, leading to low character detection accuracy.

Method used

A rotating target detection model is used to train product images, and combined with an optimal combination algorithm, to identify and combine irregularly shaped strings on medical devices. By identifying information such as the center point coordinates, length, width, angle and confidence level of the characters, independent strings are formed.

Benefits of technology

It improves the accuracy of character detection for medical devices, reduces manual intervention, and achieves automated character recognition and combination, solving the problem of low detection accuracy caused by irregular shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116152808B_ABST
    Figure CN116152808B_ABST
Patent Text Reader

Abstract

The application provides a special-shaped character detection and recognition method, system, device and storage medium, and relates to the field of special-shaped character detection and recognition.The method comprises the following steps: (1) constructing a training set based on an existing product image, and importing the training set into a rotating target detection model for training; (2) inputting a product image to be detected into the trained rotating target detection model to output string information M of different regions in the product image to be detected; and (3) based on the string information M of different regions, adopting an optimal combination algorithm to combine characters in front and back, and forming a plurality of independent strings.The application uses a rotating target detection model for character recognition, and adopts an optimal combination algorithm for character combination on the basis of character recognition, and then detects special-shaped strings on medical devices and other products.The application solves the problem of low character detection accuracy caused by irregular string shapes in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of special shape character detection and recognition, in particular to a special shape character detection and recognition method, system, device and storage medium. BACKGROUND

[0002] In application scenarios such as medical devices, it is often necessary to detect and recognize characters on the surface of metal products to meet different business application scenarios. For example, in the process of medical warehouse equipment management, it is necessary to recognize characters on medical devices to facilitate the tracking of medical devices. On these medical devices, characters are mainly printed on irregular metal surfaces by means of laser engraving, etc., so that visual imaging of characters cannot guarantee clarity and consistency. In addition, in order to adapt to different shapes of equipment, these strings usually have different shapes, such as circular, bar-shaped and various other shapes.

[0003] Traditional medical equipment and the like are mainly identified by manual visual inspection and compared with the equipment character information collected by the system to realize medical equipment warehouse management. This method is time-consuming and labor-intensive, and is prone to false detection due to fatigue detection. In addition, since the strings of medical devices have different shapes, the existing OCR detection technology cannot be effectively applied to this type of application scenario. SUMMARY

[0004] The embodiments of the present application provide a special shape character detection and recognition method, system, device and storage medium, which effectively solve the problem of low character detection accuracy caused by irregular string shape in complex scenarios such as medical device detection.

[0005] In a first aspect, the embodiments of the present application provide a special shape character detection and recognition method, which comprises the following steps:

[0006] (1) Construct a training set based on an existing product image, and import the training set into a rotation target detection model for training;

[0007] (2) Input the detected product image into the trained rotation target detection model to output string information M in different regions of the detected product image;

[0008] (3) Based on the string information M in different regions, use an optimal combination algorithm to combine characters before and after to form several independent strings.

[0009] In the above embodiments, the rotation target detection model is used for character recognition, and the optimal combination algorithm is used for character combination based on character recognition to detect the string on the medical device. The problem of low character accuracy caused by irregular string shape in complex scenarios such as medical device detection is solved.

[0010] As some optional embodiments of the present application, the string information M includes a plurality of character information m, the character information m includes the center point coordinates (x, y) of the character, the length h, the width w, the angle a, the category ch and the confidence c, and the character information m is represented as: m = (x, y, w, h, a, ch, c).

[0011] In the above embodiment, since the product includes a plurality of string information M, and each string information M includes a plurality of character information m, it is necessary to identify the character information m of the string information M in different regions subsequently, and determine the character position in combination with the coordinates (x, y) of the character, the angle a and other parameters.

[0012] As some optional embodiments of the present application, a training set is constructed based on the existing product images, and the training set is imported into the rotation target detection model for training, and the process is as follows:

[0013] (1.1) A plurality of existing product images including string information M are collected, and a training set is constructed based on the plurality of existing product images;

[0014] (1.2) The plurality of character information m of the string information M are labeled, and the labeled existing product images are imported into the rotation target detection model for training.

[0015] In the above embodiment, the rotation target detection model is used for training the character information m, so as to facilitate subsequent detection and identification of the product to output the corresponding character information.

[0016] As some optional embodiments of the present application, based on the string information M in different regions, the optimal combination algorithm is used for combination of characters before and after, and the process of forming a plurality of independent strings is as follows:

[0017] (3.1) For the string information M in different regions, the plurality of character information m of the string information M are filtered based on a preset confidence threshold ct;

[0018] (3.2) Based on the filtered string information M, initial character selection is performed to obtain a character Mc, and the character Mc is removed from the string information M;

[0019] (3.3) The optimal combination algorithm is used to calculate the distance D between all characters Mn in the string information M and the character Mc, and the distance D is arranged in ascending order;

[0020] (3.4) The characters Mn are obtained in turn according to the arrangement order of the distance D, and the directional relationship between the character Mn and the character Mc is determined;

[0021] (3.5) replace character Mn with character Mc, and remove character Mc from string information M, repeat step (3.3)-(3.4) in one direction of the string, until the end of the string in this direction, then in another direction of the string, and take the edge character of the string as character Mc, repeat the above steps (3.3)-(3.4) until the end of the string in this direction;

[0022] (3.6) if the character in string information M is not empty, repeat steps (3.2)-(3.5) until it is empty, that is, all the strings in the image of the product to be detected are obtained.

[0023] In the above embodiment, the optimal combination algorithm is used to calculate the distance D between all characters Mn and character Mc in string information M, and then the arrangement relationship of the characters is determined, and the output of the string is realized based on the direction relationship determination.

[0024] As some optional embodiments of the present application, the process of determining the direction relationship of character Mn and character Mc is as follows:

[0025] (3.41) if the angle αn of character Mn is greater than the angle αc of character Mc, character Mn is located on the left side of character Mc, otherwise, character Mn is located on the right side of character Mc;

[0026] (3.42) if the angle αn of character Mn and the angle αc of character Mc are located in the angle interval (0°, 45°) and the angle interval (315°, 360°) respectively, when the angle αn of character Mn is greater than the angle αc of character Mc, character Mn is located on the right side of character Mc, otherwise, character Mn is located on the left side of character Mc;

[0027] (3.43) if there is |αn-αc| less than angle threshold tα between the angle αn of character Mn and the angle αc of character Mc, continue to determine the size of the center point coordinate xn of character Mn and the center coordinate xc of character Mc, if xn is less than xc, character Mn is located on the left side of character Mc, otherwise, character Mn is located on the right side of character Mc, wherein tα is the angle threshold.

[0028] As some optional embodiments of the present application, the calculation formula of the optimal combination algorithm for calculating the distance D between all characters Mn and character Mc in string information M is as follows:

[0029] D(Mc,Mn)=λ(min(|αc-αn|,360-(αc-αn)))+μ((xc-xn) 2 +(yc-yn) 2 )+ν(|wc-wn|+|hc-hn|)

[0030] wherein, λ, μ, ν are preset values.

[0031] As some optional embodiments of the present application, the end of the string direction search is determined based on a distance threshold Dt, that is, the distance D of all characters Mn is greater than Dt, and the string direction search ends.

[0032] In a second aspect, the present application provides a special-shaped character detection and recognition system, the system comprising:

[0033] A rotating target detection model training unit constructs a training set based on existing product images, and imports the training set into a rotating target detection model for training.

[0034] A rotating target detection model output unit is configured to input a product image to be detected into the trained rotating target detection model to output string information M of different regions in the product image to be detected.

[0035] A string combination unit is configured to combine characters before and after based on the string information M of different regions by using an optimal combination algorithm to form several independent strings.

[0036] In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the special-shaped character detection and recognition method.

[0037] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the special-shaped character detection and recognition method.

[0038] The present application has the following advantages: the present application first collects images of equipment that needs character detection and recognition, and manually labels the corresponding character positions; then, based on the labeled image data, a rotating target detection model is trained; then, images of equipment to be recognized are collected, and the trained target detection model is used to recognize all characters on the equipment; finally, the position information and the sequence of each character are combined to output strings, thereby solving the problems of low character detection accuracy and the need for manual detection caused by irregular string shapes in complex scenes. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0040] Figure 1 is a step diagram of the special-shaped character detection and recognition method according to the embodiment of the present application;

[0041] Figure 2 is a generation flowchart of the string according to the embodiment of the present application;

[0042] Figure 3 is a detection and recognition effect diagram of one form of product according to the embodiment of the present application;

[0043] Figure 4 is a detection and recognition effect diagram of another form of product according to the embodiment of the present application;

[0044] Figure 5 is an effect diagram of an example according to the embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to better understand the above technical solutions, the technical solutions of the present application will be described in detail below through the drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solutions of the present application, and are not limitations of the technical solutions of the present application. In the case of no conflict, the technical features in the embodiments of the present application and the embodiments can be combined with each other.

[0046] It should also be understood that, in order to simplify the expression disclosed in the present application and to help understand at least one embodiment of the present application, sometimes multiple features are combined into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present application. However, this disclosure method does not mean that the features required by the object of the present application are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the disclosed single embodiment.

[0047] Embodiment 1

[0048] The present application provides a special-shaped character detection and recognition method, please refer to Figure 1 , the method comprises:

[0049] (1) constructing a training set based on an existing product image, and importing the training set into a rotation target detection model for training;

[0050] In the embodiments of the present application, a training set is constructed based on existing product images, and the training set is imported into a rotating target detection model for training, and the process is as follows:

[0051] (1.1) Collect a plurality of existing product images containing string information M, and construct a training set based on the plurality of existing product images;

[0052] (1.2) Label a plurality of character information m of the string information M, and import the labeled existing product images into the rotating target detection model for training.

[0053] In the embodiments of the present application, the rotating target detection model can use a yolov5-OBB (Yolov5 for Oriented Object Detection, YOLOv5 rotating target detection) model for recognition of rotating characters, but is not limited thereto.

[0054] (2) Input the product image to be detected into the trained rotating target detection model to output the string information M of different regions in the product image to be detected;

[0055] Wherein, the string information M includes a plurality of character information m, the character information m includes the center point coordinates (x, y) of the character, the length h, the width w, the angle a, the category ch and the confidence c, and the character information m is represented as: m = (x, y, w, h, a, ch, c);

[0056] (3) Use an optimal combination algorithm to combine characters before and after based on the string information M of different regions to form a plurality of independent strings.

[0057] Wherein, the string information M includes a plurality of character information m, the character information m includes the center point coordinates (x, y) of the character, the length h, the width w, the angle a, the category ch and the confidence c, and the character information m is represented as: m = (x, y, w, h, a, ch, c);

[0058] In the embodiments of the present application, please refer to Figure 2 The process of using an optimal combination algorithm to combine characters before and after to form a plurality of independent strings is as follows:

[0059] (3.1) For the string information M of different regions, filter a plurality of character information m of the string information M based on a preset confidence threshold ct, and filter out noise prediction characters below the confidence threshold ct, that is, obtain the string information M = {m | m > ct};

[0060] (3.2) Based on the filtered string information M, select an initial character to obtain a character Mc, and remove the character Mc from the string information M;

[0061] (3.3) calculate the distance D between all characters Mn in the string information M and the character Mc, and arrange the distance D in ascending order;

[0062] (3.4) obtain the character Mn in turn according to the arrangement order of the distance D, and determine the directional relationship between the character Mn and the character Mc.

[0063] In the embodiment of the present application, the process of determining the directional relationship between the character Mn and the character Mc is as follows:

[0064] (3.41) if the angle an of the character Mn is greater than the angle ac of the character Mc, the character Mn is located on the left side of the character Mc, otherwise, the character Mn is located on the right side of the character Mc;

[0065] (3.42) if the angle an of the character Mn and the angle ac of the character Mc are located in the angle interval (0°, 45°) and the angle interval (315°, 360°) respectively, that is, there is an angle period end, when the angle an of the character Mn is greater than the angle ac of the character Mc, the character Mn is located on the right side of the character Mc, otherwise, the character Mn is located on the left side of the character Mc;

[0066] (3.43) if the angle an of the character Mn and the angle ac of the character Mc exist |an-ac| less than the angle threshold tα, that is, the angle offset is very small, it is a straight line type string, then based on the average angle (an-ac) / 2, the two characters are rotated to be perpendicular to 90°, that is, horizontal string, then continue to determine the size of the center point coordinate xn of the character Mn and the center coordinate xc of the character Mc, if xn is less than xc, the character Mn is located on the left side of the character Mc, otherwise, the character Mn is located on the right side of the character Mc, wherein tα is the angle threshold.

[0067] (3.5) replace the character Mc with the character Mn, and remove the character Mc from the string information M, repeat steps (3.3) to (3.4), find in one direction of the string, until the end of the string direction search, then find in another direction of the string, and take the edge character of the string as the character Mc, repeat the above steps (3.3) to (3.4), until the end of the string direction search;

[0068] In the embodiment of the present application, the end of the string direction search is determined based on the distance threshold Dt, that is, the distance D of all characters Mn is greater than Dt, then the string direction search ends.

[0069] (3.6) If the character in the string information M is not empty, repeat steps (3.2)-(3.5) until it is empty, that is, all the characters in the image of the product to be detected are obtained, please refer to Figure 3 , Figure 4 .

[0070] In the embodiment of the present application, the calculation formula of the distance D between all characters Mn in the string information M and the character Mc is calculated by using the optimal combination algorithm as follows:

[0071] D(Mc,Mn)=λ(min(|αc-αn|,360-(αc-αn)))+μ((xc-xn) 2 +(yc-yn) 2 )+ν(|wc-wn|+|hc-hn|)

[0072] Wherein, λ, μ, ν are preset values, which can be optimized and adjusted according to actual situation.

[0073] In the above embodiment, first, the image of the instrument to be detected and recognized is collected, and the corresponding character position is manually labeled; then, based on the labeled image data, a rotating target detection model is trained; then, the image of the instrument to be recognized is collected, and the trained target detection model is used to recognize all the characters above; finally, the string output is combined with the position information and the sequence of each character, which solves the problem of low character detection accuracy and the need for manual detection caused by irregular string shape in complex scenes.

[0074] Please refer to Figure 5 , based on the string information M of different regions, the optimal combination algorithm is used to combine the characters before and after, and the embodiments of forming several independent strings are listed as follows:

[0075] First, randomly select the character "4" as the initial character, and use the optimal combination algorithm to calculate the distance between all characters and the character "4". In the right direction, the characters "5" and "6" are obtained based on the distance calculation formula in sequence, and the search in the right direction is ended. In the left direction, the characters "4", "3", "2" and "1" are obtained based on the distance calculation formula in sequence. Therefore, the string "1", "2", "3", "4", "5", "6" is finally obtained.

[0076] Embodiment 2

[0077] The present application provides a character detection and recognition system for irregular shapes, which comprises:

[0078] A rotating target detection model training unit, which constructs a training set based on existing product images and imports the training set into a rotating target detection model for training;

[0079] a rotation target detection model output unit, configured to input a product image to be detected into the trained rotation target detection model to output string information M of different regions in the product image to be detected;

[0080] a string combination unit, configured to combine characters in front of and behind the string information M based on an optimal combination algorithm to form a plurality of independent strings.

[0081] In the above embodiment, the string information M includes a plurality of character information m, the character information m includes a center point coordinate (x, y) of a character, a length h, a width w, an angle a, a category ch, and a confidence c, and the character information m is represented as m = (x, y, w, h, a, ch, c).

[0082] The rotation target detection model training unit trains the rotation target detection model in the following procedure:

[0083] (1.1) a plurality of existing product images containing string information M are collected, and a training set is constructed based on the plurality of existing product images;

[0084] (1.2) a plurality of character information m of the string information M is labeled, and the labeled existing product images are imported into the rotation target detection model for training.

[0085] The string combination unit combines characters in front of and behind the string information M based on an optimal combination algorithm to form a plurality of independent strings in the following procedure:

[0086] (3.1) for different regions of the string information M, a plurality of character information m of the string information M is filtered based on a preset confidence threshold ct;

[0087] (3.2) initial character selection is performed based on the filtered string information M to obtain a character Mc, and the character Mc is removed from the string information M;

[0088] (3.3) an optimal combination algorithm is used to calculate distances D between all characters Mn in the string information M and the character Mc, and the distances D are arranged in ascending order;

[0089] wherein the calculation formula of the optimal combination algorithm for calculating the distances D between all characters Mn in the string information M and the character Mc is as follows:

[0090] D(Mc, Mn) = λ(min(|ac-an|, 360-(ac-an)))+μ((xc-xn) 2 +(yc-yn) 2)+ v (| wc- wn | + | hc- hn | )

[0091] wherein, λ, μ, v are preset values;

[0092] (3.4) sequentially obtaining character Mn according to the arrangement order of distance D, and determining the directional relationship between character Mn and character Mc;

[0093] (3.5) replacing character Mc with character Mn, and removing character Mc from string information M, repeating step (3.3) to step (3.4), searching in one direction of the string until the searching in this direction of the string ends, then searching in another direction of the string, and taking the edge character of the string as character Mc, repeating the above steps (3.3) to (3.4) until the searching in this direction of the string ends; wherein, the end of the searching in the direction of the string is determined based on distance threshold Dt, that is, if the distance D of all characters Mn is greater than Dt, the searching in this direction of the string ends.

[0094] (3.6) if the character in string information M is not empty, repeating step (3.2) to step (3.5) until it is empty, that is, all the strings in the product image to be detected are obtained.

[0095] Specifically, the process of determining the directional relationship between character Mn and character Mc is as follows:

[0096] (3.41) if the angle an of character Mn is greater than the angle ac of character Mc, character Mn is located on the left side of character Mc, otherwise, character Mn is located on the right side of character Mc;

[0097] (3.42) if the angle an of character Mn and the angle ac of character Mc are located in angle interval (0°, 45°) and angle interval (315°, 360°) respectively, when the angle an of character Mn is greater than the angle ac of character Mc, character Mn is located on the right side of character Mc, otherwise, character Mn is located on the left side of character Mc;

[0098] (3.43) if the angle an of character Mn and the angle ac of character Mc exist | an-ac | less than angle threshold tα, continue to determine the size of the center point coordinate xn of character Mn and the center coordinate xc of character Mc, if xn is less than xc, character Mn is located on the left side of character Mc, otherwise, character Mn is located on the right side of character Mc, wherein tα is the angle threshold.

[0099] Example 3

[0100] The application provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the computer program performs a special-shaped character detection and recognition method according to Embodiment 1 when the processor runs.

[0101] The computer device provided by the embodiment can implement the method according to Embodiment 1, and details are not repeated here.

[0102] Embodiment 4

[0103] The application provides a computer readable storage medium, which stores a computer program, and the computer program implements a special-shaped character detection and recognition method according to Embodiment 1 when a processor runs.

[0104] The computer readable storage medium provided by the embodiment can implement the method according to Embodiment 1, and details are not repeated here.

[0105] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0106] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the special-shaped character detection and recognition system in the application by running or executing data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, an intelligent memory card, a secure digital card, a flash memory card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.

[0107] If the special-shaped character detection and recognition system is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can be implemented, and the computer program can be stored in a computer-readable storage medium. The computer program can implement the steps of the above-mentioned various method embodiments when executed by a processor. The computer program includes computer program code, object code, executable files, or some intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, point carrier signal, telecommunication signal, and software distribution medium. It should be noted that the contents of the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0108] The present application has described the basic concept, and it is obvious that the above detailed disclosure is only used as an example and does not constitute a limitation on the specification. Although it is not explicitly stated here, those skilled in the art can make various modifications, improvements and corrections to the specification. Such modifications, improvements and corrections are suggested in the specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of the specification.

[0109] The computer storage medium can contain a propagated data signal with computer program code embodied therein, for example, in baseband or as part of a carrier wave. The propagated signal can have various forms, including electromagnetic, optical, or suitable combinations thereof. The computer storage medium can be any computer readable medium except the computer readable storage medium that can be connected to an instruction execution system, device or apparatus to implement communication, propagation or transmission of programs for use. The program code on the computer storage medium can be propagated through any suitable medium, including radio, cable, optical fiber cable, RF, or similar medium, or a combination of any of the above media.

Claims

1. A method for detecting and recognizing a special shape character, characterized in that, The method comprises the following steps: (1) constructing a training set based on existing product images, and importing the training set into a rotating target detection model for training; (2) inputting a product image to be detected into the trained rotating target detection model to output string information M of different regions in the product image to be detected; (3) based on the string information M of different regions, performing character combination before and after the characters by using an optimal combination algorithm to form a plurality of independent strings; the string information M comprises a plurality of character information m, the character information m comprises a center point coordinate (x, y) of a character, a length h, a width w, an angle a, a category ch, and a confidence c, and the character information m is represented as: m = (x, y, w, h, a, ch, c); wherein, based on the string information M of different regions, the optimal combination algorithm is used to combine the characters before and after the characters to form a plurality of independent strings, and the process is as follows: (3.1) for the string information M of different regions, filtering a plurality of character information m of the string information M based on a preset confidence threshold ct; (3.2) performing initial character selection based on the filtered string information M to obtain a character Mc, and removing the character Mc from the string information M; (3.3) calculating distances D of all characters Mn in the string information M and the character Mc by using the optimal combination algorithm, and arranging the distances D in ascending order; (3.4) sequentially obtaining the characters Mn according to the arrangement order of the distances D, and determining a directional relationship between the characters Mn and the character Mc; (3.5) replacing the character Mc with the character Mn, removing the character Mc from the string information M, repeating steps (3.3) to (3.4), and searching in one direction of the string, until the searching in the direction of the string is completed, then searching in another direction of the string, and taking the edge character of the string as the character Mc, repeating the above steps (3.3) to (3.4), until the searching in the direction of the string is completed; (3.6) if the characters in the string information M are not empty, repeating steps (3.2) to (3.5) until they are empty, and all the strings in the product image to be detected are obtained; wherein, the calculation formula of the distances D of all the characters Mn in the string information M and the character Mc by using the optimal combination algorithm is as follows: D(Mc, Mn) = λ(min(|αc-αn|, 360-(αc-αn)))+μ((xc-xn) 2 +(yc-yn) 2 )+ν(|wc-wn|+|hc-hn|) wherein, λ, μ, and v are preset values.

2. The method for detecting and recognizing special-shaped characters according to claim 1, characterized in that, The process of constructing a training set based on existing product images and importing the training set into a rotating target detection model for training is as follows: (1.1) collecting a plurality of existing product images containing string information M, and constructing a training set based on the plurality of existing product images; (1.2) labeling a plurality of character information m of the string information M, and importing the labeled existing product images into a rotating target detection model for training.

3. The method of claim 1, wherein the special-shaped character is a Chinese character. The process of determining the directional relationship between the characters Mn and the character Mc is as follows: (3.41) if the angle an of the character Mn is greater than the angle ac of the character Mc, the character Mn is located on the left side of the character Mc, otherwise, the character Mn is located on the right side of the character Mc; (3.42) if the angle an of the character Mn and the angle ac of the character Mc are one in the angle interval and the other in the angle interval , then the character Mn is located at the right side of the character Mc when the angle an of the character Mn is greater than the angle ac of the character Mc, otherwise, the character Mn is located at the left side of the character Mc; (3.43) If the angle an of the character Mn and the angle ac of the character Mc exist |an-ac| less than the angle threshold t a, continue to determine the size of the center point coordinate xn of the character Mn and the center coordinate xc of the character Mc, if xn is less than xc, the character Mn is located on the left side of the character Mc, otherwise, the character Mn is located on the right side of the character Mc, wherein t a is the angle threshold.

4. The method of claim 1, wherein the special-shaped character is a Chinese character. The end of the string direction finding is based on the distance threshold Dt, that is, the distance D of all characters Mn is greater than Dt, then the string direction finding ends.

5. A special shape character detection and recognition system for implementing the method of claim 1, characterized by, The system comprises: A rotating target detection model training unit constructs a training set based on existing product images, and imports the training set into a rotating target detection model for training; A rotating target detection model output unit is used to input the to-be-detected product image into the trained rotating target detection model to output the string information M of different regions in the to-be-detected product image; A string combination unit combines the characters before and after based on the string information M of different regions using an optimal combination algorithm to form several independent strings.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to realize the special-shaped character detection and recognition method of any one of claims 1-4.

7. A computer readable storage medium characterized by The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the special-shaped character detection and recognition method of any one of claims 1-4.

Citation Information

Patent Citations

  • End-to-end identification method for scene text with random shape

    CN108549893A

  • Remote sensing image target detection and identification method, device, equipment and medium

    CN114120138A