CN110619252B - Method, device and equipment for identifying form data in picture and storage medium - Google Patents

Method, device and equipment for identifying form data in picture and storage medium Download PDF

Info

Publication number
CN110619252B
CN110619252B CN201810630395.1A CN201810630395A CN110619252B CN 110619252 B CN110619252 B CN 110619252B CN 201810630395 A CN201810630395 A CN 201810630395A CN 110619252 B CN110619252 B CN 110619252B
Authority
CN
China
Prior art keywords
target
picture file
type
target picture
determining
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.)
Active
Application number
CN201810630395.1A
Other languages
Chinese (zh)
Other versions
CN110619252A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810630395.1A priority Critical patent/CN110619252B/en
Publication of CN110619252A publication Critical patent/CN110619252A/en
Application granted granted Critical
Publication of CN110619252B publication Critical patent/CN110619252B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • 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/412Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Character Input (AREA)

Abstract

The application provides a method, a device, equipment and a storage medium for identifying form data in a picture, wherein the method comprises the following steps: acquiring a target picture file to be identified; classifying the target picture file, and determining a target type to which a form in the target picture file belongs; determining a target recognition model according to the target type of the form; and identifying the target picture file by using the target identification model so as to obtain form data contained in the target picture file. According to the method, when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, the identification accuracy is improved, and the user experience is improved.

Description

