CN113887337A - Seal identification method and system with bent text and storage medium - Google Patents

Seal identification method and system with bent text and storage medium Download PDF

Info

Publication number
CN113887337A
CN113887337A CN202111078213.2A CN202111078213A CN113887337A CN 113887337 A CN113887337 A CN 113887337A CN 202111078213 A CN202111078213 A CN 202111078213A CN 113887337 A CN113887337 A CN 113887337A
Authority
CN
China
Prior art keywords
seal
network
text
image
stamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111078213.2A
Other languages
Chinese (zh)
Inventor
马凤强
吴运祥
梁延灼
刘琛
安晓博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202111078213.2A priority Critical patent/CN113887337A/en
Publication of CN113887337A publication Critical patent/CN113887337A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, a system and a storage medium for identifying a seal with a bent text, belonging to the technical field of computer vision, aiming at solving the technical problems of low efficiency, time and labor consumption of traditional government document examination and approval and bill information examination and verification, and adopting the technical scheme that: the method comprises the following specific steps: detecting the seal in the picture through a deep learning target detection network; correcting the direction of the seal by using an angle classification network for the detected seal picture; the corrected seal is sent to a text detection network to detect characters in the seal; and sending the detected characters into a character recognition network for character recognition. The system comprises a seal detection module, a seal direction correction module, a seal text detection module and a seal bent text recognition module.

Description

