Image quality recognition model training method, device, equipment and storage medium

By constructing and training an image quality recognition model including a backbone neural network and a text recognition network, and combining clear and blurred training samples, the problem of low reliability of the existing model is solved, more efficient document image quality recognition is achieved, and OCR recognition performance is improved.

CN115293333BActive Publication Date: 2025-09-09CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210950610.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-09-09
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The existing image quality recognition model has the problem of low reliability during the training process and is unable to accurately screen out poor quality document images, resulting in a decline in OCR recognition performance.

Method used

By constructing a target text detection model including a backbone neural network and a text recognition network, training it with clear training samples, obtaining the target text detection model, and replacing the text recognition network to construct an original quality recognition model, the original quality recognition model is trained with combination of clear and fuzzy training samples to improve the recognition accuracy of the model.

Benefits of technology

The reliability and recognition accuracy of the image quality recognition model have been improved, which can more accurately screen out poor-quality document images, reduce the impact on subsequent document image recognition, and improve OCR recognition performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115293333B_ABST
    Figure CN115293333B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and discloses an image quality recognition model training method, device, equipment, and storage medium. A target text detection model comprising a backbone neural network and a text recognition network is constructed, and the original text detection model is trained using the acquired clear training samples to obtain a trained target text detection model, so that the backbone neural network performs text detection; an original quality recognition model is constructed based on the backbone neural network in the target text detection model and the original quality recognition network, and the clear training samples are fuzzy processed to obtain corresponding fuzzy training samples; the original quality recognition model is trained using the clear training samples and the fuzzy training samples, thereby obtaining a target quality recognition model with more accurate quality recognition. This training method improves the reliability of quality recognition of the target quality recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an image quality recognition model training method, device, equipment and storage medium. Background Art

[0002] Optical Character Recognition (OCR) is the process of analyzing and identifying text images to obtain text and layout information. By recognizing text within images and returning it as text, OCR fulfills the business need of converting document images into text. OCR performance is affected by the quality of the document images being processed. Therefore, document quality identification can quickly filter out low-quality samples through preliminary screening, reducing the impact of poor document image quality and improving OCR performance.

[0003] Document image quality recognition models are typically trained and modeled based on deep learning. After training, these models determine whether a document is blurry overall. However, document images may have clear text areas while non-text areas are reflective or blurry, or even blurry text areas while non-text areas are clear. These examples are often intercepted by traditional methods, resulting in the loss of critical information. Consequently, trained document image quality recognition models in existing technologies cannot accurately screen document images, resulting in poor robustness and reliability. Summary of the Invention

[0004] The embodiments of the present invention provide an image quality recognition model training method, apparatus, device and storage medium to solve the problem of low reliability of the quality recognition model during the existing image quality recognition model training.

[0005] An embodiment of the present invention provides an image quality recognition model training method, comprising:

[0006] Obtain clear training samples;

[0007] Performing blur processing on the clear training sample to obtain a blurred training sample;

[0008] Using clear training samples to train the original text detection model to obtain a target text detection model, wherein the target text detection model includes a backbone neural network and a text recognition network;

[0009] Using the original quality recognition network to replace the text recognition network in the target text detection model to obtain an original quality recognition model, wherein the original quality recognition model includes a backbone neural network and an original quality recognition network;

[0010] The original quality recognition model is trained using the clear training samples and the fuzzy training samples to obtain a target quality recognition model, which includes a backbone neural network and a target quality recognition network.

[0011] An embodiment of the present invention further provides an image quality identification method, comprising:

[0012] Obtaining the document image to be processed;

[0013] Using a target quality recognition model, performing text box detection on the document image to be processed to obtain content features of the text box to be processed;

[0014] Perform quality identification on the content features of the text box to be processed to obtain a quality identification result.

[0015] An embodiment of the present invention further provides an image quality recognition model training device, comprising:

[0016] A clear training sample acquisition module is used to acquire clear training samples;

[0017] A fuzzy training sample acquisition module performs fuzzy processing on the clear training sample to obtain a fuzzy training sample;

[0018] A target text detection model acquisition module is configured to train an original text detection model using clear training samples to obtain a target text detection model, wherein the target text detection model includes a backbone neural network and a text recognition network;

