CN112101346A - Verification code identification method and device based on target detection - Google Patents

Verification code identification method and device based on target detection Download PDF

Info

Publication number
CN112101346A
CN112101346A CN202010881077.XA CN202010881077A CN112101346A CN 112101346 A CN112101346 A CN 112101346A CN 202010881077 A CN202010881077 A CN 202010881077A CN 112101346 A CN112101346 A CN 112101346A
Authority
CN
China
Prior art keywords
verification code
prediction
characters
target detection
information
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
CN202010881077.XA
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.)
Southern Hospital Southern Medical University
Original Assignee
Southern Hospital Southern Medical University
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 Southern Hospital Southern Medical University filed Critical Southern Hospital Southern Medical University
Priority to CN202010881077.XA priority Critical patent/CN112101346A/en
Publication of CN112101346A publication Critical patent/CN112101346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/635Overlay text, e.g. embedded captions in a TV program
    • 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
    • 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/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (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)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a verification code identification method and a verification code identification device based on target detection, wherein the method comprises the following steps: inputting the received verification code picture into a target detection network, wherein output data comprises at least one prediction result corresponding to each character, and the prediction result comprises a predicted character, coordinate information of the predicted character and prediction confidence information; and selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining the identification result of the verification code. The verification code identification method and device based on target detection provided by the embodiment of the invention can realize identification of the sequence of characters in the verification code picture, can distinguish the same characters in the verification code picture, is not limited by the length of the verification code in the identification process, and can realize random length of the verification code, thereby greatly improving the precision and flexibility of verification code identification.

Description