Seal identification method and system with bent text and storage medium
Technical Field
The invention relates to the technical field of computer vision, in particular to a method and a system for identifying a seal with a bent text and a storage medium.
Background
With the development of computers and artificial intelligence technologies, government affair service informatization and intellectualization are important trends in current development, seal information needs to be audited and calibrated manually during traditional government affair document approval and bill information audit, manpower and material resources are consumed, and efficiency is low. The stamp character recognition technology can automatically and efficiently detect the stamp in the picture and extract the text information, and can effectively solve the difficult and painful point of government affair approval.
The traditional stamp character recognition technology firstly processes an image, extracts a stamp through Hough circle detection and a color space filtering method, then detects characters in the extracted stamp through a deep learning method, then flattens a detected bent text, and finally sends the flattened text to a text recognition network to recognize stamp text information. The method has the advantages that the problems of false detection, omission and the like of the seal are easily caused during seal detection, and in addition, when the detected characters are flattened, the character patterns are easily subjected to larger deformation, so that the character identification information is mistaken, and the integral seal character identification accuracy rate is reduced.
Therefore, the technical problems to be solved at present are solved by improving the defects that the traditional government affair document approval and bill information auditing are low in efficiency, time-consuming and labor-consuming.
Disclosure of Invention
The invention provides a seal identification method, a seal identification system and a storage medium with a bent text, and solves the problems of low efficiency, time consumption and labor consumption of traditional government affair document approval and bill information verification.
The technical task of the invention is realized in the following way, and the method for identifying the seal with the bent text specifically comprises the following steps:
detecting the seal in the picture through a deep learning target detection network;
correcting the direction of the seal by using an angle classification network for the detected seal picture;
the corrected seal is sent to a text detection network to detect characters in the seal;
and sending the detected characters into a character recognition network for character recognition.
Preferably, the detection of the seal in the picture by the deep learning target detection model is as follows:
acquiring an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
inputting an original image to be identified into a target detection network, and acquiring coordinate information corresponding to all seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
and cutting out a corresponding stamp image on the original image to be identified according to the coordinate information of the stamp.
Preferably, the seal direction correction of the detected seal picture by using the angle classification network is as follows:
inputting the cut seal image into a pre-trained angle classification network, and acquiring a rotation angle of the cut seal image so as to acquire a seal angle category; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
and according to the seal angle category, performing angle rotation on the cut seal image according to the angle information to obtain a corrected seal image.
Preferably, the characters sent to the text detection network detection stamp by the corrected stamp are as follows:
inputting the corrected stamp image into a text detection network, acquiring coordinate values of text outlines, and attaching text regions according to texts of different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and cutting the corrected stamp image according to the coordinate value of the text outline to obtain text information images in different shapes.
Preferably, the step of sending the detected characters to a character recognition network for character recognition is as follows:
preprocessing the text information image, specifically: predicting a set of reference points for the image of textual information over a positioning network;
calculating text information image transformation parameters in a grid generator according to the reference points to generate a sampling network based on the original image, and enabling the network and the input image to pass through points on the sampling network by a sampler to obtain a primary correction image;
inputting the preliminary correction image into an SRN network for identification, and directly identifying a sequence from the input preliminary correction image by an encoder of the SRN network; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder (encoder) is h ═ (h1, h2, ·, hL); wherein L is equal to the width of the convolution layer;
the decoder of the SRN circularly generates a target character sequence according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1 represents the output of the previous GRU; α t-1 represents the previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character is related to the output st-1 of the previous GRU, the previous weight vector alpha t-1 and the input sequence h;
and calculating probability distribution by a softmax function according to the target character sequence generated by the decoder, and finally outputting the character with the highest probability.
A stamp identification system having curved text, the system comprising,
the seal detection module is used for detecting the seal in the picture through a deep learning target detection network;
the seal direction correction module is used for correcting the seal direction of the detected seal picture by using an angle classification network;
the seal text detection module is used for sending the corrected seal to a text detection network to detect characters in the seal;
and the stamp bending text recognition module is used for sending the detected characters into a character recognition network for character recognition.
Preferably, the stamp detecting module includes a first module,
the first acquisition sub-module is used for acquiring an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
the second acquisition submodule is used for inputting the original image to be identified into the target detection network and acquiring coordinate information corresponding to all the seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
the first cutting submodule is used for cutting out a corresponding stamp image on an original image to be identified according to the coordinate information of the stamp and inputting the stamp image to the stamp direction correction module;
the stamp direction correcting module comprises a stamp direction correcting module,
the third acquisition submodule is used for inputting the cut seal image into a pre-trained angle classification network, acquiring the rotation angle of the cut seal image and further acquiring the seal angle class; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
and the fourth acquisition submodule is used for performing angle rotation on the cut seal image according to the seal angle type and the angle information to acquire a corrected seal image and inputting the corrected seal image into the seal text detection module.
Preferably, the stamp text detection module comprises,
a fifth obtaining sub-module, configured to input the corrected stamp image into a text detection network, obtain coordinate values of a text outline, and attach the text area according to texts of different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and the second cutting submodule is used for cutting the corrected stamp image according to the coordinate value of the text outline, acquiring text information images in different shapes and inputting the text information images at the cutting position to the stamp bending text recognition module.
Preferably, the stamp bending text recognition module comprises,
the preprocessing submodule is used for preprocessing the text information image, and specifically comprises: predicting a set of reference points for the image of textual information over a positioning network;
the calculation submodule is used for calculating the text information image conversion parameters in the grid generator according to the reference points to generate a sampling network based on the original image, and the sampler obtains a primary correction image by the network and the input image through points on the sampling network;
the identification submodule is used for inputting the primary corrected image into an SRN network for identification, and an encoder of the SRN network directly identifies a sequence from the input primary corrected image; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder (encoder) is h ═ (h1, h2, ·, hL); wherein L is equal to the width of the convolution layer;
the generation submodule is used for circularly generating a target character sequence by the decoder of the SRN according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1 represents the output of the previous GRU; α t-1 represents the previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character is related to the output st-1 of the previous GRU, the previous weight vector alpha t-1 and the input sequence h;
and the output submodule is used for calculating probability distribution through a softmax function according to the target character sequence generated by the decoder and finally outputting the character with the highest probability.
A computer-readable storage medium having stored thereon computer-executable instructions, which, when executed by a processor, implement a method for stamp recognition with curved text as described above.
The method, the system and the storage medium for identifying the seal with the bent text have the following advantages that:
the stamp character recognition system solves the problems of low examination and approval efficiency, low examination and approval efficiency of bill information, time consumption, labor consumption and the like of the traditional government affair document, can effectively improve the detection accuracy of the stamp, can directly send the characters into a character recognition network without independently leveling and rotating the characters by a character recognition module, can effectively improve the accuracy of stamp character recognition, and can be better applied to an examination and approval scene of government affairs;
secondly, the invention detects and positions the seal in the picture through the target detection network, inputs the cut seal into the seal angle classification network, then inputs the corrected seal picture into the seal text detection network, and finally directly sends the detected text area into the text recognition network to obtain the character information in the seal, thereby effectively improving the accuracy of seal character recognition;
the invention is totally built by adopting an end-to-end neural network, compared with the traditional seal character recognition, the whole process does not need additional human intervention, and the precision and the robustness of the seal character recognition are improved;
fourthly, the seal in the picture is detected by using a deep learning method in the seal detection model, the robustness is better compared with the traditional method for detecting the position of the seal by using the Hough circle, and the seals of the ellipse and other types can be detected;
in the invention, 36 types of angle classification is adopted when the seal angles are classified, the classification is more precise, and the seal angle error after the rotation correction is smaller;
the method adopts the deep learning network to detect the text during the seal text detection, can output multi-point coordinates to be attached to the bent text, has more accurate detected text region information, has less interference information compared with a four-point text box, and can effectively improve the seal character recognition precision;
the method has the advantages that during stamp character recognition, the detected text area is directly sent to the character recognition network, and for the bent text, the text is directly input to the deep learning network for processing without independently performing character flattening or character rotation, so that the influence of character deformation and the like after the characters are flattened can be effectively reduced, and the character recognition precision is improved;
and (eighth) the invention can identify the horizontal text and the curved text by using a curved text identification algorithm, and output the final corresponding character information aiming at the input different types of text pictures.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart diagram of a method of stamp identification with curved text;
FIG. 2 is a block diagram of a stamp identification system with curved text;
FIG. 3 is a block flow diagram of the operation of a stamp identification system with curved text.
Detailed Description
The method, system, and storage medium for identifying a stamp having a curved document according to the present invention will be described in detail with reference to the accompanying drawings and embodiments.
Example 1:
as shown in fig. 1, the method for identifying a stamp with a curved text of the present invention specifically includes the following steps:
s1, detecting the seal in the picture through a deep learning target detection network;
s2, correcting the direction of the seal by using an angle classification network for the detected seal picture;
s3, sending the corrected seal to a text detection network to detect characters in the seal;
and S4, sending the detected characters to a character recognition network for character recognition.
In this embodiment, the detection of the stamp in the picture by the deep learning target detection model in step S1 is specifically as follows:
s101, obtaining an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
s102, inputting an original image to be identified into a target detection network, and acquiring coordinate information corresponding to all seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
s103, cutting out a corresponding stamp image on the original image to be identified according to the coordinate information of the stamp.
In this embodiment, the seal direction correction performed on the detected seal picture by using the angle classification network in step S2 is specifically as follows:
s201, inputting the cut seal image into a pre-trained angle classification network, and acquiring a rotation angle of the cut seal image so as to acquire a seal angle category; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
s202, according to the stamp angle type, performing angle rotation on the cut stamp image according to the angle information to obtain a corrected stamp image.
In this embodiment, the characters of the seal detected by the text detection network sent by the corrected seal in step S3 are specifically as follows:
s301, inputting the corrected stamp image into a text detection network, acquiring coordinate values of text outlines, and attaching text regions according to texts in different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and S302, cutting the corrected stamp image according to the coordinate value of the text outline to obtain text information images in different shapes.
The specific steps of the present embodiment to send the detected characters to the character recognition network for character recognition in step S4 are as follows:
s401, preprocessing the text information image, specifically: predicting a set of reference points for the image of textual information over a positioning network;
s402, calculating text information image transformation parameters in a grid generator according to the reference points to generate a sampling network based on an original image, and enabling the network and the input image to pass through points on the sampling network by a sampler to obtain a primary correction image;
s403, inputting the preliminary correction image into an SRN network for identification, wherein an encoder of the SRN network directly identifies a sequence from the input preliminary correction image; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder (encoder) is h ═ (h1, h2, ·, hL); wherein L is equal to the width of the convolution layer;
the decoder of the SRN circularly generates a target character sequence according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1 represents the output of the previous GRU; α t-1 represents the previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character is related to the output st-1 of the previous GRU, the previous weight vector alpha t-1 and the input sequence h;
s404, calculating probability distribution through a softmax function according to the target character sequence generated by the decoder, and finally outputting the character with the highest probability.
Example 2:
referring to fig. 2, the stamp identification system with curved text of the present invention, includes,
the seal detection module is used for detecting the seal in the picture through a deep learning target detection network;
the seal direction correction module is used for correcting the seal direction of the detected seal picture by using an angle classification network;
the seal text detection module is used for sending the corrected seal to a text detection network to detect characters in the seal;
and the stamp bending text recognition module is used for sending the detected characters into a character recognition network for character recognition.
The stamp detection module in the present embodiment includes,
the first acquisition sub-module is used for acquiring an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
the second acquisition submodule is used for inputting the original image to be identified into the target detection network and acquiring coordinate information corresponding to all the seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
the first cutting submodule is used for cutting out a corresponding stamp image on an original image to be identified according to the coordinate information of the stamp and inputting the stamp image to the stamp direction correction module;
the stamp direction correcting module in the embodiment comprises,
the third acquisition submodule is used for inputting the cut seal image into a pre-trained angle classification network, acquiring the rotation angle of the cut seal image and further acquiring the seal angle class; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
and the fourth acquisition submodule is used for performing angle rotation on the cut seal image according to the seal angle type and the angle information to acquire a corrected seal image and inputting the corrected seal image into the seal text detection module.
The stamp text detection module in the present embodiment includes,
a fifth obtaining sub-module, configured to input the corrected stamp image into a text detection network, obtain coordinate values of a text outline, and attach the text area according to texts of different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and the second cutting submodule is used for cutting the corrected stamp image according to the coordinate value of the text outline, acquiring text information images in different shapes and inputting the text information images at the cutting position to the stamp bending text recognition module.
The stamp bending text recognition module in this embodiment includes,
the preprocessing submodule is used for preprocessing the text information image, and specifically comprises: predicting a set of reference points for the image of textual information over a positioning network;
the calculation submodule is used for calculating the text information image conversion parameters in the grid generator according to the reference points to generate a sampling network based on the original image, and the sampler obtains a primary correction image by the network and the input image through points on the sampling network;
the identification submodule is used for inputting the primary corrected image into an SRN network for identification, and an encoder of the SRN network directly identifies a sequence from the input primary corrected image; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder (encoder) is h ═ (h1, h2, ·, hL); wherein L is equal to the width of the convolution layer;
the generation submodule is used for circularly generating a target character sequence by the decoder of the SRN according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1 represents the output of the previous GRU; α t-1 represents the previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character is related to the output st-1 of the previous GRU, the previous weight vector alpha t-1 and the input sequence h;
and the output submodule is used for calculating probability distribution through a softmax function according to the target character sequence generated by the decoder and finally outputting the character with the highest probability.
The working process of the seal recognition system with the bent text specifically comprises the following steps:
(1) after the seal detection module acquires an original image to be detected, detecting the seal by using a target detection algorithm of deep learning, outputting coordinate information of the seal on the image and the seal type, cutting out a seal image according to the coordinates, and transmitting the seal image to the seal direction correction module;
(2) after the seal direction correction module acquires the seal picture, classifying the seal angles by using an image classification algorithm, wherein the angle classification algorithm classifies the rotation angles of the seals into 36 classes, and each class is gradually increased from 0 degrees according to 10-degree intervals; after the angle classification model determines the rotation angle of the seal, the seal picture is corrected in a rotating mode, and the corrected seal picture is sent to a seal text detection module;
(3) the seal text detection module acquires a text coordinate position in a seal picture by using a bent text detection algorithm, cuts out a bent text and a horizontal text according to coordinate information, and sends the cut-out picture to the seal bent character recognition module;
(4) the stamp bent text recognition module can recognize a horizontal text and a bent text by using a bent text recognition algorithm, and outputs final corresponding character information aiming at input different types of text pictures.
Example 3:
the embodiment of the invention also provides a computer-readable storage medium, wherein a plurality of instructions are stored, and the instructions are loaded by the processor, so that the processor executes the seal identification method with the bent text in any embodiment of the invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for identifying a seal with a bent text is characterized by comprising the following steps:
detecting the seal in the picture through a deep learning target detection network;
correcting the direction of the seal by using an angle classification network for the detected seal picture;
the corrected seal is sent to a text detection network to detect characters in the seal;
and sending the detected characters into a character recognition network for character recognition.
2. The method for recognizing a stamp with a curved text according to claim 1, wherein the stamp in the picture is detected by a deep learning target detection model as follows:
acquiring an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
inputting an original image to be identified into a target detection network, and acquiring coordinate information corresponding to all seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
and cutting out a corresponding stamp image on the original image to be identified according to the coordinate information of the stamp.
3. The method according to claim 1, wherein the seal direction correction of the detected seal picture using the angle classification network is as follows:
inputting the cut seal image into a pre-trained angle classification network, and acquiring a rotation angle of the cut seal image so as to acquire a seal angle category; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
and according to the seal angle category, performing angle rotation on the cut seal image according to the angle information to obtain a corrected seal image.
4. The method according to claim 1, wherein the characters in the stamp detected by the text detection network after the stamp is corrected are as follows:
inputting the corrected stamp image into a text detection network, acquiring coordinate values of text outlines, and attaching text regions according to texts of different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and cutting the corrected stamp image according to the coordinate value of the text outline to obtain text information images in different shapes.
5. A method of stamp recognition with curved text according to any of claims 1-4, wherein the detected text is fed to a text recognition network for text recognition as follows:
preprocessing the text information image, specifically: predicting a set of reference points for the image of textual information over a positioning network;
calculating text information image transformation parameters in a grid generator according to the reference points to generate a sampling network based on the original image, and enabling the network and the input image to pass through points on the sampling network by a sampler to obtain a primary correction image;
inputting the preliminary correction image into an SRN network for identification, and directly identifying a sequence from the input preliminary correction image by an encoder of the SRN network; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder is h ═ (h1, h2, …, hL); wherein L is equal to the width of the convolution layer;
the decoder of the SRN circularly generates a target character sequence according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1Represents the output of the previous GRU; alpha is alphat-1Representing a previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character and the output s of the previous GRUt-1Previous weight vector αt-1And the input sequence h;
and calculating probability distribution by a softmax function according to the target character sequence generated by the decoder, and finally outputting the character with the highest probability.
6. A stamp identification system having curved text, the system comprising,
the seal detection module is used for detecting the seal in the picture through a deep learning target detection network;
the seal direction correction module is used for correcting the seal direction of the detected seal picture by using an angle classification network;
the seal text detection module is used for sending the corrected seal to a text detection network to detect characters in the seal;
and the stamp bending text recognition module is used for sending the detected characters into a character recognition network for character recognition.
7. The stamp recognition system with curved text according to claim 6, wherein the stamp detection module includes,
the first acquisition sub-module is used for acquiring an original image to be identified, wherein the original image to be identified comprises a seal type; wherein the seal type comprises a circular shape or an oval shape;
the second acquisition submodule is used for inputting the original image to be identified into the target detection network and acquiring coordinate information corresponding to all the seals; wherein, the target detection network adopts YOLOV3, YOLOV4 or YOLOV 5;
the first cutting submodule is used for cutting out a corresponding stamp image on an original image to be identified according to the coordinate information of the stamp and inputting the stamp image to the stamp direction correction module;
the stamp direction correcting module comprises a stamp direction correcting module,
the third acquisition submodule is used for inputting the cut seal image into a pre-trained angle classification network, acquiring the rotation angle of the cut seal image and further acquiring the seal angle class; wherein the angle classification network adopts ResNet, GoogleNet or DPN; the angle classification network is divided into 36 classes, and the class is from 0 degree to 360 degrees at intervals of 10 degrees;
and the fourth acquisition submodule is used for performing angle rotation on the cut seal image according to the seal angle type and the angle information to acquire a corrected seal image and inputting the corrected seal image into the seal text detection module.
8. The stamp identification system with curved text according to claim 6, wherein the stamp text detection module includes,
a fifth obtaining sub-module, configured to input the corrected stamp image into a text detection network, obtain coordinate values of a text outline, and attach the text area according to texts of different shapes; the text detection network comprises a PANET, a PSENet or a DBNet;
and the second cutting submodule is used for cutting the corrected stamp image according to the coordinate value of the text outline, acquiring text information images in different shapes and inputting the text information images at the cutting position to the stamp bending text recognition module.
9. Stamp identification system with curved text according to one of claims 6 to 8, characterized in that the stamp curved text recognition module comprises,
the preprocessing submodule is used for preprocessing the text information image, and specifically comprises: predicting a set of reference points for the image of textual information over a positioning network;
the calculation submodule is used for calculating the text information image conversion parameters in the grid generator according to the reference points to generate a sampling network based on the original image, and the sampler obtains a primary correction image by the network and the input image through points on the sampling network;
the identification submodule is used for inputting the primary corrected image into an SRN network for identification, and an encoder of the SRN network directly identifies a sequence from the input primary corrected image; the encoder comprises 7 convolutional layers, wherein 2 x 2 max-firing layers are connected behind the 1 st convolutional layer, the 2 nd convolutional layer, the 4 th convolutional layer and the 6 th convolutional layer respectively, a double-layer BLSTM network is arranged on each convolutional layer, and each BLSTM network has 256 hidden units; the output sequence of the encoder is h ═ (h1, h2, ·, hL); wherein L is equal to the width of the convolution layer;
the generation submodule is used for circularly generating a target character sequence by the decoder of the SRN according to the output sequence of the encoder of the SRN; wherein, the decoder is a cyclic network based on attention mechanism, the GRU adopted by the network structure of the decoder is a variant of LSTM, the weight is continuously updated according to the output result, and the weight calculation function formula is as follows:
αt=Attend(st-1,αt-1,h);
wherein, alpha represents the weight vector corresponding to the current output character; st-1Represents the output of the previous GRU; alpha is alphat-1Representing a previous weight vector; h represents an input sequence; according to the weight calculation function formula, the weight vector alpha corresponding to the current output character and the output s of the previous GRUt-1Previous weight vector αt-1And the input sequence h;
and the output submodule is used for calculating probability distribution through a softmax function according to the target character sequence generated by the decoder and finally outputting the character with the highest probability.
10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer, the method for identifying a stamp with curved text according to any one of claims 1 to 5 is implemented.
CN202111078213.2A 2021-09-15 2021-09-15 Seal identification method and system with bent text and storage medium Pending CN113887337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111078213.2A CN113887337A (en) 2021-09-15 2021-09-15 Seal identification method and system with bent text and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111078213.2A CN113887337A (en) 2021-09-15 2021-09-15 Seal identification method and system with bent text and storage medium