[0019] An original quality recognition model acquisition module uses an original quality recognition network to replace the text recognition network in the target text detection model to obtain an original quality recognition model, wherein the original quality recognition model includes a backbone neural network and an original quality recognition network;

[0020] The target quality recognition model acquisition module uses the clear training samples and the fuzzy training samples to train the original quality recognition model to obtain a target quality recognition model, wherein the target quality recognition model includes a backbone neural network and a target quality recognition network.

[0021] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the above-mentioned image quality recognition model training method is implemented, or when the processor executes the computer program, the above-mentioned image quality recognition method is implemented.

[0022] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned image quality recognition model training method, or when the processor executes the computer program, it implements the above-mentioned image quality recognition method.

[0023] The above-mentioned image quality recognition model training method, device, equipment and storage medium construct a target text detection model including a backbone neural network and a text recognition network, use the obtained clear training samples to train the original text detection model, and obtain a trained target text detection model so that the backbone neural network can perform text detection; based on the backbone neural network in the target text detection model and the original quality recognition network, an original quality recognition model is constructed, and then the clear training samples are blurred to obtain corresponding fuzzy training samples; the original quality recognition model is trained using clear training samples and fuzzy training samples, thereby obtaining a target quality recognition model with more accurate quality recognition, and the reliability of quality recognition of the target quality recognition model is improved through this training method. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0025] Figure 1 2. It is a schematic diagram of an application environment of an image quality recognition model training method according to an embodiment of the present invention;

[0026] Figure 2 is a flow chart of an image quality recognition model training method according to an embodiment of the present invention;

[0027] Figure 3 is another flow chart of the image quality recognition model training method according to one embodiment of the present invention;

[0028] Figure 4 is another flow chart of the image quality recognition model training method according to one embodiment of the present invention;

[0029] Figure 5 is another flow chart of the image quality recognition model training method according to one embodiment of the present invention;

[0030] Figure 6 is a flow chart of an image quality identification method according to an embodiment of the present invention;

[0031] Figure 7is a schematic diagram of an image quality recognition model training device according to an embodiment of the present invention;

[0032] Figure 8 FIG. 1 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0034] The image quality recognition model training method provided by the embodiment of the present invention can be applied in Figure 1 In the application environment shown. Figure 1 As shown, the client (computer device) communicates with the server via the network. The client, also known as the user end, refers to the program that corresponds to the server and provides local services to the client. The client (computer device) includes but is not limited to various personal computers, laptops, smartphones, tablets, cameras, and portable wearable devices. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0035] The image quality recognition model training method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the image quality recognition model training method is applied in an image quality recognition model training system, which includes the following: Figure 1 The client and server shown communicate with each other through a network to train the quality recognition model to obtain a quality recognition model with higher training reliability.

[0036] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.

[0037] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0038] In one embodiment, if Figure 2 As shown, a method for training an image quality recognition model is provided, and the method is applied in Figure 1 The server in the example is used as an example, and the steps are as follows:

[0039] S201: Obtain clear training samples;

[0040] S202: performing blur processing on the clear training sample to obtain a blurred training sample;

[0041] S203: Using clear training samples to train the original text detection model to obtain a target text detection model, where the target text detection model includes a backbone neural network and a text recognition network;

[0042] S204: Using the original quality recognition network, replacing the text recognition network in the target text detection model to obtain an original quality recognition model, where the original quality recognition model includes a backbone neural network and an original quality recognition network;

[0043] S205: Using the clear training samples and the fuzzy training samples, the original quality recognition model is trained to obtain a target quality recognition model. The target quality recognition model includes a backbone neural network and a target quality recognition network.

[0044] Among them, the target quality recognition model is used to identify the quality of document images, that is, to analyze and identify the image file quality of text materials, continue preliminary screening through document quality recognition, quickly filter out document images of poor quality, and reduce the impact of poor document image quality on the subsequent text conversion performance of document images.

[0045] As an example, in step S201, the server receives clear training samples and uses the received clear training samples for model training. The clear training samples can be obtained via the internet or uploaded locally by the user. The clear training samples include, but are not limited to, text image files and poster image files. The formats of the clear training samples include, but are not limited to, JPEG files, TIFF files, RAW files, BMP files, GIF files, PNG files, and PDF files.

