CN112183594B - Bill image processing method and device, storage medium and electronic equipment - Google Patents
Bill image processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN112183594B CN112183594B CN202010980981.6A CN202010980981A CN112183594B CN 112183594 B CN112183594 B CN 112183594B CN 202010980981 A CN202010980981 A CN 202010980981A CN 112183594 B CN112183594 B CN 112183594B
- Authority
- CN
- China
- Prior art keywords
- image
- target
- bill
- images
- fuzzy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title abstract description 18
- 238000013145 classification model Methods 0.000 claims abstract description 101
- 238000000605 extraction Methods 0.000 claims abstract description 91
- 238000000034 method Methods 0.000 claims abstract description 44
- 238000012545 processing Methods 0.000 claims abstract description 33
- 238000012552 review Methods 0.000 claims abstract description 5
- 238000012549 training Methods 0.000 claims description 50
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 15
- 230000006835 compression Effects 0.000 claims description 14
- 238000007906 compression Methods 0.000 claims description 14
- 230000009466 transformation Effects 0.000 claims description 14
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 13
- 238000002372 labelling Methods 0.000 claims description 13
- 238000011176 pooling Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 10
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000012550 audit Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- 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
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/462—Salient features, e.g. scale invariant feature transforms [SIFT]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a bill image processing method and device, a storage medium and electronic equipment, and belongs to the field of image processing. Wherein the method comprises the following steps: acquiring a target image to be audited; inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network; inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer; determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold; in the case where the target classification result is used to indicate that the target image is not a blurred image, it is determined that the review of the target image passes. The application solves the problem that the image recognition effect has certain limitation caused by unclear identification limit on clear and fuzzy bill image quality in the related technology.
Description
Technical Field
The present application relates to the field of image processing, and in particular, to a method and apparatus for processing a ticket image, a storage medium, and an electronic device.
Background
In the scenes of claim acceptance, bank business handling and the like, a bill is manually checked by an application acceptance party according to bill material business provided by an applicant, and whether the current business enters an acceptance stage is judged according to whether the bill has quality problems. If the problem exists, the business application accepting party feeds the corresponding bill problem back to the applicant, and the applicant returns the bill problem according to the requirement. The manual auditing mode has the problems of long time consumption and human resource consumption, and has poor user experience.
In the related technology, the bill image quality can be automatically checked. The automatic auditing of the bill image quality generally adopts a traditional computer vision method and a machine learning model to distinguish the clear and fuzzy bill images. However, there is no absolute standard for the definition and blurring of the image quality of the bill currently, and the manually constructed features have limitations and restrictions, resulting in a certain limitation of the image recognition effect.
Therefore, there is a problem in the related art that the image recognition effect has a certain limitation due to the unclear qualification limits for the definition and blurring of the ticket image quality.
Disclosure of Invention
The application provides a processing method and a device for bill images, a storage medium and electronic equipment, which at least solve the problem that the image recognition effect has a certain limitation caused by unclear clear and fuzzy identification limits on the quality of bill images in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for processing a ticket image, the method including:
Acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
Inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model comprising the target feature extraction network by using a first bill image sample set;
Inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
Determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
and determining that the target image is approved under the condition that the target classification result is used for indicating that the target image is not a blurred image.
According to another aspect of the embodiment of the present application, there is also provided a processing apparatus for ticket images, including:
the first acquisition module is used for acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
The first input module is used for inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model comprising the target feature extraction network by using a first bill image sample set;
The second input module is used for inputting the target fuzzy characteristics to a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
The first determining module is used for determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold value, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
And the second determining module is used for determining that the target image is checked and passed under the condition that the target classification result is used for indicating that the target image is not a blurred image.
Optionally, the apparatus further comprises:
The second acquisition module is used for acquiring the first bill image sample set before acquiring the target image to be audited, wherein the first bill image sample set comprises the first bill image and target marking information for indicating whether the first bill image is a blurred image or not;
A third determining module, configured to determine, according to a blur feature of the first ticket image, a first initial probability that the first ticket image is a blurred image, and a second initial probability that the first ticket image is not a blurred image;
A fourth determining module, configured to determine the first classification result of the first ticket image according to the first initial probability and the second initial probability;
and the adjusting module is used for adjusting the model parameters of the initial classification model according to the first classification result and the target labeling information to obtain the target classification model.
Optionally, the apparatus further comprises:
A third obtaining module, configured to obtain a second bill image sample set before obtaining the first bill image sample set, where the second bill image sample set includes at least two second bill images and a target ordering result that is used to indicate a sequence of blur degrees of the at least two second bill images;
And a fifth determining module, configured to train an initial image sorting model by using the second bill image sample set to obtain a target image sorting model, where the initial image sorting model includes an initial feature extraction network corresponding to the target feature extraction network, the initial image sorting model is configured to sort blur degrees of the at least two second bill images according to blur features of the at least two second bill images, and the target image sorting model includes the target feature extraction network.
Optionally, the adjusting module includes:
A retaining unit, configured to retain the target feature extraction network in the target image ordering model;
the connection unit is used for connecting a global average pooling layer and a full connection layer after the target feature extraction network to obtain the initial classification model;
And the fine tuning unit is used for fine tuning the initial classification model according to the input first bill image sample set and the first classification result to obtain the target classification model.
Optionally, the third acquisition module includes at least one of:
the first execution unit is used for executing at least two image compression operations on the first reference bill image to obtain at least two first sub-bill images, wherein the at least two image compression operations are in one-to-one correspondence with the at least two first sub-bill images, and the at least two second bill images comprise the at least two first sub-bill images;
the second execution unit is used for executing at least two blurring operator operations on the second reference bill image to obtain at least two second sub-bill images, wherein the at least two blurring operator operations are in one-to-one correspondence with the at least two second sub-bill images, and the at least two second bill images comprise the at least two second sub-bill images;
The third execution unit is used for executing at least two affine transformation operations on the third reference bill image to obtain at least two third sub-bill images, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images, and the at least two second bill images comprise the at least two third sub-bill images;
and the fourth execution unit is used for executing at least two brightness adjustment operations on the fourth reference bill image to obtain at least two fourth sub-bill images, wherein the at least two brightness adjustment operations are in one-to-one correspondence with the at least two fourth sub-bill images, and the at least two second bill images comprise the at least two fourth sub-bill images.
Optionally, the fifth determining module includes:
an acquiring unit, configured to acquire a plurality of ticket image pairs from the at least two second ticket images, where one ticket image pair of the plurality of ticket image pairs includes two ticket images of the same ticket image and different blur degrees;
The training unit is used for training the initial image ordering model by using the plurality of bill image pairs and the target ordering result to obtain the target image ordering model, wherein the initial image ordering model is a twin network model comprising two initial feature extraction networks.
Optionally, the acquiring unit includes:
and the acquisition subunit is used for acquiring a plurality of bill image pairs from the at least two second bill images according to the bill images and the blurring operation types, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blurring degrees, wherein the two bill images are obtained by executing blurring operations of the same type on the same bill image.
Optionally, the apparatus further comprises:
a sixth determining module, configured to determine to accept the target service after the determining that the target image audit passes;
and the sending module is used for sending a notification message to a client applying for accepting the target service, wherein the notification message is used for indicating to accept the target service.
According to still another aspect of the embodiments of the present application, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein the memory is used for storing a computer program; a processor for executing the method steps of processing the ticket image in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to execute the method steps of processing ticket images in any of the embodiments described above when run.
According to yet another aspect of embodiments of the present application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the processing method of the ticket image in any of the above embodiments.
In the embodiment of the application, a depth model is introduced into the auditing task of the bill image, the auditing task of the bill image is executed by using the target classification model obtained by training the initial classification model by using the bill image marked with the fuzzy image or not, the constructed target classification model can clearly or fuzzy judge the bill image of the application acceptance target service, the manpower consumption is reduced, the accuracy of image quality classification is improved, the automation effect of bill quality auditing is improved, and the problem that the image recognition effect has a certain limitation due to unclear identification limits on the definition and the fuzzy of the bill image quality in the related technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an alternative ticket image processing method according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative method of processing ticket images in accordance with an embodiment of the application;
FIG. 3 is a schematic diagram of an alternative target image ordering model according to an embodiment of the application;
FIG. 4 is a schematic diagram of an alternative fine-tuning initial classification model according to an embodiment of the application;
FIG. 5 is a schematic illustration of a scenario of an alternative online claim settlement application according to embodiments of the present application;
FIG. 6 is a block diagram of an alternative ticket image processing apparatus according to an embodiment of the present application;
Fig. 7 is a block diagram of an alternative electronic device in accordance with an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, a processing method of bill images is provided. Alternatively, in the embodiment of the present application, the method for processing the ticket image may be applied to a hardware environment as shown in fig. 1. As shown in fig. 1, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional components). The terminal 102 may be communicatively coupled to a server 112 via a network 110, the server 112 being operable to provide services (e.g., gaming services, application services, etc.) to the terminal or to clients installed on the terminal, and a database 114 may be provided on the server 112 or independent of the server 112 for providing data storage services to the server 112. In addition, a processing engine 116 may be run in the server 112, which processing engine 116 may be used to perform the steps performed by the server 112.
Alternatively, the terminal 102 may be, but is not limited to, a terminal capable of calculating data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a notebook computer, a PC (Personal Computer ) or the like, where the network may include, but is not limited to, a wireless network or a wired network. Wherein the wireless network comprises: bluetooth, WIFI (WIRELESS FIDELITY ) and other networks that enable wireless communications. The wired network may include, but is not limited to: wide area network, metropolitan area network, local area network. The server 112 may include, but is not limited to, any hardware device that can perform calculations.
In addition, in this embodiment, the method for processing the ticket image may be applied to, but not limited to, an independent processing device with a relatively high processing capability, without data interaction. For example, the processing device may be, but not limited to, a terminal device with a relatively high processing capability, i.e., each operation in the above-described ticket image processing method may be integrated into a single processing device. The above is merely an example, and is not limited in any way in the present embodiment.
Alternatively, in the present embodiment, the above-described processing method of the ticket image may be performed by the server 112, may be performed by the terminal 102, or may be performed by both the server 112 and the terminal 102. The processing method of the ticket image performed by the terminal 102 according to the embodiment of the present application may be performed by a client installed thereon.
Taking a server as an example, fig. 2 is a schematic flow chart of an alternative method for processing a bill image according to an embodiment of the present application, as shown in fig. 2, the flow of the method may include the following steps:
step S201, obtaining a target image to be audited, wherein the target image is a bill image for applying to accept target business.
The processing method of the bill image in the embodiment of the application can be applied to a business scene that the applicant applies for handling some bill images with certain requirements on definition of uploaded bill images, for example, the applicant handles claim business, the bill images need to be uploaded to a claim business system, and the claim business system judges the definition of the currently acquired bill images so as to determine whether the next step is to enter a receiving stage or inform the applicant to return again according to the system prompt requirements. The business scenario may be financial business related to the personal information transacted from the applicant to the bank, which is not limited in the embodiment of the present application.
Optionally, the embodiment of the application explains the processing method of the bill image by taking the claim settlement service scene as an example. The applicant can upload the target image to be audited into the claim settlement business system, wherein the target image is a bill image for applying to accept the target business, and the bill image is insurance bill image information of the user.
The background server of the claim service system may receive the target image uploaded by the client of the applicant (i.e., the client applying for accepting the target service), thereby acquiring the target image.
Step S202, inputting a target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model containing a target feature extraction network by using a first bill image sample set.
Optionally, inputting the obtained target image into a target feature extraction network in the trained target classification model to obtain the target fuzzy feature of the target image output by the target feature extraction network.
The target feature extraction network is obtained by training at least two bill images with different fuzzy degrees of the same bill image; the target classification model is obtained by training and fine-tuning an initial classification model containing a target feature extraction network by using a first bill image sample set.
Step S203, inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image.
Optionally, the target fuzzy feature is input to a target full-connection layer of the target classification model to obtain two decimal values, which are target fuzzy probability and target definition probability respectively, wherein the target fuzzy probability is the probability that the target image is a fuzzy image, and the target definition probability is the probability that the target image is a clear image.
Step S204, determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not.
Optionally, in the embodiment of the present application, a fuzzy probability threshold is preset, and then the obtained target fuzzy probability is compared with a preset fuzzy probability threshold, if the obtained target fuzzy probability is greater than or equal to the preset fuzzy probability threshold, the obtained target classification result is a fuzzy image, and if the obtained target classification result is less than the preset fuzzy probability threshold, the obtained target classification result is a clear image.
The target classification model is obtained by training an initial classification model by using a first bill image sample set.
In step S205, in the case where the target classification result is used to indicate that the target image is not a blurred image, it is determined that the review of the target image passes.
The target classification result is used for indicating whether the target image is a blurred image, if the target classification result is used for indicating that the target image is a blurred image, the fact that the target image audit is not passed is determined, a background server of the claim settlement business system can prompt a client applying for accepting target business, the prompt information is used for prompting that the target image audit is not passed, and the process of uploading the clear image again can be prompted.
Optionally, if the target classification result is used to indicate that the target image is not a blurred image (clear image), the current target image is indicated to meet the requirement of service acceptance, and the target image is determined to pass the audit.
According to the embodiment, the depth model is introduced into the examination task of the bill image, the examination task of the bill image is executed by using the target classification model obtained by training the initial classification model by using the bill image marked with the fuzzy image or not, the constructed target classification model can clearly or fuzzy judge the bill image of the application acceptance target service, the manpower consumption is reduced, the accuracy of image quality classification is improved, the automation effect of bill quality examination is improved, and the problem that the image recognition effect has a certain limitation due to the unclear identification limit on the clear and fuzzy quality of the bill image in the related technology is solved.
As an alternative embodiment, before acquiring the target image to be audited, the method further comprises:
Acquiring a first bill image sample set, wherein the first bill image sample set comprises a first bill image and target labeling information for indicating whether the first bill image is a blurred image or not;
inputting the first bill image into a target feature extraction network in the initial classification model to obtain fuzzy features of the first bill image;
Determining a first initial probability that the first bill image is a blurred image and a second initial probability that the first bill image is not the blurred image according to the blurred characteristics of the first bill image;
determining a first classification result of the first bill image according to the first initial probability and the second initial probability;
And adjusting model parameters of the initial classification model according to the first classification result and the target labeling information to obtain a target classification model.
Before using the target classification model, the initial classification model may be first trained by using the first bill image sample set to obtain the target classification model, and the device for training the initial classification model may be a first model training device, where the first model training device may be the server, or may be another device different from the server, for example, another server, which is not limited in this embodiment. It should be noted that, the first bill image sample herein includes a first bill image and target labeling information for indicating whether the first bill image is a blurred image, and performs loss calculation according to a classification result output by the initial classification model each time, so as to complete adjustment of parameters of the initial classification model until a loss function (loss function) meets a convergence condition (for example, a maximum value reaches 0), and training is completed, so as to obtain a target classification model.
For example, the first model training device may first acquire the first bill image sample set, wherein the first bill image sample set includes a first bill image and target annotation information for indicating whether the first bill image is a blurred image; then, the first bill image is input into a target feature extraction network in an initial classification model, fuzzy features of the first bill image are extracted, and a first initial probability that the first bill image is a fuzzy image and a second initial probability that the first bill image is not a fuzzy image are output according to the fuzzy features, wherein the first initial probability and the second initial probability can be decimal values, and a classification result of the first bill image is obtained according to the first initial probability and the second initial probability which are output currently. For example, if the first initial probability is greater than a set probability threshold (which may be 50% or a threshold greater than or less than 50%), the output first classification result is used to indicate that the first document image is a blurred image, otherwise, the output first classification result is used to indicate that the first document image is not a blurred image.
The number of the first bill images can be at least one, and the initial classification model can be iterated for a plurality of times by using the at least one first bill image until the convergence condition of the model is met, namely, the loss function corresponding to the model meets the convergence condition, so that the target classification model is obtained. The above convergence condition may be that the number (or ratio) of ticket images that are classified correctly (that is, the classification result output by the model matches the target labeling information) is greater than or equal to a set number threshold (or ratio threshold).
In order to improve the model convergence efficiency and ensure the rationality of model parameter adjustment when training the classification model, the embodiment of the application can obtain the target feature extraction network by pre-training (pre-training) the initial feature extraction network in the continuous training process of the initial classification model, and takes the pre-trained target feature extraction network as the feature extraction network of the initial classification model. The target feature extraction network is used for extracting fuzzy features of the input image, and the fuzzy features are used for representing the fuzzy degree of the input image.
When the initial classification model is trained, the first bill image can be input into a target feature extraction network to obtain the fuzzy features of the first bill image output by the target feature extraction network, and the fuzzy features of the first bill image can be used for representing the fuzzy degree of the first bill image.
According to the embodiment, the initial classification model comprises the target feature extraction network obtained through pre-training, the target feature extraction network can learn the differences among different fuzzy degrees, fuzzy features of the image under different fuzzy degrees are obtained, the classification result is output according to the fuzzy features, and convergence of the initial classification model can be accelerated through the pre-training design.
As an alternative embodiment, before acquiring the first ticket image sample set, the method further comprises:
Acquiring a second bill image sample set, wherein the second bill image sample set comprises at least two second bill images and a target ordering result for indicating the order of the blur degree of the at least two second bill images;
Training an initial image ordering model by using a second bill image sample set to obtain a target image ordering model, wherein the initial image ordering model comprises an initial feature extraction network corresponding to a target feature extraction network, the initial image ordering model is used for ordering the blurring degree of at least two second bill images according to the blurring features of the at least two second bill images, and the target image ordering model comprises the target feature extraction network.
Optionally, the embodiment of the present application may use a twin network to generate an initial image sorting model, and because the twin network is used to extract features of an input image, the twin network includes two network structures, so when an acquired second bill image sample set is input into the initial image sorting model, the second bill image sample set needs to include at least two second bill images and a target sorting result for indicating a sequence of blur degrees of the at least two second bill images, the sorting result is compared with the target sorting result according to the sorting result of the at least two second bill images output by the initial image sorting model, parameters in the initial image sorting model are adjusted through loss calculation, and a target image sorting model is determined, wherein the initial image sorting model includes an initial feature extraction network, and after continuous parameter adjustment processing, the initial feature extraction network becomes a target feature extraction network, and the target image sorting model includes the target feature extraction network.
The target feature extraction network is one of the main networks (for example, resnet networks) in the twin network, and it is to be noted that the two networks in the twin network have the same structure, and the parameters between the two networks are shared, that is, the parameters are consistent, so that the extraction of the fuzzy feature of the first bill image can be completed by selecting one of the main networks in the twin network as the target feature extraction network. Wherein the blur feature is used to characterize the degree of blur of the input image; the backbone network may be resnet network or DenseNet network or Mask-RCNN network.
For example, as shown in fig. 3, two second bill images with different blur degrees of the same clear image are input into a twin network, respective blur scores are predicted, and then the blur degree ranks of the two blur images are output, for example, the blur score output by the first second bill image is x1:0.5, the blur score of the output of the first bill image and the second bill image is x2: and 0.6, outputting a sorting value of-1 by the initial image sorting model if the fuzzy value of the first second bill image is smaller than that of the second bill image, otherwise, outputting a value of 1, inputting the value of-1 or 1 into a loss function, continuously adjusting parameters of the initial image sorting model according to the value obtained by the loss function until the value obtained by the loss function is 0, and stopping training the initial image sorting model to obtain the target image sorting model. Wherein, the calculation formula of the loss function is as follows: loss=max (0, -y× (x 1-x 2) +margin, which is an offset that can be set to 0, and y takes on the value of the ranking value output by the initial image ranking model, i.e., 1 or-1.
In the process of continuously training the initial image ordering model, parameters in the initial feature extraction network are adjusted all the time until training of the initial image ordering model is stopped to obtain a target image ordering model, and at the moment, the initial feature extraction network in the twin network also becomes the target feature extraction network.
As an alternative embodiment, adjusting model parameters of the initial classification model according to the first classification result and the target labeling information, and obtaining the target classification model includes:
Preserving a target feature extraction network in the target image ordering model;
connecting a global average pooling layer and a full connection layer after the target feature extraction network to obtain an initial classification model;
and fine tuning the initial classification model according to the input first bill image sample set and the first classification result to obtain a target classification model.
Optionally, referring to fig. 3, all parameters of the last layer in the target image ordering model are removed, that is, the blur score (x 1), the blur score (x 2) and MarginRankingLoss functions in fig. 3 are removed, only all parameters in the target feature extraction network (that is, one of the two resnet networks) are reserved, the target feature extraction network is put into the initial classification model, and the global average pooling layer and the full-connection layer are connected as the initial classification model after the target feature extraction network, and referring to fig. 4, the initial classification model is used for performing a clear or fuzzy classification task of the bill image. Therefore, when the initial classification model is used for image classification tasks, as the target feature extraction network is trained in advance and is mainly used for extracting the fuzzy features of the input bill images with different fuzzy degrees, the aim of rapidly judging whether the bill images are fuzzy can be achieved by only fine tuning parameters in the model when the initial classification model is used for executing the tasks.
According to the method and the device for classifying the bill images, the trained target feature extraction network is reserved in the initial classification model, so that the fuzzy or clear discrimination speed of the model to the bill images can be accelerated, meanwhile, the accuracy is improved, and the convergence of the model is accelerated.
As an alternative embodiment, acquiring the second ticket image sample set includes at least one of:
at least two image compression operations are carried out on the first reference bill image to obtain at least two first sub-bill images, wherein the at least two image compression operations are in one-to-one correspondence with the at least two first sub-bill images, and the at least two second bill images comprise the at least two first sub-bill images;
executing at least two fuzzy operator operations on the second reference bill image to obtain at least two second sub-bill images, wherein the at least two fuzzy operator operations are in one-to-one correspondence with the at least two second sub-bill images, and the at least two second bill images comprise the at least two second sub-bill images;
Performing at least two affine transformation operations on the third reference bill image to obtain at least two third sub-bill images, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images, and the at least two second bill images comprise the at least two third sub-bill images;
and executing at least two brightness adjustment operations on the fourth reference bill image to obtain at least two fourth sub-bill images, wherein the at least two brightness adjustment operations are in one-to-one correspondence with the at least two fourth sub-bill images, and the at least two second bill images comprise the at least two fourth sub-bill images.
Optionally, in the embodiment of the present application, at least two image compression operations may be performed on a first reference document image, where the image compression operations may be to compress the current first reference document image to 50% of the original image size, or compress the current first reference document image to 30% of the original image size, or the like, and the image compression operations may be to compress the resolution of the current first reference document image to three fifths or five fifths of the original image size, or the like, so as to obtain at least two document images (i.e., first sub-document images) with different blur degrees, where the at least two image compression operations are in one-to-one correspondence with the at least two first sub-document images.
Similarly, in a bill image scene, the blurring of focusing can also cause the blurring of a bill image, for example, the condition that the edge is unclear generally occurs in the bill image, and according to the embodiment of the application, at least two kinds of blurring operator operations, such as sobel operator, canny operator and the like, can be performed on a second reference bill image, and at least two bill images (namely, second sub-bill images) with different blurring degrees can be obtained through the blurring operator operations, wherein the at least two kinds of blurring operator operations are in one-to-one correspondence with the at least two second sub-bill images.
Similarly, in the bill image scene, a blurred bill image can be acquired by using an oblique photographing mode, such as oblique 45 ° photographing or oblique 30 ° photographing. Based on this, the embodiment of the application can execute affine transformation operation of at least two degrees on a third reference bill image, and the affine transformation operation can obtain at least two bill images (namely third sub-bill images) with different blur degrees, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images.
Similarly, in the bill image scene, too bright or too dark illumination intensity can directly influence whether characters on the bill can be clearly seen, so that the brightness characteristic of the bill image can also be used as an influence characteristic of the clarity and the blurring of the bill image. Based on this, the embodiment of the present application may perform at least two brightness adjustment operations on a fourth reference bill image, for example, based on brightness or brightness channels in an HSL color channel or an HSV color channel, and take one or more mathematical statistics of the color channel as features, for example, brightness adjustment operations such as mean, variance, skewness, kurtosis, etc., to obtain at least two bill images (i.e., fourth sub-bill images) with different blur degrees, where at least two brightness adjustment operations are in one-to-one correspondence with at least two fourth sub-bill images.
It should be noted that, in the embodiment of the present application, the first reference document image, the second reference document image, the third reference document image and the fourth reference document image are all a clear image. The four reference bill images may be the same bill image or different four bill images. The number of the reference bill images and the fuzzy operation mode are not particularly limited in the embodiment of the application.
According to the embodiment, different computer vision methods are used for carrying out different degrees of transformation on the same clear bill image or each clear bill image, so that a plurality of fuzzy images in the production process are simulated, and the contrast between data is enhanced.
As an alternative embodiment, training the initial image ordering model using the second bill image sample set, obtaining the target image ordering model includes:
Acquiring a plurality of bill image pairs from at least two second bill images, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blur degrees of the same bill image;
Training an initial image ordering model by using a plurality of bill image pairs and a target ordering result to obtain a target image ordering model, wherein the initial image ordering model is a twin network model comprising two initial feature extraction networks.
Alternatively, a plurality of (at least one) ticket image pairs may be determined from the acquired at least two second ticket images, and one ticket image pair of the plurality of ticket image pairs may be selected (for example, one ticket image pair is generated as shown in fig. 3), where each ticket image pair may be two ticket images including the same ticket image and different blur degrees.
And then training the initial image ordering model according to the plurality of bill image pairs and the target ordering results of the plurality of bill images to obtain a target image ordering model. It should be noted that the initial image ordering model is a twin network model including two initial feature extraction networks.
Illustratively, the initial graphical ranking model is trained in multiple rounds as follows:
In the process of performing the training of the initial image ordering model, selecting a current bill image pair from a plurality of bill image pairs;
inputting the current bill image pair into a target image ordering model to obtain a model ordering result of the current bill image pair;
And under the condition that the model sorting result is inconsistent with the reference sorting result of the current bill image pair indicated by the target sorting result, adjusting the model parameters of the target image sorting model to obtain an adjusted target image sorting model, wherein the sorting result of the current bill image pair output by the adjusted target image sorting model is consistent with the reference sorting result, and the target image sorting model is obtained.
According to the method and the device for training the input initial image ordering model by selecting one bill image, the requirement that the twin network is paired with the input image is met, the twin network can concentrate on the difference part between the two images, namely the fuzzy part, when the characteristics are extracted, and the original composition content of the focused clear image is reduced.
As an alternative embodiment, acquiring a plurality of ticket image pairs from at least two second ticket images includes:
And acquiring a plurality of bill image pairs from at least two second bill images according to the bill images and the blurring operation types, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blurring degrees, wherein the two bill images are obtained by executing blurring operations of the same type on the same bill image.
Optionally, one of the plurality of ticket image pairs acquired in the embodiment of the present application includes two ticket images with different blur degrees obtained by performing the same type of blur operation on the same ticket image, that is, in the embodiment of the present application, two ticket images in one ticket image pair may be obtained by performing the same type of blur operation on the same ticket image and are two ticket images with different blur degrees, which are used for extracting blur features with different blur degrees.
According to the method and the device for obtaining the ticket image pairs with different fuzzy degrees under the same fuzzy type, fuzzy features causing different fuzzy degrees of the ticket image can be better extracted, and the obtained fuzzy features have more reference significance.
As an alternative embodiment, after determining that the review of the target image passes, the method further comprises:
Determining acceptance target business;
and sending a notification message to the client applying for accepting the target service, wherein the notification message is used for indicating to accept the target service.
Optionally, after obtaining the message that the target image passes through the verification, the claim service system may further upload other additional information according to the client, such as: checking the amount of the claim, the client signature, the client identity card number and the like, and sending a notification message to the client applying for accepting the target service after all the information passes the checking, so as to inform the client of accepting the target service.
Illustratively, as in FIG. 5, FIG. 5 is a schematic illustration of an alternative on-line claims application scenario in accordance with an embodiment of the present application. When a client applies for an online claim settlement service, the claim settlement service system prompts the client to fill in application data, such as: after the information of the application data is filled completely and without errors, prompting a customer to upload the claim settlement material (mainly an uploaded jpg format image), wherein the claim settlement material comprises bill images, identity card document photos (comprising front and back sides), clinic medical record book images, discharge record single photos, discharge evidence single photos and the like, and after the image checking of the claim settlement material is passed, prompting the customer to sign and confirm, and after the claim settlement service system confirms that the customer signature is without errors, jumping to the current claim settlement service to enter a receiving stage.
According to the embodiment, after the target image is obtained and checked to pass, whether other additional information uploaded by the client meets the requirements of the service system is combined, and whether the current service node enters a receiving stage or prompts the client to return according to prompts is further obtained, so that the accuracy of service handling can be improved, and the safety risk is reduced.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM (Read-Only Memory)/RAM (Random Access Memory), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method for processing ticket images according to various embodiments of the present application.
According to another aspect of the embodiment of the application, a bill image processing device for implementing the bill image processing method is also provided. Fig. 6 is a schematic diagram of an alternative bill image processing apparatus according to an embodiment of the present application, as shown in fig. 6, the apparatus may include:
The first obtaining module 601 is configured to obtain a target image to be audited, where the target image is a ticket image for applying for accepting a target service;
The first input module 602 is connected to the first obtaining module 601, and is configured to input a target image to a target feature extraction network in the target classification model, so as to obtain a target fuzzy feature of the target image output by the target feature extraction network, where the target feature extraction network is obtained by training at least two bill images with different fuzzy degrees of the same bill image; the target classification model is obtained by training and fine-tuning an initial classification model containing a target feature extraction network by using a first bill image sample set;
The second input module 603 is connected to the first input module 602, and is configured to input a target fuzzy feature to a target full-connection layer of the target classification model, so as to obtain a target fuzzy probability output by the target full-connection layer, where the target fuzzy probability is a probability that the target image is a fuzzy image;
the first determining module 604 is connected to the second input module 603, and is configured to determine a target classification result of the target image according to the target blur probability and a preset blur probability threshold, where the target classification result is used to indicate whether the target image is a blurred image;
A second determining module 605, coupled to the second input module 604, is configured to determine that the review of the target image passes if the target classification result is indicative that the target image is not a blurred image.
It should be noted that, the first obtaining module 601 in this embodiment may be used to perform the above-mentioned step S201, the first input module 602 in this embodiment may be used to perform the above-mentioned step S202, the second input module 603 in this embodiment may be used to perform the above-mentioned step S203, the first determining module 604 in this embodiment may be used to perform the above-mentioned step S204, and the second determining module 605 in this embodiment may be used to perform the above-mentioned step S205.
By the aid of the module, a depth model is introduced into the auditing task of the bill image, the auditing task of the bill image is executed by using the target classification model obtained by training the initial classification model by using the bill image marked with whether the bill image is a fuzzy image, the constructed target classification model can clearly or fuzzy judge the bill image of the application acceptance target service, manual labor consumption is reduced, accuracy of image quality classification is improved, automation effect of bill quality auditing is improved, and the problem that image recognition effect caused by unclear identification limit on clear and fuzzy bill image quality in the related technology is solved.
As an alternative embodiment, the apparatus further comprises:
The second acquisition module is used for acquiring a first bill image sample set before acquiring a target image to be audited, wherein the first bill image sample set comprises a first bill image and target labeling information for indicating whether the first bill image is a blurred image or not;
The third determining module is used for determining a first initial probability that the first bill image is a blurred image and a second initial probability that the first bill image is not the blurred image according to the blurred characteristics of the first bill image;
The fourth determining module is used for determining a first classification result of the first bill image according to the first initial probability and the second initial probability;
and the adjusting module is used for adjusting the model parameters of the initial classification model according to the first classification result and the target labeling information to obtain the target classification model.
As an alternative embodiment, the apparatus further comprises:
A third obtaining module, configured to obtain a second bill image sample set before the first bill image sample set is obtained, where the second bill image sample set includes at least two second bill images and a target ordering result that indicates an order of blur degrees of the at least two second bill images;
And a fifth determining module, configured to train an initial image ordering model by using the second bill image sample set to obtain a target image ordering model, where the initial image ordering model includes an initial feature extraction network corresponding to the target feature extraction network, and the initial image ordering model is configured to order the blur degree of at least two second bill images according to the blur features of the at least two second bill images, and the target image ordering model includes the target feature extraction network.
As an alternative embodiment, the adjustment module comprises:
the preserving unit is used for preserving the target feature extraction network in the target image ordering model;
The connection unit is used for connecting the global average pooling layer and the full connection layer after the target feature extraction network to obtain an initial classification model;
and the fine tuning unit is used for fine tuning the initial classification model according to the input first bill image sample set and the first classification result to obtain a target classification model.
As an alternative embodiment, the third acquisition module comprises at least one of:
The first execution unit is used for executing at least two image compression operations on the first reference bill image to obtain at least two first sub-bill images, wherein the at least two image compression operations are in one-to-one correspondence with the at least two first sub-bill images, and the at least two second bill images comprise the at least two first sub-bill images;
The second execution unit is used for executing at least two fuzzy operator operations on the second reference bill image to obtain at least two second sub-bill images, wherein the at least two fuzzy operator operations are in one-to-one correspondence with the at least two second sub-bill images, and the at least two second bill images comprise at least two second sub-bill images;
the third execution unit is used for executing at least two affine transformation operations on the third reference bill image to obtain at least two third sub-bill images, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images, and the at least two second bill images comprise the at least two third sub-bill images;
and the fourth execution unit is used for executing at least two brightness adjustment operations on the fourth reference bill image to obtain at least two fourth sub-bill images, wherein the at least two brightness adjustment operations are in one-to-one correspondence with the at least two fourth sub-bill images, and the at least two second bill images comprise the at least two fourth sub-bill images.
As an alternative embodiment, the fifth determining module includes:
An acquisition unit for acquiring a plurality of bill image pairs from at least two second bill images, wherein one bill image pair of the plurality of bill image pairs comprises two bill images of the same bill image and different blur degrees;
The training unit is used for training the initial image ordering model by using the plurality of bill image pairs and the target ordering result to obtain a target image ordering model, wherein the initial image ordering model is a twin network model comprising two initial feature extraction networks.
As an alternative embodiment, the acquisition unit comprises:
And the acquisition subunit is used for acquiring a plurality of bill image pairs from at least two second bill images according to the bill images and the blurring operation types, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blurring degrees, wherein the two bill images are obtained by executing the blurring operation of the same type on the same bill image.
As an alternative embodiment, the apparatus further comprises:
The sixth determining module is used for determining to accept the target service after determining that the target image auditing is passed;
And the sending module is used for sending a notification message to the client applying for accepting the target service, wherein the notification message is used for indicating to accept the target service.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to still another aspect of the embodiment of the present application, there is also provided an electronic device for implementing the above ticket image processing method, where the electronic device may be a server, a terminal, or a combination thereof.
Fig. 7 is a block diagram of an alternative electronic device, according to an embodiment of the application, as shown in fig. 7, comprising a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory 703 communicate with each other via the communication bus 704, wherein,
A memory 703 for storing a computer program;
The processor 701 is configured to execute the computer program stored in the memory 703, and implement the following steps:
s1, acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
s2, inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model containing a target feature extraction network by using a first bill image sample set;
S3, inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
s4, determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
S5, determining that the target image is checked and passed under the condition that the target classification result is used for indicating that the target image is not a blurred image.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, as shown in fig. 7, the memory 702 may include, but is not limited to, a first acquiring module 601, a first input module 602, a second input module 603, a first determining module 604, and a second determining module 605 in the processing apparatus including the ticket image. In addition, other module units in the processing device of the bill image may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but may also be a DSP (DIGITAL SIGNAL Processing), ASIC (Application SPECIFIC INTEGRATED Circuit), FPGA (Field-Programmable gate array) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In addition, the electronic device further includes: and the display is used for displaying the bill image auditing result.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is only illustrative, and the device implementing the ticket image processing method may be a terminal device, and the terminal device may be a smart phone (such as an Android Mobile phone, an iOS Mobile phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 7 is not limited to the structure of the electronic device. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in fig. 7, or have a different configuration than shown in fig. 7.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of an embodiment of the present application, there is also provided a storage medium. Alternatively, in the present embodiment, the above-described storage medium may be used for executing the program code of the processing method of the ticket image.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
s1, acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
s2, inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model containing a target feature extraction network by using a first bill image sample set;
S3, inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
s4, determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
S5, determining that the target image is checked and passed under the condition that the target classification result is used for indicating that the target image is not a blurred image.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
According to yet another aspect of embodiments of the present application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the processing method of the ticket image in any of the above embodiments.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product or all or part of the technical solution, which is stored in a storage medium, and includes several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the processing method of ticket images according to various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and are merely a logical functional division, and there may be other manners of dividing the apparatus in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the present embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.
Claims (10)
1. A method for processing a ticket image, the method comprising:
Acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
Inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model comprising the target feature extraction network by using a first bill image sample set;
Inputting the target fuzzy characteristics into a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
Determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
Determining that the target image is approved under the condition that the target classification result is used for indicating that the target image is not a blurred image;
Before the target image to be audited is acquired, the method further comprises:
acquiring a first bill image sample set, wherein the first bill image sample set comprises the first bill image and target labeling information for indicating whether the first bill image is a blurred image or not;
inputting the first bill image into the target feature extraction network in the initial classification model to obtain fuzzy features of the first bill image;
Determining a first initial probability that the first bill image is a blurred image and a second initial probability that the first bill image is not a blurred image according to the blurred characteristics of the first bill image;
determining a first classification result of the first bill image according to the first initial probability and the second initial probability;
According to the first classification result and the target labeling information, model parameters of the initial classification model are adjusted to obtain the target classification model;
Wherein prior to the acquiring the first ticket image sample set, the method further comprises:
acquiring a second bill image sample set, wherein the second bill image sample set comprises at least two second bill images and a target ordering result for indicating the order of the blur degree of the at least two second bill images;
Training an initial image ordering model by using the second bill image sample set to obtain a target image ordering model;
the acquiring the second ticket image sample set includes at least one of:
Performing at least two image compression operations on a first reference bill image to obtain at least two first sub-bill images, wherein the at least two image compression operations are in one-to-one correspondence with the at least two first sub-bill images, and the at least two second bill images comprise the at least two first sub-bill images;
executing at least two blurring operator operations on the second reference bill image to obtain at least two second sub-bill images, wherein the at least two blurring operator operations are in one-to-one correspondence with the at least two second sub-bill images, and the at least two second bill images comprise the at least two second sub-bill images;
Executing at least two affine transformation operations on the third reference bill image to obtain at least two third sub-bill images, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images, and the at least two second bill images comprise the at least two third sub-bill images;
and executing at least two brightness adjustment operations on the fourth reference bill image to obtain at least two fourth sub-bill images, wherein the at least two brightness adjustment operations are in one-to-one correspondence with the at least two fourth sub-bill images, and the at least two second bill images comprise the at least two fourth sub-bill images.
2. The method of claim 1, wherein the initial image ordering model comprises an initial feature extraction network corresponding to the target feature extraction network, the initial image ordering model is configured to order the blur degree of the at least two second ticket images according to the blur features of the at least two second ticket images, and the target image ordering model comprises the target feature extraction network.
3. The method of claim 1, wherein adjusting model parameters of the initial classification model based on the first classification result and the target labeling information to obtain the target classification model comprises:
reserving the target feature extraction network within the target image ordering model;
connecting a global average pooling layer and a full connection layer after the target feature extraction network to obtain the initial classification model;
And fine tuning the initial classification model according to the input first bill image sample set and the first classification result to obtain the target classification model.
4. The method of claim 2, wherein training an initial image ordering model using the second set of ticket image samples to obtain a target image ordering model comprises:
Acquiring a plurality of bill image pairs from the at least two second bill images, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blur degrees of the same bill image;
Training the initial image ordering model by using the plurality of bill image pairs and the target ordering result to obtain the target image ordering model, wherein the initial image ordering model is a twin network model comprising two initial feature extraction networks.
5. The method of claim 4, wherein the acquiring a plurality of ticket image pairs from the at least two second ticket images comprises:
And acquiring a plurality of bill image pairs from the at least two second bill images according to the bill images and the blurring operation types, wherein one bill image pair in the plurality of bill image pairs comprises two bill images with different blurring degrees, wherein the two bill images are obtained by executing blurring operations of the same type on the same bill image.
6. The method of any one of claims 1 to 5, wherein after the determining that the target image review passes, the method further comprises:
determining to accept the target service;
and sending a notification message to a client applying for accepting the target service, wherein the notification message is used for indicating to accept the target service.
7. A ticket image processing apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a target image to be audited, wherein the target image is a bill image for applying for accepting target business;
The first input module is used for inputting the target image into a target feature extraction network in a target classification model to obtain target fuzzy features of the target image output by the target feature extraction network, wherein the target feature extraction network is obtained by training at least two bill images with the same bill image and different fuzzy degrees; the target classification model is obtained by training and fine-tuning an initial classification model comprising the target feature extraction network by using a first bill image sample set;
The second input module is used for inputting the target fuzzy characteristics to a target full-connection layer of the target classification model to obtain target fuzzy probability output by the target full-connection layer, wherein the target fuzzy probability is the probability that the target image is a fuzzy image;
The first determining module is used for determining a target classification result of the target image according to the target fuzzy probability and a preset fuzzy probability threshold value, wherein the target classification result is used for indicating whether the target image is a fuzzy image or not;
a second determining module, configured to determine that the target image is approved if the target classification result is used to indicate that the target image is not a blurred image;
wherein the device is further for:
acquiring a first bill image sample set, wherein the first bill image sample set comprises the first bill image and target labeling information for indicating whether the first bill image is a blurred image or not;
inputting the first bill image into the target feature extraction network in the initial classification model to obtain fuzzy features of the first bill image;
Determining a first initial probability that the first bill image is a blurred image and a second initial probability that the first bill image is not a blurred image according to the blurred characteristics of the first bill image;
determining a first classification result of the first bill image according to the first initial probability and the second initial probability;
According to the first classification result and the target labeling information, model parameters of the initial classification model are adjusted to obtain the target classification model;
wherein the device is further for:
acquiring a second bill image sample set, wherein the second bill image sample set comprises at least two second bill images and a target ordering result for indicating the order of the blur degree of the at least two second bill images;
Training an initial image ordering model by using the second bill image sample set to obtain a target image ordering model;
The device is particularly used for:
Performing at least two image compression operations on a first reference bill image to obtain at least two first sub-bill images, wherein the at least two image compression operations are in one-to-one correspondence with the at least two first sub-bill images, and the at least two second bill images comprise the at least two first sub-bill images;
executing at least two blurring operator operations on the second reference bill image to obtain at least two second sub-bill images, wherein the at least two blurring operator operations are in one-to-one correspondence with the at least two second sub-bill images, and the at least two second bill images comprise the at least two second sub-bill images;
Executing at least two affine transformation operations on the third reference bill image to obtain at least two third sub-bill images, wherein the at least two affine transformation operations are in one-to-one correspondence with the at least two third sub-bill images, and the at least two second bill images comprise the at least two third sub-bill images;
and executing at least two brightness adjustment operations on the fourth reference bill image to obtain at least two fourth sub-bill images, wherein the at least two brightness adjustment operations are in one-to-one correspondence with the at least two fourth sub-bill images, and the at least two second bill images comprise the at least two fourth sub-bill images.
8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, characterized in that,
The memory is used for storing a computer program;
the processor is configured to execute the steps of the method for processing ticket images according to any one of claims 1to 5 by executing the computer program stored on the memory.
9. A readable computer storage medium, characterized in that the storage medium comprises a stored computer program, wherein the computer program, when run, performs the method steps of processing ticket images according to any of the preceding claims 1 to 5.
10. A computer program product comprising computer instructions stored in a computer readable storage medium;
a processor of a computer device reads the computer instructions from the computer readable storage medium, the processor executing the computer instructions to cause the computer device to perform the method steps of processing ticket images according to any of the embodiments of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010980981.6A CN112183594B (en) | 2020-09-17 | 2020-09-17 | Bill image processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010980981.6A CN112183594B (en) | 2020-09-17 | 2020-09-17 | Bill image processing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112183594A CN112183594A (en) | 2021-01-05 |
CN112183594B true CN112183594B (en) | 2024-06-11 |
Family
ID=73920331
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010980981.6A Active CN112183594B (en) | 2020-09-17 | 2020-09-17 | Bill image processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112183594B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113657773B (en) * | 2021-08-19 | 2023-08-29 | 中国平安人寿保险股份有限公司 | Method and device for voice operation quality inspection, electronic equipment and storage medium |
CN114862415A (en) * | 2022-04-02 | 2022-08-05 | 阿里云计算有限公司 | Service processing method, electronic device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108898579A (en) * | 2018-05-30 | 2018-11-27 | 腾讯科技(深圳)有限公司 | A kind of image definition recognition methods, device and storage medium |
CN110533097A (en) * | 2019-08-27 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of image definition recognition methods, device, electronic equipment and storage medium |
WO2020037932A1 (en) * | 2018-08-20 | 2020-02-27 | 深圳云天励飞技术有限公司 | Image quality assessment method, apparatus, electronic device and computer readable storage medium |
CN111178345A (en) * | 2019-05-20 | 2020-05-19 | 京东方科技集团股份有限公司 | Bill analysis method, bill analysis device, computer equipment and medium |
CN111428875A (en) * | 2020-03-11 | 2020-07-17 | 北京三快在线科技有限公司 | Image recognition method and device and corresponding model training method and device |
CN111444792A (en) * | 2020-03-13 | 2020-07-24 | 安诚迈科(北京)信息技术有限公司 | Bill recognition method, electronic device, storage medium and device |
CN111652232A (en) * | 2020-05-29 | 2020-09-11 | 泰康保险集团股份有限公司 | Bill identification method and device, electronic equipment and computer readable storage medium |
-
2020
- 2020-09-17 CN CN202010980981.6A patent/CN112183594B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108898579A (en) * | 2018-05-30 | 2018-11-27 | 腾讯科技(深圳)有限公司 | A kind of image definition recognition methods, device and storage medium |
WO2020037932A1 (en) * | 2018-08-20 | 2020-02-27 | 深圳云天励飞技术有限公司 | Image quality assessment method, apparatus, electronic device and computer readable storage medium |
CN111178345A (en) * | 2019-05-20 | 2020-05-19 | 京东方科技集团股份有限公司 | Bill analysis method, bill analysis device, computer equipment and medium |
CN110533097A (en) * | 2019-08-27 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of image definition recognition methods, device, electronic equipment and storage medium |
CN111428875A (en) * | 2020-03-11 | 2020-07-17 | 北京三快在线科技有限公司 | Image recognition method and device and corresponding model training method and device |
CN111444792A (en) * | 2020-03-13 | 2020-07-24 | 安诚迈科(北京)信息技术有限公司 | Bill recognition method, electronic device, storage medium and device |
CN111652232A (en) * | 2020-05-29 | 2020-09-11 | 泰康保险集团股份有限公司 | Bill identification method and device, electronic equipment and computer readable storage medium |
Non-Patent Citations (1)
Title |
---|
复杂背景下的票据字符类型识别方法;陈湘;孙章;丁雪凇;;现代电子技术(第08期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112183594A (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110766033B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN108256591B (en) | Method and apparatus for outputting information | |
CN108337505B (en) | Information acquisition method and device | |
CN112183594B (en) | Bill image processing method and device, storage medium and electronic equipment | |
CN110490181B (en) | Form filling and auditing method, device and equipment based on OCR (optical character recognition) technology and computer storage medium | |
CN111178147B (en) | Screen crushing and grading method, device, equipment and computer readable storage medium | |
CN107943811B (en) | Content publishing method and device | |
CN111738083B (en) | Training method and device for face recognition model | |
CN110798709A (en) | Video processing method and device, storage medium and electronic device | |
CN111415336B (en) | Image tampering identification method, device, server and storage medium | |
CN108648189A (en) | Image fuzzy detection method, apparatus, computing device and readable storage medium storing program for executing | |
CN113537248B (en) | Image recognition method and device, electronic equipment and storage medium | |
CN114170468A (en) | Text recognition method, storage medium and computer terminal | |
CN113255766A (en) | Image classification method, device, equipment and storage medium | |
CN111401438B (en) | Image sorting method, device and system | |
CN116912223A (en) | Image tampering detection method and device, storage medium and electronic equipment | |
CN113674276B (en) | Image quality difference scoring method and device, storage medium and electronic equipment | |
CN114187545B (en) | Progressive lens identification method and device, electronic equipment and storage medium | |
CN111797922B (en) | Text image classification method and device | |
CN110837562A (en) | Case processing method, device and system | |
CN112581001B (en) | Evaluation method and device of equipment, electronic equipment and readable storage medium | |
CN113705587A (en) | Image quality scoring method, device, storage medium and electronic equipment | |
CN112183520A (en) | Intelligent data information processing method and device, electronic equipment and storage medium | |
CN111160429B (en) | Training method of image detection model, image detection method, device and equipment | |
CN113709563B (en) | Video cover selecting method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |