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

By segmenting and masking training images, and combining encoding and decoding techniques, an image quality recognition model is constructed, which solves the problem of low training efficiency in existing technologies and achieves efficient training and recognition of image quality recognition models.

CN115170910BActive Publication Date: 2026-03-27CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing image quality recognition models have low training efficiency, rely on a large amount of labeled data, and are limited by the depth and receptive field of convolutional neural networks, thus failing to achieve optimal results.

Method used

By segmenting the training images to obtain N original images, and then performing masking processing to obtain M masked images and NM first images, the first images are encoded using the original encoder. The features of the masked images and the first images are then concatenated, decoded to obtain the reconstructed image, and the model parameters are updated to obtain the target encoder, thus constructing an image quality recognition model.

Benefits of technology

Improving the training efficiency of image quality recognition models, reducing training costs, and increasing model recognition accuracy can be achieved without the need for labeled data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170910B_ABST
    Figure CN115170910B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence, and discloses an image quality recognition model training method and device, equipment and a storage medium.The obtained training image is divided into N original images, and after part of the N original images are randomly selected and partially covered, M covered images and N-M first images that are not covered are obtained; the N-M first images are encoded to obtain first image features corresponding to the N-M first images, the N-M first image features are spliced with covered image features corresponding to the M covered images to obtain second image features, and the second image features are decoded to obtain N reconstructed images; after the N original images and the N reconstructed images are processed, a target encoder is fine-tuned to obtain an image quality recognition model, and no label file is required in the training process, thereby improving the efficiency of training the image quality recognition model and reducing the training cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to an image quality recognition model training method and device, equipment and a storage medium. BACKGROUND

[0002] Traditional document quality analysis is usually based on a deep convolutional neural network modeling method. On the one hand, a deep convolutional neural network usually requires a large amount of labeled data, and the labeling of ambiguous samples relies on subjective judgment by humans, which requires repeated labeling by multiple people to offset the differences in individual subjective judgment, greatly increasing the difficulty and cost of collection. On the other hand, the quality recognition task is often limited by the depth and receptive field of the convolutional neural network, and the optimal effect cannot be achieved. Although the data labeling method has been improved, the training of the quality recognition model still relies on a large amount of labeled data to improve the accuracy of the quality recognition task. There is still a problem of low training efficiency of the image quality recognition model in the prior art. SUMMARY

[0003] The embodiments of the present application provide an image quality recognition model training method, device, computer equipment and storage medium, which solves the problem of low training efficiency of the image quality recognition model in the prior art.

[0004] The embodiments of the present application provide an image quality recognition model training method, which comprises:

[0005] Obtain a training image, perform image segmentation on the training image, and obtain N original images; wherein N is a positive integer greater than 1;

[0006] Perform covering processing on the N original images to obtain M covered images and N-M first images, and the M covered images all correspond to the same covered image feature; wherein M is less than N, and M is a positive integer greater than 0;

[0007] Encode the N-M first images using an original encoder to obtain first image features corresponding to the N-M first images;

[0008] Splice the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images to obtain second image features;

[0009] Decode the second image features to obtain N reconstructed images;

[0010] Update the model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder;

[0011] Obtain an image quality recognition model according to the target encoder.

[0012] The embodiment of the present application also provides an image quality recognition model training device, which comprises:

[0013] An original image acquisition module acquires training images, performs image segmentation on the training images, and acquires N original images;

[0014] An image covering processing module performs covering processing on the N original images, acquires M covering images and N-M first images, and the M covering images all correspond to the same covering image feature; wherein M is less than N, and M is a positive integer greater than 0.

[0015] A first image feature acquisition module encodes the N-M first images by using an original encoder, and acquires first image features corresponding to the N-M first images;

[0016] A second image feature acquisition module splices the covering image features corresponding to the M covering images and the first image features corresponding to the N-M first images, and acquires second image features;

[0017] A reconstructed image acquisition module decodes the second image features, and acquires N reconstructed images;

[0018] A target encoder acquisition module updates model parameters of the original encoder according to the N original images and the N reconstructed images, and acquires a target encoder;

[0019] An image quality recognition model acquisition module acquires an image quality recognition model according to the target encoder.

[0020] An image quality recognition method comprises the following steps:

[0021] Acquiring a to-be-processed image;