[0046] Among them, whether the clear training sample is clear can be confirmed based on the fuzziness calculation method, and the fuzziness calculation method may include but is not limited to the grayscale variance algorithm, Roberts gradient sum, Tenengrad function and grayscale difference square sum variance algorithm. In this example, according to the standard that the document image can be transcoded, the corresponding average degree of change threshold is set, and the grayscale variance algorithm is used to determine whether the image is clear or fuzzy. When the average degree of change of the training sample is not less than the average degree of change threshold, it is a clear training sample. If it is less than the average degree of change threshold, it is a fuzzy training sample. Specifically, the grayscale variance algorithm is based on the principle that the image is clear and the high-frequency components in the image become more. By taking the grayscale average value of all pixels in the image as a reference, the grayscale value of each pixel point is subtracted and the square sum is calculated, and then normalized by the total number of pixels to characterize the average degree of grayscale change of the image. When the average degree of grayscale change is greater, the image is clearer, and the smaller the average degree of grayscale change is, the more blurred the image is.

[0047] As an example, in step S202, after obtaining a clear training sample, the server performs blur processing on the clear training sample to obtain a blurred training sample corresponding to the clear training sample. In this example, the clear training sample can be used as a positive sample file, and the blurred training sample corresponding to the clear training sample can be used as a negative sample file to train the model, thereby improving the robustness and accuracy of the trained model.

[0048] Methods for blurring clear training samples include, but are not limited to, Gaussian blur, salt and pepper blur, motion blur, blurred image simulation, radial blur, and focus blur. This example uses Gaussian blur to smooth the image data of the clear training sample using a normal distribution, thereby blurring the clear training sample and obtaining a blurred training sample corresponding to the clear training sample.

[0049] As an example, in step S203, the server uses the received clear training samples to train the original text detection model, and uses the original text detection model to learn whether the clear training samples are text, and determines the corresponding text box position according to the recognition results, to obtain a trained target text detection model.

[0050] In this example, the target text detection model includes a backbone neural network and a text recognition network. The backbone neural network is mainly used to distinguish the document image, identify the target box position, that is, the text box content in this example, and perform feature extraction to output the document image feature representation. The trained backbone neural network can improve the sensitivity to the text and text box position features of the document. The backbone neural network can also be based on classification network neural networks, such as Mobilenet and VGGNet; the text recognition network is the fully connected layers (FC) of the target text detection model, composed of many neurons, also known as a classifier, which plays a classification role in the target text detection model. The text recognition network is used to map the feature representation output by the backbone neural network to the sample label space for corresponding classification processing. In this target text detection model, the classification task of the text recognition network is to perform text and non-text classification on the document image features output by the backbone neural network, and regress the text box position coordinates of the recognized results to obtain the text box position.

[0051] In another example, the target text detection model is based on the Region Proposal Network (RPN) detection model, and the corresponding original text detection model is an untrained RPN detection model. The RPN detection model performs binary classification by judging whether each region contains an object or is the background (that is, empty), and then performs bounding box regression to fine-tune the region containing the object to obtain the candidate region, so that the candidate region can better predict the position of the real region. In this application, the RPN detection model is used to detect the text box position, and the backbone neural network of the model is utilized.

[0052] As an example, in step S204, after determining the target text detection model, the server adds an original quality recognition network based on the backbone neural network of the target text detection model to replace the text recognition network in the target text detection model to obtain an original quality recognition model, thereby performing a clear classification judgment on the text box content features output by the backbone neural network through original quality recognition. The original quality recognition model is used to identify the quality of the input document image, that is, to judge the quality of the document image, so as to screen out document images with document image quality that meets the standard for subsequent document image recognition tasks. Among them, the original quality recognition network is the fully connected layers (FC) of the original quality recognition model, which is composed of many neurons and is also called a classifier. In the original quality recognition model, the original quality recognition network receives the text box content features output by the backbone neural network, performs a binary classification of the text box content features into image quality, and outputs the quality recognition result of the document image, which includes clarity and blur.

[0053] In this example, the backbone neural network trained for text detection is used to retain its sensitivity to the position of the text box, thereby improving the model's focus on the position of the text box, so as to identify the document image quality in that area based on the position of the text box.

[0054] As an example, in step S205, the server trains the original quality recognition network in the original quality recognition model using the acquired clear training samples and fuzzy training samples, extracts features through the backbone neural network, and then trains the original quality recognition network based on the text box content features output by the backbone neural network to obtain the target quality recognition network and the final target quality recognition model.

[0055] In this example, by selecting 50 training sample sets in the backbone neural network and directly using the 50 training sample sets for quality identification using the traditional solution, the final quality identification effect of the document image with sparse text distribution is achieved, and the 50 training sample sets achieve a recognition accuracy of 73.2%; by using the 50 training sample sets as the backbone neural network to train the target text detection model, that is, to train the RPN detection model, and then freezing the backbone neural network parameters, using the quality identification network as a classifier for binary classification quality identification, the recognition accuracy of this solution is 96%, which is 22.8% higher than the traditional method.

[0056] In this example, a target text detection model including a backbone neural network and a text recognition network is constructed, and the original text detection model is trained using the obtained clear training samples to obtain a trained target text detection model, so that the backbone neural network can perform text detection; an original quality recognition model is constructed based on the backbone neural network in the target text detection model and the original quality recognition network, and then the clear training samples are fuzzy processed to obtain corresponding fuzzy training samples; the original quality recognition model is trained using clear training samples and fuzzy training samples to obtain a target quality recognition model with more accurate quality recognition. This training method improves the reliability of quality recognition of the target quality recognition model.

[0057] In one embodiment, if Figure 3 As shown, in step S203, the original text detection model is trained using clear training samples to obtain a target text detection model. The target text detection model includes a backbone neural network and a text recognition network, including:

[0058] S301: Inputting the clear training sample into the original text detection model for model training to obtain the predicted text box position corresponding to the clear document image;

[0059] S302: Obtaining a text box detection loss value based on the predicted text box position and the annotated text box position corresponding to the clear document image;

[0060] S303: If the text box detection loss value reaches the convergence condition, the target text detection model is obtained.

[0061] As an example, in step S301, after obtaining a clear training sample, the server inputs it into the original text detection model for model training. The original backbone neural network in the existing original text detection model identifies the text box position of the input clear training sample, obtains the text box position to be confirmed, and inputs this feature into the original text recognition network in the original text detection model for classification and judgment, obtaining the predicted text box position corresponding to the clear document image. In this example, the original text detection model determines whether each area in the clear training sample contains text through binary classification, and then performs bounding box regression to fine-tune the area containing text to obtain the predicted text box position.

[0062] As an example, in step S302, after obtaining the predicted text box position, the server uses a loss function to calculate the loss value of the predicted text box position and the annotated text box position in the pre-annotated clear training sample, obtains the text box detection loss value, and determines the stability of the original text detection model in capturing the text box position. The parameters of the original text detection model are updated based on the text box detection loss value. The loss function is selected based on actual needs and includes but is not limited to the cross entropy loss function, the perceptual loss function, the Hinge loss function, the exponential loss function, and the logarithmic loss function.

[0063] As an example, in step S303, the server updates the parameters of the original backbone neural network and the original text recognition network in the original text detection model based on the obtained text box detection loss value, and confirms whether the text box detection loss value meets the convergence condition based on the pre-set convergence loss threshold. If the convergence condition is not met, the original text detection model continues to be trained. If the convergence condition is met, the target text detection model is obtained and the parameters of the backbone neural network and the text recognition network are determined.

[0064] In this example, clear training samples are input into the original text detection model for model training, and the predicted text box position is identified. Then, the loss is calculated based on the predicted text box position and the annotated text box position corresponding to the clear document image to obtain the corresponding text box detection loss value. The target text detection model is obtained by making a judgment based on the text box detection loss value, thereby training the original text detection model through supervised training to obtain a more accurate target text detection model.

[0065] In one embodiment, if Figure 4 As shown, in step S204, the original quality recognition network is used to replace the text recognition network in the target text detection model to obtain an original quality recognition model. The original quality recognition model includes a backbone neural network and an original quality recognition network, including:

[0066] S401: Freeze the parameters of the backbone neural network in the target text detection model, and replace the text recognition network with the original quality recognition network to obtain the original quality recognition model.