Method, device and equipment for identifying form data in picture and storage medium
Technical Field
The present application relates to the field of character recognition technologies, and in particular, to a method, an apparatus, a device, and a storage medium for identifying form data in a picture.
Background
In recent years, paperless offices have prevailed in various fields, but forms printed on paper are still used in basic businesses such as invoices, attendance sheets, questionnaires, test papers, bank account opening sheets, hospital diagnosis sheets, and the like. To systematically manage the information on such forms, the forms may be scanned by a scanner and the form information identified from the generated pictures.
Currently, characters in a picture can be recognized by an Optical Character Recognition (OCR) technology. The OCR is a process of recognizing optical characters in a picture by image processing and pattern recognition techniques and translating the optical characters into computer words.
However, in the related art, OCR recognition can only accurately recognize form information when the form format included in the picture is fixed, and when the form format included in the picture is not fixed, recognition accuracy is low, and user experience is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for identifying form data in a picture, which are used for solving the problem that in the related technology, when the picture containing the form with an unfixed format is identified, the identification accuracy is low.
An embodiment of an aspect of the present application provides a method for identifying form data in a picture, where the method includes: acquiring a target picture file to be identified; classifying the target picture files, and determining the target types of the forms in the target picture files; determining a target recognition model according to the target type of the form; and identifying the target picture file by using the target identification model so as to obtain form data contained in the target picture file.
The method for identifying form data in a picture includes the steps of firstly obtaining a target picture file to be identified, then classifying the target picture file, determining a target type of a form in the target picture file, then determining a target identification model according to the target type of the form, and finally identifying the target picture file by using the target identification model to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In another aspect of the present application, an apparatus for identifying form data in a picture is provided, where the apparatus includes: the first acquisition module is used for acquiring a target picture file to be identified; the classification module is used for classifying the target picture file and determining a target type to which a form in the target picture file belongs; the first determining module is used for determining a target recognition model according to the target type of the form; and the identification module is used for identifying the target picture file by using the target identification model so as to acquire form data contained in the target picture file.
The device for identifying form data in a picture, provided by the embodiment of the application, is used for firstly obtaining a target picture file to be identified, then classifying the target picture file, determining a target type to which a form in the target picture file belongs, then determining a target identification model according to the target type to which the form belongs, and finally identifying the target picture file by using the target identification model so as to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In yet another aspect of the present application, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method for identifying form data in a picture according to the foregoing embodiments.
The computer device provided by the embodiment of the application firstly obtains a target picture file to be identified, then classifies the target picture file, determines a target type to which a form in the target picture file belongs, determines a target identification model according to the target type to which the form belongs, and finally identifies the target picture file by using the target identification model so as to obtain form data contained in the target picture file. Therefore, when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In yet another aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for identifying form data in a picture according to the foregoing embodiments.
The computer-readable storage medium provided by the embodiment of the application can be arranged in computer equipment capable of identifying form data in a picture, and when the form format in a target picture file is not fixed, accurate identification of the form data in the target picture file can be realized by executing a computer program stored in the computer equipment, so that the identification accuracy is improved, and the user experience is improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a method for identifying form data in a picture according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for identifying form data in a picture according to another embodiment of the present application;
FIG. 3 is an exemplary diagram of the format of each parameter in a preset image parameter set according to an embodiment of the present application;
fig. 4 is an exemplary diagram of formats of parameters in an image parameter set corresponding to a target picture file according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an apparatus for identifying form data in a picture according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating an apparatus for identifying form data in a picture according to another embodiment of the present application;
FIG. 7 is a schematic block diagram of a computer device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to another embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The embodiments in the application mainly aim at the problems that in the related technology, OCR recognition can only realize accurate recognition of form information when the form format included in a picture is fixed, and recognition accuracy is low and user experience is poor when the form format included in the picture is not fixed, and a method for recognizing form data in the picture is provided.
According to the method for identifying the form data in the picture, after the target picture file to be identified is obtained, the target picture file is classified to determine the target type of the form in the target picture file, and then the target identification model is determined according to the target type of the form, so that the target picture file is identified by using the target identification model to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
A method, an apparatus, a device, and a storage medium for identifying form data in a picture according to an embodiment of the present application are described below with reference to the accompanying drawings.
First, a method for identifying form data in a picture according to an embodiment of the present application will be specifically described with reference to fig. 1.
Fig. 1 is a flowchart illustrating a method for identifying form data in a picture according to an embodiment of the present application.
As shown in fig. 1, the method for identifying form data in a picture of the present application may include the following steps:
step 101, a target picture file to be identified is obtained.
Specifically, an execution main body of the method for identifying form data in a picture provided by the embodiment of the present application may be an apparatus for identifying form data in a picture provided by the embodiment of the present application, and hereinafter, may be referred to as an identification apparatus for short. The identification device can be configured in any computer equipment to accurately identify the target picture file to be identified.
The target picture file may be a picture file generated by scanning a text data such as a form with a scanner, a picture file generated by shooting the text data with a camera, or a picture file generated by other methods, which is not limited herein.
It will be appreciated that in some specific institutions, such as banks, hospitals and administrative departments, there are proprietary forms belonging to them, and the format of these proprietary forms is usually not fixed, for example, the forms may all have the contents of name, sex, etc., but the locations of these contents may be different. In the embodiment of the present application, the target picture file may be a target picture file generated after scanning a dedicated form in an organization such as a bank, a hospital, and an administrative department with an unfixed format. Of course, the method for identifying form data in a picture file according to the embodiment of the present application may be applied to a picture file generated from a form having a fixed format, such as an identification card, a passport, a license plate number, and the like, and the present application is not limited thereto.
And 102, classifying the target picture files, and determining the target types of the forms in the target picture files.
Specifically, the target picture file may be classified in the following manner to determine a target type to which the form in the target picture file belongs. That is, step 102 may specifically include:
carrying out image identification on the target picture file, and determining an image parameter set corresponding to the target picture file;
and determining the target type of the form in the target picture file according to the mapping relation between each parameter in the image parameter set and each form type.
The image parameter set may include parameters such as name, identification number, telephone number, home address, and work unit.
In specific implementation, the mapping relationship between each form type and each parameter in the image parameter set can be preset, so that after the image parameter set corresponding to the target picture file is determined, the target type to which the form belongs in the target picture file can be determined according to each parameter in the image parameter set corresponding to the target picture file and the preset mapping relationship between each form type and each parameter in the image parameter set.
For example, if the type of the preset form is a, the corresponding image parameter set includes the following parameters: a1, A2, A3 and A4; when the type of the form is b, the corresponding image parameter set includes the following parameters: b1, B2, B3, B4; when the type of the form is c, the corresponding image parameter set includes the following parameters: c1, C2, C3 and C4. Then, performing image recognition on the target picture file, and determining that the image parameter set corresponding to the target picture file includes A1, A2, A3, and A4, according to the mapping relationship between the preset form types and the parameters in the image parameter set, determining that the target type to which the form belongs in the target picture file is a.
It should be noted that, when determining the target type of the form in the target picture file according to the parameters in the image parameter set corresponding to the target picture file and the mapping relationship between the preset form types and the parameters in the image parameter set, the parameters in the image parameter set corresponding to the target picture file may not be completely matched with the parameters in the image parameter set in the preset mapping relationship. At this time, the target type to which the form belongs in the target picture file may be determined according to the matching degree between the image parameter set corresponding to the target picture file and each image parameter set corresponding to each form type.
Specifically, each parameter in the image parameter set corresponding to the target picture file may be compared with each parameter in each image parameter set corresponding to each preset form type, so as to determine, according to each parameter in the image parameter set corresponding to the target picture file, each matching degree of each parameter in each image parameter set corresponding to each form type, the matching degree of each image parameter set corresponding to the target picture file and each image parameter set corresponding to each form type, and thereby determine the form type corresponding to the image parameter set with the highest matching degree as the target type to which the form belongs in the target picture file.
For example, if the type of the preset form is a, the corresponding image parameter set includes the following parameters: a1, A2, A3 and A4; when the type of the form is b, the corresponding image parameter set includes the following parameters: b1, B2, B3, B4; when the type of the form is c, the corresponding image parameter set includes the following parameters: c1, C2, C3 and C4. After the target picture file is subjected to image recognition, the image parameter set corresponding to the target picture file is determined to comprise A1, A2, A3 and B4. Since A1, A2, and A3 are respectively matched with the parameters included in the image parameter set corresponding to the type a, and B4 is matched with the parameters included in the image parameter set corresponding to the type B, it can be determined that the matching degree between the image parameter set corresponding to the target picture file and the image parameter set corresponding to the type a is 75%, and the matching degree between the image parameter set corresponding to the type B is 25%, so that the target type to which the form belongs in the target picture file can be determined to be a according to the sizes of the two matching degrees.
In addition, in a possible implementation form, one or more parameters in the image parameter set corresponding to the target picture file may not match any parameter in each image parameter set corresponding to each preset form type. At this time, the target type to which the form belongs in the target picture file may be determined only according to the remaining parameters without considering the one or more parameters. It should be noted that, if the ratio of the one or more parameters in the image parameter set corresponding to the target image file is relatively large, the mapping relationship between each preset form type and each parameter in the image parameter set can be supplemented and perfected according to the target image file.
For example, if the type of the preset form is a, the corresponding image parameter set includes the following parameters: a1, A2, A3 and A4; when the type of the form is b, the corresponding image parameter set includes the following parameters: b1, B2, B3, B4; when the type of the form is c, the corresponding image parameter set includes the following parameters: c1, C2, C3 and C4. After the image identification is carried out on the target image file, the image parameter set corresponding to the target image file is determined to comprise A1, A2, A3 and D. Because D is not matched with any parameter in each image parameter set corresponding to each preset form type, and A1, A2 and A3 are respectively matched with each parameter in the image parameter set corresponding to the type a, the target type to which the form belongs in the target picture file can be determined to be a.
It should be noted that, each time the target picture file is identified, the condition of each parameter included in the image parameter set corresponding to the target picture file may be recorded, so that the mapping relationship between each preset form type and each parameter in the image parameter set may be updated according to multiple recordings.
For example, continuing with the above example, a threshold may be preset, and after multiple identifications, when the number of occurrences of the case where the image parameter set includes A1, A2, A3, and D is greater than the threshold, it is considered that the a-type form may be updated. At this time, in the original mapping relationship, the parameters A1, A2, A3, and A4 in the image parameter set corresponding to the type a may be replaced with A1, A2, A3, and D; or, in the original mapping relationship, the corresponding relationship between the type a and each parameter A1, A2, A3, D in the image parameter set is added, so as to update the mapping relationship between each preset form type and each parameter in the image parameter set.
And 103, determining a target recognition model according to the target type of the form.
Specifically, the recognition models corresponding to the form types may be trained in advance, and the correspondence between the form types and the recognition models may be stored, so that after the target type to which the form in the target image file belongs is determined, the target recognition model may be determined according to the target type to which the form belongs and the correspondence between the form types and the recognition models that are stored in advance.
For example, assume that the pre-stored correspondence between each form type and the recognition model is: the identification model A corresponds to the bank account opening form type, the identification model B corresponds to the attendance form type, and the identification model C corresponds to the hospital diagnosis form type.
Furthermore, before determining the target recognition model according to the target type to which the form belongs and the pre-stored correspondence between each form type and the recognition model, the recognition model corresponding to each form type needs to be generated by training.
Specifically, a form sample data set corresponding to each form type may be obtained first, the type of each form in each form sample data set may be marked, and then each form in the form sample data set of each form type may be used to train the initial recognition model, so as to generate a recognition model corresponding to each type.
That is, before step 103, the following steps may be further included:
acquiring a form sample data set corresponding to a target type;
and training the initial recognition model by using each form in the form sample data set to generate a target recognition model corresponding to the target type.
The initial recognition model may be a deep learning object detection model of OCR.
And 104, identifying the target picture file by using the target identification model to acquire form data contained in the target picture file.
Specifically, after the target identification model is determined according to the target type to which the form belongs, the target identification model can be used for identifying the target image file so as to acquire form data contained in the target image file.
It can be understood that, in practical applications, the user may not need all the data in the form of the target picture file, and in this embodiment, only the form data needed by the user may be identified by using the target identification model according to the user's needs, so as to better meet the user's needs.
In specific implementation, the target image file can be identified by using the target identification model to obtain a character data set contained in the target image file, and then target form data can be obtained from the character data set according to the attribute information of a target field corresponding to the target identification model.
The character data set comprises all character data in a form of the target picture file.
In addition, the target field refers to a field to be identified in the target picture file. The attribute information of the target field may include any information related to the target field, such as the length of the target field, the name of the target field, and the number of target fields. And the target form data is the form data required by the user. Wherein, the attribute information of the target field can be set according to the requirement.
For example, it is assumed that the type of the form in the target picture file is a bank account opening form type, and the corresponding target identification model is an identification model a. The user needs to identify the bank institution number and the user's identity card number in the form of the target picture file, the number of the target fields corresponding to the identification model A is set to be 2, the names of the 2 target fields are respectively ' account opening institution number ' and ' identity card number ', and the lengths of the corresponding target fields are respectively 5 characters and 18 characters. Therefore, the identification device can firstly identify the target picture file by using the identification model A to obtain the character data set contained in the target picture file, and then obtain the target form data from the character data set according to the attribute information of the target field corresponding to the identification model A. The target form data includes an account opening organization number "178XX" and an identification number "123456 XXXXXXXXXXXXX" in the form of the target picture file.
It can be understood that when the target picture file is identified, the target picture file is identified by using the target identification model, the character data set contained in the target picture file is obtained, and then the target form data is obtained from the character data set according to the attribute information of the target field corresponding to the target identification model, so that the field of the target picture file, which needs to be identified by the user, is identified, the user requirement is better met, and the user experience is improved.
In order to recognize a target field that needs to be recognized by a user in a target picture file by using a target recognition model to obtain target form data that the user needs, the generated target recognition model needs to be able to recognize only the target field that the user needs to recognize when the initial recognition model is trained.
Specifically, after the form sample data set corresponding to the target type is obtained, the target fields corresponding to the forms in the form sample data set may be marked, so that the marked forms are used to train the initial recognition model to generate the target recognition model corresponding to the target type.
The method for identifying form data in a picture includes the steps of firstly obtaining a target picture file to be identified, then classifying the target picture file, determining a target type of a form in the target picture file, then determining a target identification model according to the target type of the form, and finally identifying the target picture file by using the target identification model to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
According to the analysis, after the target picture file is classified and the target type of the form in the target picture is determined, the target picture file can be identified by using the target identification model corresponding to the target type, so that the form data contained in the target picture file can be acquired. In practical applications, the same type of form may have different formats, for example, different bank cards may all include the user name, the bank card number, and the valid year and month, but the area occupied by these contents on the bank card may have different sizes and locations. In view of the above situation, the method for presenting form data in an identification picture according to the present application will be further described with reference to fig. 2.
Fig. 2 is a flowchart illustrating a method for identifying form data in a picture according to another embodiment of the present application.
As shown in fig. 2, the method for identifying form data in a picture according to the embodiment of the present application may include the following steps:
step 201, obtaining a target picture file to be identified.
Step 202, performing image recognition on the target picture file, and determining an image parameter set corresponding to the target picture file.
And step 203, determining the target type of the form in the target picture file according to the mapping relation between each parameter in the image parameter set and each form type.
And step 204, determining a target recognition model according to the target type of the form.
The detailed implementation process and principle of the steps 201 to 204 may refer to the detailed description of the above embodiments, and are not described herein again.
And step 205, performing recombination processing on each parameter in the image parameter set corresponding to the target picture file to generate a picture file to be identified.
The restructuring process for each parameter may include adjusting the size of the area occupied by each parameter in the form, the position where each parameter is located, and the like.
Specifically, the formats of the parameters corresponding to the forms of the respective types may be preset, and the recognition models corresponding to the forms of the respective types may be set to recognize the forms, respectively, so that after the recognition device determines the target recognition model according to the target type to which the form belongs, the parameters in the image parameter set corresponding to the target picture file may be reorganized according to the formats of the parameters corresponding to the forms of the preset target type, so as to adjust the formats of the parameters to the parameter formats recognized by the target recognition models, thereby generating the picture file to be recognized.
For example, assume that the format of each parameter corresponding to the form of the preset bank card type is the format shown in fig. 3, corresponding to the recognition model a. The identification device determines that the type of the form in the target picture file is the bank card type, the target identification model is the identification model a, the image parameters corresponding to the target picture file are concentrated, and the format of each parameter is the format shown in fig. 4, so that the format of each parameter can be adjusted to the format shown in fig. 3, and the picture file to be identified is generated.
After the target identification model is determined according to the target type of the form in the target picture file, the parameters in the image parameter set corresponding to the target picture file are recombined to generate the picture file to be identified, and the picture file to be identified is identified, so that the accuracy of identifying the picture file containing the form with unfixed format is improved.
And step 206, identifying the picture file to be identified by using the target identification model so as to acquire the character data set contained in the picture file to be identified.
And step 207, acquiring target form data from the character data set according to the attribute information of the target field corresponding to the target identification model.
Specifically, the recognition device performs recombination processing on each parameter in an image parameter set corresponding to the target picture file, generates a picture file to be recognized, and then recognizes the picture file to be recognized by using the target recognition model to acquire a character data set included in the picture file to be recognized, and further acquires target form data from the character data set according to attribute information of a target field corresponding to the target recognition model.
In one possible implementation form, the attribute information of the target field corresponding to the target recognition model may be determined in the following manner. That is, before step 207, the method may further include:
acquiring a configuration file corresponding to the target recognition model;
and determining attribute information of a target field corresponding to the target recognition model according to the configuration file.
The configuration file is used for configuring attribute information such as the length and the name of a field needing to be identified by the target identification model.
In this embodiment of the present application, the configuration file may be configured by a user as needed, or may be automatically generated by a recognition device according to an obtained form sample training set when training a target recognition model, which is not limited here.
Specifically, after the recognition device obtains the configuration file corresponding to the target recognition model, the attribute information of the target field corresponding to the target recognition model can be determined according to the configuration file, so that after the target picture file is recognized by using the target recognition model and the character data set contained in the target picture file is obtained, the target form data can be obtained from the character data set according to the attribute information of the target field corresponding to the target recognition model, and the field to be recognized in the target picture file can be recognized by using the target recognition model.
According to the method and the device, the attribute information of the target field corresponding to the target recognition model is determined according to the configuration file, and then the target form data is obtained from the character data set contained in the obtained target picture file according to the attribute information, so that the field needing to be recognized by the user in the target picture file is recognized, the user requirement is met better, and the user experience is improved.
An apparatus for identifying form data in a picture according to an embodiment of the present application is described below with reference to the drawings.
Fig. 5 is a schematic structural diagram of an apparatus for identifying form data in a picture according to an embodiment of the present application.
As shown in fig. 5, the apparatus for recognizing form data in a picture includes: a first obtaining module 51, a classifying module 52, a first determining module 53 and an identifying module 54.
The first obtaining module 51 is configured to obtain a target picture file to be identified;
the classification module 52 is configured to classify the target image file, and determine a target type to which a form in the target image file belongs;
the first determining module 53 determines a target recognition model according to the target type of the form;
the identifying module 54 is configured to identify the target picture file by using the target identification model, so as to obtain form data included in the target picture file.
Specifically, the apparatus for identifying form data in a picture provided in the embodiment of the present application may execute the method for identifying form data in a picture provided in the embodiment of the present application. The device for identifying the form data in the picture can be configured in any computer equipment to accurately identify the target picture file to be identified.
As an alternative implementation form, the classification module 52 is specifically configured to:
performing image recognition on the target picture file, and determining an image parameter set corresponding to the target picture file;
and determining the target type of the form in the target picture file according to the mapping relation between each parameter in the image parameter set and each form type.
As an alternative implementation form, the identification module 54 is specifically configured to:
identifying the target picture file by using the target identification model so as to obtain a character data set contained in the target picture file;
and acquiring target form data from the character data set according to the attribute information of the target field corresponding to the target recognition model.
It should be noted that, for the implementation process and the technical principle of the apparatus for identifying form data in an image in this embodiment, reference is made to the foregoing explanation of the method embodiment for identifying form data in an image, and details are not described here again.
The device for identifying form data in a picture, provided by the embodiment of the application, is used for firstly obtaining a target picture file to be identified, then classifying the target picture file, determining a target type to which a form in the target picture file belongs, then determining a target identification model according to the target type to which the form belongs, and finally identifying the target picture file by using the target identification model so as to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In an exemplary embodiment, an apparatus for identifying form data in a picture is also provided.
Fig. 6 is a schematic structural diagram of an apparatus for identifying form data in a picture according to another embodiment of the present application.
Referring to fig. 6, the apparatus for identifying form data in a picture according to the present application, based on fig. 5, further includes: a second obtaining module 61, a training module 62, a restructuring module 63, a third obtaining module 64, and a second determining module 65.
The second obtaining module 61 is configured to obtain a form sample data set corresponding to the target type;
a training module 62, configured to train an initial recognition model with each form in the form sample data set to generate a target recognition model corresponding to the target type;
a recombination module 63, configured to recombine each parameter in the image parameter set corresponding to the target picture file to generate a picture file to be identified;
correspondingly, the identification module 54 is specifically configured to:
and identifying the picture file to be identified.
As an alternative implementation form, the apparatus for identifying form data in a picture further includes:
a third obtaining module 64, configured to obtain a configuration file corresponding to the target recognition model;
and a second determining module 65, configured to determine, according to the configuration file, attribute information of a target field corresponding to the target identification model.
It should be noted that, for the implementation process and the technical principle of the apparatus for identifying form data in an image in this embodiment, reference is made to the foregoing explanation of the method embodiment for identifying form data in an image, and details are not described here again.
The device for identifying form data in a picture, provided by the embodiment of the application, is used for firstly obtaining a target picture file to be identified, then classifying the target picture file, determining a target type to which a form in the target picture file belongs, then determining a target identification model according to the target type to which the form belongs, and finally identifying the target picture file by using the target identification model so as to obtain the form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In order to implement the above embodiments, the present application also provides a computer device.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer apparatus 200 includes: the image recognition system comprises a memory 210, a processor 220 and a computer program stored on the memory 210 and capable of running on the processor 220, wherein the processor 220 implements the method for recognizing the form data in the image according to the foregoing embodiment when executing the program.
In an alternative implementation form, as shown in fig. 8, the computer device 200 may further include: a memory 210 and a processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 storing a computer program, and the processor 220 implementing the method for identifying form data in a picture according to the embodiment of the present application when executing the program.
Bus 230 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 200 typically includes a variety of computer device readable media. Such media can be any available media that is accessible by computer device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 240 and/or cache memory 250. The computer device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8 and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 230 by one or more data media interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 280 having a set (at least one) of program modules 270, 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, may be stored in, for example, the memory 210. The program modules 270 generally perform the functions and/or methodologies of the embodiments described herein.
The computer device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), with one or more devices that enable a user to interact with the computer device 200, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 292. Also, computer device 200 may 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) through network adapter 293. As shown, network adapter 293 communicates with the other modules of computer device 200 via bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that, for the implementation process and the technical principle of the computer device in this embodiment, reference is made to the foregoing explanation of the method embodiment for identifying form data in a picture, and details are not described here again.
The computer device provided by the embodiment of the application firstly obtains a target picture file to be identified, then classifies the target picture file, determines a target type to which a form in the target picture file belongs, determines a target identification model according to the target type to which the form belongs, and finally identifies the target picture file by using the target identification model so as to obtain form data contained in the target picture file. Therefore, even when the form format in the target picture file is not fixed, accurate identification of the form data in the target picture file can be achieved, identification accuracy is improved, and user experience is improved.
In order to implement the foregoing embodiments, the present application further provides a computer-readable storage medium.
Wherein the computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the method for identifying form data in a picture according to the foregoing embodiments.
In an alternative implementation, the embodiments may be implemented in any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
To achieve the above embodiments, the present application further proposes a computer program, when instructions in the computer program product are executed by a processor, to execute the method for identifying form data in a picture according to the foregoing embodiments.
In the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are exemplary and should not be construed as limiting the present application and that changes, modifications, substitutions and alterations in the above embodiments may be made by those of ordinary skill in the art within the scope of the present application.