[0022] Performing quality recognition on the to-be-processed image by using an image quality recognition model, and acquiring a quality recognition result.

[0023] The embodiment of the present application also provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image quality recognition model training method or the image quality recognition method when executing the computer program.

[0024] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the image quality recognition model training method or the image quality recognition method.

[0025] The image quality recognition model training method, device, computer device and storage medium described above, by dividing the obtained training image into N original images, performing partial random selection and partial image covering processing on the N original images to obtain corresponding M covered images and N-M first images that are not covered, performing encoding processing on the N-M first images to obtain first image features corresponding to the N-M first images, splicing the N-M first image features with covered image features corresponding to the M covered images to obtain second image features, performing decoding processing on the second image features to obtain N reconstructed images, updating model parameters of the original encoder by processing the N original images and the N reconstructed images, obtaining a target encoder for fine-tuning, and obtaining an image quality recognition model, the training process does not require a label file, the efficiency of training the image quality recognition model is improved, and the training cost is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0027] Figure 1 is an application environment diagram of the image quality recognition model training method in an embodiment of the present application;

[0028] Figure 2 is a flowchart of the image quality recognition model training method in an embodiment of the present application;

[0029] Figure 3 is another flowchart of the image quality recognition model training method in an embodiment of the present application;

[0030] Figure 4 is another flowchart of the image quality recognition model training method in an embodiment of the present application;

[0031] Figure 5 is another flowchart of the image quality recognition model training method in an embodiment of the present application;

[0032] Figure 6 is another flowchart of the image quality recognition model training method in an embodiment of the present application;

[0033] Figure 7 is another flowchart of the image quality recognition model training method in an embodiment of the present application;

[0034] Figure 8is a flowchart of an image quality recognition method in an embodiment of the present application;

[0035] Figure 9 is a schematic diagram of an image quality recognition model training device in an embodiment of the present application;

[0036] Figure 10 is a schematic diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0038] The image quality recognition model training method provided in the embodiments of the present application can be applied in an application environment as shown in Figure 1 . As shown in Figure 1 , a client (computer device) communicates with a server through a network. The client, also known as the user end, is a program that provides local services for the client and corresponds to the server. The client (computer device) includes but is not limited to various personal computers, notebook computers, smart phones, tablet computers, cameras, and portable wearable devices. The server can be an independent server or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0039] The image quality recognition model training method provided in the embodiments of the present application can be applied in an application environment as shown in Figure 1 . Specifically, the image quality recognition model training method is applied in an image quality recognition model training system, which includes a client and a server as shown in Figure 1 . The client and the server communicate through a network to process training images to obtain an image quality recognition model with higher training efficiency.

[0040] In an embodiment, as shown in Figure 2 , an image quality recognition model training method is provided. Taking the server in Figure 1 as an example, the method includes the following steps:

[0041] S201: Obtain a training image, perform image segmentation on the training image, and obtain N original images; where N is a positive integer greater than 1;

[0042] S202: Perform covering processing on the N original images to obtain M covered images and N-M first images, and the M covered images all correspond to the same covered image feature; where M is less than N, and M is a positive integer greater than 0;

[0043] S203: Perform encoding processing on the N-M first images using an original encoder to obtain first image features corresponding to the N-M first images;

[0044] S204: Concatenate the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images to obtain second image features;

[0045] S205: Decode the second image features to obtain N reconstructed images;

[0046] S206: Update the model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder;

[0047] S207: Obtain an image quality recognition model according to the target encoder.

[0048] Image Quality Assessment (IQA) is one of the basic techniques in image processing, which mainly identifies the characteristics of an image and then evaluates the quality of the image (the degree of image distortion). Image quality recognition plays an important role in algorithm analysis and comparison, system performance evaluation, etc. in image processing. The methods of image quality recognition usually include three types: full reference (Full-Reference, FR), partial reference (Reduced-Reference, RR) and no reference (No-Reference, NR). Unlike traditional IQA, the image quality recognition model trained in this application will directly give the corresponding image quality recognition result, rather than a score or a level.

[0049] As an example, in step S201, the server obtains a training image for training the original encoder, and obtains N segmented original images by performing image segmentation on the received training image, where N is a positive integer greater than 1. In this example, images can be obtained from the Internet as training images, and the images are segmented according to a pre-set size to obtain more standard N original images for subsequent training use.