[0067] As an example, in step S401, after obtaining the target text detection model, the server freezes the parameters of the backbone neural network in the target text detection model and replaces the text recognition network in the target text detection model with the original quality recognition network, that is, the frozen backbone neural network is added to the original quality recognition network to obtain the original quality recognition model. Parameter freezing refers to fixing the parameters of the backbone neural network and not adjusting the parameters of the backbone neural network in the subsequent training process to ensure that the backbone neural network maintains its sensitivity to the text box and the text and text box position features of the document, thereby improving the recognition of the text box position in the subsequent document image quality recognition process, and thus more accurately identifying the quality recognition results.

[0068] In this example, by freezing the backbone neural network in the target text detection model and replacing the original text recognition network in the target text detection model with the original quality recognition network, the final original quality recognition model is obtained, thereby improving the recognition of the text box position in the subsequent document image quality recognition process, and thus more accurately identifying the quality recognition results.

[0069] In one embodiment, if Figure 5 As shown, in step S205, the original quality recognition model is trained using clear training samples and fuzzy training samples to obtain a target quality recognition model. The target quality recognition model includes a backbone neural network and a target quality recognition network, including:

[0070] S501: Using the backbone neural network in the original quality recognition model, extract features of the clear training samples and the fuzzy training samples to obtain clear text box content features and fuzzy text box content features;

[0071] S502: Based on the clear text box content features and the fuzzy text box content features, the original quality recognition network is trained to obtain a target quality recognition network;

[0072] S503: Obtaining a target quality recognition model based on the target quality recognition network and the backbone neural network.

[0073] As an example, in step S501, after obtaining the fuzzy training samples after blurring, the server uses the backbone neural network in the original quality recognition model to extract features from the clear training samples and the fuzzy training samples, and extracts the corresponding clear text box content features and fuzzy text box content features through the backbone neural network's sensitivity to the text box of the document and the text box position features.

[0074] As an example, in step S502, after obtaining the clear text box content features and the fuzzy text box content features, the server uses the obtained clear text box content features and the fuzzy text box content features to train the original quality recognition network to obtain the target quality recognition network. In this example, the original quality recognition network can be trained based on the clear text box content features and the fuzzy text box content features using a cross-entropy loss function to obtain the target quality recognition network.

[0075] As an example, in step S503, after determining the target quality recognition network, the server combines the frozen backbone neural networks to obtain a final target quality recognition model.

[0076] In this example, the backbone neural network is used to extract features of clear training samples and fuzzy training samples. The original quality recognition network is trained based on the clear text box content features and the fuzzy text box content features to obtain the target quality recognition network, so as to obtain the final target quality recognition network. During the quality recognition process, the target quality recognition network improves the recognition accuracy by performing quality recognition on the text box position.

[0077] In one embodiment, step S501 uses the backbone neural network in the original quality recognition model to perform feature extraction on the clear training samples and the fuzzy training samples to obtain the clear text box content features and the fuzzy text box content features, including:

[0078] S5011: Use the backbone neural network in the original quality recognition model to perform text box detection on clear training samples and fuzzy training samples to obtain the clear text box content and the fuzzy text box content;

[0079] S5012: Perform feature extraction based on the clear text box content and the fuzzy text box content to obtain clear text box content features and fuzzy text box content features.

[0080] As an example, in step S5011, the server uses the backbone neural network in the original quality recognition model, and performs text box detection on clear training samples and fuzzy training samples through the backbone neural network based on the sensitivity of the backbone neural network to the text box position, and obtains the clear text box content and fuzzy text box content after text box detection for subsequent feature extraction.

[0081] As an example, in step S5012, after obtaining the clear text box content and the fuzzy text box content, the server performs feature extraction on the clear text box content and the fuzzy text box content, that is, performs encoding processing, and obtains the clear text box content features and the fuzzy text box content features, so as to perform subsequent quality recognition training based on the clear text box content features and the fuzzy text box content features.

[0082] In this example, the backbone neural network's sensitivity to text box positions is utilized to detect the text box positions of clear training samples and fuzzy training samples, and then the features within the text boxes are extracted to obtain the clear text box content features and fuzzy text box content features, so that subsequent quality recognition training is performed based on the clear text box content features and fuzzy text box content features.

[0083] In one embodiment, step S502, based on the clear text box content features and the fuzzy text box content features, training the original quality recognition network to obtain the target quality recognition network includes:

[0084] S5021: Using the original quality recognition network, identify the content features of the clear text box and the content features of the fuzzy text box to obtain the clear sample recognition results and the fuzzy sample recognition results;