Verification code identification method and device based on target detection
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a verification code identification method and device based on target detection.
Background
The existing identifying code identifying method mainly comprises the steps of manufacturing a training set through manual marking and then utilizing a classification network to carry out classification and identification. When the verification code is manually marked, characters, numbers and the like contained in the verification code are marked, and the number of the characters in each training sample picture is usually the same.
The identifying precision of the identifying model of the identifying code trained by the training method is low, which is reflected in that the character sequence of the identifying code has low predicting precision, the identifying code containing the same character has low predicting precision and the like, and the length of the identifying code can not be set arbitrarily, so that the flexibility is poor.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a verification code identification method and device based on target detection.
In a first aspect, an embodiment of the present invention provides a verification code identification method based on target detection, where the method includes: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
Further, the prediction confidence information comprises location confidence information and category confidence information; the position confidence information is used for reflecting the confidence degree of the coordinate information, and the category confidence information is used for reflecting the confidence degree of the predicted character.
Further, the coordinate information includes at least one vertex coordinate corresponding to a rectangular boundary of each of the predicted characters, and the vertex coordinates of each of the predicted characters are of the same type.
Further, the coordinate information includes coordinates of two opposite vertices of the rectangular boundary.
Further, the method further comprises: and generating the verification code sample picture, and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby automatically generating a training sample set for training the target detection network.
Further, the object detection network comprises yolov3 network.
Further, the preset threshold is 0.8.
In a second aspect, an embodiment of the present invention provides an apparatus for identifying a verification code based on target detection, where the apparatus includes: a prediction result output module to: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; a verification code identification module to: selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method as provided in the first aspect.
According to the verification code identification method and device based on target detection provided by the embodiment of the invention, the verification code picture is input into the target detection network, the prediction results comprising the predicted characters, the coordinate information of the predicted characters and the prediction confidence information are output, the prediction results are sequenced according to the confidence information to obtain the verification code identification result, the sequence of the characters in the verification code picture can be identified, the same characters in the verification code picture can be distinguished, the identification process is not limited by the length of the verification code, and the length of the verification code can be any, so that the precision and the flexibility of verification code identification are greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a verification code identification method based on object detection according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for identifying a verification code based on object detection according to an embodiment of the present invention;
fig. 3 illustrates a physical structure diagram of an electronic device.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a verification code identification method based on target detection according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step 101, inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, and coordinate information and confidence information of the predicted characters; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing all characters and coordinate information of all characters in the verification code sample picture.
The identifying device of identifying code based on target detection inputs the identifying code picture received to the target detection network trained in advance, the target detection network can identify the character and the position information of the character in the picture, the output data of the target detection network includes at least one prediction result corresponding to each character in the identifying code picture, namely corresponding to each character in the identifying code picture, and a plurality of prediction results can be output. The prediction result includes a predicted character (i.e., a character whose specific content is predicted), coordinate information of the predicted character, and prediction confidence information. The prediction confidence information is used to reflect the confidence level of the prediction result, and may be represented by a score, for example. The characters in the verification code picture and the verification code sample picture can be letters, numbers, characters and the like.
The target detection network is a pre-trained network used for identifying the verification code. When the target detection network is trained, the identifying code sample picture is taken as input, and the characters in the identifying code sample picture and the coordinate information of the characters are taken as output labels to be trained.
And 102, selecting a plurality of prediction results of which the confidence information is greater than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information to obtain a verification code identification result.
The numerical value of the confidence degree information reflects the credibility of the prediction result, and the higher the value is, the more accurate the prediction result is. In the embodiment of the invention, a preset threshold of the confidence information can be set, and when the confidence information is considered to be greater than the preset threshold, the prediction result is accurate and credible. Because each character may have a plurality of prediction results, the screening among the plurality of prediction results can be realized through the preset threshold value, so that a more accurate prediction result can be obtained.
And screening the prediction result corresponding to each character according to a preset threshold value, wherein the screening prediction result is larger than the preset threshold value, so that the retained prediction result of each character is most accurate. After a plurality of prediction results with confidence level information in the prediction results of each character being larger than a preset threshold value are obtained, sorting the prediction characters in the prediction results according to corresponding coordinate information, and thus sorting the prediction characters of characters at different positions in the input verification code picture according to the coordinate information, and obtaining the final verification code recognition result.
According to the identifying method of the identifying code provided by the embodiment of the invention, the identifying code picture is input into the target detection network, the prediction result comprising the predicted character, the coordinate information of the predicted character and the prediction confidence information is output, the prediction results are sequenced according to the confidence information to obtain the identifying result of the identifying code, the sequence of the characters in the identifying code picture can be identified, the same characters in the identifying code picture can be distinguished, the identifying process is not limited by the length of the identifying code, and the length of the identifying code can be any, so that the identifying precision and the identifying flexibility of the identifying code are greatly improved.
Further, based on the above embodiment, the prediction confidence information includes location confidence information and category confidence information; the position confidence information is used for reflecting the confidence degree of the coordinate information, and the category confidence information is used for reflecting the confidence degree of the predicted character.
The prediction confidence information in the prediction result output by the target detection network and corresponding to each character in the verification code picture comprises position confidence information and category confidence information. The position confidence information is used for reflecting the confidence degree of the coordinate information in the prediction result, and the category confidence information is used for reflecting the confidence degree of the predicted character in the prediction result.
When a plurality of prediction results of which the prediction confidence information is greater than the preset threshold value in the prediction results are selected, a plurality of prediction results of which the position confidence information and the category confidence information are both greater than the set preset threshold value can be selected, and the prediction characters in the plurality of prediction results are sorted according to the coordinate information, so that the verification code recognition result is obtained.
On the basis of the above embodiments, the embodiment of the present invention further improves the prediction accuracy by including, in the prediction confidence information, position confidence information for reflecting the degree of confidence in the coordinate information and category confidence information for reflecting the degree of confidence in the predicted character.
Further, based on the above-described embodiment, the coordinate information includes at least one vertex coordinate corresponding to a rectangular boundary of each of the predicted characters, and the types of the vertex coordinates of each of the predicted characters are identical.
The position of each predicted character may be represented by a rectangular boundary. The coordinate information in the prediction result includes at least one vertex coordinate corresponding to a rectangular boundary of each of the predicted characters. This vertex coordinate may be at least one of an upper left coordinate, a lower right coordinate, a lower left coordinate, and an upper right coordinate. In order to facilitate distinguishing the positional relationship of the respective predicted characters, the vertex coordinates of each of the predicted characters are of the same type. For example, the coordinate is selected as the upper left coordinate. The position discrimination by using the upper left coordinate may be more suitable for the usual usage habit.
It should be noted that no matter what form the coordinate information is selected for representation, it needs to be satisfied that the positional relationship of each predicted character can be effectively distinguished by using the representation form.
On the basis of the above embodiment, the embodiment of the present invention performs coordinate information representation by using at least one vertex coordinate of the rectangular boundary of the predicted character, which is beneficial to distinguishing the position relationship of the predicted character, and further improves the prediction accuracy.
Further, based on the above embodiment, the coordinate information includes coordinates of two opposite vertices of the rectangular boundary.
The discrimination of the positional relationship of the predicted character can be achieved by using one vertex position of the rectangular boundary. However, if the coordinates of two opposite vertices of the rectangular boundary (e.g., the upper left coordinate and the lower right coordinate) are used to represent the coordinate information, the determination of the position of the character can be achieved when the size of the character is different, that is, the position of the predicted character is defined by the coordinates of two opposite vertices of the rectangular boundary, which is beneficial to outputting a more accurate result when outputting the recognition result of the recognized verification code.
On the basis of the above embodiment, the embodiment of the present invention further improves the prediction accuracy by including the coordinates of two opposite vertices of the rectangular boundary in the coordinate information.
Further, based on the above embodiment, the method further includes: and generating the verification code sample picture, and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby automatically generating a training sample set for training the target detection network.
In order to overcome the defect of the existing manual labeling of the training samples, the embodiment of the invention generates the training sample set for training the target detection network in an automatic mode. The method specifically comprises the following steps: and generating the verification code sample picture, automatically recording each character and the coordinate information of each character in the verification code sample picture, and performing training of a target detection network by taking the verification code sample picture as input and the coordinate information of each character and each character as output, thereby automatically generating a training sample set for training the target detection network.
The method for generating the verification code sample picture can be implemented by adopting the prior art. Taking a python scroll library as an example, the process comprises the steps of sequentially creating a canvas, a painting brush and defining fonts, firstly randomly generating verification code content, drawing the verification code content on the canvas, randomly transforming the drawn content, and finally randomly drawing a plurality of dotted lines on the canvas to generate a final verification code sample picture. And after the drawn content is randomly transformed, extracting information to obtain each character and the coordinate information of each character in the verification code sample picture.
On the basis of the embodiment, the embodiment of the invention automatically generates the training sample set for training the target detection network by generating the verification code sample picture and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby realizing the automatic generation of the training data set, improving the automation degree and saving the labor cost.
Further, based on the above embodiments, the object detection network comprises yolov3 network.
On the basis of the above embodiment, the embodiment of the invention further improves the accuracy of identifying the verification code by using the yolov3 network to detect the target.
Further, based on the above embodiment, the preset threshold is 0.8.
On the basis of the above embodiment, in the embodiment of the present invention, the preset threshold of the prediction confidence information is set to be 0.8, and the predicted characters in the prediction result with the prediction confidence information greater than 0.8 are sorted according to the coordinate information, so as to obtain the verification code recognition result, thereby further improving the verification code recognition accuracy.
The following further describes the flow of the verification code identification method based on target detection according to an embodiment of the present invention with a specific example.
1. And (5) making a training set. Taking the example of generating the captcha with the character 'abcd', the upper left, lower right coordinates of 'a', 'b', 'c','d' in the captcha map and the character itself constitute four training set data, i.e., 'a', (x1, y1), (x2, y 2); ', (x1, y1), (x2, y 2); "c", (x1, y1), (x2, y 2); 'd', (x1, y1), (x2, y 2).
2. Training was performed using yolov 3.
3. Model reasoning, wherein each verification code obtains n pieces of prediction information. The information content includes: (x1, y1, x2, y2, conf, cls _ conf, cls _ pred), wherein (x1, y1), (x2, y2) are the upper left and lower right coordinates of the predicted character, conf and cls _ conf are the position confidence and the category confidence, respectively, and cls _ pred is the specific content of the prediction.
4. And (5) taking m pieces of data with conf and cls _ conf both larger than 0.8, sorting the data according to the value of x1, and arranging m preds in a descending order to form an output result.
The verification code identification method based on target detection provided by the embodiment of the invention has the following characteristics:
the training data set is automatically generated: when the verification code is generated, the coordinates of the upper left point, the lower right point and the character content of each character of the verification code are recorded, and a training set txt file is automatically generated.
The test precision is improved: the embodiment of the invention utilizes yolov3 network to train, when reasoning, the generated data format is (x1, y1, x2, y2, conf, cls _ conf, cls _ pred), wherein (x1, y1), (x2, y2) are respectively the upper left coordinate and the lower right coordinate of the predicted character, conf and cls _ conf are respectively the position confidence coefficient and the category confidence coefficient, and cls _ pred is the specific content of prediction, and all the predicted characters are sequenced according to x1, so that the final sequence can be obtained, the method is simple and efficient, the test is carried out by ten thousand test pictures, the accuracy reaches more than 97 percent (± 2 percent), and the problem of verifying the same character in the code character string is solved.
The length of the verification code can be any: the method used by the embodiment of the invention takes the first m predicted characters as final characters according to conf and cls _ conf (namely position confidence and category confidence), thereby realizing the requirement of any length of the verification code.
Fig. 2 is a schematic structural diagram of an apparatus for identifying a verification code based on object detection according to an embodiment of the present invention. As shown in fig. 2, the apparatus includes a prediction result output module 10 and a verification code identification module 20, wherein: the prediction result output module 10 is configured to: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; the verification code identification module 20 is configured to: selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
According to the identifying method of the identifying code provided by the embodiment of the invention, the identifying code picture is input into the target detection network, the prediction result comprising the predicted character, the coordinate information of the predicted character and the prediction confidence information is output, the prediction results are sequenced according to the confidence information to obtain the identifying result of the identifying code, the sequence of the characters in the identifying code picture can be identified, the same characters in the identifying code picture can be distinguished, the identifying process is not limited by the length of the identifying code, and the length of the identifying code can be any, so that the identifying precision and the identifying flexibility of the identifying code are greatly improved.
Further, the prediction confidence information comprises location confidence information and category confidence information; the position confidence information is used for reflecting the confidence degree of the coordinate information, and the category confidence information is used for reflecting the confidence degree of the predicted character.
On the basis of the above embodiments, the embodiment of the present invention further improves the prediction accuracy by including, in the prediction confidence information, position confidence information for reflecting the degree of confidence in the coordinate information and category confidence information for reflecting the degree of confidence in the predicted character.
Further, the coordinate information includes at least one vertex coordinate corresponding to a rectangular boundary of each of the predicted characters, and the vertex coordinates of each of the predicted characters are of the same type.
On the basis of the above embodiment, the embodiment of the present invention performs coordinate information representation by using at least one vertex coordinate of the rectangular boundary of the predicted character, which is beneficial to distinguishing the position relationship of the predicted character, and further improves the prediction accuracy.
Further, the coordinate information includes coordinates of two opposite vertices of the rectangular boundary.
On the basis of the above embodiment, the embodiment of the present invention further improves the prediction accuracy by including the coordinates of two opposite vertices of the rectangular boundary in the coordinate information.
Further, the apparatus further comprises a training sample set constructing module configured to: and generating the verification code sample picture, and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby automatically generating a training sample set for training the target detection network.
On the basis of the embodiment, the embodiment of the invention automatically generates the training sample set for training the target detection network by generating the verification code sample picture and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby realizing the automatic generation of the training data set, improving the automation degree and saving the labor cost.
Further, the object detection network comprises yolov3 network.
On the basis of the above embodiment, the embodiment of the invention further improves the accuracy of identifying the verification code by using the yolov3 network to detect the target.
Further, the preset threshold is 0.8.
On the basis of the above embodiment, in the embodiment of the present invention, the preset threshold of the prediction confidence information is set to be 0.8, and the predicted characters in the prediction result with the prediction confidence information greater than 0.8 are sorted according to the coordinate information, so as to obtain the verification code recognition result, thereby further improving the verification code recognition accuracy.
The apparatus provided in the embodiment of the present invention is used for the method, and specific functions may refer to the method flow described above, which is not described herein again.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor)310, a communication Interface (communication Interface)320, a memory (memory)330 and a communication bus 340, wherein the processor 310, the communication Interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to perform a target detection based captcha identification method comprising: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer is capable of executing the target detection-based verification code identification method provided by the above-mentioned method embodiments, where the method includes: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
In yet another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the object detection-based verification code identification method provided in the foregoing embodiments, and the method includes: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture; selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A verification code identification method based on target detection is characterized by comprising the following steps:
inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture;
selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
2. The object detection-based captcha identification method of claim 1, wherein the prediction confidence information comprises location confidence information and category confidence information; the position confidence information is used for reflecting the confidence degree of the coordinate information, and the category confidence information is used for reflecting the confidence degree of the predicted character.
3. The object-detection-based captcha identifying method of claim 1, wherein the coordinate information includes at least one vertex coordinate corresponding to a rectangular boundary of each of the predicted characters, and the types of the vertex coordinates of each of the predicted characters are identical.
4. The object-detection-based captcha identification method of claim 3, wherein said coordinate information comprises coordinates of two opposite vertices of said rectangular boundary.
5. The object detection-based captcha identification method of claim 1, further comprising:
and generating the verification code sample picture, and automatically recording each character and the coordinate information of each character in the verification code sample picture, thereby automatically generating a training sample set for training the target detection network.
6. The object-detection-based captcha identification method of claim 1, wherein the object-detection network comprises yolov3 network.
7. The object detection-based authentication code identification method according to claim 1, wherein the preset threshold is 0.8.
8. An apparatus for identifying a verification code based on object detection, comprising:
a prediction result output module to: inputting a received verification code picture into a pre-trained target detection network, wherein output data of the target detection network comprises at least one prediction result corresponding to each character in the verification code picture, and the prediction results comprise predicted characters, coordinate information of the predicted characters and prediction confidence information; the target detection network is obtained by taking a verification code sample picture as input and training output labels containing characters and coordinate information of the characters in the verification code sample picture;
a verification code identification module to: selecting a plurality of prediction results of which the prediction confidence information is larger than a preset threshold value in the prediction results, and sequencing the prediction characters in the prediction results according to the coordinate information, thereby obtaining a verification code identification result.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the object detection-based captcha identification method according to any one of claims 1 to 7 when executing the computer program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the object detection-based captcha identification method according to any one of claims 1 to 7.
CN202010881077.XA 2020-08-27 2020-08-27 Verification code identification method and device based on target detection Pending CN112101346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010881077.XA CN112101346A (en) 2020-08-27 2020-08-27 Verification code identification method and device based on target detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010881077.XA CN112101346A (en) 2020-08-27 2020-08-27 Verification code identification method and device based on target detection