[0050] As an example, in step S202, the server, after obtaining the segmented N original images, performs random mask processing, i.e., random covering processing, on the N original images to obtain M covered images and N-M first images, where M is less than N, and M is a positive integer greater than 0. In this example, the original image is usually converted into a solid color block of the same color to represent a covered image, and the M covered images after covering each correspond to the same covered image feature.

[0051] As an example, in step S203, after obtaining the N-M first images, the server encodes the N-M first images using an original encoder to obtain first image features corresponding to the N-M first images. In this example, the original encoder is based on a transformer composition and is pre-trained in a self-supervised manner. The original encoder is composed of a transformer block, where the structure of the transformer block includes an embedded patch layer, a norm layer, a multi-head attention layer, and a multi-layer perceptron (MLP) to encode the training image.

[0052] As an example, in step S204, after encoding the first images, the server sorts the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images in the original arrangement order of the N original images, and then splices them to obtain spliced second image features for restoring the M covered images.

[0053] As an example, in step S205, after obtaining the spliced second image features, the server decodes the second image features using a target encoder, and in the decoding process, according to the first image features, predicts the covered image feature part in the second image features to obtain N reconstructed images. In this example, the original decoder is based on a transformer composition and is pre-trained in a self-supervised manner. The original encoder is composed of a transformer block, where the structure of the transformer block includes an embedded patch layer, a norm layer, a multi-head attention layer, and a multi-layer perceptron (MLP). A linear layer is added after the decoder to map back to the size of the training image to decode the second image features corresponding to the training image.

[0054] As an example, in step S206, after confirming N reconstructed images, the server calculates the mean squared error loss between the original images and their corresponding reconstructed images based on the N original images and the N reconstructed images. This loss value is used to update the model parameters of the original encoder. After updating to a certain target, a target encoder is obtained to construct the image quality recognition model. In this example, by calculating the mean squared error loss between the original images and their corresponding reconstructed images, this loss value is simultaneously updated to update the original decoder for subsequent synchronous training with the original encoder to obtain the target decoder.

[0055] Mean Square Error (MSE), also known as quadratic loss or L2 loss, is commonly used in regression prediction tasks. The mean square error function measures the quality of a model by calculating the square of the distance (i.e., error) between the predicted and actual values. In other words, the closer the predicted and actual values ​​are, the smaller the mean square error between them.

[0056] As an example, in step S207, after receiving the target encoder, the server obtains an image quality recognition model based on the trained target encoder. In this example, the image quality recognition model is based on the target encoder, meaning it does not require a target decoder. Instead, it adds a linear (Average pooling) layer to the target decoder, mapping the output to a corresponding quality value comparison table, thereby performing quality recognition on the input image to be processed and outputting whether it is clear or blurry.

[0057] In this example, the acquired training image is segmented into N original images. Partial random image occlusion is then performed on each of the N original images to obtain M occluded images and NM uncovered first images. The NM first images are then encoded to obtain first image features corresponding to each first image. These NM first image features are then concatenated with the occluded image features corresponding to the M occluded images to obtain second image features. These second image features are then decoded to obtain N reconstructed images. After processing the N original images and the N reconstructed images, the model parameters of the original encoder are updated, and the target encoder is fine-tuned to obtain an image quality recognition model, thereby improving the efficiency of training the image quality recognition model.

[0058] In one embodiment, such as Figure 3 As shown, step S201: Obtain training images, perform image segmentation on the training images, and obtain N original images, including:

[0059] S301: Using the first image size, resize the training image to obtain a standard-sized image;

[0060] S302: dividing the standard size image to obtain N original images with image serial numbers by using a second image size; wherein the first image size is greater than the second image size, and the first image size is N times the second image size.

[0061] As an example, in step S301, the server adjusts the size of the training image to the first image size after receiving the training image, and obtains the standard size image. In this example, the first image size is set according to actual needs, which can be a common size in a business scenario, such as the size of A4 (210mm*297mm) paper. In this example, the first image size is 224mm*224mm.