[0085] S5022: Obtaining a quality detection loss value based on the clear sample recognition result and the fuzzy sample recognition result;

[0086] S5023: When the quality detection loss value reaches a convergence condition, a target quality recognition network is obtained.

[0087] As an example, in step S5021, after obtaining the clear text box content features and the fuzzy text box content features, the server uses the original quality recognition network to identify the clear text box content features and the fuzzy text box content features, and simultaneously outputs the clear sample recognition results and the fuzzy sample recognition results.

[0088] As an example, in step S5022, after obtaining the clear sample recognition results and the blurred sample recognition results, the server calculates a loss value based on the clear sample recognition results and the blurred sample recognition results to obtain a quality detection loss value. In this example, the clear sample recognition results and the blurred sample recognition results are processed using a cross-entropy loss function, and the corresponding scores are derived. The probability of the prediction being clear is calculated to obtain the corresponding quality detection loss value.

[0089] As an example, in step S5023, after determining the quality detection loss value, the server determines whether the quality detection loss value reaches the convergence condition. When the quality detection loss value does not reach the convergence condition, new samples are continued to be used for training. If the convergence condition is met, the original quality recognition network is confirmed as the target quality recognition network and the training is terminated.

[0090] In this example, the original quality recognition network is used to identify the content features of the clear text box and the content features of the fuzzy text box, obtain the clear sample recognition results and the fuzzy sample recognition results, and calculate the loss based on the clear sample recognition results and the fuzzy sample recognition results. According to the quality detection loss value after the loss calculation, the final target quality recognition network is determined, thereby completing the corresponding quality recognition training based on the features output by the backbone neural network, thereby improving the accuracy and reliability of quality recognition.

[0091] In another embodiment, if Figure 6 As shown, a method for identifying image quality is provided, comprising the following steps:

[0092] S601: Acquire the document image to be processed;

[0093] S602: Using the target quality recognition model, perform text box detection on the document image to be processed and obtain content features of the text box to be processed;

[0094] S603: Perform quality recognition on the content features of the text box to be processed and obtain a quality recognition result.

[0095] As an example, in step S601, the server receives a user's service request and receives a corresponding document image to be processed for quality identification. Where the user's service request is document image recognition, the server performs quality identification on the document images to screen out document images suitable for document recognition and intercepts images whose quality affects document recognition.

[0096] As an example, in step S602, after obtaining the document image to be processed, the server uses the backbone neural network in the target quality recognition model to perform text box detection on the document image to be processed, determine the text box content of the document image to be processed, and determine the content features of the text box to be processed for quality recognition.

[0097] As an example, in step S603, after obtaining the content features of the text box to be processed, the server uses the target quality recognition network in the target quality recognition model to perform quality recognition on the content features of the text box to be processed extracted by the backbone neural network, thereby obtaining a quality recognition result. The quality recognition result indicates whether the document image to be processed is clear or blurred, thereby determining whether the document image to be processed should undergo document image recognition.

[0098] In this example, by receiving the corresponding document images to be processed and performing quality identification, the document images to be processed that can be used for document identification are screened out, and the images to be processed whose quality affects the document identification are intercepted, thereby improving the efficiency of subsequent document recognition.

[0099] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0100] In one embodiment, an image quality recognition model training device is provided, which corresponds to the image quality recognition model training method in the above embodiment. Figure 7 As shown, the image quality recognition model training device includes a clear training sample acquisition module 701, a fuzzy training sample acquisition module 702, a target text detection model acquisition module 703, an original quality recognition model acquisition module 704, and a target quality recognition model acquisition module 705. The functional modules are described in detail as follows:

[0101] A clear training sample acquisition module 701 acquires clear training samples;

[0102] A fuzzy training sample acquisition module 702 performs fuzzy processing on the clear training sample to obtain a fuzzy training sample;

[0103] The target text detection model acquisition module 703 uses the clear training samples to train the original text detection model to obtain the target text detection model, which includes a backbone neural network and a text recognition network;

[0104] The original quality recognition model acquisition module 704 uses the original quality recognition network to replace the text recognition network in the target text detection model to obtain the original quality recognition model, which includes the backbone neural network and the original quality recognition network;

[0105] The target quality recognition model acquisition module 705 uses clear training samples and fuzzy training samples to train the original quality recognition model to obtain a target quality recognition model. The target quality recognition model includes a backbone neural network and a target quality recognition network.