Publications (1)

Publication Number Publication Date
CN112101346A true CN112101346A (en) 2020-12-18

Family

ID=73758096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010881077.XA Pending CN112101346A (en) 2020-08-27 2020-08-27 Verification code identification method and device based on target detection

Country Status (1)

Country Link
CN (1) CN112101346A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883965A (en) * 2021-02-08 2021-06-01 中兴盛达电气技术(郑州)有限公司 Date detection method on packaging vessel, electronic device and computer-readable storage medium
CN112949514A (en) * 2021-03-09 2021-06-11 广州文石信息科技有限公司 Scanned document information processing method and device, electronic equipment and storage medium
WO2022095318A1 (en) * 2020-11-06 2022-05-12 上海商汤智能科技有限公司 Character detection method and apparatus, electronic device, storage medium, and program

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022328A (en) * 2016-05-11 2016-10-12 上海应用技术学院 Method for identifying complicated verification code
CN107977659A (en) * 2016-10-25 2018-05-01 北京搜狗科技发展有限公司 A kind of character recognition method, device and electronic equipment
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN108399405A (en) * 2017-02-07 2018-08-14 腾讯科技(上海)有限公司 Business license recognition methods and device
CN109034149A (en) * 2017-06-08 2018-12-18 北京君正集成电路股份有限公司 A kind of character identifying method and device
CN109858542A (en) * 2019-01-25 2019-06-07 广州云测信息技术有限公司 A kind of character identifying method and device
CN110188761A (en) * 2019-04-22 2019-08-30 平安科技(深圳)有限公司 Recognition methods, device, computer equipment and the storage medium of identifying code
CN110569853A (en) * 2019-09-12 2019-12-13 南京红松信息技术有限公司 Target positioning-based independent formula segmentation method
CN111428723A (en) * 2020-04-02 2020-07-17 苏州杰锐思智能科技股份有限公司 Character recognition method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022328A (en) * 2016-05-11 2016-10-12 上海应用技术学院 Method for identifying complicated verification code
CN107977659A (en) * 2016-10-25 2018-05-01 北京搜狗科技发展有限公司 A kind of character recognition method, device and electronic equipment
CN108399405A (en) * 2017-02-07 2018-08-14 腾讯科技(上海)有限公司 Business license recognition methods and device
CN109034149A (en) * 2017-06-08 2018-12-18 北京君正集成电路股份有限公司 A kind of character identifying method and device
CN108182437A (en) * 2017-12-29 2018-06-19 北京金堤科技有限公司 One kind clicks method for recognizing verification code, device and user terminal
CN109858542A (en) * 2019-01-25 2019-06-07 广州云测信息技术有限公司 A kind of character identifying method and device
CN110188761A (en) * 2019-04-22 2019-08-30 平安科技(深圳)有限公司 Recognition methods, device, computer equipment and the storage medium of identifying code
CN110569853A (en) * 2019-09-12 2019-12-13 南京红松信息技术有限公司 Target positioning-based independent formula segmentation method
CN111428723A (en) * 2020-04-02 2020-07-17 苏州杰锐思智能科技股份有限公司 Character recognition method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
宋人杰;刘娟;: "基于模糊聚类与RBF网络集成分类器的验证码识别", 东北电力大学学报, no. 04, pages 44 - 47 *
杨建 等: "基于深度学习的方坯号识别系统设计", 《工业控制计算机》, vol. 32, no. 4, 31 December 2019 (2019-12-31), pages 40 - 41 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022095318A1 (en) * 2020-11-06 2022-05-12 上海商汤智能科技有限公司 Character detection method and apparatus, electronic device, storage medium, and program
CN112883965A (en) * 2021-02-08 2021-06-01 中兴盛达电气技术(郑州)有限公司 Date detection method on packaging vessel, electronic device and computer-readable storage medium
CN112949514A (en) * 2021-03-09 2021-06-11 广州文石信息科技有限公司 Scanned document information processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112101346A (en) Verification code identification method and device based on target detection
CN111667066B (en) Training method and device of network model, character recognition method and device and electronic equipment
CN109343920B (en) Image processing method and device, equipment and storage medium thereof
CN112070138B (en) Construction method of multi-label mixed classification model, news classification method and system
CN111626177B (en) PCB element identification method and device
CN111191067A (en) Picture book identification method, terminal device and computer readable storage medium
CN111612081B (en) Training method, device, equipment and storage medium for recognition model
CN111159417A (en) Method, device and equipment for extracting key information of text content and storage medium
CN111767883A (en) Title correction method and device
CN110276352A (en) Identification recognition method and device, electronic equipment and computer readable storage medium
CN114691525A (en) Test case selection method and device
CN114330588A (en) Picture classification method, picture classification model training method and related device
CN115344699A (en) Training method and device of text classification model, computer equipment and medium
CN113591881B (en) Intention recognition method and device based on model fusion, electronic equipment and medium
CN112613367A (en) Bill information text box acquisition method, system, equipment and storage medium
CN115618043B (en) Text operation graph mutual inspection method and model training method, device, equipment and medium
CN111539390A (en) Small target image identification method, equipment and system based on Yolov3
CN110765872A (en) Online mathematical education resource classification method based on visual features
CN113469188B (en) Data enhancement and character recognition method and device for training character recognition model
CN116246161A (en) Method and device for identifying target fine type of remote sensing image under guidance of domain knowledge
CN113705559B (en) Character recognition method and device based on artificial intelligence and electronic equipment
JP7420578B2 (en) Form sorting system, form sorting method, and program
CN110909737A (en) Picture character recognition method and system
CN113641746B (en) Document structuring method, device, electronic equipment and storage medium
JP2014092817A (en) Character recognition device and program

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