CN111079571A - Identification card information identification and edge detection model training method and device - Google Patents

Identification card information identification and edge detection model training method and device Download PDF

Info

Publication number
CN111079571A
CN111079571A CN201911200237.3A CN201911200237A CN111079571A CN 111079571 A CN111079571 A CN 111079571A CN 201911200237 A CN201911200237 A CN 201911200237A CN 111079571 A CN111079571 A CN 111079571A
Authority
CN
China
Prior art keywords
card
picture
edge
certificate
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
CN201911200237.3A
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.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream 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 Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN201911200237.3A priority Critical patent/CN111079571A/en
Publication of CN111079571A publication Critical patent/CN111079571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a certificate card information identification method and device, an edge detection model training method and device, electronic equipment and a storage medium. The identification method of the certificate card information comprises the following steps: inputting a card picture of a card to be identified into an edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards; performing edge detection on the input card picture through the edge detection model to obtain card edge information, and determining a card area in the card picture according to the card edge information; using a card template of the card with the same type as the card to be identified to perform template matching on the card area so as to position a text identification sub-area in the card area; and performing text recognition on the text recognition subarea to extract card information. Therefore, identification of the card information of different types of cards is realized, and an identification model does not need to be trained for each type of card.

Description

Identification card information identification and edge detection model training method and device
Technical Field
The invention relates to the technical field of information processing, in particular to a certificate card information identification method and device, an edge detection model training method and device, electronic equipment and a storage medium.
Background
With the continuous improvement of the accuracy of the image text recognition technology, the image text recognition technology is more and more applied to the text recognition of certificate card images such as certificates and tickets to extract information in the certificate cards. At present, for identification of different types of card information, an identification model needs to be trained for each type of card, which wastes manpower and computational power.
In addition, in order to eliminate the interference of the background area of the card image on the identification of the card information, before the identification of the card information is performed, edge detection needs to be performed on the acquired card image to acquire the card edge image. At present, all lines in a picture can be identified by a commonly used edge detection model, most lines are not edges of a certificate in the picture, and the extraction of the certificate card edge picture can be interfered, so that the efficiency and the accuracy of information identification of the certificate card picture are influenced.
Disclosure of Invention
The invention provides a certificate card information identification method and device, an edge detection model training method and device, electronic equipment and a storage medium, which have high efficiency and high accuracy and can be used for carrying out certificate information identification on different types of certificates.
Specifically, the invention is realized by the following technical scheme:
in a first aspect, a method for identifying card information is provided, the method comprising:
inputting a card picture of a card to be identified into an edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards;
performing edge detection on the input card picture through the edge detection model to obtain card edge information, and determining a card area in the card picture according to the card edge information;
using a card template of the card with the same type as the card to be identified to perform template matching on the card area so as to position a text identification sub-area in the card area;
and performing text recognition on the text recognition subarea to extract card information.
Optionally, training the edge detection model by using identification card picture samples of different types of identification cards, including:
obtaining card picture samples of different types of cards, wherein the card picture samples are marked with card edge marking information;
extracting a card edge picture from the card picture sample, and embedding the obtained card edge picture into other background pictures to obtain a synthetic picture marked with card edge marking information;
taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process;
and adjusting the network parameters of the neural network based on the difference until the training is finished when the training stopping condition is met, so as to obtain the edge detection model.
Optionally, after the acquired certificate card edge picture is embedded into another background picture, the method further includes:
and adjusting the picture parameters of the card edge picture according to the picture parameters of the other background pictures.
Optionally, the picture parameters include at least one of the following parameters:
pixel value, brightness, color depth.
Optionally, the card edge information includes: a plurality of point coordinates;
determining a card area in the card picture according to the card edge information, including:
carrying out Hough transform on the coordinates of the plurality of points to obtain a plurality of line segments;
merging two line segments of which the difference of the inclination angles is smaller than an inclination angle threshold value and the line segment distance is smaller than a distance threshold value;
and determining the card identification area according to the combined line segment.
Optionally, before performing template matching on the certificate area by using a certificate template of the certificate card of which the type is the same as that of the certificate card to be identified, the method includes:
inputting the certificate card picture of the certificate card to be identified into a certificate type identification model, wherein the certificate type identification model is trained by adopting the certificate card picture containing certificate type marking information;
and extracting the characteristics of the input certificate card picture through the certificate type identification model, and determining the type of the certificate card to be identified according to the characteristics so as to obtain a certificate card template of the certificate card with the same type as the certificate card to be identified.
Optionally, before performing template matching on the identification card area by using the identification card template, the method further includes:
and performing inclination correction and/or size correction on the card area according to the card template.
In a second aspect, a training method of an edge detection model is provided, where the training method includes:
obtaining card picture samples of different types of cards, wherein the card picture samples are marked with edge marking information;
extracting a card edge picture from the card picture sample, and embedding the obtained card edge picture into other background pictures to obtain a synthetic picture marked with card edge marking information;
taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process;
and adjusting the network parameters of the neural network based on the difference until the training is finished when the training stopping condition is met, so as to obtain the edge detection model.
In a third aspect, there is provided an identification card information identifying apparatus comprising:
the input module is used for inputting the card picture of the card to be identified into the edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards;
the determining module is used for carrying out edge detection on the input card picture through the edge detection model to obtain card edge information and determining a card area in the card picture according to the card edge information;
the matching module is used for performing template matching on the certificate card area by using a certificate card template of the certificate card with the same type as the type of the certificate card to be identified so as to position a text identification sub-area in the certificate card area;
and the text recognition module is used for performing text recognition on the text recognition sub-area so as to extract the information of the certificate card.
In a fourth aspect, a training apparatus for an edge detection model is provided, the training apparatus comprising:
the acquisition module is used for acquiring card picture samples of different types of cards, and the card picture samples are marked with edge marking information;
the picture synthesis module is used for extracting a card edge picture from the card picture sample, and embedding the acquired card edge picture into other background pictures to obtain a synthesized picture marked with card edge marking information;
the model training module is used for taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
and the parameter adjusting module is used for determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process, adjusting the network parameters of the neural network based on the difference until the training stopping condition is met, and ending the training to obtain the edge detection model.
In a fifth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the identification method of the identification card information according to any one of the first aspect is implemented.
In a sixth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method for training an edge detection model according to the second aspect.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
in the embodiment of the invention, the identification of the information of the cards of different types is realized, and an identification model does not need to be trained for each type of card. And the edge detection model is obtained by training the card picture samples of different types of cards, so that the card area in the picture can be accurately identified, and the accuracy of card information identification is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a method for identification of credential card information in accordance with an exemplary embodiment of the present invention;
FIG. 2 is a diagram illustrating the result of edge detection on a credential card image in accordance with an exemplary embodiment of the present invention;
FIG. 3 is a diagram illustrating the result of template matching for a license card region in accordance with an exemplary embodiment of the present invention;
FIG. 4 is a flowchart illustrating in detail the step of determining an identification card area in an identification card picture according to identification card edge information in FIG. 1, according to an exemplary embodiment of the invention;
FIG. 5 is a diagram illustrating merging of line segments in accordance with an exemplary embodiment of the present invention;
FIG. 6 is a flowchart illustrating the steps of determining the type of identification card to be identified in accordance with an exemplary embodiment of the present invention;
FIG. 7 is a flow chart illustrating a method for training an edge detection model in accordance with an exemplary embodiment of the present invention;
FIG. 8 is a block diagram of an identification card information identification apparatus according to an exemplary embodiment of the present invention;
FIG. 9 is a block diagram of an apparatus for training an edge detection model according to an exemplary embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating an identification method of identification card information according to an exemplary embodiment of the present invention, where the method includes the following steps:
step 101, inputting a card picture of a card to be identified into an edge detection model.
In step 101, a card to be identified may be subjected to image acquisition by a camera to obtain a card picture thereof.
The edge detection model is trained by adopting the card picture samples of different types of cards in advance and is used for carrying out edge detection on the card images of the different types of cards.
And 102, performing edge detection on the input card picture through an edge detection model to obtain card edge information, and determining a card area in the card picture according to the card edge information.
Wherein, card edge information includes: a plurality of point coordinates. In step 102, an identification card area in the identification card picture is determined according to the identification card edge information, that is, an identification card area (see an area a surrounded by a dotted line area in fig. 2) containing identification card information in the identification card picture is determined according to a plurality of point coordinates, and a non-identification card information area (see an area B in fig. 2) is excluded.
And 103, performing template matching on the certificate card area by using the certificate card template of the certificate card with the same type as the type of the certificate card to be identified so as to position the text identification sub-area in the certificate card area.
The certificate template is marked with field area information to position a text recognition sub-area in the certificate card area. Taking the identification card area obtained from fig. 2 as an example, referring to fig. 3, after template matching is performed on the identification card area, text recognition sub-areas a1, a2, a3, a4 and a5 can be obtained.
And step 104, performing text recognition on the text recognition sub-area to extract card information.
In step 104, the text recognition sub-area obtained in step 103 may be, but is not limited to, text recognition using OCR (optical character recognition).
In the embodiment, the identification of the information of the cards of different types is realized, and an identification model does not need to be trained for each type of card. The edge detection model is obtained by training the card picture samples of different types of cards, so that the card area containing card information in the picture can be accurately identified, the non-card information area is eliminated, and the identification accuracy of the card information is improved.
Referring to fig. 4, the following specifically describes the step of determining the identification card area in the identification card picture according to the identification card edge information in step 102 in fig. 1, and specifically includes the following steps:
step 401, hough transform is performed on the coordinates of the plurality of points to obtain a plurality of line segments.
In step 401, the obtained line segments are all possible line segments obtained after connecting point coordinates, and the line segments are represented by expressions. Wherein, the same or similar line segment representations may exist in the line segments expressed by the above expressions, and step 402 needs to be executed to merge the same or similar line segments.
Step 402, merging two line segments, of which the difference of the inclination angles is smaller than an inclination angle threshold value and the line segment distance is smaller than a distance threshold value, in the plurality of line segments.
In step 402, the difference between the tilt angles is smaller than the tilt angle threshold, and the two line segments with the line segment spacing smaller than the spacing threshold are represented by the same or similar line segments and need to be merged. Referring to FIG. 5, line segment l1And l2The difference of the inclination angles of (a) is small and the line segment spacing is also small, which shows the line segment l1And l2If the line belongs to a line segment, the line segment l is divided into1And l2And are merged into a line segment L. Specifically, but not limited to, the line segments may be merged by using a similarity algorithm.
And step 403, determining a card identification area according to the combined line segment.
Specifically, in step 403, the corner points of the combined line segment are obtained, and the card identification area is determined according to all possible combinations of 4 corner points. The possible 4 corner points may be, for example, a combination of 4 points that are obtained by connecting 4 points and that match the ratio of 4 edges of the card edge, and the 4 line segments are determined as the possible 4 corner points. It can be understood that the line segments may be extended when being merged, and the card certification area is determined according to all possible 4 corners, so that the points on the extension lines of the line segments are prevented from being determined as the corners of the card certification area.
In another embodiment, before step 103, the type of the identification card to be identified needs to be determined to obtain an identification card template of the identification card belonging to the same type as the identification card to be identified, and referring to fig. 6, the determining the type of the identification card to be identified includes the following steps:
step 601, inputting the certificate card picture of the certificate card to be identified into the certificate type identification model.
The certificate type identification model adopts certificate card pictures containing certificate type marking information in advance to complete neural network training and is used for identifying the types of the certificate cards. The model training process is introduced as follows:
acquiring a large number of different types of card pictures marked with type marking information; the acquired certificate card pictures are taken as training samples and are sequentially input into a neural network; the method comprises the steps of extracting features of an input certificate card picture through a neural network, determining certificate type prediction information of the certificate card picture according to the extracted features, determining the difference between the certificate type prediction information and certificate type marking information of the corresponding certificate picture, and adjusting network parameters of the neural network based on the difference. And (4) iteratively training the neural network until the iteration times reach a time threshold or the difference between the certificate type prediction information and the certificate type marking information is smaller than a difference threshold, and stopping training to obtain a certificate type recognition model.
And step 602, performing feature extraction on the input certificate card picture through the certificate type identification model, and determining the type of the certificate card to be identified according to the features.
After the type of the card to be identified is determined, obtaining a card template of the card, which is the same as the type of the card to be identified, for example, if the card to be identified is an identity card, obtaining the card template of the identity card; and if the certificate card to be identified is the value-added tax invoice, acquiring a certificate template of the value-added tax invoice.
In order to improve the accuracy of identification of the card information, in another embodiment, before template matching is performed on the card area, inclination correction and/or size correction needs to be performed on the card edge picture according to the card template, so as to adjust the edge of the card area in the card picture to be a regular edge, and the edge size of the card area in the card picture is almost the same as that of the card template. Specifically, the certificate template is used as a correction standard, and the certificate card edge picture can be corrected through perspective transformation without limitation. After correction, the relative position between the information of each certificate in the certificate area is almost absolutely fixed and is the same as the certificate template, so that the text identification subarea in the certificate area can be positioned according to the field area information marked in the certificate template.
Fig. 7 is a flowchart illustrating a method for training an edge detection model according to an exemplary embodiment of the present invention, where the method includes the following steps:
and 701, obtaining card picture samples of different types of cards.
The card image sample is marked with card edge marking information. The identification card edge marking information comprises: a plurality of point coordinates.
And 702, extracting an identification card edge picture from the identification card picture sample, and embedding the acquired identification card edge picture into other background pictures to obtain a synthetic picture marked with identification card edge marking information.
Since the labor consumption for performing edge labeling on the card image is relatively high, in this embodiment, the card edge image containing the card information is obtained from the card image subjected to edge labeling. Taking the identification card picture in fig. 2 as an example, the identification card edge picture is obtained, that is, the area a in fig. 2 is scratched to be the identification card edge picture. And randomly embedding the card edge picture into other background pictures to obtain a synthetic picture with the card edge marking information. The card edge picture can be embedded into a plurality of different background pictures, so that a large number of composite pictures can be obtained.
In another embodiment, after the acquired card edge picture is embedded into other background pictures, the picture parameters of the card edge picture are adjusted according to the picture parameters of the other background pictures. Wherein the picture parameters comprise at least one of the following parameters: pixel value, brightness, color depth, etc. The picture parameters of the card edge picture are adjusted, namely the pixel value, the brightness, the color depth and the like of the card edge picture, particularly the picture parameters of the edge area of the card edge picture are adjusted, so that the synthesized picture is more real, and the accuracy of the model can be improved.
And 703, taking the certificate card picture sample and the synthesized picture as training samples to train the neural network in an iterative way.
And step 704, determining the difference between the certificate card edge prediction information and the certificate card edge marking information output by the neural network in each iteration process.
For example, the difference between the card edge prediction information and the card edge annotation information can be determined by a loss function. The present embodiment does not limit the specific form of the loss function.
Step 705, adjusting network parameters of the neural network based on the difference, and ending the training until the training stopping condition is met to obtain an edge detection model.
The training stopping condition may be, but is not limited to, the number of iterations reaching a threshold number, or the difference between the card edge prediction information and the card edge marking information being less than a difference threshold.
The edge detection model obtained by the training method based on the edge detection model of the embodiment can detect the edge information of different types of cards in the picture, excludes non-card information areas, and has high accuracy.
Corresponding to the embodiments of the identification method of the certificate card information and the training method of the edge detection model, the invention also provides embodiments of a certificate card information identification device and a training device of the edge detection model.
Fig. 8 is a block diagram of a training apparatus for an edge detection model according to an exemplary embodiment of the present invention, where the identification card information recognition apparatus includes: an input module 81, a determination module 82, a matching module 83, and a text recognition module 84.
The input module 81 is used for inputting the card picture of the card to be identified into the edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards;
the determining module 82 is used for performing edge detection on the input card picture through the edge detection model to obtain card edge information, and determining a card area in the card picture according to the card edge information;
the matching module 83 is used for performing template matching on the certificate area by using a certificate template of the certificate card with the same type as that of the certificate card to be identified so as to position a text identification sub-area in the certificate card area;
the text recognition module 84 is configured to perform text recognition on the text recognition sub-area to extract the identification card information.
Optionally, the identification card information identification apparatus further includes: a model training module;
the model training module is configured to:
obtaining card picture samples of different types of cards, wherein the card picture samples are marked with card edge marking information;
extracting a card edge picture from the card picture sample, and embedding the obtained card edge picture into other background pictures to obtain a synthetic picture marked with card edge marking information;
taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process;
and adjusting the network parameters of the neural network based on the difference until the training is finished when the training stopping condition is met, so as to obtain the edge detection model.
Optionally, the model training module is further configured to:
and adjusting the picture parameters of the card edge picture according to the picture parameters of the other background pictures.
Optionally, the card edge information includes: a plurality of point coordinates;
when the identification card area in the identification card picture is determined according to the identification card edge information, the determination module is used for:
carrying out Hough transform on the coordinates of the plurality of points to obtain a plurality of line segments;
merging two line segments of which the difference of the inclination angles is smaller than an inclination angle threshold value and the line segment distance is smaller than a distance threshold value;
and determining the card identification area according to the combined line segment.
Optionally, the identification card information identification apparatus further includes: a type determination module;
the type determination module is configured to:
inputting the certificate card picture of the certificate card to be identified into a certificate type identification model, wherein the certificate type identification model is trained by adopting the certificate card picture containing certificate type marking information;
and extracting the characteristics of the input certificate card picture through the certificate type identification model, and determining the type of the certificate card to be identified according to the characteristics so as to obtain a certificate card template of the certificate card with the same type as the certificate card to be identified.
Optionally, the identification card information identification apparatus further includes:
and the correction module is used for performing inclination correction and/or size correction on the card area according to the card template.
Fig. 9 is a block diagram of a training apparatus for an edge detection model according to an exemplary embodiment of the present invention, the training apparatus including: an acquisition module 91, a picture synthesis module 92, a model training module 93 and a parameter adjustment module 94.
The acquisition module 91 is used for acquiring card picture samples of different types of cards, wherein the card picture samples are marked with edge marking information;
the picture synthesis module 92 is configured to extract a card edge picture from the card picture sample, and embed the acquired card edge picture into other background pictures to obtain a synthesis picture labeled with card edge labeling information;
the model training module 93 is used for taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
the parameter adjusting module 94 is configured to determine a difference between the credential edge prediction information output by the neural network and the credential edge label information in each iteration, and adjust a network parameter of the neural network based on the difference until the training is finished when a training stop condition is met, so as to obtain the edge detection model.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and shows a block diagram of an exemplary electronic device 100 suitable for implementing an embodiment of the present invention. The electronic device 100 shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 10, the electronic device 100 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 100 may include, but are not limited to: the at least one processor 101, the at least one memory 102, and a bus 103 connecting the various system components (including the memory 102 and the processor 101).
The bus 103 includes a data bus, an address bus, and a control bus.
The memory 102 may include volatile memory, such as Random Access Memory (RAM)1021 and/or cache memory 1022, and may further include Read Only Memory (ROM) 1023.
Memory 102 may also include a program tool 1025 (or utility tool) having a set (at least one) of program modules 1024, such program modules 1024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 101 executes various functional applications and data processing, such as the methods provided by any of the above embodiments, by running a computer program stored in the memory 102.
The electronic device 100 may also communicate with one or more external devices 104 (e.g., keyboard, pointing device, etc.). Such communication may be through an input/output (I/O) interface 105. Also, the model-generated electronic device 100 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 106. As shown, network adapter 106 communicates with the other modules of model-generated electronic device 100 over bus 103. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generated electronic device 100, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. A card information identification method is characterized by comprising the following steps:
inputting a card picture of a card to be identified into an edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards;
performing edge detection on the input card picture through the edge detection model to obtain card edge information, and determining a card area in the card picture according to the card edge information;
using a card template of the card with the same type as the card to be identified to perform template matching on the card area so as to position a text identification sub-area in the card area;
and performing text recognition on the text recognition subarea to extract card information.
2. The identification method of card information as in claim 1, wherein training the edge detection model using card picture samples of different types of cards comprises:
obtaining card picture samples of different types of cards, wherein the card picture samples are marked with card edge marking information;
extracting a card edge picture from the card picture sample, and embedding the obtained card edge picture into other background pictures to obtain a synthetic picture marked with card edge marking information;
taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process;
and adjusting the network parameters of the neural network based on the difference until the training is finished when the training stopping condition is met, so as to obtain the edge detection model.
3. The identification method of card information of claim 2, wherein after embedding the acquired card edge picture into other background pictures, further comprising:
and adjusting the picture parameters of the card edge picture according to the picture parameters of the other background pictures.
4. The identification method of card information as claimed in claim 3, wherein the picture parameters include at least one of the following parameters:
pixel value, brightness, color depth.
5. The identification method of card information of claim 1, wherein the card edge information comprises: a plurality of point coordinates;
determining a card area in the card picture according to the card edge information, including:
carrying out Hough transform on the coordinates of the plurality of points to obtain a plurality of line segments;
merging two line segments of which the difference of the inclination angles is smaller than an inclination angle threshold value and the line segment distance is smaller than a distance threshold value;
and determining the card identification area according to the combined line segment.
6. The identification method of the identification card information as claimed in claim 1, wherein before the template matching of the identification card area is performed by using the identification card template of the identification card with the same type as the identification card to be identified, the method comprises:
inputting the certificate card picture of the certificate card to be identified into a certificate type identification model, wherein the certificate type identification model is trained by adopting the certificate card picture containing certificate type marking information;
and extracting the characteristics of the input certificate card picture through the certificate type identification model, and determining the type of the certificate card to be identified according to the characteristics so as to obtain a certificate card template of the certificate card with the same type as the certificate card to be identified.
7. The identification method of card information of claim 1, wherein before template matching is performed on the card area using the card template, further comprising:
and performing inclination correction and/or size correction on the card area according to the card template.
8. A training method of an edge detection model, the training method comprising:
obtaining card picture samples of different types of cards, wherein the card picture samples are marked with edge marking information;
extracting a card edge picture from the card picture sample, and embedding the obtained card edge picture into other background pictures to obtain a synthetic picture marked with card edge marking information;
taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process;
and adjusting the network parameters of the neural network based on the difference until the training is finished when the training stopping condition is met, so as to obtain the edge detection model.
9. An identification card information recognition apparatus, comprising:
the input module is used for inputting the card picture of the card to be identified into the edge detection model, wherein the edge detection model is trained by adopting card picture samples of different types of cards;
the determining module is used for carrying out edge detection on the input card picture through the edge detection model to obtain card edge information and determining a card area in the card picture according to the card edge information;
the matching module is used for performing template matching on the certificate card area by using a certificate card template of the certificate card with the same type as the type of the certificate card to be identified so as to position a text identification sub-area in the certificate card area;
and the text recognition module is used for performing text recognition on the text recognition sub-area so as to extract the information of the certificate card.
10. An apparatus for training an edge detection model, the apparatus comprising:
the acquisition module is used for acquiring card picture samples of different types of cards, and the card picture samples are marked with edge marking information;
the picture synthesis module is used for extracting a card edge picture from the card picture sample, and embedding the acquired card edge picture into other background pictures to obtain a synthesized picture marked with card edge marking information;
the model training module is used for taking the certificate card picture sample and the synthesized picture as training samples to iteratively train a neural network;
and the parameter adjusting module is used for determining the difference between the certificate card edge prediction information output by the neural network and the certificate card edge marking information in each iteration process, adjusting the network parameters of the neural network based on the difference until the training stopping condition is met, and ending the training to obtain the edge detection model.
11. 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 identification method of the identification card information according to any one of claims 1 to 7 when executing the computer program.
12. 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 method of training an edge detection model of claim 8 when executing the computer program.
CN201911200237.3A 2019-11-29 2019-11-29 Identification card information identification and edge detection model training method and device Pending CN111079571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911200237.3A CN111079571A (en) 2019-11-29 2019-11-29 Identification card information identification and edge detection model training method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911200237.3A CN111079571A (en) 2019-11-29 2019-11-29 Identification card information identification and edge detection model training method and device