Publications (1)

Publication Number Publication Date
CN113887337A true CN113887337A (en) 2022-01-04

Family

ID=79009166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111078213.2A Pending CN113887337A (en) 2021-09-15 2021-09-15 Seal identification method and system with bent text and storage medium

Country Status (1)

Country Link
CN (1) CN113887337A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114495100A (en) * 2022-04-14 2022-05-13 电子科技大学 Intelligent microscope system applied to photoelectric chip microscopic character recognition
CN114565044A (en) * 2022-03-01 2022-05-31 北京九章云极科技有限公司 Seal identification method and system
CN115063804A (en) * 2022-06-29 2022-09-16 支付宝(杭州)信息技术有限公司 Seal identification and anti-counterfeiting detection method and system
CN115187978A (en) * 2022-08-08 2022-10-14 杭州实在智能科技有限公司 Complex background seal identification method based on deep learning
CN116416626A (en) * 2023-06-12 2023-07-11 平安银行股份有限公司 Method, device, equipment and storage medium for acquiring circular seal data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114565044A (en) * 2022-03-01 2022-05-31 北京九章云极科技有限公司 Seal identification method and system
CN114565044B (en) * 2022-03-01 2022-08-16 北京九章云极科技有限公司 Seal identification method and system
CN114495100A (en) * 2022-04-14 2022-05-13 电子科技大学 Intelligent microscope system applied to photoelectric chip microscopic character recognition
CN115063804A (en) * 2022-06-29 2022-09-16 支付宝(杭州)信息技术有限公司 Seal identification and anti-counterfeiting detection method and system
CN115187978A (en) * 2022-08-08 2022-10-14 杭州实在智能科技有限公司 Complex background seal identification method based on deep learning
CN116416626A (en) * 2023-06-12 2023-07-11 平安银行股份有限公司 Method, device, equipment and storage medium for acquiring circular seal data
CN116416626B (en) * 2023-06-12 2023-08-29 平安银行股份有限公司 Method, device, equipment and storage medium for acquiring circular seal data