Claims (9)

1. A method for identifying form data in a picture, comprising:
acquiring a target picture file to be identified;
classifying the target picture file, and determining a target type to which a form in the target picture file belongs;
determining a target recognition model according to the target type of the form;
identifying the target picture file by using the target identification model so as to obtain form data contained in the target picture file; the classifying the target picture file comprises the following steps:
performing image recognition on the target picture file, and determining an image parameter set corresponding to the target picture file;
comparing each parameter in the image parameter set with each parameter in each image parameter set corresponding to each preset form type respectively, determining the matching degree of each image parameter set corresponding to the target image file and each image parameter set corresponding to each form type respectively according to each parameter in the image parameter set corresponding to the target image file and each matching degree of each parameter in each image parameter set corresponding to each form type respectively, and determining the form type corresponding to the image parameter set with the highest matching degree as the target type of the form in the target image file;
after the determining the target recognition model, the method further includes: according to the format of each parameter corresponding to a preset target type form, carrying out recombination processing on each parameter in an image parameter set corresponding to the target picture file to generate a picture file to be identified, wherein the recombination processing on each parameter comprises the following steps: and adjusting the size of the area occupied by each parameter in the form and the position of each parameter to generate a parameter format which can be identified by the target identification model.
2. The method of claim 1, wherein prior to determining the object recognition model based on the object type to which the form belongs, further comprising:
acquiring a form sample data set corresponding to the target type;
and training an initial recognition model by using each form in the form sample data set to generate a target recognition model corresponding to the target type.
3. The method of claim 1, wherein after determining the target recognition model, further comprising:
the identifying the target picture file comprises:
and identifying the picture file to be identified.
4. The method of any of claims 1-3, wherein said identifying the target picture file using the target identification model comprises:
identifying the target picture file by using the target identification model so as to obtain a character data set contained in the target picture file;
and acquiring target form data from the character data set according to the attribute information of the target field corresponding to the target recognition model.
5. The method of claim 4, wherein prior to obtaining target form data from the character dataset, further comprising:
acquiring a configuration file corresponding to the target recognition model;
and determining attribute information of a target field corresponding to the target identification model according to the configuration file.
6. An apparatus for identifying form data in a picture, comprising:
the first acquisition module is used for acquiring a target picture file to be identified;
the classification module is used for classifying the target picture file and determining a target type to which a form in the target picture file belongs;
the first determining module is used for determining a target recognition model according to the target type of the form;
the identification module is used for identifying the target picture file by utilizing the target identification model so as to acquire form data contained in the target picture file; wherein, the classifying the target picture file includes:
performing image recognition on the target picture file, and determining an image parameter set corresponding to the target picture file;
comparing each parameter in the image parameter set with each parameter in each image parameter set corresponding to each preset form type respectively, determining the matching degree of each image parameter set corresponding to the target picture file and each image parameter set corresponding to each form type respectively according to each parameter in the image parameter set corresponding to the target picture file and each matching degree of each parameter in each image parameter set corresponding to each form type respectively, and determining the form type corresponding to the image parameter set with the highest matching degree as the target type of the form in the target picture file; after the determining the target recognition model, the method further includes: according to the format of each parameter corresponding to the preset target type form; recombining each parameter in the image parameter set corresponding to the target picture file to generate a picture file to be identified, wherein recombining each parameter comprises: and adjusting the size of the area occupied by each parameter in the form and the position of each parameter to generate a parameter format which can be identified by the target identification model.
7. The apparatus of claim 6, further comprising:
the second acquisition module is used for acquiring a form sample data set corresponding to the target type;
and the training module is used for training the initial recognition model by utilizing each form in the form sample data set so as to generate a target recognition model corresponding to the target type.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program performing the method of identifying form data in a picture according to any of claims 1 to 5.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of identifying form data in a picture according to any one of claims 1 to 5.
CN201810630395.1A 2018-06-19 2018-06-19 Method, device and equipment for identifying form data in picture and storage medium Active CN110619252B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810630395.1A CN110619252B (en) 2018-06-19 2018-06-19 Method, device and equipment for identifying form data in picture and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810630395.1A CN110619252B (en) 2018-06-19 2018-06-19 Method, device and equipment for identifying form data in picture and storage medium