Publications (1)

Publication Number Publication Date
CN111079571A true CN111079571A (en) 2020-04-28

Family

ID=70312084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911200237.3A Pending CN111079571A (en) 2019-11-29 2019-11-29 Identification card information identification and edge detection model training method and device

Country Status (1)

Country Link
CN (1) CN111079571A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582134A (en) * 2020-04-30 2020-08-25 平安科技(深圳)有限公司 Certificate edge detection method, device, equipment and medium
CN112132812A (en) * 2020-09-24 2020-12-25 平安科技(深圳)有限公司 Certificate checking method and device, electronic equipment and medium
CN112528998A (en) * 2021-02-18 2021-03-19 成都新希望金融信息有限公司 Certificate image processing method and device, electronic equipment and readable storage medium
CN112651953A (en) * 2020-12-31 2021-04-13 平安国际智慧城市科技股份有限公司 Image similarity calculation method and device, computer equipment and storage medium
CN112686248A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Certificate increase and decrease type detection method and device, readable storage medium and terminal
CN112801232A (en) * 2021-04-09 2021-05-14 苏州艾隆科技股份有限公司 Scanning identification method and system applied to prescription entry
CN113111882A (en) * 2021-02-24 2021-07-13 北京邮电大学 Card identification method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549881A (en) * 2018-05-02 2018-09-18 杭州创匠信息科技有限公司 The recognition methods of certificate word and device
CN109377240A (en) * 2018-08-21 2019-02-22 中国平安人寿保险股份有限公司 Trade company's management method, device, computer equipment and storage medium neural network based
CN110119741A (en) * 2019-04-08 2019-08-13 浙江大学宁波理工学院 A kind of card card image information recognition methods having powerful connections
CN110263694A (en) * 2019-06-13 2019-09-20 泰康保险集团股份有限公司 A kind of bank slip recognition method and device
CN110378338A (en) * 2019-07-11 2019-10-25 腾讯科技(深圳)有限公司 A kind of text recognition method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108549881A (en) * 2018-05-02 2018-09-18 杭州创匠信息科技有限公司 The recognition methods of certificate word and device
CN109377240A (en) * 2018-08-21 2019-02-22 中国平安人寿保险股份有限公司 Trade company's management method, device, computer equipment and storage medium neural network based
CN110119741A (en) * 2019-04-08 2019-08-13 浙江大学宁波理工学院 A kind of card card image information recognition methods having powerful connections
CN110263694A (en) * 2019-06-13 2019-09-20 泰康保险集团股份有限公司 A kind of bank slip recognition method and device
CN110378338A (en) * 2019-07-11 2019-10-25 腾讯科技(深圳)有限公司 A kind of text recognition method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
悟乙己: "边缘检测︱基于 HED网络TensorFlow 和 OpenCV 实现图片边缘检测", pages 1 - 6, Retrieved from the Internet <URL:https://blog.csdn.net/sinat_26917383/article/details/73087831> *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021218183A1 (en) * 2020-04-30 2021-11-04 平安科技(深圳)有限公司 Certificate edge detection method and apparatus, and device and medium
CN111582134A (en) * 2020-04-30 2020-08-25 平安科技(深圳)有限公司 Certificate edge detection method, device, equipment and medium
CN112132812A (en) * 2020-09-24 2020-12-25 平安科技(深圳)有限公司 Certificate checking method and device, electronic equipment and medium
CN112132812B (en) * 2020-09-24 2023-06-30 平安科技(深圳)有限公司 Certificate verification method and device, electronic equipment and medium
WO2021189856A1 (en) * 2020-09-24 2021-09-30 平安科技(深圳)有限公司 Certificate check method and apparatus, and electronic device and medium
CN112686248A (en) * 2020-12-10 2021-04-20 广州广电运通金融电子股份有限公司 Certificate increase and decrease type detection method and device, readable storage medium and terminal
CN112686248B (en) * 2020-12-10 2022-07-22 广州广电运通金融电子股份有限公司 Certificate increase and decrease type detection method and device, readable storage medium and terminal
WO2022121025A1 (en) * 2020-12-10 2022-06-16 广州广电运通金融电子股份有限公司 Certificate category increase and decrease detection method and apparatus, readable storage medium, and terminal
CN112651953A (en) * 2020-12-31 2021-04-13 平安国际智慧城市科技股份有限公司 Image similarity calculation method and device, computer equipment and storage medium
CN112651953B (en) * 2020-12-31 2024-03-15 平安国际智慧城市科技股份有限公司 Picture similarity calculation method and device, computer equipment and storage medium
CN112528998A (en) * 2021-02-18 2021-03-19 成都新希望金融信息有限公司 Certificate image processing method and device, electronic equipment and readable storage medium
CN113111882A (en) * 2021-02-24 2021-07-13 北京邮电大学 Card identification method and device, electronic equipment and storage medium
CN113111882B (en) * 2021-02-24 2022-12-20 北京邮电大学 Card identification method and device, electronic equipment and storage medium
CN112801232A (en) * 2021-04-09 2021-05-14 苏州艾隆科技股份有限公司 Scanning identification method and system applied to prescription entry