[0062] As an example, in step S302, the server divides the standard size image to obtain N original images with image serial numbers by using a second image size after obtaining the standard size image. The image is divided according to the second image size, the original image after division maintains the order of the training image, and the corresponding image serial number is set. In this example, the second image size is 16mm*16mm, and 196 original images are obtained after dividing the standard size image with a size of 224mm*224mm.

[0063] In this example, the training image is adjusted in size by using the preset first image size to obtain the standard size image for division, and the standard size image is divided by using the preset second image size to obtain N original images with image serial numbers, so as to ensure the stability of subsequent decoding of the image.

[0064] In an embodiment, as shown in Figure 4 Step S202: performing covering processing on the N original images to obtain M cover images and N-M first images, the M cover images all correspond to the same cover image feature, including:

[0065] S401: classifying the N original images according to a preset division ratio to obtain N-M first images and M second images;

[0066] S402: performing covering processing on the M second images to obtain M cover images; wherein the M cover images all correspond to the same cover image feature.

[0067] As an example, in step S401, after obtaining the N segmented original images, the server performs random masking on the N original images. Based on the masking image ratio in the preset division ratio, the N original images are classified, and NM first images and M second images are selected for use as masking images. In this example, the preset division ratio is set to 75%, and M second images, representing 75% of the total N, are randomly selected for masking. If this example has 196 original images, then 147 second images and the corresponding 49 first images are selected.

[0068] As an example, in step S402, after confirming M second images, the server performs occlusion processing on the M second images to obtain M occluded images. In this example, the M second images are occluded using the same color block to obtain corresponding occluded images. Since the same color block is used, the M occluded images all correspond to the same occluded image features.

[0069] In this example, by pre-defined division ratios, a certain proportion of NM first images and M second images are randomly selected, and the M second images are occluded. The NM first images are used for feature extraction, so as to achieve prediction processing of the M occluded images based on the NM first images.

[0070] In one embodiment, such as Figure 5 As shown, step S203: Using the original encoder, the NM first images are encoded to obtain the first image features corresponding to the NM first images, including:

[0071] S501: Sort the NM first images according to their image numbers to obtain the first image sequence;

[0072] S502: Encode the first image sequence to obtain the first image features corresponding to NM first images.

[0073] As an example, in step S501, after acquiring NM first images, the server sorts the NM first images according to the image sequence numbers set during image segmentation to obtain a one-dimensional first image sequence. In this example, since the M occlusion images also have image sequence numbers, the first images are sorted according to their image sequence numbers, and image sequence numbers that are occlusion images are skipped. In this example, the 49 first images arranged in two dimensions are mapped into a one-dimensional first image sequence through a linear layer.

[0074] As an example, in step S502, after the server obtains the first image sequence, it encodes the first image sequence to obtain the first image features corresponding to NM first images, and then converts the NM first images into the corresponding first image features through the original encoder.

[0075] In this example, according to the image sequence number, the N-M first images are sorted to obtain a one-dimensional first image sequence, the first image sequence is encoded, and the first image features corresponding to the N-M first images are obtained to capture the features of the first images for subsequent prediction processing of the covered image part.

[0076] In an embodiment, as shown in Figure 6 Step S204: splicing the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images to obtain second image features, including:

[0077] S601: According to the image sequence number, the M covered images and the N-M first images are sorted to obtain a second image sequence;

[0078] S602: According to the second image sequence, the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images are spliced to obtain second image features.

[0079] As an example, in step S601, after the server obtains the first image features, the M covered images and the N-M first images are sorted according to the image sequence number after image segmentation to obtain a second image sequence.

[0080] As an example, in step S602, after the server sorts the M covered images and the N-M first images, the corresponding M covered image features and the N-M first image features are spliced according to the second image sequence to obtain second image features with covered image features and first image features.

[0081] In this example, the M covered images and the N-M first images are sorted according to the image sequence number after image segmentation, and the corresponding M covered image features and the N-M first image features are spliced according to the second image sequence obtained by sorting to obtain second image features with covered image features and first image features for inputting the decoder to predict and reconstruct the covered images according to the first image features.

[0082] In an embodiment, as shown in Figure 7 Step S206: updating the model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder, including:

[0083] S701: obtaining a target loss value according to the N original images and the N reconstructed images;

[0084] S702: judging whether a convergence criterion is reached according to the target loss value;

[0085] S703: updating the model parameter of the original encoder if the target loss value does not reach the convergence criterion;