Publications (2)

Publication Number Publication Date
CN110619252A CN110619252A (en) 2019-12-27
CN110619252B true CN110619252B (en) 2022-11-04

Family

ID=68920452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810630395.1A Active CN110619252B (en) 2018-06-19 2018-06-19 Method, device and equipment for identifying form data in picture and storage medium

Country Status (1)

Country Link
CN (1) CN110619252B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111598122B (en) * 2020-04-01 2022-02-08 深圳壹账通智能科技有限公司 Data verification method and device, electronic equipment and storage medium
CN111695517B (en) * 2020-06-12 2023-08-18 北京百度网讯科技有限公司 Image form extraction method and device, electronic equipment and storage medium
CN112464925A (en) * 2020-11-11 2021-03-09 湖北省楚建易网络科技有限公司 Mobile terminal account opening data bank information automatic extraction method based on machine learning
CN112613513A (en) * 2020-12-31 2021-04-06 北京市商汤科技开发有限公司 Image recognition method, device and system
CN116823152A (en) * 2023-05-31 2023-09-29 杭州微宏科技有限公司 Automatic online method, system, device and medium for offline form

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034848A (en) * 2012-12-19 2013-04-10 方正国际软件有限公司 Identification method of form type
CN103793846A (en) * 2014-01-20 2014-05-14 中国建设银行股份有限公司 Processing method and device of element information of business voucher
CN105095842A (en) * 2014-05-22 2015-11-25 阿里巴巴集团控股有限公司 Method and device for identifying information of bill
CN105426356A (en) * 2015-10-29 2016-03-23 杭州九言科技股份有限公司 Target information identification method and apparatus
CN105678612A (en) * 2015-12-30 2016-06-15 远光软件股份有限公司 Mobile terminal original certificate electronic intelligent filling system and method
CN106557747A (en) * 2016-11-15 2017-04-05 平安科技(深圳)有限公司 The method and device of identification insurance single numbers
CN107133571A (en) * 2017-04-11 2017-09-05 上海众开信息科技有限公司 A kind of system and method that paper invoice is automatically generated to financial statement
CN107358232A (en) * 2017-06-28 2017-11-17 中山大学新华学院 Invoice recognition methods and identification and management system based on plug-in unit
CN107766809A (en) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 Electronic installation, billing information recognition methods and computer-readable recording medium
CN107798299A (en) * 2017-10-09 2018-03-13 平安科技(深圳)有限公司 Billing information recognition methods, electronic installation and readable storage medium storing program for executing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034848A (en) * 2012-12-19 2013-04-10 方正国际软件有限公司 Identification method of form type
CN103793846A (en) * 2014-01-20 2014-05-14 中国建设银行股份有限公司 Processing method and device of element information of business voucher
CN105095842A (en) * 2014-05-22 2015-11-25 阿里巴巴集团控股有限公司 Method and device for identifying information of bill
CN105426356A (en) * 2015-10-29 2016-03-23 杭州九言科技股份有限公司 Target information identification method and apparatus
CN105678612A (en) * 2015-12-30 2016-06-15 远光软件股份有限公司 Mobile terminal original certificate electronic intelligent filling system and method
CN106557747A (en) * 2016-11-15 2017-04-05 平安科技(深圳)有限公司 The method and device of identification insurance single numbers
CN107133571A (en) * 2017-04-11 2017-09-05 上海众开信息科技有限公司 A kind of system and method that paper invoice is automatically generated to financial statement
CN107358232A (en) * 2017-06-28 2017-11-17 中山大学新华学院 Invoice recognition methods and identification and management system based on plug-in unit
CN107766809A (en) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 Electronic installation, billing information recognition methods and computer-readable recording medium
CN107798299A (en) * 2017-10-09 2018-03-13 平安科技(深圳)有限公司 Billing information recognition methods, electronic installation and readable storage medium storing program for executing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于BP神经网络的银行票据识别;韩梦迪等;《信息通信》;20160915(第09期);全文 *
模式识别在银行票据自动化处理中的集成应用;石甲玉;《万方数据库》;20070807;第3章 *
石甲玉.模式识别在银行票据自动化处理中的集成应用.《万方数据库》.2007, *

Also Published As

Publication number Publication date
CN110619252A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN110619252B (en) Method, device and equipment for identifying form data in picture and storage medium
CN107239666B (en) Method and system for desensitizing medical image data
CN108564035B (en) Method and system for identifying information recorded on document
AU2017302250B2 (en) Optical character recognition in structured documents
CN103294746B (en) For the method and system for going identification in visual media data
US11810070B2 (en) Classifying digital documents in multi-document transactions based on embedded dates
RU2571545C1 (en) Content-based document image classification
US20140328518A1 (en) Methods, systems and processor-readable media for designing a license plate overlay decal having infrared annotation marks
CN110348294A (en) The localization method of chart, device and computer equipment in PDF document
CN108549643B (en) Translation processing method and device
CN110084289B (en) Image annotation method and device, electronic equipment and storage medium
EP3709212A1 (en) Image processing method and device for processing image, server and storage medium
JP2016048444A (en) Document identification program, document identification device, document identification system, and document identification method
CN112862024B (en) Text recognition method and system
Lee et al. Robust handwriting extraction and lecture video summarization
US11106933B2 (en) Method, device and system for processing image tagging information
KR102292775B1 (en) System and method for providing learning service
CN112149663A (en) RPA and AI combined image character extraction method and device and electronic equipment
WO2016086309A1 (en) System and method for interacting with information posted in the media
US20220262154A1 (en) Determining experiments represented by images in documents
CN110889406B (en) Method, system and terminal for acquiring information of problem data card
JP6529254B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM
US11120074B2 (en) Streamlining citations and references
CN113158773A (en) Training method and training device for living body detection model
CN104992136B (en) Identify the method and device of bar code

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
GR01 Patent grant
GR01 Patent grant