Similar Documents

Publication Publication Date Title
CN111079571A (en) Identification card information identification and edge detection model training method and device
CN109961009B (en) Pedestrian detection method, system, device and storage medium based on deep learning
CN110569878B (en) Photograph background similarity clustering method based on convolutional neural network and computer
WO2019169532A1 (en) License plate recognition method and cloud system
CN104217203B (en) Complex background card face information identifying method and system
US8494273B2 (en) Adaptive optical character recognition on a document with distorted characters
US20160328601A1 (en) Three-dimensional facial recognition method and system
CN110598686B (en) Invoice identification method, system, electronic equipment and medium
Dibeklioglu et al. 3D facial landmarking under expression, pose, and occlusion variations
CN111783757A (en) OCR technology-based identification card recognition method in complex scene
CN105512657B (en) Character identifying method and equipment
CN113111880B (en) Certificate image correction method, device, electronic equipment and storage medium
CN111191649A (en) Method and equipment for identifying bent multi-line text image
CN110852311A (en) Three-dimensional human hand key point positioning method and device
CN112966685B (en) Attack network training method and device for scene text recognition and related equipment
US9679218B2 (en) Method and apparatus for image matching
CN114049499A (en) Target object detection method, apparatus and storage medium for continuous contour
CN113011426A (en) Method and device for identifying certificate
CN112669412A (en) Certificate picture generation method, device, equipment and storage medium
CN111414914A (en) Image recognition method and device, computer equipment and storage medium
CN110059711A (en) Alignment schemes, device and the equipment of image
CN112686247A (en) Identification card number detection method and device, readable storage medium and terminal
US7957555B2 (en) Method and apparatus for localizing an object part in digital image data by updating an initial position estimate based on a displacement of the object part
CN113627442A (en) Medical information input method, device, equipment and storage medium
Sharma et al. Dominating direction based an efficient copy–move image tampering detection technique

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