[0086] S704: determining the original encoder as the target encoder if the target loss value reaches the convergence criterion.

[0087] As an example, in step S701, the server calculates the mean square error loss value of the original image and the corresponding reconstructed image according to the N original images and the N reconstructed images after obtaining the N reconstructed images, so as to obtain the target loss value for judgment. In this example, since the first image does not change, the loss calculation can be performed only on the M covered images and the M reconstructed images corresponding to the M covered images, thereby improving the speed of loss calculation.

[0088] As an example, in step S702, the server judges whether the convergence criterion is reached according to the target loss value after obtaining the target loss value. In this example, the convergence criterion is set by a preset loss threshold, and the target loss value is set according to actual business requirements.

[0089] As an example, in step S703, the server continues to update the model parameter of the original encoder for new training after judging the target loss value, and updates the model parameter of the original encoder until the convergence criterion is met, so as to complete the training of the target model. In this example, the original decoder is updated at the same time, and new training is performed on the original encoder.

[0090] As an example, in step S704, the server determines the original encoder as the target encoder when the target loss value reaches the convergence criterion after judging the target loss value. In this example, when the target loss value reaches the convergence criterion, the original decoder is determined as the target decoder, so as to complete the training of the original encoder.

[0091] In this example, the target loss value is obtained by calculating the loss value of the N original images and the N reconstructed images, and whether the convergence criterion is reached is judged according to the target loss value. If the target loss value does not reach the convergence criterion, the model parameter of the original encoder is determined to continue to be updated, and if the target loss value reaches the convergence criterion, the original encoder is determined as the target encoder, thereby ensuring the accuracy of the finally generated image quality recognition model.

[0092] In another embodiment, as shown in Figure 8 , an image quality recognition method is provided, comprising the following steps:

[0093] S801: obtaining an image to be processed;

[0094] S802: Employs an image quality recognition model to perform quality recognition on the image to be processed and obtain the quality recognition results.

[0095] As an example, in step S801, the server acquires the image to be processed and performs image quality recognition processing based on the instruction triggered by the user. In this example, the image quality recognition model can also be fine-tuned using the image to be processed to improve its accuracy.

[0096] As an example, in step S802, after acquiring the image to be processed, the server uses an image quality recognition model to perform quality recognition on the image to be processed and obtain the quality recognition result. In this example, by performing recognition processing on parts of the image to be processed, the efficiency of quality recognition is improved. At the same time, according to a preset quality value comparison table, the output of the target encoder in the image quality recognition model is classified to obtain the final quality recognition result.

[0097] In this example, based on the user's operation, an image quality recognition model is used to perform quality recognition on the image to be processed and obtain the quality recognition result. The quality recognition can process only a part of the image to be processed, thereby improving the recognition efficiency.

[0098] It should be understood that the sequence number of each step in the above embodiments does not imply 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.

[0099] In one embodiment, an image quality recognition model training device is provided, which corresponds one-to-one with the image quality recognition model training method described in the above embodiments. For example... Figure 9 As shown, the image quality recognition model training device includes a raw image acquisition module 901, an image occlusion processing module 902, a first image feature acquisition module 903, a second image feature acquisition module 904, a reconstructed image acquisition module 905, a target encoder acquisition module 906, and an image quality recognition model acquisition module 907. Detailed descriptions of each functional module are as follows:

[0100] The original image acquisition module 901 acquires training images, performs image segmentation on the training images, and acquires N original images;

[0101] The image masking processing module 902 performs masking processing on N original images to obtain M masked images and NM first images. The M masked images all correspond to the same masked image feature; where M is less than N and M is a positive integer greater than 0.

[0102] The first image feature acquisition module 903 acquires first image features corresponding to the N-M first images by encoding the N-M first images using an original encoder.

[0103] The second image feature acquisition module 904 acquires second image features by splicing the cover image features corresponding to the M cover images and the first image features corresponding to the N-M first images.

[0104] The reconstructed image acquisition module 905 acquires N reconstructed images by decoding the second image features.

[0105] The target encoder acquisition module 906 acquires a target encoder by updating the model parameters of the original encoder according to the N original images and the N reconstructed images.

[0106] The image quality identification model acquisition module 907 acquires an image quality identification model according to the target encoder.