Similar Documents

Publication Publication Date Title
CN113887337A (en) Seal identification method and system with bent text and storage medium
JP4676225B2 (en) Method and apparatus for capturing electronic forms from scanned documents
CN106980856B (en) Formula identification method and system and symbolic reasoning calculation method and system
WO2018108129A1 (en) Method and apparatus for use in identifying object type, and electronic device
CN109919160B (en) Verification code identification method, device, terminal and storage medium
JP6793885B1 (en) Image processing system and image processing method
CN112418216B (en) Text detection method in complex natural scene image
CN109343920B (en) Image processing method and device, equipment and storage medium thereof
CN112949455B (en) Value-added tax invoice recognition system and method
CN113158895A (en) Bill identification method and device, electronic equipment and storage medium
CN112115921A (en) True and false identification method and device and electronic equipment
CN113592886A (en) Method and device for examining architectural drawings, electronic equipment and medium
JPH06301781A (en) Method and equipment for image transformation for pattern recognition by computer
CN116597466A (en) Engineering drawing text detection and recognition method and system based on improved YOLOv5s
EP4130966A1 (en) Gesture stroke recognition in touch-based user interface input
CN117496521A (en) Method, system and device for extracting key information of table and readable storage medium
CN113780040A (en) Lip key point positioning method and device, storage medium and electronic equipment
CN111274863A (en) Text prediction method based on text peak probability density
CN116678888A (en) Component defect detection method and device
CN116246161A (en) Method and device for identifying target fine type of remote sensing image under guidance of domain knowledge
CN116884006A (en) Mathematical problem solving method and system combining visual scanning recognition and correction
CN116630610A (en) ROI region extraction method based on semantic segmentation model and conditional random field
CN113658195B (en) Image segmentation method and device and electronic equipment
EP2573694A1 (en) Conversion method and system
Jiang et al. Filtering of airborne LiDAR point clouds for complex cityscapes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination