WO2019071662A1 - Electronic device, bill information identification method, and computer readable storage medium - Google Patents
Electronic device, bill information identification method, and computer readable storage medium Download PDFInfo
- Publication number
- WO2019071662A1 WO2019071662A1 PCT/CN2017/108767 CN2017108767W WO2019071662A1 WO 2019071662 A1 WO2019071662 A1 WO 2019071662A1 CN 2017108767 W CN2017108767 W CN 2017108767W WO 2019071662 A1 WO2019071662 A1 WO 2019071662A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- picture
- ticket
- training
- model
- identified
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/24—Aligning, centring, orientation detection or correction of the image
- G06V10/243—Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
- G06V30/41—Analysis of document content
- G06V30/412—Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Definitions
- the present application relates to the field of data identification technologies, and in particular, to an electronic device, a ticket information identification method, and a computer readable storage medium.
- the main purpose of the present application is to provide an electronic device, a ticket information identification method, and a computer readable storage medium, which are intended to accurately and efficiently realize automatic identification of text information in a ticket picture uploaded by a user.
- a first aspect of the present application provides an electronic device including a memory, a processor, and a memory information recognition system operable on the processor, where the ticket information identification system is executed by the processor Implement the following steps:
- the pre-trained bill picture recognition model After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
- the character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- a second aspect of the present application provides a ticket information identification method, where the ticket information identification method includes the following steps:
- the pre-trained bill picture recognition model After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
- the character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- a third aspect of the present application provides a computer readable storage medium storing a ticket information identification system, the ticket information identification system being executable by at least one processor to cause the at least one processor Perform the following steps:
- the pre-trained bill picture recognition model After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
- the character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- the ticket type in the received bill picture is first identified by the pre-trained bill picture recognition model, and the received bill picture is tilt corrected by a predetermined correction rule; Identifying the mapping relationship of the field, determining the to-be-identified field in the currently received bill image; and determining the first recognition model corresponding to each of the to-be-identified fields according to the mapping relationship between the to-be-identified field and the first recognition model, Identifying a target line character region of each field to be identified; finally, determining a second recognition model corresponding to each field to be identified according to a mapping relationship between the field to be identified and the second recognition model, and identifying each of the respective groups according to each second recognition model
- the character information included in the target line character area of the identification field is described, and the identified individual character information is associated with the current ticket picture, so that the automatic identification of the text information in the ticket picture uploaded by the user is realized accurately and efficiently.
- FIG. 1 is a schematic flow chart of an embodiment of a method for identifying a ticket information according to the present application
- FIG. 2 is a flowchart of a training process of a bill picture recognition model in an embodiment of the bill information identification method of the present application
- FIG. 3 is a flowchart of a training process of a first identification model in an embodiment of a ticket information identification method of the present application
- FIG. 4 is a flowchart of a training process of a second identification model in an embodiment of the ticket information identification method of the present application
- FIG. 5 is a schematic diagram of an operating environment of an embodiment of a ticket information identification system of the present application.
- FIG. 6 is a program block diagram of an embodiment of a ticket information identification system of the present application.
- FIG. 1 is a schematic flowchart of an embodiment of a method for identifying a bill information according to the present application.
- the method for identifying the ticket information includes:
- Step S10 after receiving the picture of the bill to be processed, using the pre-trained bill picture recognition model to identify the bill type in the received bill picture, and output the category identification result of the bill;
- the system After receiving the picture of the bill to be processed, the system uses the pre-trained bill picture recognition model to identify the received bill picture, identify the category of the bill and output the category identification result; for example, the bill to be processed received by the system
- the picture is a picture of the medical bill, and the category of the medical bill includes the outpatient bill, the hospital bill, the surgical bill, etc.
- the system uses the bill picture recognition model system to identify the received medical bill picture, and outputs the category identification result of the medical bill: the clinic Bills, hospital bills, surgical bills, etc.
- Step S20 performing tilt correction on the received bill image by using a predetermined correction rule
- the system has predetermined correction rules; since the picture of the ticket uploaded by the user to the system (that is, the picture of the ticket received by the system) usually has a certain skew, the system will tilt the received picture of the ticket with a predetermined correction rule. Correction to ensure the system's success rate of identification of ticket information.
- the predetermined correction rule is: first, using a probability algorithm of Hough transform to find as many small straight lines as possible in the image; and then determining all the horizontal levels from the found small straight line.
- the straight lines in which the x coordinate values differ by less than the first preset difference (for example, 0.2 cm) are sequentially connected in the order of the corresponding y coordinate values, and are classified into several classes according to the size of the x coordinate value.
- the straight lines in which the determined y coordinate values differ by less than the second preset difference value (for example, 0.3 cm) are sequentially connected in the order of the magnitude of the corresponding x coordinate value, and are classified into several classes according to the size of the y coordinate value; All horizontal lines belonging to a class are regarded as a target class line, and the longest line closest to each target class line is found by least square method; finally, the slope of each long line is calculated, and the slope of each long line is calculated.
- the number of bits and the mean, the median and mean of the calculated slope are compared to determine the smaller one, and the image tilt is adjusted based on the smaller one determined.
- other correction rules may also be employed.
- Step S30 Determine, according to a mapping relationship between the predetermined ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
- the system may determine the to-be-identified field corresponding to the ticket category of the received ticket picture according to the mapping relationship between the predetermined ticket category and the to-be-identified field, and the ticket category corresponding to the identifier to be identified
- the number of fields may be one or more.
- Step S40 determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, And the first recognition model corresponding to the to-be-identified field, for each of the to-be-identified fields, calling a corresponding first recognition model to perform region recognition on the line character region of the obliquely corrected bill image to identify each of the included a target line character area of the character information of the identified field;
- the system has a first mapping relationship table between the to-be-identified field and the first identification model; after the system determines each of the to-be-identified fields of the ticket image, the system can find each of the to-be-finished by searching the first mapping relationship table. Identifying a first recognition model corresponding to each of the fields; the system, for each field to be identified, calling the first recognition model corresponding to the to-be-identified field to perform area recognition on the line character region of the obliquely corrected ticket image, thereby respectively identifying the ticket
- the image contains the target line character area of the character information of each field to be recognized.
- Step S50 Determine, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and call a corresponding number for each of the target line character regions of the to-be-identified field.
- the second recognition model performs character recognition to respectively identify the character information included in the target line character region of each of the to-be-identified fields, and associates the identified character information of each of the to-be-identified fields with the ticket image.
- the system further has a second mapping relationship table between the to-be-identified field and the second identification model; the system identifies the target line character area of the character information of each to-be-identified field after the ticket picture is identified, a second mapping relationship table, first finding a second recognition model corresponding to each of the to-be-identified fields; and then, for each target character region of the to-be-identified field, calling a corresponding second recognition model for character recognition, thereby Each of the corresponding second recognition models identifies the character information included in the target line character region of each of the to-be-identified fields, and then associates the recognized character information of each of the to-be-identified fields with the ticket image to establish an association. Mapping relations.
- the ticket type in the received ticket picture is first identified by the pre-trained ticket picture recognition model, and the received ticket picture is tilt corrected by a predetermined correction rule; Determining, by the mapping relationship of the to-be-identified field, the to-be-identified field in the currently-received bill image; and determining, according to the mapping relationship between the to-be-identified field and the first recognition model, respectively, the first recognition model corresponding to each of the to-be-identified fields, The target line character region of each field to be identified is identified; finally, according to the mapping relationship between the field to be identified and the second recognition model, a second recognition model corresponding to each field to be identified is determined, and each of the second recognition models is respectively identified according to each second recognition model.
- the character information included in the target line character area of the to-be-identified field is associated with the current ticket image, so that the text information in the bill image uploaded by the user is automatically and accurately implemented. Identification.
- the training process of the ticket picture recognition model is as follows:
- Step S1 preparing a preset number of ticket picture samples marked with corresponding picture categories for each preset ticket picture category
- a preset number for example, 1000 sheets
- a preset number of coupon picture samples with corresponding picture categories are prepared; for example, there are two types of preset ticket picture categories, namely, outpatient tickets and hospitalization.
- the ticket prepares a preset number of ticket picture samples with the outpatient ticket and a preset number of ticket picture samples marked with the hospital ticket.
- Step S2 dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, and mixing the ticket picture samples in each training subset to obtain a training set. And mixing the sample of the bill pictures in each verification subset to obtain a verification set;
- the ticket picture samples are divided into a first proportion (for example, 80%) of the training subset and a second ratio (for example, 20%) of the verification subset, and then each of the obtained subsets
- a sample of the bill pictures in the training subset is mixed to obtain a training set (for example, a training set of bills by the outpatient bill) 80% of the sample of the tablet is mixed with 80% of the sample of the ticket image of the hospitalized ticket), and the obtained sample of the ticket image in each verification subset is mixed to obtain a verification set (for example, the verification set is sampled by the ticket picture of the outpatient ticket) 20% is formed by mixing 20% of the sample picture of the hospital bill.
- Step S3 using the training set to train the ticket picture recognition model, and using the verification set to verify the accuracy of the ticket picture recognition model after the training set is completed;
- the ticket picture recognition model is trained by using the obtained training set, and after the training of the ticket picture recognition model is completed by using the training set, the obtained verification set is used again. Verifying the accuracy of the ticket picture recognition model;
- Step S4 if the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;
- the verification threshold of the accuracy rate (ie, the preset accuracy rate, for example, 98.5%) is preset in the system, and is used to check the training effect of the ticket picture recognition model; if the ticket image is used by the verification set If the accuracy of the recognition of the recognition model is greater than the preset accuracy, then the training of the ticket image recognition model reaches a preset standard, and the model training is ended.
- step S5 if the accuracy rate is less than the preset accuracy rate, the number of ticket picture samples corresponding to each preset ticket picture category is increased, and steps S2 and S3 are performed again.
- the accuracy of the verification of the bill image recognition model by the verification set is less than or equal to the preset accuracy rate, it indicates that the training of the bill image recognition model has not reached the preset standard, and may be the number of training sets. Not enough or the number of verification sets is not enough, so in this case, increase the number of ticket picture samples corresponding to each preset ticket picture category (for example, increase the fixed number each time or increase the random number each time), and then here Based on this, the above steps S2 and S3 are re-executed, and the loop is executed until the requirement of step S4 is reached, and the model training is ended.
- the ticket picture recognition model is preferably a deep convolutional neural network (for example, the deep convolutional neural network may be a SSD (Single Shot MultiBox Detector) algorithm selected in a CaffeNet environment. Model), the deep convolutional neural network model used in this application consists of one input layer, 13 convolutional layers, 5 pooling layers, 2 fully connected layers, and 1 sorting layer.
- the detailed structure of the deep convolutional neural network model is shown in the following table:
- Layer Name column indicates the name of each layer
- Input indicates the input layer
- Conv indicates the convolution layer of the model
- Conv1 indicates the first convolution layer of the model
- MaxPool indicates the maximum pooling layer of the model
- MaxPool1 indicates the model.
- the first maximum pooling layer, Fc represents the fully connected layer in the model
- Fc1 represents the first fully connected layer in the model
- Softmax represents the Softmax classifier
- Batch Size represents the number of input images of the current layer
- Kernel Size represents the current layer
- the scale of the convolution kernel (for example, the Kernel Size can be equal to 3, indicating that the scale of the convolution kernel is 3x3)
- the Stride Size indicates the moving step size of the convolution kernel, that is, moving to the next convolution position after completing one convolution Distance
- Pad Size indicates the size of the image fill in the current network layer.
- the ticket picture sample may be processed as follows:
- the transposition of the bill picture is judged and the flip adjustment is made; when the aspect ratio is greater than 1, the height and width of the bill picture are reversed, and if the stamp position is on the left side of the bill picture, the bill is The image is rotated clockwise by ninety degrees. If the stamp position is on the right side of the bill image, the bill image is rotated counterclockwise by ninety degrees. When the aspect ratio is less than 1, the bill image height and width are not reversed. The position is on the lower side of the ticket picture, and the ticket image is rotated clockwise by one hundred and eighty degrees.
- the first recognition model is a convolutional neural network model
- the training process for the first recognition model corresponding to a field to be identified is as follows:
- Step C1 Obtain a preset number of bill picture samples for the to-be-identified field
- the preset number (for example, 100,000) of the ticket picture samples are randomly obtained, wherein the partial ticket picture sample contains the character information of the to-be-identified field, and the partial ticket picture sample does not include the character information of the to-be-identified field.
- Step C2 the ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;
- the ticket picture sample containing the character information of the to-be-identified field is separated from the ticket picture sample not containing the character information of the to-be-identified field, and the ticket picture including the character information of the to-be-identified field is included
- the sample is classified into the first training set, and the ticket picture sample that does not contain the character information of the to-be-identified field is classified into the second training set.
- Step C3 Extracting, from the first training set and the second training set, the first preset ratio of the ticket picture samples as the sample picture to be trained, and taking the remaining ticket picture samples in the first training set and the second training set as Verified sample image;
- a first preset ratio for example, 80%
- the ticket picture sample is used as a sample picture with verification, so that the sample picture of the ticket to be trained and the sample picture to be verified are included in the sample picture with and without the character information of the to-be-identified field, and the included and not included
- the sample image of the character information of the field is sampled and to be sampled in the sample to be trained The proportions in the verified sample images are consistent.
- Step C4 performing model training using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;
- Step C5 if the verification pass rate is greater than or equal to the preset threshold, the training is completed;
- the verification threshold of the verification pass rate (ie, the preset threshold, for example, 98%) is preset in the system, and is used to check the training effect of the first recognition model; If the verification pass rate obtained by the first identification model verification is greater than the preset threshold, then the training of the first recognition model reaches the expected standard, and the model training is ended.
- step C6 if the verification pass rate is less than the preset threshold, the number of ticket picture samples is increased, and steps C2, C3, and C4 are repeatedly executed.
- the verification pass rate obtained by verifying the first recognition model by each of the sample images to be verified is less than or equal to the preset threshold, it indicates that the training of the first recognition model has not reached the expected standard, which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the loop is executed until the requirement of step C5 is reached, and the model training is ended.
- the expected standard which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the
- the second recognition model is a Long-Short Term Memory (LSTM), and the training process for the second recognition model corresponding to a field to be identified is as follows: :
- Step D1 Obtain a preset number of ticket picture samples for the to-be-identified field, where each ticket picture sample contains only one line of character information of the to-be-identified field, the font is black, the background is white, and each ticket picture sample is The name is named as the character information of the to-be-identified field contained therein;
- each ticket picture sample includes and only contains one line of character information of the to-be-identified field, and the name of each ticket picture sample Named as the character information of the to-be-identified field contained therein; when the ticket picture sample is used for model training, the model can recognize the position of the character information according to the font color and the background color of the character information, thereby acquiring the Character information.
- a preset number for example, 100,000
- Step D2 dividing the ticket picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as training.
- All the acquired ticket picture samples are divided into a first data set and a second data set according to a ratio of a preset ratio X:Y (X and Y are greater than 0), wherein the number of picture samples in the first data set is smaller than the second data set.
- the number of picture samples is large, that is, X is greater than Y (for example, X is 4, Y is 1); the first data set is used as a training set for training the model; and the second data set is used as a test set for training the test model. effect.
- step D3 the image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model;
- the trained model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.
- the model is tested using the second data set to detect the effect of the currently trained model; specifically, during the test, the model obtained by the current training is used in the second data set.
- the picture sample performs character information recognition, and compares the recognized result with the name of the tested picture sample, thereby calculating the error between the recognition result and the name of the picture sample.
- the error calculation uses the edit distance as the calculation standard. .
- Step D4 if the error of the model identification of the image sample diverges, the training parameters are adjusted and retrained;
- the model discards the error of the image sample recognition, the model training does not meet the requirements. At this time, the model is trained according to the preset rules or randomly adjusted training parameters, so that the error of the recognition of the bill image by the model during training can be convergence.
- step D5 if the error of the model identification on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be-identified field.
- the model training is ended, and the generated model (ie, the current trained model) is used as the final second recognition model corresponding to the to-be-identified field.
- the present application also proposes a ticket information identification system.
- FIG. 5 is a schematic diagram of an operating environment of a preferred embodiment of the ticket information identification system 10 of the present application.
- the ticket information identification system 10 is installed and operated in the electronic device 1.
- the electronic device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a server.
- the electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13.
- Figure 5 shows only the electronic device 1 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
- the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk or memory of the electronic device 1.
- the memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc.
- the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
- the memory 11 is used to store application software and various types of data, such as program codes of the ticket information recognition system 10, installed in the electronic device 1.
- the memory 11 can also be used to temporarily store data that has been output or is about to be output.
- the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing ticket information identification. System 10 and so on.
- CPU Central Processing Unit
- microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing ticket information identification. System 10 and so on.
- the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like in some embodiments.
- the display 13 is for displaying information processed in the electronic device 1 and a user interface for displaying visualization, such as a business customization interface or the like.
- the components 11-13 of the electronic device 1 communicate with one another via a system bus.
- FIG. 6 is a program module diagram of a preferred embodiment of the ticket information identification system 10 of the present application.
- the ticket information identification system 10 can be divided into one or more modules, one or more modules are stored in the memory 11, and by one or more processors (the processor 12 in this embodiment) Executed to complete the application.
- the ticket information identification system 10 can be divided into a first identification module 101, a correction module 102, a determination module 103, a second identification module 104, and a third identification module 105.
- the module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program for describing the execution process of the ticket information recognition system 10 in the electronic device 1. in:
- the first identification module 101 is configured to: after receiving the picture of the ticket to be processed, identify the type of the ticket in the received ticket picture by using the pre-trained ticket picture recognition model, and output the category identification result of the ticket;
- the system After receiving the picture of the bill to be processed, the system uses the pre-trained bill picture recognition model to identify the received bill picture, identify the category of the bill and output the category identification result; for example, the bill to be processed received by the system
- the picture is a picture of the medical bill, and the category of the medical bill includes the outpatient bill, the hospital bill, the surgical bill, etc.
- the system uses the bill picture recognition model system to identify the received medical bill picture, and outputs the category identification result of the medical bill: the clinic Bills, hospital bills, surgical bills, etc.
- the correction module 102 is configured to perform tilt correction on the received bill image by using a predetermined correction rule
- the system has predetermined correction rules; since the picture of the ticket uploaded by the user to the system (that is, the picture of the ticket received by the system) usually has a certain skew, the system will tilt the received picture of the ticket with a predetermined correction rule. Correction to ensure the system's success rate of identification of ticket information.
- the predetermined correction rule is: first, using a probability algorithm of Hough transform to find as many small straight lines as possible in the image; and then determining all the horizontal levels from the found small straight line.
- the straight lines in which the x coordinate values differ by less than the first preset difference (for example, 0.2 cm) are sequentially connected in the order of the corresponding y coordinate values, and are classified into several classes according to the size of the x coordinate value.
- the straight lines in which the determined y coordinate values differ by less than the second preset difference value (for example, 0.3 cm) are sequentially connected in the order of the magnitude of the corresponding x coordinate value, and are classified into several classes according to the size of the y coordinate value; All horizontal lines belonging to a class are regarded as a target class line, and the longest line closest to each target class line is found by least square method; finally, the slope of each long line is calculated, and the slope of each long line is calculated.
- the number of bits and the mean, the median and mean of the calculated slope are compared to determine the smaller one, and the image tilt is adjusted based on the smaller one determined.
- other correction rules may also be employed.
- a determining module 103 configured to determine, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
- the system may determine the to-be-identified field corresponding to the ticket category of the received ticket picture according to the mapping relationship between the predetermined ticket category and the to-be-identified field, and the ticket category corresponding to the identifier to be identified
- the number of fields may be one or more.
- the second identification module 104 is configured to determine, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first identification model corresponding to each of the to-be-identified fields, and invoke a corresponding An identification model performs area recognition on the line character area of the obliquely corrected ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;
- the system has a first mapping relationship table between the to-be-identified field and the first identification model; after the system determines each of the to-be-identified fields of the ticket image, the system can find each of the to-be-finished by searching the first mapping relationship table. Identifying a first recognition model corresponding to each of the fields; the system, for each field to be identified, calling the first recognition model corresponding to the to-be-identified field to perform area recognition on the line character region of the obliquely corrected ticket image, thereby respectively identifying the ticket
- the image contains the target line character area of the character information of each field to be recognized.
- a third identification module 105 configured to determine, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and a target line character region for each of the to-be-identified fields And calling the corresponding second recognition model for character recognition to respectively identify the character information included in the target line character region of each of the to-be-identified fields, and identifying each of the identified to be recognized
- the character information of the field is associated with the ticket picture.
- the system further has a second mapping relationship table between the to-be-identified field and the second identification model; the system identifies the target line character area of the character information of each to-be-identified field after the ticket picture is identified, a second mapping relationship table, first finding a second recognition model corresponding to each of the to-be-identified fields; and then, for each target character region of the to-be-identified field, calling a corresponding second recognition model for character recognition, thereby Each of the corresponding second recognition models identifies the character information included in the target line character region of each of the to-be-identified fields, and then associates the recognized character information of each of the to-be-identified fields with the ticket image to establish an association. Mapping relations.
- the ticket type in the received ticket picture is first identified by the pre-trained ticket picture recognition model, and the received ticket picture is tilt corrected by a predetermined correction rule; Determining, by the mapping relationship of the to-be-identified field, the to-be-identified field in the currently-received bill image; and determining, according to the mapping relationship between the to-be-identified field and the first recognition model, respectively, the first recognition model corresponding to each of the to-be-identified fields, The target line character region of each field to be identified is identified; finally, according to the mapping relationship between the field to be identified and the second recognition model, a second recognition model corresponding to each field to be identified is determined, and each of the second recognition models is respectively identified according to each second recognition model.
- the character information included in the target line character area of the to-be-identified field is associated with the current ticket image, so that the text information in the bill image uploaded by the user is automatically and accurately implemented. Identification.
- the training process of the ticket picture recognition model is as follows:
- Step S1 preparing a preset number of ticket picture samples marked with corresponding picture categories for each preset ticket picture category
- a preset number for example, 1000 sheets
- a preset number of coupon picture samples with corresponding picture categories are prepared; for example, there are two types of preset ticket picture categories, namely, outpatient tickets and hospitalization.
- the ticket prepares a preset number of ticket picture samples with the outpatient ticket and a preset number of ticket picture samples marked with the hospital ticket.
- Step S2 dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, and mixing the ticket picture samples in each training subset to obtain a training set. And mixing the sample of the bill pictures in each verification subset to obtain a verification set;
- the ticket picture samples are divided into a first proportion (for example, 80%) of the training subset and a second ratio (for example, 20%) of the verification subset, and then each of the obtained subsets
- the sample of the bill pictures in the training subset is mixed to obtain a training set (for example, the training set is formed by 80% of the bill picture sample of the outpatient bill and 80% of the bill picture sample of the hospital bill), and the respective verification subsets to be obtained
- the sample of the ticket pictures is mixed to obtain a verification set (eg, the verification set is formed by a mixture of 20% of the ticket picture sample of the outpatient ticket and 20% of the ticket picture sample of the hospitalized ticket).
- Step S3 using the training set to train the ticket picture recognition model, and using the verification set to verify the accuracy of the ticket picture recognition model after the training set is completed;
- the ticket picture recognition model is trained by using the obtained training set, and after the training of the ticket picture recognition model is completed by using the training set, the obtained verification set is used again. Verifying the accuracy of the ticket picture recognition model;
- Step S4 if the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;
- the verification threshold of the accuracy rate (ie, the preset accuracy rate, for example, 98.5%) is preset in the system, and is used to check the training effect of the ticket picture recognition model; if the ticket image is used by the verification set If the accuracy of the recognition of the recognition model is greater than the preset accuracy, then the training of the ticket image recognition model reaches a preset standard, and the model training is ended.
- step S5 if the accuracy rate is less than the preset accuracy rate, the number of ticket picture samples corresponding to each preset ticket picture category is increased, and steps S2 and S3 are performed again.
- the accuracy of the verification of the bill image recognition model by the verification set is less than or equal to the preset accuracy rate, it indicates that the training of the bill image recognition model has not reached the preset standard, and may be the number of training sets. Not enough or the number of verification sets is not enough, so in this case, increase the number of ticket picture samples corresponding to each preset ticket picture category (for example, increase the fixed number each time or increase the random number each time), and then here Based on this, the above steps S2 and S3 are re-executed, and the loop is executed until the requirement of step S4 is reached, and the model training is ended.
- the ticket picture recognition model is preferably a deep convolutional neural network (for example, the deep convolutional neural network may be a SSD (Single Shot MultiBox Detector) algorithm selected in a CaffeNet environment. Model), the deep convolutional neural network model used in this application consists of one input layer, 13 convolutional layers, 5 pooling layers, 2 fully connected layers, and 1 sorting layer.
- the detailed structure of the deep convolutional neural network model is shown in the following table:
- Layer Name column indicates the name of each layer
- Input indicates the input layer
- Conv indicates the convolution layer of the model
- Conv1 indicates the first convolution layer of the model
- MaxPool indicates the maximum pooling layer of the model
- MaxPool1 indicates the model.
- the first maximum pooling layer, Fc represents the fully connected layer in the model
- Fc1 represents the first fully connected layer in the model
- Softmax represents the Softmax classifier
- Batch Size represents the number of input images of the current layer
- Kernel Size represents the current layer
- the scale of the convolution kernel (for example, the Kernel Size can be equal to 3, indicating that the scale of the convolution kernel is 3x3)
- the Stride Size indicates the moving step size of the convolution kernel, that is, moving to the next convolution position after completing one convolution Distance
- Pad Size indicates the current network The size of the image fill in the layer.
- the ticket picture sample may be processed as follows:
- the transposition of the bill picture is judged and the flip adjustment is made; when the aspect ratio is greater than 1, the height and width of the bill picture are reversed, and if the stamp position is on the left side of the bill picture, the bill is The image is rotated clockwise by ninety degrees. If the stamp position is on the right side of the bill image, the bill image is rotated counterclockwise by ninety degrees. When the aspect ratio is less than 1, the bill image height and width are not reversed. The position is on the lower side of the ticket picture, and the ticket image is rotated clockwise by one hundred and eighty degrees.
- the first recognition model is a convolutional neural network model
- the training process for the first recognition model corresponding to a field to be identified is as follows:
- Step C1 Obtain a preset number of bill picture samples for the to-be-identified field
- the preset number (for example, 100,000) of the ticket picture samples are randomly obtained, wherein the partial ticket picture sample contains the character information of the to-be-identified field, and the partial ticket picture sample does not include the character information of the to-be-identified field.
- Step C2 the ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;
- the ticket picture sample containing the character information of the to-be-identified field is separated from the ticket picture sample not containing the character information of the to-be-identified field, and the ticket picture including the character information of the to-be-identified field is included
- the sample is classified into the first training set, and the ticket picture sample that does not contain the character information of the to-be-identified field is classified into the second training set.
- Step C3 Extracting, from the first training set and the second training set, the first preset ratio of the ticket picture samples as the sample picture to be trained, and taking the remaining ticket picture samples in the first training set and the second training set as Verified sample image;
- a first preset ratio for example, 80%
- the ticket picture sample is used as a sample picture with verification, so that the sample picture of the ticket to be trained and the sample picture to be verified are included in the sample picture with and without the character information of the to-be-identified field, and the included and not included
- the ticket picture sample of the character information of the field is consistent in the proportion of the sample picture to be trained and the sample picture to be verified.
- Step C4 performing model training using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;
- Step C5 if the verification pass rate is greater than or equal to the preset threshold, the training is completed;
- the verification threshold of the verification pass rate (ie, the preset threshold, for example, 98%) is preset in the system, and is used to check the training effect of the first recognition model; If the verification pass rate obtained by the first identification model verification is greater than the preset threshold, then the training of the first recognition model reaches the expected standard, and the model training is ended.
- Step C6 if the verification pass rate is less than the preset threshold, increase the number of bill picture samples, and Repeat steps C2, C3, and C4.
- the verification pass rate obtained by verifying the first recognition model by each of the sample images to be verified is less than or equal to the preset threshold, it indicates that the training of the first recognition model has not reached the expected standard, which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the loop is executed until the requirement of step C5 is reached, and the model training is ended.
- the expected standard which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the
- the second recognition model is a Long-Short Term Memory (LSTM), and the training process for the second recognition model corresponding to a field to be identified is as follows:
- Step D1 Obtain a preset number of ticket picture samples for the to-be-identified field, where each ticket picture sample contains only one line of character information of the to-be-identified field, the font is black, the background is white, and each ticket picture sample is The name is named as the character information of the to-be-identified field contained therein;
- each ticket picture sample includes and only contains one line of character information of the to-be-identified field, and the name of each ticket picture sample Named as the character information of the to-be-identified field contained therein; when the ticket picture sample is used for model training, the model can recognize the position of the character information according to the font color and the background color of the character information, thereby acquiring the Character information.
- a preset number for example, 100,000
- Step D2 dividing the ticket picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as training.
- All the acquired ticket picture samples are divided into a first data set and a second data set according to a ratio of a preset ratio X:Y (X and Y are greater than 0), wherein the number of picture samples in the first data set is smaller than the second data set.
- the number of picture samples is large, that is, X is greater than Y (for example, X is 4, Y is 1); the first data set is used as a training set for training the model; and the second data set is used as a test set for training the test model. effect.
- step D3 the image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model;
- the trained model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.
- the model is trained by the image samples in the first data set, and the second data set is tested on the model for each preset time (for example, every 1000 iterations) or at a preset frequency to detect the current
- the model effect of the training specifically, during the test, the model obtained by the current training is used to identify the character information of the image sample in the second data set, and the recognized result is compared with the name of the tested picture sample, thereby calculating the recognized
- the preferred error calculation in this embodiment uses the edit distance as the calculation standard.
- Step D4 if the error of the model identification of the image sample diverges, the training parameters are adjusted and retrained;
- the model discards the error of the image sample recognition, the model training does not meet the requirements. At this time, the model is trained according to the preset rules or randomly adjusted training parameters, so that the error of the recognition of the bill image by the model during training can be convergence.
- step D5 if the error of the model identification on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be-identified field.
- the trained model When the model converges on the error of the image sample recognition, the trained model meets the requirements, and the model training ends. Practicing, and the generated model (ie, the model after the current training) is taken as the second recognition model corresponding to the final identified field.
- the present application further provides a computer readable storage medium storing a ticket information identification system, the ticket information identification system being executable by at least one processor to cause the at least one processing
- the ticket information identifying method in any of the above embodiments is performed.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Image Analysis (AREA)
Abstract
The present application discloses an electronic device, a bill information identification method, and a storage medium. The method comprises: upon receiving a bill image to be processed, identifying a bill type of the bill image by means of a pre-trained bill image identification model; using a predetermined correction rule to perform skew correction on the bill image; determining fields to be identified corresponding to the identified bill type; determining a first identification model corresponding to the fields to be identified, and calling the corresponding first identification model to perform region identification on a character line region of the bill image having undergone skew correction, so as to identify a target character line region containing character information of the fields to be identified; and determining a second identification model corresponding to the fields to be identified, and calling the corresponding second identification model to perform character identification, so as to identify character information contained in the target character line region of the fields to be identified. The technical solution of the present application achieves accurate and highly efficient automatic identification of text information in a bill image.
Description
本申请基于巴黎公约申明享有2017年10月9日递交的申请号为CN201710929629.8、名称为“电子装置、票据信息识别方法和计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。The present application is based on the priority of the Chinese Patent Application entitled "Electronic Device, Bill Information Identification Method and Computer Readable Storage Medium", which is filed on October 9, 2017, with the application number of CN201710929629.8, which is filed on October 9, 2017. The overall content is incorporated herein by reference.
本申请涉及数据识别技术领域,特别涉及一种电子装置、票据信息识别方法和计算机可读存储介质。The present application relates to the field of data identification technologies, and in particular, to an electronic device, a ticket information identification method, and a computer readable storage medium.
如今随着经济的发展和人们生活水平的提高,越来越多的人选择购买医疗、商业、金融等保险。为了改善用户的保险理赔体验,提升保险理赔效率,目前,有些保险公司推出了自助理赔业务,比如用户在进行医疗保险理赔过程中,只需要将门诊或住院票据拍照上传到保险公司系统,保险公司业务员会将用户上传的票据图片上的信息录入到理赔系统中,以进行下一步操作,这种自助理赔方式大大方便了用户进行理赔的过程;然而,这种自助理赔方式在带来了便捷的理赔过程的同时,却增加了保险公司业务人员的工作压力,问题主要表现在需要花费大量的人力来处理用户上传的票据图像,效率低下,且数据录入的错误率居高不下。Nowadays, with the development of the economy and the improvement of people's living standards, more and more people choose to purchase medical, commercial, financial and other insurance. In order to improve the user's insurance claims experience and improve the efficiency of insurance claims, some insurance companies have launched self-service claims services. For example, in the process of medical insurance claims, users only need to upload photos of outpatient or hospital bills to the insurance company system, insurance companies. The salesperson will enter the information on the picture uploaded by the user into the claim system for the next step. This self-service settlement method greatly facilitates the user's process of claim settlement; however, this self-service settlement method brings convenience. At the same time of the claims process, it increases the work pressure of the insurance company's business personnel. The problem is mainly caused by the need to spend a lot of manpower to process the image uploaded by the user, which is inefficient and the error rate of data entry is high.
因此,运用于保险自助理赔业务的票据信息自动识别技术显得越来越重要和迫切,如何提出一种高效、准确地自动识别用户上传的票据图片中的文本信息的方案,成为亟待解决的问题。Therefore, the automatic identification technology of bill information applied to the insurance self-service claims business is becoming more and more important and urgent. How to propose a scheme for automatically and accurately identifying the text information in the bill pictures uploaded by users has become an urgent problem to be solved.
发明内容Summary of the invention
本申请的主要目的是提供一种电子装置、票据信息识别方法和计算机可读存储介质,旨在准确、高效的实现对用户上传的票据图片中的文本信息的自动识别。The main purpose of the present application is to provide an electronic device, a ticket information identification method, and a computer readable storage medium, which are intended to accurately and efficiently realize automatic identification of text information in a ticket picture uploaded by a user.
本申请第一方面提供一种电子装置,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的票据信息识别系统,所述票据信息识别系统被所述处理器执行时实现如下步骤:A first aspect of the present application provides an electronic device including a memory, a processor, and a memory information recognition system operable on the processor, where the ticket information identification system is executed by the processor Implement the following steps:
在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;
根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;
根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。
Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
本申请第二方面提供一种票据信息识别方法,该票据信息识别方法包括步骤:A second aspect of the present application provides a ticket information identification method, where the ticket information identification method includes the following steps:
在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;
根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;
根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
本申请第三方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有票据信息识别系统,所述票据信息识别系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A third aspect of the present application provides a computer readable storage medium storing a ticket information identification system, the ticket information identification system being executable by at least one processor to cause the at least one processor Perform the following steps:
在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;
利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;
根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;
根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
本申请技术方案,首先通过预先训练好的票据图片识别模型识别出收到的票据图片中的票据类别,并通过预先确定的矫正规则对收到的票据图片进行倾斜矫正;然后根据票据类别与待识别字段的映射关系,确定当前接收到的待处理票据图片中的待识别字段;再根据待识别字段与第一识别模型的映射关系,分别确定各个待识别字段各自对应的第一识别模型,以识别出各个待识别字段的目标行字符区域;最后根据待识别字段与第二识别模型的映射关系,确定各个待识别字段各自对应的第二识别模型,根据各个第二识别模型分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别出的各个字符信息与当前的票据图片进行关联映射,如此准确、高效的实现对用户上传的票据图片中的文本信息的自动识别。
In the technical solution of the present application, the ticket type in the received bill picture is first identified by the pre-trained bill picture recognition model, and the received bill picture is tilt corrected by a predetermined correction rule; Identifying the mapping relationship of the field, determining the to-be-identified field in the currently received bill image; and determining the first recognition model corresponding to each of the to-be-identified fields according to the mapping relationship between the to-be-identified field and the first recognition model, Identifying a target line character region of each field to be identified; finally, determining a second recognition model corresponding to each field to be identified according to a mapping relationship between the field to be identified and the second recognition model, and identifying each of the respective groups according to each second recognition model The character information included in the target line character area of the identification field is described, and the identified individual character information is associated with the current ticket picture, so that the automatic identification of the text information in the ticket picture uploaded by the user is realized accurately and efficiently. .
图1为本申请票据信息识别方法一实施例的流程示意图;1 is a schematic flow chart of an embodiment of a method for identifying a ticket information according to the present application;
图2为本申请票据信息识别方法一实施例中票据图片识别模型的训练过程流程图;2 is a flowchart of a training process of a bill picture recognition model in an embodiment of the bill information identification method of the present application;
图3为本申请票据信息识别方法一实施例中第一识别模型的训练过程流程图;3 is a flowchart of a training process of a first identification model in an embodiment of a ticket information identification method of the present application;
图4为本申请票据信息识别方法一实施例中第二识别模型的训练过程流程图;4 is a flowchart of a training process of a second identification model in an embodiment of the ticket information identification method of the present application;
图5为本申请票据信息识别系统一实施例的运行环境示意图;5 is a schematic diagram of an operating environment of an embodiment of a ticket information identification system of the present application;
图6为本申请票据信息识别系统一实施例的程序模块图。FIG. 6 is a program block diagram of an embodiment of a ticket information identification system of the present application.
以下结合附图对本申请的原理和特征进行描述,所举实例只用于解释本申请,并非用于限定本申请的范围。The principles and features of the present application are described in the following with reference to the accompanying drawings, which are only used to explain the present application and are not intended to limit the scope of the application.
如图1所示,图1为本申请票据信息识别方法一实施例的流程示意图。As shown in FIG. 1 , FIG. 1 is a schematic flowchart of an embodiment of a method for identifying a bill information according to the present application.
本实施例中,该票据信息识别方法包括:In this embodiment, the method for identifying the ticket information includes:
步骤S10,在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;Step S10, after receiving the picture of the bill to be processed, using the pre-trained bill picture recognition model to identify the bill type in the received bill picture, and output the category identification result of the bill;
系统在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片进行识别,识别出票据的类别并输出类别识别结果;例如,系统收到的待处理的票据图片为医疗票据图片,而医疗票据的类别包括门诊票据、住院票据、手术票据等,那么系统利用票据图片识别模型系统对收到的医疗票据图片识别后,输出该医疗票据的类别识别结果:门诊票据、住院票据、手术票据等。After receiving the picture of the bill to be processed, the system uses the pre-trained bill picture recognition model to identify the received bill picture, identify the category of the bill and output the category identification result; for example, the bill to be processed received by the system The picture is a picture of the medical bill, and the category of the medical bill includes the outpatient bill, the hospital bill, the surgical bill, etc., then the system uses the bill picture recognition model system to identify the received medical bill picture, and outputs the category identification result of the medical bill: the clinic Bills, hospital bills, surgical bills, etc.
步骤S20,利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Step S20, performing tilt correction on the received bill image by using a predetermined correction rule;
系统中具有预先确定的矫正规则;由于用户上传到系统的票据图片(即系统收到的票据图片)通常都有一定的歪斜,因此系统会对收到的票据图片利用预先确定的矫正规则进行倾斜矫正,以确保系统对票据信息的识别成功率。本实施例优选所述预先确定的矫正规则为:首先,用霍夫变换(Hough)的概率算法找出图像中尽可能多的小段直线;然后,从找出的小段直线中确定出所有偏水平的直线,并将确定出的直线中x坐标值相差小于第一预设差值(例如0.2cm)的直线按对应的y坐标值的大小顺序依次相连,按照x坐标值大小分为若干类,或者,将确定出的直线中y坐标值相差小于第二预设差值(例如0.3cm)的直线按对应的x坐标值的大小顺序依次相连,按照y坐标值大小分为若干类;接着,将属于一类的所有水平直线作为一个目标类直线,并通过最小二乘法找出最接近各个目标类直线的长直线;最后,计算出各个长直线的斜率,计算出各个长直线的斜率的中位数和均值,比较计算出的斜率的中位数和均值的大小以确定出较小者,并根据确定出的较小者调整图像倾角。当然,在其它实施例中,还可以采取其它矫正规则。The system has predetermined correction rules; since the picture of the ticket uploaded by the user to the system (that is, the picture of the ticket received by the system) usually has a certain skew, the system will tilt the received picture of the ticket with a predetermined correction rule. Correction to ensure the system's success rate of identification of ticket information. Preferably, in the embodiment, the predetermined correction rule is: first, using a probability algorithm of Hough transform to find as many small straight lines as possible in the image; and then determining all the horizontal levels from the found small straight line. a straight line, and the straight lines in which the x coordinate values differ by less than the first preset difference (for example, 0.2 cm) are sequentially connected in the order of the corresponding y coordinate values, and are classified into several classes according to the size of the x coordinate value. Alternatively, the straight lines in which the determined y coordinate values differ by less than the second preset difference value (for example, 0.3 cm) are sequentially connected in the order of the magnitude of the corresponding x coordinate value, and are classified into several classes according to the size of the y coordinate value; All horizontal lines belonging to a class are regarded as a target class line, and the longest line closest to each target class line is found by least square method; finally, the slope of each long line is calculated, and the slope of each long line is calculated. The number of bits and the mean, the median and mean of the calculated slope are compared to determine the smaller one, and the image tilt is adjusted based on the smaller one determined. Of course, in other embodiments, other correction rules may also be employed.
步骤S30,根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Step S30: Determine, according to a mapping relationship between the predetermined ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
系统在得到票据图片的票据类别后,根据预先确定的票据类别与待识别字段的映射关系,则可确定出收到的票据图片的票据类别所对应的待识别字段,该票据类别对应的待识别字段的数量可能是一个或多个。After obtaining the ticket category of the ticket picture, the system may determine the to-be-identified field corresponding to the ticket category of the received ticket picture according to the mapping relationship between the predetermined ticket category and the to-be-identified field, and the ticket category corresponding to the identifier to be identified The number of fields may be one or more.
步骤S40,根据预先确定的待识别字段与第一识别模型的映射关系,确定各
个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Step S40: determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model,
And the first recognition model corresponding to the to-be-identified field, for each of the to-be-identified fields, calling a corresponding first recognition model to perform region recognition on the line character region of the obliquely corrected bill image to identify each of the included a target line character area of the character information of the identified field;
系统中具有预先确定的待识别字段与第一识别模型的第一映射关系表;系统在确定出票据图片的各个待识别字段后,通过查找该第一映射关系表,则可找到各个所述待识别字段各自对应的第一识别模型;系统针对每个待识别字段,均调用该待识别字段对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,从而分别识别出票据图片中包含各个待识别字段的字符信息的目标行字符区域。The system has a first mapping relationship table between the to-be-identified field and the first identification model; after the system determines each of the to-be-identified fields of the ticket image, the system can find each of the to-be-finished by searching the first mapping relationship table. Identifying a first recognition model corresponding to each of the fields; the system, for each field to be identified, calling the first recognition model corresponding to the to-be-identified field to perform area recognition on the line character region of the obliquely corrected ticket image, thereby respectively identifying the ticket The image contains the target line character area of the character information of each field to be recognized.
步骤S50,根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Step S50: Determine, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and call a corresponding number for each of the target line character regions of the to-be-identified field. The second recognition model performs character recognition to respectively identify the character information included in the target line character region of each of the to-be-identified fields, and associates the identified character information of each of the to-be-identified fields with the ticket image.
系统中还具有预先确定的待识别字段与第二识别模型的第二映射关系表;系统在识别出所述票据图片中分别包含各个待识别字段的字符信息的目标行字符区域后,通过查找第二映射关系表,先找到各个所述待识别字段各自对应的第二识别模型;然后针对每个所述待识别字段的目标行字符区域,均调用对应的第二识别模型进行字符识别,从而通过各个对应的第二识别模型识别出各个所述待识别字段的目标行字符区域包含的字符信息,再将识别出的各个所述待识别字段的字符信息与所述票据图片进行关联映射,建立关联映射关系。The system further has a second mapping relationship table between the to-be-identified field and the second identification model; the system identifies the target line character area of the character information of each to-be-identified field after the ticket picture is identified, a second mapping relationship table, first finding a second recognition model corresponding to each of the to-be-identified fields; and then, for each target character region of the to-be-identified field, calling a corresponding second recognition model for character recognition, thereby Each of the corresponding second recognition models identifies the character information included in the target line character region of each of the to-be-identified fields, and then associates the recognized character information of each of the to-be-identified fields with the ticket image to establish an association. Mapping relations.
本实施例技术方案,首先通过预先训练好的票据图片识别模型识别出收到的票据图片中的票据类别,并通过预先确定的矫正规则对收到的票据图片进行倾斜矫正;然后根据票据类别与待识别字段的映射关系,确定当前接收到的待处理票据图片中的待识别字段;再根据待识别字段与第一识别模型的映射关系,分别确定各个待识别字段各自对应的第一识别模型,以识别出各个待识别字段的目标行字符区域;最后根据待识别字段与第二识别模型的映射关系,确定各个待识别字段各自对应的第二识别模型,根据各个第二识别模型分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别出的各个字符信息与当前的票据图片进行关联映射,如此准确、高效的实现对用户上传的票据图片中的文本信息的自动识别。In the technical solution of the embodiment, the ticket type in the received ticket picture is first identified by the pre-trained ticket picture recognition model, and the received ticket picture is tilt corrected by a predetermined correction rule; Determining, by the mapping relationship of the to-be-identified field, the to-be-identified field in the currently-received bill image; and determining, according to the mapping relationship between the to-be-identified field and the first recognition model, respectively, the first recognition model corresponding to each of the to-be-identified fields, The target line character region of each field to be identified is identified; finally, according to the mapping relationship between the field to be identified and the second recognition model, a second recognition model corresponding to each field to be identified is determined, and each of the second recognition models is respectively identified according to each second recognition model. The character information included in the target line character area of the to-be-identified field is associated with the current ticket image, so that the text information in the bill image uploaded by the user is automatically and accurately implemented. Identification.
如图2所示,本实施例中,所述票据图片识别模型的训练过程如下:As shown in FIG. 2, in this embodiment, the training process of the ticket picture recognition model is as follows:
步骤S1,为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;Step S1, preparing a preset number of ticket picture samples marked with corresponding picture categories for each preset ticket picture category;
针对每一个预设票据图片类别,均准备预设数量(例如,1000张)的标注有对应的图片类别的票据图片样本;例如,预设票据图片类别总共有两种,分别为门诊票据和住院票据,则准备预设数量的标注有门诊票据的票据图片样本和预设数量的标注有住院票据的票据图片样本。For each preset ticket picture category, a preset number (for example, 1000 sheets) of coupon picture samples with corresponding picture categories are prepared; for example, there are two types of preset ticket picture categories, namely, outpatient tickets and hospitalization. The ticket prepares a preset number of ticket picture samples with the outpatient ticket and a preset number of ticket picture samples marked with the hospital ticket.
步骤S2,将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;Step S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, and mixing the ticket picture samples in each training subset to obtain a training set. And mixing the sample of the bill pictures in each verification subset to obtain a verification set;
针对每一个预设票据图片类别对应的票据图片样本,均分为第一比例(例如,80%)的训练子集和第二比例(例如,20%)的验证子集,然后将得到的各个训练子集中的票据图片样本混合,以得到训练集(例如,训练集由门诊票据的票据图
片样本的80%与住院票据的票据图片样本的80%混合形成),以及将得到的各个验证子集中的票据图片样本混合,以得到验证集(例如,验证集由门诊票据的票据图片样本的20%与住院票据的票据图片样本的20%混合形成)。For each of the preset ticket picture categories, the ticket picture samples are divided into a first proportion (for example, 80%) of the training subset and a second ratio (for example, 20%) of the verification subset, and then each of the obtained subsets A sample of the bill pictures in the training subset is mixed to obtain a training set (for example, a training set of bills by the outpatient bill)
80% of the sample of the tablet is mixed with 80% of the sample of the ticket image of the hospitalized ticket), and the obtained sample of the ticket image in each verification subset is mixed to obtain a verification set (for example, the verification set is sampled by the ticket picture of the outpatient ticket) 20% is formed by mixing 20% of the sample picture of the hospital bill.
步骤S3,利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;Step S3, using the training set to train the ticket picture recognition model, and using the verification set to verify the accuracy of the ticket picture recognition model after the training set is completed;
在得到训练集和验证集后,先用得到的训练集对所述票据图片识别模型进行训练,在用所述训练集对所述票据图片识别模型训练完成后,再用得到的所述验证集对该票据图片识别模型的准确率进行验证;After obtaining the training set and the verification set, the ticket picture recognition model is trained by using the obtained training set, and after the training of the ticket picture recognition model is completed by using the training set, the obtained verification set is used again. Verifying the accuracy of the ticket picture recognition model;
步骤S4,若准确率大于或者等于预设准确率,则训练结束;Step S4, if the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;
系统中预先设置了准确率的验证阈值(即所述预设准确率,例如98.5%),用于对所述票据图片识别模型的训练效果进行检验;若通过所述验证集对所述票据图片识别模型验证得到的准确率大于所述预设准确率,那么说明该票据图片识别模型的训练达到了预设标准,此时则结束模型训练。The verification threshold of the accuracy rate (ie, the preset accuracy rate, for example, 98.5%) is preset in the system, and is used to check the training effect of the ticket picture recognition model; if the ticket image is used by the verification set If the accuracy of the recognition of the recognition model is greater than the preset accuracy, then the training of the ticket image recognition model reaches a preset standard, and the model training is ended.
步骤S5,若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。In step S5, if the accuracy rate is less than the preset accuracy rate, the number of ticket picture samples corresponding to each preset ticket picture category is increased, and steps S2 and S3 are performed again.
若是通过所述验证集对所述票据图片识别模型验证得到的准确率小于或等于所述预设准确率,那么说明该票据图片识别模型的训练还没有达到了预设标准,可能是训练集数量不够或验证集数量不够,所以,在这种情况时,则增加每一个预设票据图片类别对应的票据图片样本的数量(例如,每次增加固定数量或每次增加随机数量),然后在这基础上,重新执行上述步骤S2和S3,如此循环执行,直至达到了步骤S4的要求,则结束模型训练。If the accuracy of the verification of the bill image recognition model by the verification set is less than or equal to the preset accuracy rate, it indicates that the training of the bill image recognition model has not reached the preset standard, and may be the number of training sets. Not enough or the number of verification sets is not enough, so in this case, increase the number of ticket picture samples corresponding to each preset ticket picture category (for example, increase the fixed number each time or increase the random number each time), and then here Based on this, the above steps S2 and S3 are re-executed, and the loop is executed until the requirement of step S4 is reached, and the model training is ended.
本实施例中,所述票据图片识别模型优选为深度卷积神经网络(例如,该深度卷积神经网络可以为在CaffeNet的环境下选取的基于深度卷积神经网络SSD(Single Shot MultiBox Detector)算法模型),本申请采用的深度卷积神经网络模型由1个输入层,13个卷积层,5个池化层,2个全连接层,1个分类层构成。所述深度卷积神经网络模型的详细结构如下表所示:In this embodiment, the ticket picture recognition model is preferably a deep convolutional neural network (for example, the deep convolutional neural network may be a SSD (Single Shot MultiBox Detector) algorithm selected in a CaffeNet environment. Model), the deep convolutional neural network model used in this application consists of one input layer, 13 convolutional layers, 5 pooling layers, 2 fully connected layers, and 1 sorting layer. The detailed structure of the deep convolutional neural network model is shown in the following table:
其中:Layer Name列表示每一层的名称,Input表示输入层,Conv表示模型的卷积层,Conv1表示模型的第1个卷积层,MaxPool表示模型的最大值池化层,MaxPool1表示模型的第1个最大值池化层,Fc表示模型中的全连接层,Fc1表示模型中第1个全连接层,Softmax表示Softmax分类器;Batch Size表示当前层的输入图像数目;Kernel Size表示当前层卷积核的尺度(例如,Kernel Size可以等于3,表示卷积核的尺度为3x3);Stride Size表示卷积核的移动步长,即做完一次卷积之后移动到下一个卷积位置的距离;Pad Size表示对当前网络层之中的图像填充的大小。Among them: Layer Name column indicates the name of each layer, Input indicates the input layer, Conv indicates the convolution layer of the model, Conv1 indicates the first convolution layer of the model, MaxPool indicates the maximum pooling layer of the model, and MaxPool1 indicates the model. The first maximum pooling layer, Fc represents the fully connected layer in the model, Fc1 represents the first fully connected layer in the model, Softmax represents the Softmax classifier; Batch Size represents the number of input images of the current layer; Kernel Size represents the current layer The scale of the convolution kernel (for example, the Kernel Size can be equal to 3, indicating that the scale of the convolution kernel is 3x3); the Stride Size indicates the moving step size of the convolution kernel, that is, moving to the next convolution position after completing one convolution Distance; Pad Size indicates the size of the image fill in the current network layer.
本实施例中,所述票据图片识别模型的训练过程之前,可对票据图片样本做如下处理:In this embodiment, before the training process of the ticket picture recognition model, the ticket picture sample may be processed as follows:
根据其高宽比信息以及印章的位置判断票据图片的转置情况,并做翻转调整;当高宽比大于1时,说明票据图片高宽颠倒,若印章位置在票据图片左侧,则对票据图像做顺时针旋转九十度处理,若印章位置在票据图片右侧,则对票据图像做逆时针旋转九十度处理;当高宽比小于1时,说明票据图片高宽未颠倒,若印章位置在票据图片下侧,则对票据图像做顺时针旋转一百八十度处理。According to the aspect ratio information and the position of the seal, the transposition of the bill picture is judged and the flip adjustment is made; when the aspect ratio is greater than 1, the height and width of the bill picture are reversed, and if the stamp position is on the left side of the bill picture, the bill is The image is rotated clockwise by ninety degrees. If the stamp position is on the right side of the bill image, the bill image is rotated counterclockwise by ninety degrees. When the aspect ratio is less than 1, the bill image height and width are not reversed. The position is on the lower side of the ticket picture, and the ticket image is rotated clockwise by one hundred and eighty degrees.
找出标注存在严重问题的票据图片样本(比如,关键位置信息缺失或超出整张图片范围,以及印章标注位置位于票据中央等明显错误的票据图片样本),将这些票据图片样本去除,确保票据图片样本的准确无误,从而确保训练效果。Find out the sample of the bill image with serious problems (for example, the key position information is missing or beyond the entire image range, and the stamp mark position is in the center of the bill, such as the bill sample sample that is obviously wrong), remove the bill image samples to ensure the bill image The accuracy of the sample ensures the training effect.
进一步地,如图3所示,本实施例优选所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:Further, as shown in FIG. 3, in the embodiment, the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:
步骤C1,针对该待识别字段,获取预设数量的票据图片样本;Step C1: Obtain a preset number of bill picture samples for the to-be-identified field;
随机获取预设数量(例如,10万个)的票据图片样本,其中,部分票据图片样本包含该待识别字段的字符信息,部分票据图片样本则不包含该待识别字段的字符信息。The preset number (for example, 100,000) of the ticket picture samples are randomly obtained, wherein the partial ticket picture sample contains the character information of the to-be-identified field, and the partial ticket picture sample does not include the character information of the to-be-identified field.
步骤C2,将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;Step C2, the ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;
从获取的票据图片样本中,将包含该待识别字段的字符信息的票据图片样本与不包含该待识别字段的字符信息的票据图片样本分开,并将包含该待识别字段的字符信息的票据图片样本归入第一训练集,以及将不包含该待识别字段的字符信息的票据图片样本归入第二训练集。From the obtained ticket picture sample, the ticket picture sample containing the character information of the to-be-identified field is separated from the ticket picture sample not containing the character information of the to-be-identified field, and the ticket picture including the character information of the to-be-identified field is included The sample is classified into the first training set, and the ticket picture sample that does not contain the character information of the to-be-identified field is classified into the second training set.
步骤C3,分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;Step C3: Extracting, from the first training set and the second training set, the first preset ratio of the ticket picture samples as the sample picture to be trained, and taking the remaining ticket picture samples in the first training set and the second training set as Verified sample image;
从所述第一训练集和第二训练集中分别提取出第一预设比例(例如,80%)的票据图片样本作为待训练的样本图片,以及将第一训练集和第二训练集中剩余的票据图片样本作为带验证的样本图片,这样使得待训练的样本图片和待验证的样本图片中均存在包含和不包含该待识别字段的字符信息的票据图片样本,且包含和不包含该待识别字段的字符信息的票据图片样本在待训练的样本图片和待
验证的样本图片中的比例一致。Extracting, from the first training set and the second training set, a first preset ratio (for example, 80%) of bill picture samples as sample pictures to be trained, and remaining the first training set and the second training set The ticket picture sample is used as a sample picture with verification, so that the sample picture of the ticket to be trained and the sample picture to be verified are included in the sample picture with and without the character information of the to-be-identified field, and the included and not included The sample image of the character information of the field is sampled and to be sampled in the sample to be trained
The proportions in the verified sample images are consistent.
步骤C4,利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;Step C4: performing model training using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;
用提取的各个待训练的样本图片对预设类型模型进行模型训练,从而得到所述第一识别模型,然后再用各个待验证的样本图片对得到的所述第一识别模型进行验证,得出所述第一识别模型的验证通过率。Performing model training on the preset type model by using the extracted sample images to be trained, thereby obtaining the first recognition model, and then verifying the obtained first recognition model with each sample image to be verified, and obtaining The verification pass rate of the first recognition model.
步骤C5,若验证通过率大于等于预设阈值,则训练完成;Step C5, if the verification pass rate is greater than or equal to the preset threshold, the training is completed;
系统中预先设置了验证通过率的验证阈值(即所述预设阈值,例如98%),用于对所述第一识别模型的训练效果进行检验;若通过各个所述待验证的样本图片对所述第一识别模型验证得到的验证通过率大于所述预设阈值,那么说明该第一识别模型的训练达到了预期标准,此时则结束模型训练。The verification threshold of the verification pass rate (ie, the preset threshold, for example, 98%) is preset in the system, and is used to check the training effect of the first recognition model; If the verification pass rate obtained by the first identification model verification is greater than the preset threshold, then the training of the first recognition model reaches the expected standard, and the model training is ended.
步骤C6,若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。In step C6, if the verification pass rate is less than the preset threshold, the number of ticket picture samples is increased, and steps C2, C3, and C4 are repeatedly executed.
若是通过各个所述待验证的样本图片对所述第一识别模型验证得到的验证通过率小于或等于所述预设阈值,那么说明该第一识别模型的训练还没有达到了预期标准,可能是待训练的样本图片数量不够或待验证的样本图片数量不够,所以,在这种情况时,则增加所述票据图片样本的数量(例如,每次增加固定数量或每次增加随机数量),然后在这基础上,重新执行上述步骤C2、C3和C4,如此循环执行,直至达到了步骤C5的要求,则结束模型训练。If the verification pass rate obtained by verifying the first recognition model by each of the sample images to be verified is less than or equal to the preset threshold, it indicates that the training of the first recognition model has not reached the expected standard, which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the loop is executed until the requirement of step C5 is reached, and the model training is ended.
进一步地,如图4所示,本实施例优选所述第二识别模型为时间递归神经网络模型(Long-Short Term Memory,LSTM),针对一个待识别字段对应的第二识别模型的训练过程如下:Further, as shown in FIG. 4, in the embodiment, the second recognition model is a Long-Short Term Memory (LSTM), and the training process for the second recognition model corresponding to a field to be identified is as follows: :
步骤D1,针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Step D1: Obtain a preset number of ticket picture samples for the to-be-identified field, where each ticket picture sample contains only one line of character information of the to-be-identified field, the font is black, the background is white, and each ticket picture sample is The name is named as the character information of the to-be-identified field contained therein;
获取预设数量(例如,10万个)的票据图片样本;获取的票据图片样本中,每个票据图片样本中包含且仅包含一行该待识别字段的字符信息,将每个票据图片样本的名称各自命名为其所述包含的该待识别字段的字符信息;该票据图片样本用于模型训练时,模型根据该字符信息的字体颜色和背景颜色即可识别出该字符信息的位置,从而获取该字符信息。Obtaining a preset number (for example, 100,000) of ticket picture samples; in the obtained ticket picture sample, each ticket picture sample includes and only contains one line of character information of the to-be-identified field, and the name of each ticket picture sample Named as the character information of the to-be-identified field contained therein; when the ticket picture sample is used for model training, the model can recognize the position of the character information according to the font color and the background color of the character information, thereby acquiring the Character information.
步骤D2,将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Step D2, dividing the ticket picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as training. Set, the second data set as a test set;
将获取的所有票据图片样本按照预设比例X:Y(X、Y均大于0)的比例分成第一数据集和第二数据集,其中,第一数据集中的图片样本数量比第二数据集中的图片样本数量多,即X大于Y(例如,X为4,Y为1);将第一数据集作为训练集,用于训练模型;第二数据集作为测试集,用于测试模型的训练效果。All the acquired ticket picture samples are divided into a first data set and a second data set according to a ratio of a preset ratio X:Y (X and Y are greater than 0), wherein the number of picture samples in the first data set is smaller than the second data set. The number of picture samples is large, that is, X is greater than Y (for example, X is 4, Y is 1); the first data set is used as a training set for training the model; and the second data set is used as a test set for training the test model. effect.
步骤D3,将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果和该图片样本的名称的误差。In step D3, the image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The trained model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.
用第一数据集中的图片样本对模型进行训练,在训练过程中每个预设时间
(例如每进行1000次迭代)或者以预设的频率,对模型使用第二数据集进行测试,以检测当前训练的模型效果;具体在测试时,使用当前训练得到的模型对第二数据集中的图片样本进行字符信息识别,并将识别出的结果与测试的图片样本的名称做对比,从而计算出识别的结果与该图片样本的名称的误差,本实施例优选误差计算采用编辑距离作为计算标准。Training the model with image samples from the first dataset, each preset time during the training process
(for example, every 1000 iterations) or at a preset frequency, the model is tested using the second data set to detect the effect of the currently trained model; specifically, during the test, the model obtained by the current training is used in the second data set. The picture sample performs character information recognition, and compares the recognized result with the name of the tested picture sample, thereby calculating the error between the recognition result and the name of the picture sample. In this embodiment, the error calculation uses the edit distance as the calculation standard. .
步骤D4,若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;Step D4, if the error of the model identification of the image sample diverges, the training parameters are adjusted and retrained;
如果模型对图片样本识别的误差出现发散,则模型训练不符合要求,此时则按预设规则或随机调整训练参数后重新对该模型进行训练,使训练时模型对票据图片的识别的误差能够收敛。If the model discards the error of the image sample recognition, the model training does not meet the requirements. At this time, the model is trained according to the preset rules or randomly adjusted training parameters, so that the error of the recognition of the bill image by the model during training can be convergence.
步骤D5,若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。In step D5, if the error of the model identification on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be-identified field.
当模型对图片样本识别的误差收敛时,训练的模型达到要求,则结束模型训练,并将生成的模型(即当前训练后的模型)作为最终的该待识别字段对应的第二识别模型。When the model converges on the error of the picture sample recognition, if the trained model meets the requirements, the model training is ended, and the generated model (ie, the current trained model) is used as the final second recognition model corresponding to the to-be-identified field.
此外,本申请还提出一种票据信息识别系统。In addition, the present application also proposes a ticket information identification system.
请参阅图5,是本申请票据信息识别系统10较佳实施例的运行环境示意图。Please refer to FIG. 5 , which is a schematic diagram of an operating environment of a preferred embodiment of the ticket information identification system 10 of the present application.
在本实施例中,票据信息识别系统10安装并运行于电子装置1中。电子装置1可以是桌上型计算机、笔记本、掌上电脑及服务器等计算设备。该电子装置1可包括,但不仅限于,存储器11、处理器12及显示器13。图5仅示出了具有组件11-13的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In the present embodiment, the ticket information identification system 10 is installed and operated in the electronic device 1. The electronic device 1 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a server. The electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Figure 5 shows only the electronic device 1 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
存储器11在一些实施例中可以是电子装置1的内部存储单元,例如该电子装置1的硬盘或内存。存储器11在另一些实施例中也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括电子装置1的内部存储单元也包括外部存储设备。存储器11用于存储安装于电子装置1的应用软件及各类数据,例如票据信息识别系统10的程序代码等。存储器11还可以用于暂时地存储已经输出或者将要输出的数据。The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a hard disk or memory of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 is used to store application software and various types of data, such as program codes of the ticket information recognition system 10, installed in the electronic device 1. The memory 11 can also be used to temporarily store data that has been output or is about to be output.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行票据信息识别系统10等。The processor 12, in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing ticket information identification. System 10 and so on.
显示器13在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器13用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面,例如业务定制界面等。电子装置1的部件11-13通过系统总线相互通信。The display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like in some embodiments. The display 13 is for displaying information processed in the electronic device 1 and a user interface for displaying visualization, such as a business customization interface or the like. The components 11-13 of the electronic device 1 communicate with one another via a system bus.
请参阅图6,是本申请票据信息识别系统10较佳实施例的程序模块图。在本实施例中,票据信息识别系统10可以被分割成一个或多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本申请。例如,在图6中,票据信息识别系统10可以被分割成第一识别模块101、矫正模块102、确定模块103、第二识别模块104及第三识别模块105。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述票据信息识别系统10在电子装置1中的执行过程,其
中:Please refer to FIG. 6, which is a program module diagram of a preferred embodiment of the ticket information identification system 10 of the present application. In the present embodiment, the ticket information identification system 10 can be divided into one or more modules, one or more modules are stored in the memory 11, and by one or more processors (the processor 12 in this embodiment) Executed to complete the application. For example, in FIG. 6, the ticket information identification system 10 can be divided into a first identification module 101, a correction module 102, a determination module 103, a second identification module 104, and a third identification module 105. The module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program for describing the execution process of the ticket information recognition system 10 in the electronic device 1.
in:
第一识别模块101,用于在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;The first identification module 101 is configured to: after receiving the picture of the ticket to be processed, identify the type of the ticket in the received ticket picture by using the pre-trained ticket picture recognition model, and output the category identification result of the ticket;
系统在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片进行识别,识别出票据的类别并输出类别识别结果;例如,系统收到的待处理的票据图片为医疗票据图片,而医疗票据的类别包括门诊票据、住院票据、手术票据等,那么系统利用票据图片识别模型系统对收到的医疗票据图片识别后,输出该医疗票据的类别识别结果:门诊票据、住院票据、手术票据等。After receiving the picture of the bill to be processed, the system uses the pre-trained bill picture recognition model to identify the received bill picture, identify the category of the bill and output the category identification result; for example, the bill to be processed received by the system The picture is a picture of the medical bill, and the category of the medical bill includes the outpatient bill, the hospital bill, the surgical bill, etc., then the system uses the bill picture recognition model system to identify the received medical bill picture, and outputs the category identification result of the medical bill: the clinic Bills, hospital bills, surgical bills, etc.
矫正模块102,用于利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;The correction module 102 is configured to perform tilt correction on the received bill image by using a predetermined correction rule;
系统中具有预先确定的矫正规则;由于用户上传到系统的票据图片(即系统收到的票据图片)通常都有一定的歪斜,因此系统会对收到的票据图片利用预先确定的矫正规则进行倾斜矫正,以确保系统对票据信息的识别成功率。本实施例优选所述预先确定的矫正规则为:首先,用霍夫变换(Hough)的概率算法找出图像中尽可能多的小段直线;然后,从找出的小段直线中确定出所有偏水平的直线,并将确定出的直线中x坐标值相差小于第一预设差值(例如0.2cm)的直线按对应的y坐标值的大小顺序依次相连,按照x坐标值大小分为若干类,或者,将确定出的直线中y坐标值相差小于第二预设差值(例如0.3cm)的直线按对应的x坐标值的大小顺序依次相连,按照y坐标值大小分为若干类;接着,将属于一类的所有水平直线作为一个目标类直线,并通过最小二乘法找出最接近各个目标类直线的长直线;最后,计算出各个长直线的斜率,计算出各个长直线的斜率的中位数和均值,比较计算出的斜率的中位数和均值的大小以确定出较小者,并根据确定出的较小者调整图像倾角。当然,在其它实施例中,还可以采取其它矫正规则。The system has predetermined correction rules; since the picture of the ticket uploaded by the user to the system (that is, the picture of the ticket received by the system) usually has a certain skew, the system will tilt the received picture of the ticket with a predetermined correction rule. Correction to ensure the system's success rate of identification of ticket information. Preferably, in the embodiment, the predetermined correction rule is: first, using a probability algorithm of Hough transform to find as many small straight lines as possible in the image; and then determining all the horizontal levels from the found small straight line. a straight line, and the straight lines in which the x coordinate values differ by less than the first preset difference (for example, 0.2 cm) are sequentially connected in the order of the corresponding y coordinate values, and are classified into several classes according to the size of the x coordinate value. Alternatively, the straight lines in which the determined y coordinate values differ by less than the second preset difference value (for example, 0.3 cm) are sequentially connected in the order of the magnitude of the corresponding x coordinate value, and are classified into several classes according to the size of the y coordinate value; All horizontal lines belonging to a class are regarded as a target class line, and the longest line closest to each target class line is found by least square method; finally, the slope of each long line is calculated, and the slope of each long line is calculated. The number of bits and the mean, the median and mean of the calculated slope are compared to determine the smaller one, and the image tilt is adjusted based on the smaller one determined. Of course, in other embodiments, other correction rules may also be employed.
确定模块103,用于根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;a determining module 103, configured to determine, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;
系统在得到票据图片的票据类别后,根据预先确定的票据类别与待识别字段的映射关系,则可确定出收到的票据图片的票据类别所对应的待识别字段,该票据类别对应的待识别字段的数量可能是一个或多个。After obtaining the ticket category of the ticket picture, the system may determine the to-be-identified field corresponding to the ticket category of the received ticket picture according to the mapping relationship between the predetermined ticket category and the to-be-identified field, and the ticket category corresponding to the identifier to be identified The number of fields may be one or more.
第二识别模块104,用于根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;The second identification module 104 is configured to determine, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first identification model corresponding to each of the to-be-identified fields, and invoke a corresponding An identification model performs area recognition on the line character area of the obliquely corrected ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;
系统中具有预先确定的待识别字段与第一识别模型的第一映射关系表;系统在确定出票据图片的各个待识别字段后,通过查找该第一映射关系表,则可找到各个所述待识别字段各自对应的第一识别模型;系统针对每个待识别字段,均调用该待识别字段对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,从而分别识别出票据图片中包含各个待识别字段的字符信息的目标行字符区域。The system has a first mapping relationship table between the to-be-identified field and the first identification model; after the system determines each of the to-be-identified fields of the ticket image, the system can find each of the to-be-finished by searching the first mapping relationship table. Identifying a first recognition model corresponding to each of the fields; the system, for each field to be identified, calling the first recognition model corresponding to the to-be-identified field to perform area recognition on the line character region of the obliquely corrected ticket image, thereby respectively identifying the ticket The image contains the target line character area of the character information of each field to be recognized.
第三识别模块105,用于根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别
字段的字符信息与所述票据图片进行关联映射。a third identification module 105, configured to determine, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and a target line character region for each of the to-be-identified fields And calling the corresponding second recognition model for character recognition to respectively identify the character information included in the target line character region of each of the to-be-identified fields, and identifying each of the identified to be recognized
The character information of the field is associated with the ticket picture.
系统中还具有预先确定的待识别字段与第二识别模型的第二映射关系表;系统在识别出所述票据图片中分别包含各个待识别字段的字符信息的目标行字符区域后,通过查找第二映射关系表,先找到各个所述待识别字段各自对应的第二识别模型;然后针对每个所述待识别字段的目标行字符区域,均调用对应的第二识别模型进行字符识别,从而通过各个对应的第二识别模型识别出各个所述待识别字段的目标行字符区域包含的字符信息,再将识别出的各个所述待识别字段的字符信息与所述票据图片进行关联映射,建立关联映射关系。The system further has a second mapping relationship table between the to-be-identified field and the second identification model; the system identifies the target line character area of the character information of each to-be-identified field after the ticket picture is identified, a second mapping relationship table, first finding a second recognition model corresponding to each of the to-be-identified fields; and then, for each target character region of the to-be-identified field, calling a corresponding second recognition model for character recognition, thereby Each of the corresponding second recognition models identifies the character information included in the target line character region of each of the to-be-identified fields, and then associates the recognized character information of each of the to-be-identified fields with the ticket image to establish an association. Mapping relations.
本实施例技术方案,首先通过预先训练好的票据图片识别模型识别出收到的票据图片中的票据类别,并通过预先确定的矫正规则对收到的票据图片进行倾斜矫正;然后根据票据类别与待识别字段的映射关系,确定当前接收到的待处理票据图片中的待识别字段;再根据待识别字段与第一识别模型的映射关系,分别确定各个待识别字段各自对应的第一识别模型,以识别出各个待识别字段的目标行字符区域;最后根据待识别字段与第二识别模型的映射关系,确定各个待识别字段各自对应的第二识别模型,根据各个第二识别模型分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别出的各个字符信息与当前的票据图片进行关联映射,如此准确、高效的实现对用户上传的票据图片中的文本信息的自动识别。In the technical solution of the embodiment, the ticket type in the received ticket picture is first identified by the pre-trained ticket picture recognition model, and the received ticket picture is tilt corrected by a predetermined correction rule; Determining, by the mapping relationship of the to-be-identified field, the to-be-identified field in the currently-received bill image; and determining, according to the mapping relationship between the to-be-identified field and the first recognition model, respectively, the first recognition model corresponding to each of the to-be-identified fields, The target line character region of each field to be identified is identified; finally, according to the mapping relationship between the field to be identified and the second recognition model, a second recognition model corresponding to each field to be identified is determined, and each of the second recognition models is respectively identified according to each second recognition model. The character information included in the target line character area of the to-be-identified field is associated with the current ticket image, so that the text information in the bill image uploaded by the user is automatically and accurately implemented. Identification.
本实施例中,所述票据图片识别模型的训练过程如下:In this embodiment, the training process of the ticket picture recognition model is as follows:
步骤S1,为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;Step S1, preparing a preset number of ticket picture samples marked with corresponding picture categories for each preset ticket picture category;
针对每一个预设票据图片类别,均准备预设数量(例如,1000张)的标注有对应的图片类别的票据图片样本;例如,预设票据图片类别总共有两种,分别为门诊票据和住院票据,则准备预设数量的标注有门诊票据的票据图片样本和预设数量的标注有住院票据的票据图片样本。For each preset ticket picture category, a preset number (for example, 1000 sheets) of coupon picture samples with corresponding picture categories are prepared; for example, there are two types of preset ticket picture categories, namely, outpatient tickets and hospitalization. The ticket prepares a preset number of ticket picture samples with the outpatient ticket and a preset number of ticket picture samples marked with the hospital ticket.
步骤S2,将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;Step S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, and mixing the ticket picture samples in each training subset to obtain a training set. And mixing the sample of the bill pictures in each verification subset to obtain a verification set;
针对每一个预设票据图片类别对应的票据图片样本,均分为第一比例(例如,80%)的训练子集和第二比例(例如,20%)的验证子集,然后将得到的各个训练子集中的票据图片样本混合,以得到训练集(例如,训练集由门诊票据的票据图片样本的80%与住院票据的票据图片样本的80%混合形成),以及将得到的各个验证子集中的票据图片样本混合,以得到验证集(例如,验证集由门诊票据的票据图片样本的20%与住院票据的票据图片样本的20%混合形成)。For each of the preset ticket picture categories, the ticket picture samples are divided into a first proportion (for example, 80%) of the training subset and a second ratio (for example, 20%) of the verification subset, and then each of the obtained subsets The sample of the bill pictures in the training subset is mixed to obtain a training set (for example, the training set is formed by 80% of the bill picture sample of the outpatient bill and 80% of the bill picture sample of the hospital bill), and the respective verification subsets to be obtained The sample of the ticket pictures is mixed to obtain a verification set (eg, the verification set is formed by a mixture of 20% of the ticket picture sample of the outpatient ticket and 20% of the ticket picture sample of the hospitalized ticket).
步骤S3,利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;Step S3, using the training set to train the ticket picture recognition model, and using the verification set to verify the accuracy of the ticket picture recognition model after the training set is completed;
在得到训练集和验证集后,先用得到的训练集对所述票据图片识别模型进行训练,在用所述训练集对所述票据图片识别模型训练完成后,再用得到的所述验证集对该票据图片识别模型的准确率进行验证;After obtaining the training set and the verification set, the ticket picture recognition model is trained by using the obtained training set, and after the training of the ticket picture recognition model is completed by using the training set, the obtained verification set is used again. Verifying the accuracy of the ticket picture recognition model;
步骤S4,若准确率大于或者等于预设准确率,则训练结束;Step S4, if the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;
系统中预先设置了准确率的验证阈值(即所述预设准确率,例如98.5%),用于对所述票据图片识别模型的训练效果进行检验;若通过所述验证集对所述票据图片识别模型验证得到的准确率大于所述预设准确率,那么说明该票据图片识别模型的训练达到了预设标准,此时则结束模型训练。
The verification threshold of the accuracy rate (ie, the preset accuracy rate, for example, 98.5%) is preset in the system, and is used to check the training effect of the ticket picture recognition model; if the ticket image is used by the verification set If the accuracy of the recognition of the recognition model is greater than the preset accuracy, then the training of the ticket image recognition model reaches a preset standard, and the model training is ended.
步骤S5,若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。In step S5, if the accuracy rate is less than the preset accuracy rate, the number of ticket picture samples corresponding to each preset ticket picture category is increased, and steps S2 and S3 are performed again.
若是通过所述验证集对所述票据图片识别模型验证得到的准确率小于或等于所述预设准确率,那么说明该票据图片识别模型的训练还没有达到了预设标准,可能是训练集数量不够或验证集数量不够,所以,在这种情况时,则增加每一个预设票据图片类别对应的票据图片样本的数量(例如,每次增加固定数量或每次增加随机数量),然后在这基础上,重新执行上述步骤S2和S3,如此循环执行,直至达到了步骤S4的要求,则结束模型训练。If the accuracy of the verification of the bill image recognition model by the verification set is less than or equal to the preset accuracy rate, it indicates that the training of the bill image recognition model has not reached the preset standard, and may be the number of training sets. Not enough or the number of verification sets is not enough, so in this case, increase the number of ticket picture samples corresponding to each preset ticket picture category (for example, increase the fixed number each time or increase the random number each time), and then here Based on this, the above steps S2 and S3 are re-executed, and the loop is executed until the requirement of step S4 is reached, and the model training is ended.
本实施例中,所述票据图片识别模型优选为深度卷积神经网络(例如,该深度卷积神经网络可以为在CaffeNet的环境下选取的基于深度卷积神经网络SSD(Single Shot MultiBox Detector)算法模型),本申请采用的深度卷积神经网络模型由1个输入层,13个卷积层,5个池化层,2个全连接层,1个分类层构成。所述深度卷积神经网络模型的详细结构如下表所示:In this embodiment, the ticket picture recognition model is preferably a deep convolutional neural network (for example, the deep convolutional neural network may be a SSD (Single Shot MultiBox Detector) algorithm selected in a CaffeNet environment. Model), the deep convolutional neural network model used in this application consists of one input layer, 13 convolutional layers, 5 pooling layers, 2 fully connected layers, and 1 sorting layer. The detailed structure of the deep convolutional neural network model is shown in the following table:
Layer NameLayer Name | Batch SizeBatch Size | Kernel SizeKernel Size | Stride SizeStride Size | Pad SizePad Size |
InputInput | 128128 | N/AN/A | N/AN/A | N/AN/A |
Conv1Conv1 | 128128 | 33 | 11 | 11 |
Conv2Conv2 | 128128 | 33 | 11 | 11 |
MaxPool1MaxPool1 | 128128 | 22 | 22 | 00 |
Conv3Conv3 | 128128 | 33 | 11 | 11 |
Conv4Conv4 | 128128 | 33 | 11 | 11 |
MaxPool2MaxPool2 | 128128 | 22 | 22 | 00 |
Conv5Conv5 | 128128 | 33 | 11 | 11 |
Conv6Conv6 | 128128 | 33 | 11 | 11 |
Conv7Conv7 | 128128 | 33 | 11 | 11 |
MaxPool3MaxPool3 | 128128 | 22 | 22 | 00 |
Conv8Conv8 | 128128 | 33 | 11 | 11 |
Conv9Conv9 | 128128 | 33 | 11 | 11 |
Conv10Conv10 | 128128 | 33 | 11 | 11 |
MaxPool4MaxPool4 | 128128 | 22 | 22 | 00 |
Conv11Conv11 | 128128 | 33 | 11 | 11 |
Conv12Conv12 | 128128 | 33 | 11 | 11 |
Conv13Conv13 | 128128 | 33 | 11 | 11 |
MaxPool5MaxPool5 | 128128 | 22 | 22 | 00 |
Fc1Fc1 | 40964096 | 11 | 11 | 00 |
Fc2Fc2 | 20482048 | 11 | 11 | 00 |
SoftmaxSoftmax | 33 | N/AN/A | N/AN/A | N/AN/A |
其中:Layer Name列表示每一层的名称,Input表示输入层,Conv表示模型的卷积层,Conv1表示模型的第1个卷积层,MaxPool表示模型的最大值池化层,MaxPool1表示模型的第1个最大值池化层,Fc表示模型中的全连接层,Fc1表示模型中第1个全连接层,Softmax表示Softmax分类器;Batch Size表示当前层的输入图像数目;Kernel Size表示当前层卷积核的尺度(例如,Kernel Size可以等于3,表示卷积核的尺度为3x3);Stride Size表示卷积核的移动步长,即做完一次卷积之后移动到下一个卷积位置的距离;Pad Size表示对当前网络
层之中的图像填充的大小。Among them: Layer Name column indicates the name of each layer, Input indicates the input layer, Conv indicates the convolution layer of the model, Conv1 indicates the first convolution layer of the model, MaxPool indicates the maximum pooling layer of the model, and MaxPool1 indicates the model. The first maximum pooling layer, Fc represents the fully connected layer in the model, Fc1 represents the first fully connected layer in the model, Softmax represents the Softmax classifier; Batch Size represents the number of input images of the current layer; Kernel Size represents the current layer The scale of the convolution kernel (for example, the Kernel Size can be equal to 3, indicating that the scale of the convolution kernel is 3x3); the Stride Size indicates the moving step size of the convolution kernel, that is, moving to the next convolution position after completing one convolution Distance; Pad Size indicates the current network
The size of the image fill in the layer.
本实施例中,所述票据图片识别模型的训练过程之前,可对票据图片样本做如下处理:In this embodiment, before the training process of the ticket picture recognition model, the ticket picture sample may be processed as follows:
根据其高宽比信息以及印章的位置判断票据图片的转置情况,并做翻转调整;当高宽比大于1时,说明票据图片高宽颠倒,若印章位置在票据图片左侧,则对票据图像做顺时针旋转九十度处理,若印章位置在票据图片右侧,则对票据图像做逆时针旋转九十度处理;当高宽比小于1时,说明票据图片高宽未颠倒,若印章位置在票据图片下侧,则对票据图像做顺时针旋转一百八十度处理。According to the aspect ratio information and the position of the seal, the transposition of the bill picture is judged and the flip adjustment is made; when the aspect ratio is greater than 1, the height and width of the bill picture are reversed, and if the stamp position is on the left side of the bill picture, the bill is The image is rotated clockwise by ninety degrees. If the stamp position is on the right side of the bill image, the bill image is rotated counterclockwise by ninety degrees. When the aspect ratio is less than 1, the bill image height and width are not reversed. The position is on the lower side of the ticket picture, and the ticket image is rotated clockwise by one hundred and eighty degrees.
找出标注存在严重问题的票据图片样本(比如,关键位置信息缺失或超出整张图片范围,以及印章标注位置位于票据中央等明显错误的票据图片样本),将这些票据图片样本去除,确保票据图片样本的准确无误,从而确保训练效果。Find out the sample of the bill image with serious problems (for example, the key position information is missing or beyond the entire image range, and the stamp mark position is in the center of the bill, such as the bill sample sample that is obviously wrong), remove the bill image samples to ensure the bill image The accuracy of the sample ensures the training effect.
进一步地,本实施例优选所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:Further, in this embodiment, the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:
步骤C1,针对该待识别字段,获取预设数量的票据图片样本;Step C1: Obtain a preset number of bill picture samples for the to-be-identified field;
随机获取预设数量(例如,10万个)的票据图片样本,其中,部分票据图片样本包含该待识别字段的字符信息,部分票据图片样本则不包含该待识别字段的字符信息。The preset number (for example, 100,000) of the ticket picture samples are randomly obtained, wherein the partial ticket picture sample contains the character information of the to-be-identified field, and the partial ticket picture sample does not include the character information of the to-be-identified field.
步骤C2,将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;Step C2, the ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;
从获取的票据图片样本中,将包含该待识别字段的字符信息的票据图片样本与不包含该待识别字段的字符信息的票据图片样本分开,并将包含该待识别字段的字符信息的票据图片样本归入第一训练集,以及将不包含该待识别字段的字符信息的票据图片样本归入第二训练集。From the obtained ticket picture sample, the ticket picture sample containing the character information of the to-be-identified field is separated from the ticket picture sample not containing the character information of the to-be-identified field, and the ticket picture including the character information of the to-be-identified field is included The sample is classified into the first training set, and the ticket picture sample that does not contain the character information of the to-be-identified field is classified into the second training set.
步骤C3,分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;Step C3: Extracting, from the first training set and the second training set, the first preset ratio of the ticket picture samples as the sample picture to be trained, and taking the remaining ticket picture samples in the first training set and the second training set as Verified sample image;
从所述第一训练集和第二训练集中分别提取出第一预设比例(例如,80%)的票据图片样本作为待训练的样本图片,以及将第一训练集和第二训练集中剩余的票据图片样本作为带验证的样本图片,这样使得待训练的样本图片和待验证的样本图片中均存在包含和不包含该待识别字段的字符信息的票据图片样本,且包含和不包含该待识别字段的字符信息的票据图片样本在待训练的样本图片和待验证的样本图片中的比例一致。Extracting, from the first training set and the second training set, a first preset ratio (for example, 80%) of bill picture samples as sample pictures to be trained, and remaining the first training set and the second training set The ticket picture sample is used as a sample picture with verification, so that the sample picture of the ticket to be trained and the sample picture to be verified are included in the sample picture with and without the character information of the to-be-identified field, and the included and not included The ticket picture sample of the character information of the field is consistent in the proportion of the sample picture to be trained and the sample picture to be verified.
步骤C4,利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;Step C4: performing model training using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;
用提取的各个待训练的样本图片对预设类型模型进行模型训练,从而得到所述第一识别模型,然后再用各个待验证的样本图片对得到的所述第一识别模型进行验证,得出所述第一识别模型的验证通过率。Performing model training on the preset type model by using the extracted sample images to be trained, thereby obtaining the first recognition model, and then verifying the obtained first recognition model with each sample image to be verified, and obtaining The verification pass rate of the first recognition model.
步骤C5,若验证通过率大于等于预设阈值,则训练完成;Step C5, if the verification pass rate is greater than or equal to the preset threshold, the training is completed;
系统中预先设置了验证通过率的验证阈值(即所述预设阈值,例如98%),用于对所述第一识别模型的训练效果进行检验;若通过各个所述待验证的样本图片对所述第一识别模型验证得到的验证通过率大于所述预设阈值,那么说明该第一识别模型的训练达到了预期标准,此时则结束模型训练。The verification threshold of the verification pass rate (ie, the preset threshold, for example, 98%) is preset in the system, and is used to check the training effect of the first recognition model; If the verification pass rate obtained by the first identification model verification is greater than the preset threshold, then the training of the first recognition model reaches the expected standard, and the model training is ended.
步骤C6,若验证通过率小于预设阈值,则增加票据图片样本的数量,并重
复执行步骤C2、C3、C4。Step C6, if the verification pass rate is less than the preset threshold, increase the number of bill picture samples, and
Repeat steps C2, C3, and C4.
若是通过各个所述待验证的样本图片对所述第一识别模型验证得到的验证通过率小于或等于所述预设阈值,那么说明该第一识别模型的训练还没有达到了预期标准,可能是待训练的样本图片数量不够或待验证的样本图片数量不够,所以,在这种情况时,则增加所述票据图片样本的数量(例如,每次增加固定数量或每次增加随机数量),然后在这基础上,重新执行上述步骤C2、C3和C4,如此循环执行,直至达到了步骤C5的要求,则结束模型训练。If the verification pass rate obtained by verifying the first recognition model by each of the sample images to be verified is less than or equal to the preset threshold, it indicates that the training of the first recognition model has not reached the expected standard, which may be The number of sample pictures to be trained is insufficient or the number of sample pictures to be verified is insufficient, so in this case, the number of sample pictures of the ticket is increased (for example, each time a fixed number is added or a random number is added each time), and then On this basis, the above steps C2, C3 and C4 are re-executed, and the loop is executed until the requirement of step C5 is reached, and the model training is ended.
进一步地,本实施例优选所述第二识别模型为时间递归神经网络模型(Long-Short Term Memory,LSTM),针对一个待识别字段对应的第二识别模型的训练过程如下:Further, in this embodiment, the second recognition model is a Long-Short Term Memory (LSTM), and the training process for the second recognition model corresponding to a field to be identified is as follows:
步骤D1,针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Step D1: Obtain a preset number of ticket picture samples for the to-be-identified field, where each ticket picture sample contains only one line of character information of the to-be-identified field, the font is black, the background is white, and each ticket picture sample is The name is named as the character information of the to-be-identified field contained therein;
获取预设数量(例如,10万个)的票据图片样本;获取的票据图片样本中,每个票据图片样本中包含且仅包含一行该待识别字段的字符信息,将每个票据图片样本的名称各自命名为其所述包含的该待识别字段的字符信息;该票据图片样本用于模型训练时,模型根据该字符信息的字体颜色和背景颜色即可识别出该字符信息的位置,从而获取该字符信息。Obtaining a preset number (for example, 100,000) of ticket picture samples; in the obtained ticket picture sample, each ticket picture sample includes and only contains one line of character information of the to-be-identified field, and the name of each ticket picture sample Named as the character information of the to-be-identified field contained therein; when the ticket picture sample is used for model training, the model can recognize the position of the character information according to the font color and the background color of the character information, thereby acquiring the Character information.
步骤D2,将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Step D2, dividing the ticket picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as training. Set, the second data set as a test set;
将获取的所有票据图片样本按照预设比例X:Y(X、Y均大于0)的比例分成第一数据集和第二数据集,其中,第一数据集中的图片样本数量比第二数据集中的图片样本数量多,即X大于Y(例如,X为4,Y为1);将第一数据集作为训练集,用于训练模型;第二数据集作为测试集,用于测试模型的训练效果。All the acquired ticket picture samples are divided into a first data set and a second data set according to a ratio of a preset ratio X:Y (X and Y are greater than 0), wherein the number of picture samples in the first data set is smaller than the second data set. The number of picture samples is large, that is, X is greater than Y (for example, X is 4, Y is 1); the first data set is used as a training set for training the model; and the second data set is used as a test set for training the test model. effect.
步骤D3,将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果和该图片样本的名称的误差。In step D3, the image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The trained model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.
用第一数据集中的图片样本对模型进行训练,在训练过程中每个预设时间(例如每进行1000次迭代)或者以预设的频率,对模型使用第二数据集进行测试,以检测当前训练的模型效果;具体在测试时,使用当前训练得到的模型对第二数据集中的图片样本进行字符信息识别,并将识别出的结果与测试的图片样本的名称做对比,从而计算出识别的结果与该图片样本的名称的误差,本实施例优选误差计算采用编辑距离作为计算标准。The model is trained by the image samples in the first data set, and the second data set is tested on the model for each preset time (for example, every 1000 iterations) or at a preset frequency to detect the current The model effect of the training; specifically, during the test, the model obtained by the current training is used to identify the character information of the image sample in the second data set, and the recognized result is compared with the name of the tested picture sample, thereby calculating the recognized As a result of the error with the name of the picture sample, the preferred error calculation in this embodiment uses the edit distance as the calculation standard.
步骤D4,若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;Step D4, if the error of the model identification of the image sample diverges, the training parameters are adjusted and retrained;
如果模型对图片样本识别的误差出现发散,则模型训练不符合要求,此时则按预设规则或随机调整训练参数后重新对该模型进行训练,使训练时模型对票据图片的识别的误差能够收敛。If the model discards the error of the image sample recognition, the model training does not meet the requirements. At this time, the model is trained according to the preset rules or randomly adjusted training parameters, so that the error of the recognition of the bill image by the model during training can be convergence.
步骤D5,若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。In step D5, if the error of the model identification on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be-identified field.
当模型对图片样本识别的误差收敛时,训练的模型达到要求,则结束模型训
练,并将生成的模型(即当前训练后的模型)作为最终的该待识别字段对应的第二识别模型。When the model converges on the error of the image sample recognition, the trained model meets the requirements, and the model training ends.
Practicing, and the generated model (ie, the model after the current training) is taken as the second recognition model corresponding to the final identified field.
进一步地,本申请还提出一种计算机可读存储介质,所述计算机可读存储介质存储有票据信息识别系统,所述票据信息识别系统可被至少一个处理器执行,以使所述至少一个处理器执行上述任一实施例中的票据信息识别方法。Further, the present application further provides a computer readable storage medium storing a ticket information identification system, the ticket information identification system being executable by at least one processor to cause the at least one processing The ticket information identifying method in any of the above embodiments is performed.
以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是在本发明的发明构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structural transformation, or direct/indirect use, of the present invention and the contents of the drawings are used in the inventive concept of the present invention. It is included in the scope of the patent protection of the present invention in other related technical fields.
Claims (20)
- 一种电子装置,其特征在于,所述电子装置包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的票据信息识别系统,所述票据信息识别系统被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, a processor, on the memory, a ticket information recognition system operable on the processor, wherein the ticket information recognition system is The following steps are implemented during execution:在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- 如权利要求1所述的电子装置,其特征在于,所述票据图片识别模型的训练过程如下:The electronic device according to claim 1, wherein the training process of the ticket picture recognition model is as follows:S1、为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;S1. Prepare, for each preset ticket picture category, a preset number of ticket picture samples marked with corresponding picture categories;S2、将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, mixing the ticket picture samples in each training subset to obtain a training set, and Mixing the bill picture samples in each verification subset to obtain a verification set;S3、利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;S3. The ticket picture recognition model is trained by using the training set, and the accuracy of the ticket picture recognition model after the training set is completed is verified by using the verification set;S4、若准确率大于或者等于预设准确率,则训练结束;S4. If the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;S5、若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。S5. If the accuracy is less than the preset accuracy, increase the number of ticket picture samples corresponding to each preset ticket picture category, and perform steps S2 and S3 again.
- 如权利要求1所述的电子装置,其特征在于,所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:The electronic device according to claim 1, wherein the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:C1、针对该待识别字段,获取预设数量的票据图片样本;C1. Obtain a preset number of bill picture samples for the to-be-identified field;C2、将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;C2. The ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;C3、分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;C3. Extracting, from the first training set and the second training set, a first preset ratio of the ticket picture samples as the sample picture to be trained, and using the remaining ticket picture samples in the first training set and the second training set as the to-be-verified Sample pictureC4、利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;C4, performing model training by using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;C5、若验证通过率大于等于预设阈值,则训练完成;C5. If the verification pass rate is greater than or equal to a preset threshold, the training is completed;C6、若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。C6. If the verification pass rate is less than the preset threshold, increase the number of ticket picture samples, and repeat steps C2, C3, and C4.
- 如权利要求1所述的电子装置,其特征在于,所述第二识别模型为时间 递归神经网络模型,针对一个待识别字段对应的第二识别模型的训练过程如下:The electronic device of claim 1 wherein said second recognition model is time The recursive neural network model, the training process for a second recognition model corresponding to a field to be identified is as follows:针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Obtaining a preset number of ticket picture samples for the to-be-identified field, each ticket picture sample includes only one line of character information of the to-be-identified field, the font is black, the background is white, and the name of each ticket picture sample is named The character information of the to-be-identified field contained therein;将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Dividing the bill picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as a training set, Two data sets as test sets;将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果和该图片样本的名称的误差。The image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;If the model at the time of testing diverge the error in the recognition of the picture sample, adjust the training parameters and retrain;若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。If the error of the model recognition on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be identified field.
- 如权利要求1所述的电子装置,其特征在于,所述预先确定的矫正规则为:The electronic device of claim 1 wherein said predetermined correction rule is:用霍夫变换的概率算法找出图像中尽可能多的小段直线;Use the probability algorithm of Hough transform to find as many small straight lines as possible in the image;从找出的小段直线中确定出所有偏水平的直线,并将确定出的直线中x坐标值相差小于第一预设差值的直线按对应的y坐标值的大小顺序依次相连,按照x坐标值大小分为若干类,或者,将确定出的直线中y坐标值相差小于第二预设差值的直线按对应的x坐标值的大小顺序依次相连,按照y坐标值大小分为若干类;All straight lines are determined from the found straight line, and the straight lines in which the x coordinate values differ by less than the first preset difference are sequentially connected in the order of the corresponding y coordinate values, according to the x coordinate The value size is divided into several categories, or the straight lines in which the y coordinate values of the determined straight lines differ by less than the second preset difference are sequentially connected in the order of the corresponding x coordinate values, and are classified into several classes according to the size of the y coordinate value;将属于一类的所有水平直线作为一个目标类直线,并通过最小二乘法找出最接近各个目标类直线的长直线;Use all horizontal lines belonging to a class as a target class line, and find the long line closest to each target class line by least squares method;计算出各个长直线的斜率,计算出各个长直线的斜率的中位数和均值,比较计算出的斜率的中位数和均值的大小以确定出较小者,并根据确定出的较小者调整图像倾角。Calculate the slope of each long line, calculate the median and mean of the slope of each long line, compare the median and mean of the calculated slope to determine the smaller one, and according to the smaller one determined Adjust the image tilt.
- 如权利要求5所述的电子装置,其特征在于,所述票据图片识别模型的训练过程如下:The electronic device according to claim 5, wherein the training process of the ticket picture recognition model is as follows:S1、为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;S1. Prepare, for each preset ticket picture category, a preset number of ticket picture samples marked with corresponding picture categories;S2、将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, mixing the ticket picture samples in each training subset to obtain a training set, and Mixing the bill picture samples in each verification subset to obtain a verification set;S3、利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;S3. The ticket picture recognition model is trained by using the training set, and the accuracy of the ticket picture recognition model after the training set is completed is verified by using the verification set;S4、若准确率大于或者等于预设准确率,则训练结束;S4. If the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;S5、若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。S5. If the accuracy is less than the preset accuracy, increase the number of ticket picture samples corresponding to each preset ticket picture category, and perform steps S2 and S3 again.
- 如权利要求5所述的电子装置,其特征在于,所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:The electronic device according to claim 5, wherein the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:C1、针对该待识别字段,获取预设数量的票据图片样本;C1. Obtain a preset number of bill picture samples for the to-be-identified field;C2、将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集; C2. The ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;C3、分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;C3. Extracting, from the first training set and the second training set, a first preset ratio of the ticket picture samples as the sample picture to be trained, and using the remaining ticket picture samples in the first training set and the second training set as the to-be-verified Sample pictureC4、利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;C4, performing model training by using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;C5、若验证通过率大于等于预设阈值,则训练完成;C5. If the verification pass rate is greater than or equal to a preset threshold, the training is completed;C6、若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。C6. If the verification pass rate is less than the preset threshold, increase the number of ticket picture samples, and repeat steps C2, C3, and C4.
- 如权利要求5所述的电子装置,其特征在于,所述第二识别模型为时间递归神经网络模型,针对一个待识别字段对应的第二识别模型的训练过程如下:The electronic device according to claim 5, wherein the second recognition model is a time recurrent neural network model, and the training process for the second recognition model corresponding to a field to be identified is as follows:针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Obtaining a preset number of ticket picture samples for the to-be-identified field, each ticket picture sample includes only one line of character information of the to-be-identified field, the font is black, the background is white, and the name of each ticket picture sample is named The character information of the to-be-identified field contained therein;将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Dividing the bill picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as a training set, Two data sets as test sets;将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果和该图片样本的名称的误差。The image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the recognition result and the error of the name of the picture sample.若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;If the model at the time of testing diverge the error in the recognition of the picture sample, adjust the training parameters and retrain;若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。If the error of the model recognition on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be identified field.
- 一种票据信息识别方法,其特征在于,该票据信息识别方法包括步骤:A ticket information identification method, characterized in that the ticket information identification method comprises the steps of:在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- 如权利要求9所述的票据信息识别方法,其特征在于,所述票据图片识别模型的训练过程如下:The ticket information identification method according to claim 9, wherein the training process of the ticket picture recognition model is as follows:S1、为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;S1. Prepare, for each preset ticket picture category, a preset number of ticket picture samples marked with corresponding picture categories;S2、将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子 集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;S2, dividing the sample of the bill picture corresponding to each preset bill picture category into the first proportion of the training sub- And a second proportional verification subset, mixing the ticket picture samples in each training subset to obtain a training set, and mixing the ticket picture samples in each verification subset to obtain a verification set;S3、利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;S3. The ticket picture recognition model is trained by using the training set, and the accuracy of the ticket picture recognition model after the training set is completed is verified by using the verification set;S4、若准确率大于或者等于预设准确率,则训练结束;S4. If the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;S5、若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。S5. If the accuracy is less than the preset accuracy, increase the number of ticket picture samples corresponding to each preset ticket picture category, and perform steps S2 and S3 again.
- 如权利要求9所述的票据信息识别方法,其特征在于,所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:The ticket information identifying method according to claim 9, wherein the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:C1、针对该待识别字段,获取预设数量的票据图片样本;C1. Obtain a preset number of bill picture samples for the to-be-identified field;C2、将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;C2. The ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;C3、分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;C3. Extracting, from the first training set and the second training set, a first preset ratio of the ticket picture samples as the sample picture to be trained, and using the remaining ticket picture samples in the first training set and the second training set as the to-be-verified Sample pictureC4、利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;C4, performing model training by using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;C5、若验证通过率大于等于预设阈值,则训练完成;C5. If the verification pass rate is greater than or equal to a preset threshold, the training is completed;C6、若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。C6. If the verification pass rate is less than the preset threshold, increase the number of ticket picture samples, and repeat steps C2, C3, and C4.
- 如权利要求9所述的票据信息识别方法,其特征在于,所述第二识别模型为时间递归神经网络模型,针对一个待识别字段对应的第二识别模型的训练过程如下:The ticket information identifying method according to claim 9, wherein the second recognition model is a time recurrent neural network model, and the training process for the second recognition model corresponding to a field to be identified is as follows:针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Obtaining a preset number of ticket picture samples for the to-be-identified field, each ticket picture sample includes only one line of character information of the to-be-identified field, the font is black, the background is white, and the name of each ticket picture sample is named The character information of the to-be-identified field contained therein;将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Dividing the bill picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as a training set, Two data sets as test sets;将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果与该图片样本的名称的误差。The image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the error between the recognition result and the name of the picture sample.若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;If the model at the time of testing diverge the error in the recognition of the picture sample, adjust the training parameters and retrain;若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。If the error of the model recognition on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be identified field.
- 如权利要求9所述的票据信息识别方法,其特征在于,所述预先确定的矫正规则为:The ticket information identifying method according to claim 9, wherein said predetermined correction rule is:用霍夫变换的概率算法找出图像中尽可能多的小段直线;Use the probability algorithm of Hough transform to find as many small straight lines as possible in the image;从找出的小段直线中确定出所有偏水平的直线,并将确定出的直线中x坐标值相差小于第一预设差值的直线按对应的y坐标值的大小顺序依次相连,按照x坐标值大小分为若干类,或者,将确定出的直线中y坐标值相差小于第二预设差 值的直线按对应的x坐标值的大小顺序依次相连,按照y坐标值大小分为若干类;All straight lines are determined from the found straight line, and the straight lines in which the x coordinate values differ by less than the first preset difference are sequentially connected in the order of the corresponding y coordinate values, according to the x coordinate The value size is divided into several classes, or the determined y coordinate values in the straight line are less than the second preset difference. The straight line of the value is sequentially connected in the order of the size of the corresponding x coordinate value, and is divided into several classes according to the size of the y coordinate value;将属于一类的所有水平直线作为一个目标类直线,并通过最小二乘法找出最接近各个目标类直线的长直线;Use all horizontal lines belonging to a class as a target class line, and find the long line closest to each target class line by least squares method;计算出各个长直线的斜率,计算出各个长直线的斜率的中位数和均值,比较计算出的斜率的中位数和均值的大小以确定出较小者,并根据确定出的较小者调整图像倾角。Calculate the slope of each long line, calculate the median and mean of the slope of each long line, compare the median and mean of the calculated slope to determine the smaller one, and according to the smaller one determined Adjust the image tilt.
- 如权利要求13所述的票据信息识别方法,其特征在于,所述票据图片识别模型的训练过程如下:The ticket information identification method according to claim 13, wherein the training process of the ticket picture recognition model is as follows:S1、为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;S1. Prepare, for each preset ticket picture category, a preset number of ticket picture samples marked with corresponding picture categories;S2、将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, mixing the ticket picture samples in each training subset to obtain a training set, and Mixing the bill picture samples in each verification subset to obtain a verification set;S3、利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;S3. The ticket picture recognition model is trained by using the training set, and the accuracy of the ticket picture recognition model after the training set is completed is verified by using the verification set;S4、若准确率大于或者等于预设准确率,则训练结束;S4. If the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;S5、若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。S5. If the accuracy is less than the preset accuracy, increase the number of ticket picture samples corresponding to each preset ticket picture category, and perform steps S2 and S3 again.
- 如权利要求13所述的票据信息识别方法,其特征在于,所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:The ticket information identifying method according to claim 13, wherein the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:C1、针对该待识别字段,获取预设数量的票据图片样本;C1. Obtain a preset number of bill picture samples for the to-be-identified field;C2、将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;C2. The ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;C3、分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;C3. Extracting, from the first training set and the second training set, a first preset ratio of the ticket picture samples as the sample picture to be trained, and using the remaining ticket picture samples in the first training set and the second training set as the to-be-verified Sample pictureC4、利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;C4, performing model training by using the extracted sample images to be trained to generate the first recognition model, and verifying the generated first recognition model by using each sample image to be verified;C5、若验证通过率大于等于预设阈值,则训练完成;C5. If the verification pass rate is greater than or equal to a preset threshold, the training is completed;C6、若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。C6. If the verification pass rate is less than the preset threshold, increase the number of ticket picture samples, and repeat steps C2, C3, and C4.
- 如权利要求13所述的票据信息识别方法,其特征在于,所述第二识别模型为时间递归神经网络模型,针对一个待识别字段对应的第二识别模型的训练过程如下:The ticket information identifying method according to claim 13, wherein the second recognition model is a time recurrent neural network model, and the training process for the second recognition model corresponding to a field to be identified is as follows:针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Obtaining a preset number of ticket picture samples for the to-be-identified field, each ticket picture sample includes only one line of character information of the to-be-identified field, the font is black, the background is white, and the name of each ticket picture sample is named The character information of the to-be-identified field contained therein;将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Dividing the bill picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as a training set, Two data sets as test sets;将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测 试的图片样本的名称做对比,以计算识别的结果与该图片样本的名称的误差。The image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The model performs character information recognition on the image samples in the second data set, and measures The name of the sample image to be tested is compared to calculate the error between the identified result and the name of the image sample.若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;If the model at the time of testing diverge the error in the recognition of the picture sample, adjust the training parameters and retrain;若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。If the error of the model recognition on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be identified field.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有票据信息识别系统,所述票据信息识别系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores a ticket information identification system, the ticket information identification system being executable by at least one processor to cause the at least one processor to execute as follows step:在收到待处理的票据图片后,利用预先训练好的票据图片识别模型对收到的票据图片中的票据类别进行识别,并输出票据的类别识别结果;After receiving the picture of the bill to be processed, the pre-trained bill picture recognition model is used to identify the bill type in the received bill picture, and output the category identification result of the bill;利用预先确定的矫正规则对收到的票据图片进行倾斜矫正;Observing the received bill image with a predetermined correction rule;根据预先确定的票据类别与待识别字段的映射关系,确定识别的票据类别对应的待识别字段;Determining, according to a predetermined mapping relationship between the ticket category and the to-be-identified field, a field to be identified corresponding to the identified ticket category;根据预先确定的待识别字段与第一识别模型的映射关系,确定各个所述待识别字段对应的第一识别模型,针对各个所述待识别字段,调用对应的第一识别模型对倾斜矫正后的票据图片的行字符区域进行区域识别,以分别识别出包含各个所述待识别字段的字符信息的目标行字符区域;Determining, according to a predetermined mapping relationship between the to-be-identified field and the first recognition model, a first recognition model corresponding to each of the to-be-identified fields, and calling, for each of the to-be-identified fields, a first recognition model for tilt correction Performing area identification on the line character area of the ticket picture to respectively identify the target line character area including the character information of each of the to-be-identified fields;根据预先确定的待识别字段与第二识别模型的映射关系,确定各个所述待识别字段对应的第二识别模型,针对各个所述待识别字段的目标行字符区域,调用对应的第二识别模型进行字符识别,以分别识别出各个所述待识别字段的目标行字符区域包含的字符信息,并将识别的各个所述待识别字段的字符信息与所述票据图片进行关联映射。Determining, according to a predetermined mapping relationship between the to-be-identified field and the second recognition model, a second recognition model corresponding to each of the to-be-identified fields, and calling a corresponding second recognition model for each of the target line character regions of the to-be-identified field The character recognition is performed to identify the character information included in the target line character region of each of the to-be-identified fields, and the character information of each of the identified to-be-identified fields is associated with the ticket image.
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述票据图片识别模型的训练过程如下:The computer readable storage medium of claim 17, wherein the training process of the ticket picture recognition model is as follows:S1、为每一个预设票据图片类别准备预设数量的标注有对应的图片类别的票据图片样本;S1. Prepare, for each preset ticket picture category, a preset number of ticket picture samples marked with corresponding picture categories;S2、将每一个预设票据图片类别对应的票据图片样本分为第一比例的训练子集和第二比例的验证子集,将各个训练子集中的票据图片样本进行混合以得到训练集,并将各个验证子集中的票据图片样本进行混合以得到验证集;S2, dividing the ticket picture sample corresponding to each preset ticket picture category into a training subset of the first ratio and a verification subset of the second ratio, mixing the ticket picture samples in each training subset to obtain a training set, and Mixing the bill picture samples in each verification subset to obtain a verification set;S3、利用所述训练集训练所述票据图片识别模型,并利用所述验证集对经所述训练集训练完成后的所述票据图片识别模型的准确率进行验证;S3. The ticket picture recognition model is trained by using the training set, and the accuracy of the ticket picture recognition model after the training set is completed is verified by using the verification set;S4、若准确率大于或者等于预设准确率,则训练结束;S4. If the accuracy rate is greater than or equal to the preset accuracy rate, the training ends;S5、若准确率小于预设准确率,则增加每一个预设票据图片类别对应的票据图片样本的数量,并重新执行步骤S2、S3。S5. If the accuracy is less than the preset accuracy, increase the number of ticket picture samples corresponding to each preset ticket picture category, and perform steps S2 and S3 again.
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述第一识别模型为卷积神经网络模型,针对一个待识别字段对应的第一识别模型的训练过程如下:The computer readable storage medium according to claim 17, wherein the first recognition model is a convolutional neural network model, and the training process for the first recognition model corresponding to a field to be identified is as follows:C1、针对该待识别字段,获取预设数量的票据图片样本;C1. Obtain a preset number of bill picture samples for the to-be-identified field;C2、将包含该待识别字段的字符信息的票据图片样本归入第一训练集,并将不包含该待识别字段的字符信息的票据图片样本归入第二训练集;C2. The ticket picture sample containing the character information of the to-be-identified field is classified into the first training set, and the ticket picture sample not containing the character information of the to-be-identified field is classified into the second training set;C3、分别从第一训练集和第二训练集中提取出第一预设比例的票据图片样本作为待训练的样本图片,并将第一训练集和第二训练集中剩余的票据图片样本作为待验证的样本图片;C3. Extracting, from the first training set and the second training set, a first preset ratio of the ticket picture samples as the sample picture to be trained, and using the remaining ticket picture samples in the first training set and the second training set as the to-be-verified Sample pictureC4、利用提取的各个待训练的样本图片进行模型训练,以生成所述第一识别 模型,并利用各个待验证的样本图片对生成的所述第一识别模型进行验证;C4. Perform model training by using the extracted sample images to be trained to generate the first identifier. Modeling, and verifying the generated first recognition model by using each sample image to be verified;C5、若验证通过率大于等于预设阈值,则训练完成;C5. If the verification pass rate is greater than or equal to a preset threshold, the training is completed;C6、若验证通过率小于预设阈值,则增加票据图片样本的数量,并重复执行步骤C2、C3、C4。C6. If the verification pass rate is less than the preset threshold, increase the number of ticket picture samples, and repeat steps C2, C3, and C4.
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述第二识别模型为时间递归神经网络模型,针对一个待识别字段对应的第二识别模型的训练过程如下:The computer readable storage medium according to claim 17, wherein the second recognition model is a time recurrent neural network model, and the training process for the second recognition model corresponding to a field to be identified is as follows:针对该待识别字段,获取预设数量的票据图片样本,每个票据图片样本中仅包含一行该待识别字段的字符信息,字体为黑色,背景为白色,并将各个票据图片样本的名称命名为其所含的该待识别字段的字符信息;Obtaining a preset number of ticket picture samples for the to-be-identified field, each ticket picture sample includes only one line of character information of the to-be-identified field, the font is black, the background is white, and the name of each ticket picture sample is named The character information of the to-be-identified field contained therein;将所述票据图片样本按照X:Y的比例分成第一数据集和第二数据集,第一数据集中的图片样本数量大于第二数据集中的图片样本数量,第一数据集作为训练集,第二数据集作为测试集;Dividing the bill picture sample into a first data set and a second data set according to a ratio of X:Y, the number of picture samples in the first data set is greater than the number of picture samples in the second data set, and the first data set is used as a training set, Two data sets as test sets;将第一数据集中的图片样本送入时间递归神经网络模型进行模型训练,每隔预设时间,对模型使用第二数据集进行测试,以评估当前训练的模型效果;测试时,使用训练得到的模型对第二数据集中的图片样本进行字符信息识别,并和测试的图片样本的名称做对比,以计算识别的结果与该图片样本的名称的误差。The image samples in the first data set are sent to the time recurrent neural network model for model training, and the second data set is tested on the model every preset time to evaluate the effect of the current training model; The model performs character information recognition on the picture samples in the second data set, and compares with the names of the tested picture samples to calculate the error between the recognition result and the name of the picture sample.若测试时的模型对图片样本识别的误差出现发散,则调整训练参数并重新训练;If the model at the time of testing diverge the error in the recognition of the picture sample, adjust the training parameters and retrain;若测试时的模型对图片样本识别的误差收敛,则结束模型训练,生成的模型作为最终的该待识别字段对应的第二识别模型。 If the error of the model recognition on the image sample converges, the model training is ended, and the generated model is used as the final second recognition model corresponding to the to-be identified field.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710929629.8 | 2017-10-09 | ||
CN201710929629.8A CN107766809B (en) | 2017-10-09 | 2017-10-09 | Electronic device, bill information identification method, and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019071662A1 true WO2019071662A1 (en) | 2019-04-18 |
Family
ID=61267112
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/108767 WO2019071662A1 (en) | 2017-10-09 | 2017-10-31 | Electronic device, bill information identification method, and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107766809B (en) |
WO (1) | WO2019071662A1 (en) |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110245087A (en) * | 2019-06-20 | 2019-09-17 | 杭州睿琪软件有限公司 | The state detection method and device at the human customer end for sample audit |
CN110276346A (en) * | 2019-06-06 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Target area identification model training method, device and computer readable storage medium |
CN110288027A (en) * | 2019-06-27 | 2019-09-27 | 上海海事大学 | A kind of crane corrosion identification and subsumption algorithm based on SSD frame |
CN110288755A (en) * | 2019-05-21 | 2019-09-27 | 平安银行股份有限公司 | The invoice method of inspection, server and storage medium based on text identification |
CN110427853A (en) * | 2019-07-24 | 2019-11-08 | 北京一诺前景财税科技有限公司 | A kind of method of smart tickets information extraction processing |
CN110705533A (en) * | 2019-09-09 | 2020-01-17 | 武汉联析医疗技术有限公司 | AI recognition and grabbing system for inspection report |
CN110717516A (en) * | 2019-09-06 | 2020-01-21 | 中国平安财产保险股份有限公司 | Bill image classification method and device and computer readable storage medium |
CN110991456A (en) * | 2019-12-05 | 2020-04-10 | 北京百度网讯科技有限公司 | Bill identification method and device |
CN111047261A (en) * | 2019-12-11 | 2020-04-21 | 青岛盈智科技有限公司 | Warehouse logistics order identification method and system |
CN111241330A (en) * | 2020-01-13 | 2020-06-05 | 苏宁云计算有限公司 | Commodity picture auditing method and device |
CN111259889A (en) * | 2020-01-17 | 2020-06-09 | 平安医疗健康管理股份有限公司 | Image text recognition method and device, computer equipment and computer storage medium |
CN111401221A (en) * | 2020-03-12 | 2020-07-10 | 重庆农村商业银行股份有限公司 | Card ticket identification method, device, equipment and storage medium |
CN111539406A (en) * | 2020-04-21 | 2020-08-14 | 招商局金融科技有限公司 | Certificate copy information identification method, server and storage medium |
CN112149701A (en) * | 2019-06-28 | 2020-12-29 | 杭州海康威视数字技术股份有限公司 | Image identification method, virtual sample data generation method and storage medium |
CN112232296A (en) * | 2020-11-09 | 2021-01-15 | 北京爱笔科技有限公司 | Hyper-parameter exploration method and device |
CN112232353A (en) * | 2020-11-23 | 2021-01-15 | 阳光保险集团股份有限公司 | Method and device for recognizing characters in image, electronic equipment and storage medium |
CN112464941A (en) * | 2020-10-23 | 2021-03-09 | 北京思特奇信息技术股份有限公司 | Invoice identification method and system based on neural network |
CN112633275A (en) * | 2020-12-22 | 2021-04-09 | 航天信息股份有限公司 | Multi-bill mixed-shooting image correction method and system based on deep learning |
CN112632926A (en) * | 2020-12-29 | 2021-04-09 | 平安科技(深圳)有限公司 | Data processing method and device for bill, electronic equipment and storage medium |
CN112699871A (en) * | 2020-12-23 | 2021-04-23 | 平安银行股份有限公司 | Method, system, device and computer readable storage medium for field content identification |
CN112990035A (en) * | 2021-03-23 | 2021-06-18 | 北京百度网讯科技有限公司 | Text recognition method, device, equipment and storage medium |
CN113434491A (en) * | 2021-06-18 | 2021-09-24 | 深圳市曙光信息技术有限公司 | Character model data cleaning method, system and medium for deep learning OCR recognition |
CN113554009A (en) * | 2021-09-22 | 2021-10-26 | 北京奇虎科技有限公司 | Bill verification method, device, equipment and storage medium |
CN113807158A (en) * | 2020-12-04 | 2021-12-17 | 四川医枢科技股份有限公司 | PDF content extraction method, device and equipment |
CN114092948A (en) * | 2021-11-24 | 2022-02-25 | 北京百度网讯科技有限公司 | Bill identification method, device, equipment and storage medium |
CN114202666A (en) * | 2021-10-19 | 2022-03-18 | 南京和瑞供应链管理有限公司 | High-efficiency automatic identification method for high-reproduction characteristic target object |
CN114708486A (en) * | 2022-04-07 | 2022-07-05 | 太原智林信息技术股份有限公司 | Automatic judging method for physical and electrical experiment operation circuit connection |
CN115035352A (en) * | 2022-03-23 | 2022-09-09 | 成都智元汇信息技术股份有限公司 | Verification method and system based on intelligent image recognition box performance |
CN116468255A (en) * | 2023-06-15 | 2023-07-21 | 国网信通亿力科技有限责任公司 | Configurable main data management system |
Families Citing this family (48)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446621A (en) * | 2018-03-14 | 2018-08-24 | 平安科技(深圳)有限公司 | Bank slip recognition method, server and computer readable storage medium |
CN108595544A (en) * | 2018-04-09 | 2018-09-28 | 深源恒际科技有限公司 | A kind of document picture classification method |
CN108764226B (en) * | 2018-04-13 | 2022-05-03 | 顺丰科技有限公司 | Image text recognition method, device, equipment and storage medium thereof |
CN108564035B (en) | 2018-04-13 | 2020-09-25 | 杭州睿琪软件有限公司 | Method and system for identifying information recorded on document |
CN108664897A (en) * | 2018-04-18 | 2018-10-16 | 平安科技(深圳)有限公司 | Bank slip recognition method, apparatus and storage medium |
CN108830138B (en) * | 2018-04-26 | 2021-05-07 | 平安科技(深圳)有限公司 | Livestock identification method, device and storage medium |
CN109034159B (en) * | 2018-05-28 | 2021-05-28 | 北京捷通华声科技股份有限公司 | Image information extraction method and device |
CN110619252B (en) * | 2018-06-19 | 2022-11-04 | 百度在线网络技术(北京)有限公司 | Method, device and equipment for identifying form data in picture and storage medium |
CN109034050B (en) * | 2018-07-23 | 2022-05-03 | 顺丰科技有限公司 | Deep learning-based identification card image text recognition method and device |
CN109299782B (en) * | 2018-08-02 | 2021-11-12 | 奇安信科技集团股份有限公司 | Data processing method and device based on deep learning model |
CN109064304A (en) * | 2018-08-03 | 2018-12-21 | 四川长虹电器股份有限公司 | Finance reimbursement bill automated processing system and method |
CN109271980A (en) * | 2018-08-28 | 2019-01-25 | 上海萃舟智能科技有限公司 | A kind of vehicle nameplate full information recognition methods, system, terminal and medium |
CN109389124B (en) * | 2018-10-29 | 2019-09-13 | 苏州派维斯信息科技有限公司 | Receipt categories of information recognition methods |
CN109784339A (en) * | 2018-12-13 | 2019-05-21 | 平安普惠企业管理有限公司 | Picture recognition test method, device, computer equipment and storage medium |
CN109815949A (en) * | 2018-12-20 | 2019-05-28 | 航天信息股份有限公司 | Invoice publicity method and system neural network based |
CN109886077B (en) * | 2018-12-28 | 2021-07-09 | 北京旷视科技有限公司 | Image recognition method and device, computer equipment and storage medium |
CN109886257B (en) * | 2019-01-30 | 2022-10-18 | 四川长虹电器股份有限公司 | Method for correcting invoice image segmentation result by adopting deep learning in OCR system |
CN109902737A (en) * | 2019-02-25 | 2019-06-18 | 厦门商集网络科技有限责任公司 | A kind of bill classification method and terminal |
CN109872444B (en) * | 2019-02-27 | 2021-03-09 | 杭州睿琪软件有限公司 | Bill identification method and device |
CN109934181A (en) * | 2019-03-18 | 2019-06-25 | 北京海益同展信息科技有限公司 | Text recognition method, device, equipment and computer-readable medium |
CN111797838A (en) * | 2019-04-08 | 2020-10-20 | 上海怀若智能科技有限公司 | Blind denoising system, method and device for picture documents |
CN110223135A (en) * | 2019-04-29 | 2019-09-10 | 北京三快在线科技有限公司 | Data processing method, device, electronic equipment and readable storage medium storing program for executing |
CN110333813A (en) * | 2019-05-30 | 2019-10-15 | 平安科技(深圳)有限公司 | Method, electronic device and the computer readable storage medium of invoice picture presentation |
CN110334596B (en) * | 2019-05-30 | 2024-02-02 | 平安科技(深圳)有限公司 | Invoice picture summarizing method, electronic device and readable storage medium |
CN110490193B (en) * | 2019-07-24 | 2022-11-08 | 西安网算数据科技有限公司 | Single character area detection method and bill content identification method |
CN110598686B (en) * | 2019-09-17 | 2023-08-04 | 携程计算机技术(上海)有限公司 | Invoice identification method, system, electronic equipment and medium |
CN110751143A (en) * | 2019-09-26 | 2020-02-04 | 中电万维信息技术有限责任公司 | Electronic invoice information extraction method and electronic equipment |
CN111626279B (en) * | 2019-10-15 | 2023-06-02 | 西安网算数据科技有限公司 | Negative sample labeling training method and highly-automatic bill identification method |
CN111091551A (en) * | 2019-12-12 | 2020-05-01 | 哈尔滨市科佳通用机电股份有限公司 | Method for detecting loss fault of brake beam strut opening pin of railway wagon |
CN111178203B (en) * | 2019-12-20 | 2021-01-29 | 江苏常熟农村商业银行股份有限公司 | Signature verification method and device, computer equipment and storage medium |
CN111325207A (en) * | 2020-03-05 | 2020-06-23 | 中国银行股份有限公司 | Bill identification method and device based on preprocessing |
CN111382791B (en) * | 2020-03-07 | 2023-12-26 | 北京迈格威科技有限公司 | Deep learning task processing method, image recognition task processing method and device |
CN111476227B (en) * | 2020-03-17 | 2024-04-05 | 平安科技(深圳)有限公司 | Target field identification method and device based on OCR and storage medium |
CN111695558B (en) * | 2020-04-28 | 2023-08-04 | 深圳市跨越新科技有限公司 | Logistics shipping list picture correction method and system based on YoloV3 model |
CN111639635B (en) * | 2020-05-26 | 2024-02-27 | 广东小天才科技有限公司 | Processing method and device for shooting pictures, electronic equipment and storage medium |
CN111510752B (en) * | 2020-06-18 | 2021-04-23 | 平安国际智慧城市科技股份有限公司 | Data transmission method, device, server and storage medium |
CN111881882A (en) * | 2020-08-10 | 2020-11-03 | 晶璞(上海)人工智能科技有限公司 | Medical bill rotation correction method and system based on deep learning |
CN111931664B (en) * | 2020-08-12 | 2024-01-12 | 腾讯科技(深圳)有限公司 | Mixed-pasting bill image processing method and device, computer equipment and storage medium |
CN111967395A (en) * | 2020-08-18 | 2020-11-20 | 中国银行股份有限公司 | Bank bill identification method and device |
CN112052858B (en) * | 2020-09-02 | 2023-09-12 | 中国银行股份有限公司 | Method and related device for extracting target field in bill image |
CN112037077B (en) * | 2020-09-03 | 2024-07-09 | 平安健康保险股份有限公司 | Seal identification method, device, equipment and storage medium based on artificial intelligence |
CN111931771B (en) * | 2020-09-16 | 2021-01-01 | 深圳壹账通智能科技有限公司 | Bill content identification method, device, medium and electronic equipment |
CN112241725A (en) * | 2020-10-30 | 2021-01-19 | 深圳供电局有限公司 | Intelligent bill identification and inspection method and system and readable storage medium |
CN112395995A (en) * | 2020-11-19 | 2021-02-23 | 深圳供电局有限公司 | Method and system for automatically filling and checking bill according to mobile financial bill |
CN112395996A (en) * | 2020-11-19 | 2021-02-23 | 深圳供电局有限公司 | Financial bill OCR recognition and image processing method, system and readable storage medium |
CN113205049A (en) * | 2021-05-07 | 2021-08-03 | 开放智能机器(上海)有限公司 | Document identification method and identification system |
CN113326895A (en) * | 2021-06-25 | 2021-08-31 | 湖南星汉数智科技有限公司 | Passenger ticket travel itinerary identification method and device, computer equipment and storage medium |
CN113723508B (en) * | 2021-08-30 | 2024-04-19 | 杭州米数科技有限公司 | Bill image classification method, device, computing equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104112128A (en) * | 2014-06-19 | 2014-10-22 | 中国工商银行股份有限公司 | Digital image processing system applied to bill image character recognition and method |
CN105654127A (en) * | 2015-12-30 | 2016-06-08 | 成都数联铭品科技有限公司 | End-to-end-based picture character sequence continuous recognition method |
CN107067020A (en) * | 2016-12-30 | 2017-08-18 | 腾讯科技(上海)有限公司 | Image identification method and device |
CN107220648A (en) * | 2017-04-11 | 2017-09-29 | 平安科技(深圳)有限公司 | The character identifying method and server of Claims Resolution document |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2835274B2 (en) * | 1994-02-24 | 1998-12-14 | 株式会社テック | Image recognition device |
CN104463126A (en) * | 2014-12-15 | 2015-03-25 | 湖南工业大学 | Automatic slant angle detecting method for scanned document image |
CN106557747B (en) * | 2016-11-15 | 2018-06-22 | 平安科技(深圳)有限公司 | The method and device of identification insurance single numbers |
-
2017
- 2017-10-09 CN CN201710929629.8A patent/CN107766809B/en active Active
- 2017-10-31 WO PCT/CN2017/108767 patent/WO2019071662A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104112128A (en) * | 2014-06-19 | 2014-10-22 | 中国工商银行股份有限公司 | Digital image processing system applied to bill image character recognition and method |
CN105654127A (en) * | 2015-12-30 | 2016-06-08 | 成都数联铭品科技有限公司 | End-to-end-based picture character sequence continuous recognition method |
CN107067020A (en) * | 2016-12-30 | 2017-08-18 | 腾讯科技(上海)有限公司 | Image identification method and device |
CN107220648A (en) * | 2017-04-11 | 2017-09-29 | 平安科技(深圳)有限公司 | The character identifying method and server of Claims Resolution document |
Non-Patent Citations (1)
Title |
---|
ZHANG, XIAOJUN: "Research on the Algorithm and Realization of Bill Character Recognition System", CHINA MASTER'S THESES FULL-TEXT DATABASE, 15 May 2009 (2009-05-15), pages 19 - 37 * |
Cited By (47)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110288755A (en) * | 2019-05-21 | 2019-09-27 | 平安银行股份有限公司 | The invoice method of inspection, server and storage medium based on text identification |
CN110276346A (en) * | 2019-06-06 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Target area identification model training method, device and computer readable storage medium |
CN110276346B (en) * | 2019-06-06 | 2023-10-10 | 北京字节跳动网络技术有限公司 | Target area recognition model training method, device and computer readable storage medium |
CN110245087A (en) * | 2019-06-20 | 2019-09-17 | 杭州睿琪软件有限公司 | The state detection method and device at the human customer end for sample audit |
CN110288027A (en) * | 2019-06-27 | 2019-09-27 | 上海海事大学 | A kind of crane corrosion identification and subsumption algorithm based on SSD frame |
CN110288027B (en) * | 2019-06-27 | 2023-04-07 | 上海海事大学 | Crane rust identification and classification algorithm based on SSD frame |
CN112149701A (en) * | 2019-06-28 | 2020-12-29 | 杭州海康威视数字技术股份有限公司 | Image identification method, virtual sample data generation method and storage medium |
CN112149701B (en) * | 2019-06-28 | 2024-05-10 | 杭州海康威视数字技术股份有限公司 | Image recognition method, virtual sample data generation method and storage medium |
CN110427853A (en) * | 2019-07-24 | 2019-11-08 | 北京一诺前景财税科技有限公司 | A kind of method of smart tickets information extraction processing |
CN110717516A (en) * | 2019-09-06 | 2020-01-21 | 中国平安财产保险股份有限公司 | Bill image classification method and device and computer readable storage medium |
CN110717516B (en) * | 2019-09-06 | 2023-08-25 | 中国平安财产保险股份有限公司 | Bill image classification method, device and computer readable storage medium |
CN110705533A (en) * | 2019-09-09 | 2020-01-17 | 武汉联析医疗技术有限公司 | AI recognition and grabbing system for inspection report |
CN110991456A (en) * | 2019-12-05 | 2020-04-10 | 北京百度网讯科技有限公司 | Bill identification method and device |
CN110991456B (en) * | 2019-12-05 | 2023-07-07 | 北京百度网讯科技有限公司 | Bill identification method and device |
CN111047261A (en) * | 2019-12-11 | 2020-04-21 | 青岛盈智科技有限公司 | Warehouse logistics order identification method and system |
CN111047261B (en) * | 2019-12-11 | 2023-06-16 | 青岛盈智科技有限公司 | Warehouse logistics order identification method and system |
CN111241330A (en) * | 2020-01-13 | 2020-06-05 | 苏宁云计算有限公司 | Commodity picture auditing method and device |
CN111241330B (en) * | 2020-01-13 | 2022-11-18 | 苏宁云计算有限公司 | Commodity picture auditing method and device |
CN111259889A (en) * | 2020-01-17 | 2020-06-09 | 平安医疗健康管理股份有限公司 | Image text recognition method and device, computer equipment and computer storage medium |
CN111401221A (en) * | 2020-03-12 | 2020-07-10 | 重庆农村商业银行股份有限公司 | Card ticket identification method, device, equipment and storage medium |
CN111539406B (en) * | 2020-04-21 | 2023-04-18 | 招商局金融科技有限公司 | Certificate copy information identification method, server and storage medium |
CN111539406A (en) * | 2020-04-21 | 2020-08-14 | 招商局金融科技有限公司 | Certificate copy information identification method, server and storage medium |
CN112464941B (en) * | 2020-10-23 | 2024-05-24 | 北京思特奇信息技术股份有限公司 | Invoice identification method and system based on neural network |
CN112464941A (en) * | 2020-10-23 | 2021-03-09 | 北京思特奇信息技术股份有限公司 | Invoice identification method and system based on neural network |
CN112232296A (en) * | 2020-11-09 | 2021-01-15 | 北京爱笔科技有限公司 | Hyper-parameter exploration method and device |
CN112232353A (en) * | 2020-11-23 | 2021-01-15 | 阳光保险集团股份有限公司 | Method and device for recognizing characters in image, electronic equipment and storage medium |
CN113807158A (en) * | 2020-12-04 | 2021-12-17 | 四川医枢科技股份有限公司 | PDF content extraction method, device and equipment |
CN112633275A (en) * | 2020-12-22 | 2021-04-09 | 航天信息股份有限公司 | Multi-bill mixed-shooting image correction method and system based on deep learning |
CN112633275B (en) * | 2020-12-22 | 2023-07-18 | 航天信息股份有限公司 | Multi-bill mixed shooting image correction method and system based on deep learning |
CN112699871B (en) * | 2020-12-23 | 2023-11-14 | 平安银行股份有限公司 | Method, system, device and computer readable storage medium for identifying field content |
CN112699871A (en) * | 2020-12-23 | 2021-04-23 | 平安银行股份有限公司 | Method, system, device and computer readable storage medium for field content identification |
CN112632926A (en) * | 2020-12-29 | 2021-04-09 | 平安科技(深圳)有限公司 | Data processing method and device for bill, electronic equipment and storage medium |
CN112632926B (en) * | 2020-12-29 | 2023-10-31 | 平安科技(深圳)有限公司 | Bill data processing method and device, electronic equipment and storage medium |
CN112990035A (en) * | 2021-03-23 | 2021-06-18 | 北京百度网讯科技有限公司 | Text recognition method, device, equipment and storage medium |
CN112990035B (en) * | 2021-03-23 | 2023-10-31 | 北京百度网讯科技有限公司 | Text recognition method, device, equipment and storage medium |
CN113434491B (en) * | 2021-06-18 | 2022-09-02 | 深圳市曙光信息技术有限公司 | Character model data cleaning method, system and medium for deep learning OCR recognition |
CN113434491A (en) * | 2021-06-18 | 2021-09-24 | 深圳市曙光信息技术有限公司 | Character model data cleaning method, system and medium for deep learning OCR recognition |
CN113554009B (en) * | 2021-09-22 | 2022-03-22 | 北京奇虎科技有限公司 | Bill verification method, device, equipment and storage medium |
CN113554009A (en) * | 2021-09-22 | 2021-10-26 | 北京奇虎科技有限公司 | Bill verification method, device, equipment and storage medium |
CN114202666A (en) * | 2021-10-19 | 2022-03-18 | 南京和瑞供应链管理有限公司 | High-efficiency automatic identification method for high-reproduction characteristic target object |
CN114092948B (en) * | 2021-11-24 | 2023-09-22 | 北京百度网讯科技有限公司 | Bill identification method, device, equipment and storage medium |
CN114092948A (en) * | 2021-11-24 | 2022-02-25 | 北京百度网讯科技有限公司 | Bill identification method, device, equipment and storage medium |
CN115035352B (en) * | 2022-03-23 | 2023-08-04 | 成都智元汇信息技术股份有限公司 | Verification method and system based on intelligent picture-identifying box performance |
CN115035352A (en) * | 2022-03-23 | 2022-09-09 | 成都智元汇信息技术股份有限公司 | Verification method and system based on intelligent image recognition box performance |
CN114708486A (en) * | 2022-04-07 | 2022-07-05 | 太原智林信息技术股份有限公司 | Automatic judging method for physical and electrical experiment operation circuit connection |
CN116468255A (en) * | 2023-06-15 | 2023-07-21 | 国网信通亿力科技有限责任公司 | Configurable main data management system |
CN116468255B (en) * | 2023-06-15 | 2023-09-08 | 国网信通亿力科技有限责任公司 | Configurable main data management system |
Also Published As
Publication number | Publication date |
---|---|
CN107766809B (en) | 2020-05-19 |
CN107766809A (en) | 2018-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019071662A1 (en) | Electronic device, bill information identification method, and computer readable storage medium | |
CN107798299B (en) | Bill information identification method, electronic device and readable storage medium | |
WO2019104879A1 (en) | Information recognition method for form-type image, electronic device and readable storage medium | |
WO2019174130A1 (en) | Bill recognition method, server, and computer readable storage medium | |
WO2018205467A1 (en) | Automobile damage part recognition method, system and electronic device and storage medium | |
WO2019037259A1 (en) | Electronic device, method and system for categorizing invoices, and computer-readable storage medium | |
WO2020238054A1 (en) | Method and apparatus for positioning chart in pdf document, and computer device | |
CN111639648B (en) | Certificate identification method, device, computing equipment and storage medium | |
WO2018090641A1 (en) | Method, apparatus and device for identifying insurance policy number, and computer-readable storage medium | |
WO2021189855A1 (en) | Image recognition method and apparatus based on ct sequence, and electronic device and medium | |
US9092697B2 (en) | Image recognition system and method for identifying similarities in different images | |
WO2022105179A1 (en) | Biological feature image recognition method and apparatus, and electronic device and readable storage medium | |
CN112699775A (en) | Certificate identification method, device and equipment based on deep learning and storage medium | |
CN110675940A (en) | Pathological image labeling method and device, computer equipment and storage medium | |
WO2021143058A1 (en) | Image-based information comparison method, apparatus, electronic device, and computer-readable storage medium | |
CN113837151B (en) | Table image processing method and device, computer equipment and readable storage medium | |
WO2021189856A1 (en) | Certificate check method and apparatus, and electronic device and medium | |
CN112668575B (en) | Key information extraction method and device, electronic equipment and storage medium | |
CN113961473A (en) | Data testing method and device, electronic equipment and computer readable storage medium | |
CN112580108A (en) | Signature and seal integrity verification method and computer equipment | |
CN114708461A (en) | Multi-modal learning model-based classification method, device, equipment and storage medium | |
CN112396047A (en) | Training sample generation method and device, computer equipment and storage medium | |
CN114332883A (en) | Invoice information identification method and device, computer equipment and storage medium | |
CN113420684A (en) | Report recognition method and device based on feature extraction, electronic equipment and medium | |
CN112560855A (en) | Image information extraction method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17928428 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 25.09.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17928428 Country of ref document: EP Kind code of ref document: A1 |