[0106] In one embodiment, the target text detection model acquisition module 703 includes:

[0107] The predicted text box position acquisition unit inputs the clear training sample into the original text detection model for model training to obtain the predicted text box position corresponding to the clear document image;

[0108] A text box detection loss value acquisition unit obtains a text box detection loss value based on the predicted text box position and the marked text box position corresponding to the clear document image;

[0109] The target text detection model acquisition unit obtains the target text detection model if the text box detection loss value reaches the convergence condition.

[0110] In one embodiment, the original quality identification model acquisition module 704 includes:

[0111] The original quality recognition model acquisition unit freezes the backbone neural network in the target text detection model, and replaces the text recognition network with the original quality recognition network to obtain the original quality recognition model.

[0112] In one embodiment, the target quality identification model acquisition module 705 includes:

[0113] The text box content feature acquisition unit uses the backbone neural network in the original quality recognition model to extract features from the clear training samples and the fuzzy training samples to obtain the clear text box content features and the fuzzy text box content features;

[0114] The target quality recognition network acquisition unit trains the original quality recognition network based on the clear text box content features and the fuzzy text box content features to acquire the target quality recognition network;

[0115] The original quality recognition model acquisition unit obtains the target quality recognition model based on the target quality recognition network and the backbone neural network.

[0116] In one embodiment, the text box content feature acquisition unit includes:

[0117] The text box content acquisition subunit uses the backbone neural network in the original quality recognition model to perform text box detection on clear training samples and fuzzy training samples to obtain the clear text box content and the fuzzy text box content;

[0118] The text box content feature acquisition subunit performs feature extraction based on the clear text box content and the fuzzy text box content to obtain the clear text box content features and the fuzzy text box content features.

[0119] In one embodiment, the target quality identification network acquisition unit includes:

[0120] The sample recognition result acquisition subunit uses the original quality recognition network to identify the content features of the clear text box and the content features of the fuzzy text box to obtain the clear sample recognition results and the fuzzy sample recognition results;

[0121] The quality detection loss value acquisition subunit acquires the quality detection loss value according to the clear sample recognition result and the fuzzy sample recognition result;

[0122] The target quality identification network obtains a subunit, and obtains the target quality identification network when the quality detection loss value reaches a convergence condition.

[0123] In another embodiment, a quality identification device is provided, comprising:

[0124] A module for acquiring images of documents to be processed, for acquiring images of documents to be processed;

[0125] The module for acquiring content features of the text box to be processed adopts the target quality recognition model to detect the text box in the document image to be processed and acquire the content features of the text box to be processed;

[0126] The quality recognition result acquisition module performs quality recognition on the content features of the text box to be processed and obtains the quality recognition result.

[0127] The specific definition of the image quality recognition model training device can be found in the definition of the image quality recognition model training method above and will not be repeated here. The various modules in the above-mentioned image quality recognition model training device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above-mentioned modules.

[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to execute the data used or generated in the process of the image quality recognition model training method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an image quality recognition model training method is implemented.

[0129] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the image quality recognition model training method in the above embodiment is implemented, for example Figure 2 S201-S205 shown, or Figures 3 to 5 As shown in , to avoid repetition, it will not be described here; the computer program can also be implemented by the processor when executing the computer program in the above embodiment. Figure 6 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the image quality recognition model training device are realized, such as Figure 7The functions of the clear training sample acquisition module 701, the fuzzy training sample acquisition module 702, the target text detection model acquisition module 703, the original quality recognition model acquisition module 704 and the target quality recognition model acquisition module 705 are not described here in detail to avoid repetition.

[0130] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image quality recognition model training method in the above embodiment is implemented, for example Figure 2 S201-S205 shown, or Figures 3 to 5 As shown in , to avoid repetition, it will not be described here; the computer program can also be implemented by the processor when executing the computer program in the above embodiment. Figure 6 Alternatively, when the computer program is executed by a processor, the functions of the modules / units in the above-mentioned image quality recognition model training device are realized, for example Figure 7 The functions of the clear training sample acquisition module 701, the fuzzy training sample acquisition module 702, the target text detection model acquisition module 703, the original quality recognition model acquisition module 704 and the target quality recognition model acquisition module 705 are not described here in detail to avoid repetition.

[0131] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described embodiment methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0132] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0133] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A method for training an image quality recognition model, characterized in that: include: Obtain clear training samples; Performing blur processing on the clear training sample to obtain a blurred training sample; Using clear training samples to train the original text detection model to obtain a target text detection model, wherein the target text detection model includes a backbone neural network and a text recognition network; Freezing the parameters of the backbone neural network in the target text detection model, replacing the text recognition network with the original quality recognition network to obtain an original quality recognition model, wherein the original quality recognition model includes the backbone neural network and the original quality recognition network; The original quality recognition model is trained using the clear training samples and the fuzzy training samples to obtain a target quality recognition model, which includes a backbone neural network and a target quality recognition network.