[0107] In an embodiment, the original image acquisition module 901 comprises:

[0108] The standard size image acquisition unit adjusts the size of the training image to a first image size to acquire a standard size image.

[0109] The original image acquisition unit divides the standard size image to acquire N original images with image serial numbers according to a second image size. The first image size is greater than the second image size, and the first image size is N times the second image size.

[0110] In an embodiment, the image cover processing module 902 comprises:

[0111] The first image and second image acquisition unit classifies the N original images according to a preset division ratio to acquire N-M first images and M second images.

[0112] The cover image acquisition unit acquires M cover images by covering the M second images. The M cover images correspond to the same cover image feature.

[0113] In an embodiment, the first image feature acquisition module 903 comprises:

[0114] The first image sequence acquisition unit sorts the N-M first images according to the image serial numbers to acquire a first image sequence.

[0115] The first image feature acquisition unit encodes the first image sequence to acquire the first image features corresponding to the N-M first images.

[0116] In an embodiment, the original image acquisition module 904 comprises:

[0117] The second image sequence acquisition unit sequentially arranges the M cover images and the N-M first images according to the image sequence number, to obtain a second image sequence.

[0118] The second image feature acquisition unit splices the cover image features corresponding to the M cover images and the first image features corresponding to the N-M first images according to the second image sequence, to obtain a second image feature.

[0119] In an embodiment, the original image acquisition module 906 comprises:

[0120] The target loss value acquisition unit acquires a target loss value according to the N original images and the N reconstructed images.

[0121] The target loss value judgment unit judges whether a convergence criterion is reached according to the target loss value.

[0122] The model parameter update unit updates the model parameter of the original encoder if the target loss value does not reach the convergence criterion.

[0123] The target encoder acquisition unit determines the original encoder as a target encoder if the target loss value reaches the convergence criterion.

[0124] In another embodiment, an image quality recognition device is provided, comprising:

[0125] The to-be-processed image acquisition unit acquires a to-be-processed image.

[0126] The quality recognition result acquisition unit performs quality recognition on the to-be-processed image by using the image quality recognition model, to obtain a quality recognition result.

[0127] For specific limitations of the image quality recognition model training device, refer to the limitations of the image quality recognition model training method in the foregoing, which will not be repeated here. Each module in the above image quality recognition model training device can be realized by software, hardware, and combinations thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0128] In one embodiment, a computer device is provided, which can be a server, and its internal structure diagram can be as shown in Figure 10As shown in the figure. The computer device includes a processor, a memory, a network interface and a database connected by a system bus. Among them, 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 adopted or generated in the process of the image quality identification model training method. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to implement an image quality identification model training method.

[0129] In an embodiment, a computer device is provided, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the image quality identification model training method in the above-mentioned embodiments when executing the computer program, for example Figure 2 As shown in S201-S207, or Figures 3 to 7 As shown in the above-mentioned embodiments, details are not repeated here. The computer device can also implement the image quality identification method when the processor executes the computer program as shown in the above-mentioned embodiments. Figure 8 As shown in the above-mentioned embodiments, details are not repeated here. The computer device can also implement the image quality identification method when the processor executes the computer program as shown in the above-mentioned embodiments. Figure 9 As shown in the above-mentioned embodiments, details are not repeated here. The computer device can also implement the image quality identification method when the processor executes the computer program as shown in the above-mentioned embodiments.

[0130] In an embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the image quality identification model training method in the above-mentioned embodiments, for example Figure 2 As shown in S201-S207, or Figures 3 to 7 As shown in the above-mentioned embodiments, details are not repeated here. The computer device can also implement the image quality identification method when the processor executes the computer program as shown in the above-mentioned embodiments. Figure 8 As shown in the above-mentioned embodiments, details are not repeated here. The computer device can also implement the image quality identification method when the processor executes the computer program as shown in the above-mentioned embodiments. Figure 9The functions of the illustrated raw image to be processed acquisition module 901, the image covering processing module 902, the first image feature acquisition module 903, the second image feature acquisition module 904, the reconstructed image acquisition module 905, the target encoder acquisition module 906, and the image quality identification model acquisition module 907 are not repeated here to avoid repetition.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above-mentioned embodiments can be included. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application 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. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified. In actual application, the above-mentioned functions can be completed by different functional units or modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.

[0133] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for training an image quality recognition model, characterized in that, The method comprises the following steps: acquiring a training image, resizing the training image to obtain a standard size image using a first image size; dividing the standard size image to obtain N original images with image serial numbers using a second image size; wherein the first image size is greater than the second image size, and the first image size is N times the second image size, N being a positive integer greater than 1; performing covering processing on the N original images to obtain M covered images and N-M first images, the M covered images each corresponding to the same covered image feature; wherein M is less than N, and M is a positive integer greater than 0; encoding the N-M first images using an original encoder to obtain first image features corresponding to the N-M first images; splicing the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images to obtain second image features; decoding the second image features to obtain N reconstructed images; updating model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder; obtaining an image quality recognition model according to the target encoder, the image quality recognition model adding a linear layer through the target decoder to map the output to a corresponding quality value comparison table, performing quality recognition on an input image to be processed, and outputting whether the image is clear or blurred. 2.The image quality recognition model training method of claim 1, wherein, The covering processing on the N original images to obtain M covered images and N-M first images, the M covered images each corresponding to the same covered image feature, comprises: classifying the N original images according to a preset division ratio to obtain N-M first images and M second images; performing covering processing on the M second images to obtain M covered images; wherein the M covered images each correspond to the same covered image feature. 3.The image quality recognition model training method of claim 1, wherein, The encoding processing on the N-M first images to obtain first image features corresponding to the N-M first images comprises: sorting the N-M first images according to the image serial numbers to obtain a first image sequence; encoding the first image sequence to obtain first image features corresponding to the N-M first images. 4.The image quality recognition model training method of claim 1, wherein, The splicing of the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images to obtain second image features comprises: sorting the M covered images and the N-M first images according to the image serial numbers to obtain a second image sequence; splicing the covered image features corresponding to the M covered images and the first image features corresponding to the N-M first images according to the second image sequence to obtain second image features. 5.The image quality recognition model training method of claim 1, wherein, The updating of the model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder comprises: obtaining a target loss value according to the N original images and the N reconstructed images; determining whether a convergence criterion is met according to the target loss value. If the target loss value does not reach the convergence standard, the model parameters of the original encoder are updated; If the target loss value reaches the convergence standard, the original encoder is determined as the target encoder.

6. An image quality recognition method characterized by comprising: The method comprises the following steps: An image quality recognition model is obtained by using the image quality recognition model training method according to any one of claims 1-5, and the image quality recognition model is used to perform quality recognition on the to-be-processed image to obtain a quality recognition result. The method comprises the following steps:

7. An image quality recognition model training apparatus, characterized by comprising: An original image acquisition module acquires training images, and uses a first image size to perform size adjustment on the training images to obtain standard size images; A second image size is used to perform segmentation processing on the standard size images to obtain N original images with image serial numbers; wherein the first image size is greater than the second image size, and the first image size is N times the second image size, N being a positive integer greater than 1; An image covering processing module performs covering processing on the N original images to obtain M covering images and N-M first images, and the M covering images all correspond to the same covering image feature; wherein M is less than N, and M is a positive integer greater than 0; A first image feature acquisition module uses an original encoder to perform encoding processing on the N-M first images to obtain first image features corresponding to the N-M first images; A second image feature acquisition module splices the covering image features corresponding to the M covering images and the first image features corresponding to the N-M first images to obtain second image features; A reconstructed image acquisition module decodes the second image features to obtain N reconstructed images; A target encoder acquisition module updates the model parameters of the original encoder according to the N original images and the N reconstructed images to obtain a target encoder; An image quality recognition model acquisition module acquires an image quality recognition model according to the target encoder, and the image quality recognition model adds a linear layer through the target decoder to map the output to a corresponding quality value comparison table, performs quality recognition on an input to-be-processed image, and outputs whether it is clear or blurred. The processor executes the computer program to implement the image quality recognition model training method according to any one of claims 1-5, or the processor executes the computer program to implement the image quality recognition method according to claim 6.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the image quality recognition model training method according to any one of claims 1-5, or the processor executes the computer program to implement the image quality recognition method according to claim 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. ​

Citation Information

Patent Citations

  • OCR (Optical Character Recognition) model training method, OCR method and related device

    CN114565751A