2. The image quality recognition model training method according to claim 1, wherein: The method of using clear training samples to train the original text detection model to obtain the target text detection model includes: Inputting the clear training sample into the original text detection model for model training to obtain the predicted text box position corresponding to the clear document image; Obtaining a text box detection loss value according to the predicted text box position and the marked text box position corresponding to the clear document image; If the text box detection loss value reaches the convergence condition, the target text detection model is obtained.

3. The image quality recognition model training method according to claim 1, wherein: The method of training the original quality recognition model using the clear training samples and the fuzzy training samples to obtain a target quality recognition model includes: Using the backbone neural network in the original quality recognition model, feature extraction is performed on the clear training samples and the fuzzy training samples to obtain clear text box content features and fuzzy text box content features; Based on the clear text box content features and the fuzzy text box content features, the original quality recognition network is trained to obtain a target quality recognition network; Based on the target quality recognition network and the backbone neural network, a target quality recognition model is obtained.

4. The image quality recognition model training method according to claim 3, wherein: The method of using the backbone neural network in the original quality recognition model to extract features from the clear training samples and the fuzzy training samples to obtain clear text box content features and fuzzy text box content features includes: Using the backbone neural network in the original quality recognition model, perform text box detection on the clear training samples and the fuzzy training samples to obtain the clear text box content and the fuzzy text box content; Feature extraction is performed based on the clear text box content and the fuzzy text box content to obtain clear text box content features and fuzzy text box content features.

5. The image quality recognition model training method according to claim 3, wherein: The training of the original quality recognition network based on the clear text box content features and the fuzzy text box content features to obtain a target quality recognition network includes: Using the original quality recognition network, the clear text box content features and the fuzzy text box content features are recognized to obtain a clear sample recognition result and a fuzzy sample recognition result; Obtaining a quality detection loss value according to the clear sample recognition result and the fuzzy sample recognition result; When the quality detection loss value reaches a convergence condition, a target quality recognition network is obtained.

6. A method for identifying image quality, characterized in that: include: Obtaining the document image to be processed; Using the target quality recognition model of any one of claims 1 to 5, performing text box detection on the document image to be processed to obtain content features of the text box to be processed; Perform quality identification on the content features of the text box to be processed to obtain a quality identification result.

7. An image quality recognition model training device, characterized in that: include: A clear training sample acquisition module is used to acquire clear training samples; A fuzzy training sample acquisition module performs fuzzy processing on the clear training sample to obtain a fuzzy training sample; A target text detection model acquisition module is configured to train an original text detection model using clear training samples to obtain a target text detection model, wherein the target text detection model includes a backbone neural network and a text recognition network; an original quality recognition model acquisition module, which freezes the parameters of the backbone neural network in the target text detection model and replaces the text recognition network with the original quality recognition network to obtain an original quality recognition model, wherein the original quality recognition model includes the backbone neural network and the original quality recognition network; The target quality recognition model acquisition module uses the clear training samples and the fuzzy training samples to train the original quality recognition model to obtain a target quality recognition model, wherein the target quality recognition model includes a backbone neural network and a target quality recognition network.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the image quality recognition model training method according to any one of claims 1 to 5 is implemented, or when the processor executes the computer program, the image quality recognition method according to claim 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the image quality recognition model training method according to any one of claims 1 to 5 is implemented, or when the processor executes the computer program, the image quality recognition method according to claim 6 is implemented.

Citation Information

Patent Citations

  • Text classification method and training method and device of text classification network

    CN113688237A

  • Rare flower automatic identification method based on deep convolutional neural network

    CN114580553A