Image quality evaluation method and device, electronic equipment and storage medium
By introducing user assessment requirement prompt information into the image quality assessment model, and using the encoder, feature fusion module and regressor, the problem of the existing model's inability to adapt to changes in assessment requirements is solved, and higher scene adaptability and migration capabilities are achieved.
Patent Information
- Application Number
- CN202410641051.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-10-08
AI Technical Summary
Existing image quality assessment models cannot adapt to changes in external user assessment requirements, have poor scene adaptability, and cannot effectively migrate to new assessment requirements without retraining or fine-tuning the model.
By introducing user evaluation demand prompt information, using image samples and corresponding user evaluation demand prompt information samples for model training, a model capable of learning image quality evaluation requirements is constructed, including an encoder, feature fusion module and regressor, for feature encoding, feature Fusion and regression analysis, output image quality score.
It improves the scene adaptability and migration capabilities of image quality assessment, can adapt to unknown assessment needs with a very small amount of prompt information, and reduces the migration cost of the model under new assessment requirements.
Smart Images

Figure CN118747730A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image quality assessment, and in particular to an image quality assessment method, device, electronic equipment and storage medium. Background Art
[0002] Image Quality Assessment (IQA) technology is widely used in various imaging fields. In recent years, with the development of deep learning (DL), more and more DL-based no-reference image quality assessment (NR-IQA) models have been proposed, and these models have achieved significant improvements in performance and generalization ability.
[0003] Although many meaningful IQA models have been proposed in terms of model structure and dataset reconstruction, these models all have a common problem, that is, they are unable to perceive other unknown IQA evaluation requirements. When the external user evaluation requirements change, the existing IQA models cannot accurately score the image quality and have poor scene adaptability.
[0004] Therefore, how to better implement image quality assessment has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0005] The present invention provides an image quality assessment method, device, electronic equipment and storage medium, which are used to better implement image quality assessment.
[0006] The present invention provides an image quality assessment method, comprising:
[0007] Acquire an image to be evaluated and user evaluation requirement prompt information of the image to be evaluated;
[0008] The image to be evaluated and the user evaluation requirement prompt information are input into an image quality assessment model to obtain an image quality score of the image to be evaluated output by the image quality assessment model; the image quality assessment model is trained based on image samples and corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
[0009] According to an image quality assessment method provided by the present invention, the image quality assessment model includes an encoder, a feature fusion module and a regressor; the image to be assessed and the user assessment requirement prompt information are input into the image quality assessment model to obtain the image quality score of the image to be assessed output by the image quality assessment model, including:
[0010] Inputting the image to be evaluated and the user evaluation requirement prompt information into the encoder for feature encoding respectively, to obtain a feature representation of the image to be evaluated and a feature representation of the evaluation requirement prompt information;
[0011] Inputting the feature representation of the image to be evaluated and the feature representation of the evaluation requirement prompt information into the feature fusion module to obtain an image quality feature vector of the image to be evaluated output by the feature fusion module;
[0012] The image quality feature vector of the image to be evaluated is input into the regressor to obtain the image quality score of the image to be evaluated output by the regressor.
[0013] According to an image quality assessment method provided by the present invention, before inputting the image to be assessed and the user assessment requirement prompt information into an image quality assessment model to obtain an image quality score of the image to be assessed output by the image quality assessment model, the method further includes:
[0014] Taking the image samples and the corresponding user evaluation requirement prompt information samples as a group of training samples, obtaining multiple groups of training samples;
[0015] The image quality assessment model is trained using the multiple groups of training samples.
[0016] According to an image quality assessment method provided by the present invention, the method of training an image quality assessment model using the multiple groups of training samples includes:
[0017] For any set of training samples, input the training samples into the image quality assessment model, and output the prediction scores corresponding to the training samples;
[0018] Using a preset loss function, a loss value is calculated according to the prediction score corresponding to the training sample and the image quality assessment score label in the training sample;
[0019] Based on the loss value, adjusting the model parameters of the image quality assessment model until the number of model training times reaches a preset number;
[0020] The model parameters obtained when the model training times reaches the preset times are used as the model parameters of the trained image quality assessment model.
[0021] According to an image quality assessment method provided by the present invention, after obtaining multiple groups of training samples, the method further includes:
[0022] By using a random scaling method, a plurality of image quality assessment score labels in the plurality of training samples are normalized to obtain each normalized assessment score label;
[0023] Replacing the image quality assessment score labels in the plurality of training samples with the normalized assessment score labels to obtain a plurality of new training samples;
[0024] The image quality assessment model is trained using the new multiple groups of training samples.
[0025] According to an image quality assessment method provided by the present invention, after obtaining multiple groups of training samples, the method further includes:
[0026] The plurality of image quality assessment score labels in the plurality of training samples are converted by random flipping to obtain respective converted assessment score labels;
[0027] Replacing the image quality assessment score labels in the plurality of training samples with the assessment score labels after the conversion process, respectively, to obtain a plurality of new training samples;
[0028] The image quality assessment model is trained using the new multiple groups of training samples.
[0029] The present invention also provides an image quality assessment device, comprising:
[0030] An acquisition module, used for acquiring an image to be evaluated and user evaluation requirement prompt information of the image to be evaluated;
[0031] An evaluation module is used to input the image to be evaluated and the user evaluation requirement prompt information into an image quality evaluation model to obtain an image quality score of the image to be evaluated output by the image quality evaluation model; the image quality evaluation model is trained based on image samples and corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include image quality evaluation score labels corresponding to the image samples.
[0032] The present invention also provides an electronic 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 program, any of the above-mentioned image quality assessment methods is implemented.
[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the image quality assessment method described in any one of the above is implemented.
[0034] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the image quality assessment method described above is implemented.
[0035] The image quality assessment method, device, electronic device and storage medium provided by the present invention introduce user assessment requirement prompt information, use different image samples and corresponding user assessment requirement prompt information samples containing image quality assessment score labels to perform model training, and obtain an image quality assessment model, so that the model can learn these information that can represent the image quality assessment requirements and understand new user assessment requirements. Therefore, when the image to be assessed and the user assessment requirement prompt information are obtained, the image quality assessment and scoring can be carried out on the image to be assessed in a targeted manner, thereby improving the scene adaptability of the image quality assessment. At the same time, without fine-tuning the model, a very small amount of prompt information can be used to achieve a good migration capability for unknown assessment requirements, thereby greatly reducing the migration cost of the image quality assessment model to completely new assessment requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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 work.
[0037] Figure 1 It is a flowchart of the image quality assessment method provided by the present invention;
[0038] Figure 2 This is one of the schematic diagrams comparing the results of the image quality assessment method provided by the present invention with the existing methods;
[0039] Figure 3 This is the second schematic diagram comparing the results of the image quality assessment method provided by the present invention and the existing method;
[0040] Figure 4 is a schematic diagram of performance test results of the image quality assessment method provided by the present invention;
[0041] Figure 5 is a structural schematic diagram of an image quality assessment device provided by the present invention;
[0042] Figure 6 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0045] First, some professional terms in the embodiments of the present invention are explained:
[0046] Image Quality Assessment (IQA): Quantitative evaluation of image quality.
[0047] Pearson Linear Correlation Coefficient (PLCC): used to evaluate the performance of the IQA model.
[0048] Spearman Rank-Order Correlation Coefficient (SROCC): used to evaluate the performance of the IQA model.
[0049] Mean Opinion Score (MOS): When humans score, they give a quality score to each distorted image. The higher the score, the more satisfied they are with the quality of the image. Finally, the average of the scores given by all scorers is taken as the MOS of the image.
[0050] Differential Mean Opinion Score (DMOS): When humans score, they compare each distorted image with its reference image and give a difference value between the two. The higher the difference value, the greater the difference between the quality of the distorted image and the reference image, and the worse the image quality. Finally, the average of the difference values given by all scorers is taken as the DMOS of the image.
[0051] IQA dataset: Each sample in the dataset contains a distorted image and a human-annotated image quality score label. Image quality score labels mainly come in two forms: MOS and DMOS.
[0052] Assessment Requirement (AR): In different application scenarios, image quality assessment tasks have different focuses, resulting in diverse assessment requirements. Even for the same image, different image quality scores are given in different application scenarios and different assessment requirements.
[0053] Assessment Requirement Prompt (ARP): It consists of a series of prompt information that can represent the assessment requirements and can intuitively reflect the assessment requirements.
[0054] For IQA models in the existing technology, when external evaluation requirements change, a common direct method is to re-produce a large-scale dataset based on the new user evaluation requirements, and then train or fine-tune the model based on this dataset. However, making IQA datasets is time-consuming and laborious. Although some methods try to reduce the amount of data required for model fine-tuning by proposing multi-dataset hybrid training strategies or carefully designing networks. But in real-world applications, evaluation requirements are usually diverse. Therefore, it becomes crucial to create new datasets consistent with these requirements and retrain or fine-tune IQA models on these datasets.
[0055] However, the above methods still require a considerable amount of data, and it becomes impractical to re-create the dataset for each requirement. From this point of view, it is crucial to enable the IQA model to understand the evaluation requirements effectively and at low cost with very little data, so as to better migrate to new evaluation requirements.
[0056] In this regard, in order to solve the above-mentioned defects in the prior art, the present invention provides an image quality assessment method, device, electronic device and storage medium.
[0057] Combine the following Figure 1-Figure 3 The present invention describes an image quality assessment method, an apparatus, an electronic device and a storage medium.
[0058] Figure 1 The flowchart of the image quality assessment method provided by the present invention is shown in FIG. 1 . The execution subject of each step in the method can be a device constructed based on the image quality assessment model, which can be implemented by software and / or hardware. The device can be integrated in an electronic device, which can be a terminal device (such as a smart phone, a personal computer, etc.), a server (such as a local server or a cloud server, or a server cluster, etc.), a processor, or a chip, etc. Figure 1 As shown, including:
[0059] Step 110, obtaining the image to be evaluated and user evaluation requirement prompt information of the image to be evaluated;
[0060] Step 120, input the image to be evaluated and the user evaluation requirement prompt information into the image quality evaluation model, and obtain the image quality score of the image to be evaluated output by the image quality evaluation model; the image quality evaluation model is trained based on image samples and corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include image quality evaluation score labels corresponding to the image samples.
[0061] Specifically, the image to be evaluated described in the embodiment of the present invention refers to an image waiting for image quality evaluation, which can be an image of any type and any resolution, and the present application does not limit the image type and source.
[0062] The user evaluation requirement prompt information of the image to be evaluated described in the embodiment of the present invention refers to the prompt information based on the IQA evaluation requirement provided by the user for the image to be evaluated, and the specific forms of these prompt information may include image-text pairs, image-score pairs, image-frame-score-text, etc. It can intuitively reflect the evaluation requirements, such as evaluation preferences, standards, score ranges, etc.
[0063] The IQA model described in the embodiment of the present invention refers to a deep neural network model for quantitatively evaluating the image quality of an input image. It is used to extract features of the image to be evaluated and the corresponding user evaluation requirement prompt information, and to fuse the extracted features. Based on the fused features, image quality evaluation is performed, and an image quality score of the image to be evaluated is output.
[0064] In an embodiment of the present invention, the IQA model can be obtained by training a deep neural network model based on image samples and corresponding user evaluation requirement prompt information samples, wherein the user evaluation requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
[0065] Among them, the training samples are composed of multiple groups of image samples carrying real image quality assessment score labels and corresponding user assessment requirement prompt information samples.
[0066] The real image quality assessment score label described in the present invention is predetermined based on the image sample and corresponds one-to-one with the image sample and the user assessment requirement prompt information sample. That is, each image sample in the training sample is predetermined to carry a corresponding image quality assessment score label.
[0067] It should be noted that, in the embodiment of the present invention, the IQA model can be constructed based on a deep neural network model, which can include an encoder for feature encoding, a fusion module for feature fusion, and a fully connected neural network, etc. It is used to learn prompt information that can represent IQA evaluation requirements, understand new evaluation requirements, and thus evaluate and score the image quality of the image in a targeted manner.
[0068] In the embodiment of the present invention, in step 110, the image to be evaluated and the user evaluation requirement prompt information of the image to be evaluated may be obtained through the user front-end input.
[0069] Furthermore, in an embodiment of the present invention, in step 120, a deep neural network model is trained in advance based on the acquired image samples and the corresponding user evaluation requirement prompt information samples to obtain a trained IQA model; the image to be evaluated and the user evaluation requirement prompt information acquired in step 110 are input into the IQA model together, and after feature extraction and recognition by the IQA model, different evaluation requirements are understood, and the image quality of the image to be evaluated is quantitatively evaluated in a targeted manner, and finally the image quality score of the image to be evaluated is output.
[0070] The image quality assessment method of the embodiment of the present invention introduces user assessment requirement prompt information, uses different image samples and corresponding user assessment requirement prompt information samples containing image quality assessment score labels to perform model training, and obtains an image quality assessment model, so that the model can learn these information that can represent the image quality assessment requirements and understand new user assessment requirements. Therefore, when the image to be evaluated and the user assessment requirement prompt information are obtained, the image quality assessment and scoring can be performed on the image to be evaluated in a targeted manner, thereby improving the scene adaptability of the image quality assessment. At the same time, without fine-tuning the model, a very small amount of prompt information can be used to achieve a good migration capability for unknown evaluation requirements, thereby greatly reducing the migration cost of the image quality assessment model to completely new evaluation requirements.
[0071] Based on the content of the above embodiment, as an optional embodiment, the IQA model includes an encoder, a feature fusion module and a regressor; the image to be evaluated and the user evaluation requirement prompt information are input into the IQA model to obtain the image quality score of the image to be evaluated output by the IQA model, including:
[0072] The image to be evaluated and the user evaluation requirement prompt information are respectively input into the encoder for feature encoding to obtain the feature representation of the image to be evaluated and the feature representation of the evaluation requirement prompt information;
[0073] Inputting the feature representation of the image to be evaluated and the feature representation of the evaluation requirement prompt information into the feature fusion module, obtaining the image quality feature vector of the image to be evaluated output by the feature fusion module;
[0074] The image quality feature vector of the image to be evaluated is input into the regressor to obtain the image quality score of the image to be evaluated output by the regressor.
[0075] Specifically, in an embodiment of the present invention, the encoder may include a text encoder and a visual encoder. The text encoder is used to encode the text features of the text information in the user evaluation requirement prompt information, which may specifically adopt a Transformer Encoder model or an Encoder model constructed by any other neural network; the visual encoder is used to encode the image features of the image to be evaluated, which may specifically adopt a Resnet network, a Vision Transformer (ViT) model, etc.
[0076] The feature fusion module described in the embodiment of the present invention is used to perform feature fusion processing on the feature representation of the image to be evaluated and the feature representation of the evaluation requirement prompt information. Specifically, a fusion module constructed according to a convolution algorithm, a cross-attention mechanism or a fully connected neural network can be adopted.
[0077] The regressor described in the embodiment of the present invention is a module for performing regression analysis on the image quality feature vector of the image to be evaluated. Specifically, a regressor constructed according to a clustering algorithm, a regression algorithm or a fully connected neural network may be used.
[0078] In an embodiment of the present invention, after the image to be evaluated and the user evaluation requirement prompt information are input into the IQA model, first, the image to be evaluated I and the user evaluation requirement prompt information are respectively input into the encoder for feature encoding. After the encoding process, the feature representation of the image to be evaluated can be obtained, which can be recorded as V(I), and the high-dimensional feature representation corresponding to the evaluation requirement prompt information can be recorded as F ARP .
[0079] Furthermore, in an embodiment of the present invention, the feature representation V(I) of the image to be evaluated and the feature representation F(I) of the evaluation requirement prompt information can be expressed as ARP The image quality feature vector of the image to be evaluated is obtained by inputting it into the feature fusion module for feature fusion processing, which can be recorded as F = FM (F ARP ,V(I)), where FM(·,·) represents a feature fusion module.
[0080] Furthermore, in an embodiment of the present invention, the image quality feature vector F of the image to be evaluated output by the feature fusion module is directly input into the regressor, and through the regression operation processing of the regressor, the image quality score S of the image to be evaluated I can be output.
[0081] The method of the embodiment of the present invention constructs an IQA model by utilizing an encoder, a feature fusion module, and a regressor, respectively extracts feature representations of the image to be evaluated and the user's evaluation requirement prompt information, and performs feature fusion to obtain an image quality feature vector of the image to be evaluated. Image quality assessment is performed based on the fused features, which enables the model to deeply learn and understand new evaluation requirements in the prompt information, thereby making up for the deficiency that the traditional IQA framework cannot perceive changes in unknown evaluation requirements, and realizes the ability to migrate to unknown evaluation requirements by perceiving the unknown evaluation requirement prompts provided, thereby improving the migration and generalization capabilities of the IQA model.
[0082] Based on the content of the above embodiment, as an optional embodiment, before inputting the image to be evaluated and the user evaluation requirement prompt information into the IQA model to obtain the image quality score of the image to be evaluated output by the IQA model, the method further includes:
[0083] Taking the image samples and the corresponding user evaluation requirement prompt information samples as a group of training samples, obtaining multiple groups of training samples;
[0084] The IQA model is trained using multiple sets of training samples.
[0085] Specifically, before the image to be evaluated and the user evaluation requirement prompt information are input into the IQA model and the image quality score of the image to be evaluated output by the IQA model is obtained, the IQA model needs to be trained. The specific training process is as follows:
[0086] The image samples and the corresponding user evaluation requirement prompt information samples are used as a group of training samples, wherein the user evaluation requirement prompt information samples include the image quality assessment score labels corresponding to the image samples. Thus, for different image samples and for different user evaluation requirement prompt information samples for each image sample, multiple groups of training samples can be obtained, thereby constructing an IQA dataset.
[0087] In the embodiment of the present invention, each image sample and its corresponding user evaluation requirement prompt information sample and image quality evaluation score label are in one-to-one correspondence.
[0088] Then, after obtaining multiple groups of training samples, the multiple groups of training samples are input into the IQA model in sequence, that is, the image samples in each group of training samples and the corresponding user evaluation requirement prompt information samples are input into the IQA model at the same time. According to each output result of the IQA model, the model parameters of the IQA model are adjusted by calculating the loss function value, and finally the training process of the IQA model is completed.
[0089] The method of the embodiment of the present invention uses image samples and corresponding user evaluation requirement prompt information samples as a group of training samples, and uses multiple groups of training samples to train the IQA model, thereby ensuring the prediction accuracy of the IQA model.
[0090] Based on the content of the above embodiment, as an optional embodiment, using multiple groups of training samples to train the image quality assessment model includes:
[0091] For any set of training samples, input the training samples into the image quality assessment model and output the prediction scores corresponding to the training samples;
[0092] Using a preset loss function, the loss value is calculated according to the prediction score corresponding to the training sample and the image quality assessment score label in the training sample;
[0093] Based on the loss value, the model parameters of the image quality assessment model are adjusted until the model training times reach a preset times;
[0094] The model parameters obtained when the model training times reaches a preset number are used as the model parameters of the trained image quality assessment model.
[0095] Specifically, the preset loss function described in the embodiment of the present invention refers to the loss function pre-set in the IQA model, which is used for model evaluation; the preset threshold refers to the threshold pre-set by the model, which is used to obtain the minimum loss value and complete model training; the preset number of times refers to the maximum number of model iteration training pre-set.
[0096] After obtaining multiple groups of training samples, for any group of training samples, the image samples in each group of training samples and the corresponding user assessment requirement prompt information samples containing image quality assessment score labels are simultaneously input into the IQA model, and the prediction score corresponding to the training sample is output.
[0097] On this basis, the preset loss function is used to calculate the loss value according to the prediction score corresponding to the training sample and the image quality assessment score label corresponding to the training sample.
[0098] Furthermore, after the loss value is calculated, the training process ends. The model parameters of the IQA model are adjusted based on the loss value to update the weight parameters of each layer of the model in the IQA model, and then the next training is carried out, and the model training is repeated iteratively.
[0099] During the training process, if the training results for a certain group of training samples meet the preset training termination conditions, such as the corresponding calculated loss value is less than the preset threshold, or when the current number of iterations reaches the preset number, the model loss value can be controlled within the convergence range, then the model training ends. At this point, the obtained model parameters can be used as the model parameters of the trained IQA model, and the IQA model training is completed, thereby obtaining a trained IQA model.
[0100] The method of the embodiment of the present invention controls the loss value of the IQA model within a convergence range by repeatedly iteratively training the IQA model using multiple groups of training samples, thereby facilitating improving the accuracy of the image quality assessment score output by the model and enhancing the performance and generalization ability of the IQA model.
[0101] It should be noted that, since the real label in the IQA dataset can only represent a single evaluation requirement, this weakens the role of the evaluation requirement prompt in the IQA model of the present invention, causing the model to rely more on the input image for score prediction rather than predicting the score by fully understanding the ARP. Therefore, in order to further enhance the training effect of the IQA model, the following enhancement strategy is additionally proposed in the embodiment of the present invention.
[0102] Based on the content of the above embodiment, as an optional embodiment, after obtaining multiple groups of training samples, the method further includes:
[0103] By using a random scaling method, multiple image quality assessment score labels in multiple groups of training samples are normalized to obtain normalized assessment score labels;
[0104] The normalized evaluation score labels are respectively replaced with the image quality evaluation score labels in the multiple groups of training samples to obtain multiple new groups of training samples;
[0105] The image quality assessment model is trained using multiple new sets of training samples.
[0106] Specifically, in an embodiment of the present invention, multiple image quality assessment score labels in multiple groups of training samples are processed by utilizing random scaling (RS), and the prompt scores in different user evaluation requirement prompt information samples and the real image quality assessment score labels of the image samples to be evaluated are normalized with a certain probability.
[0107] Specifically, in this embodiment, each image quality assessment score label in multiple groups of training samples is extracted to form a score list, assuming that it is a list of n+1 scores S = [S1, S2, ..., S n , G], where G represents the real image quality assessment score label of the current model input. Then the n+1 image quality assessment score labels are normalized and the resulting set f RS (S) can be expressed as:
[0108]
[0109] Among them, max(S) represents the maximum value in the score list S.
[0110] Furthermore, according to the above normalization process, each evaluation score label after normalization process is replaced with each image quality evaluation score label in multiple sets of training samples, thereby obtaining multiple new sets of training samples. Furthermore, based on the above model training method, the IQA model can be optimized and trained using multiple new sets of training samples.
[0111] The method of the embodiment of the present invention, by adopting a random scaling strategy, normalizes the image quality assessment score labels in the IQA training data set, which can effectively enrich the evaluation requirements of the data set, so that the model can learn and understand more different evaluation requirement data during training, thereby improving the performance and generalization ability of the IQA model for image quality assessment.
[0112] Based on the content of the above embodiment, as an optional embodiment, after obtaining multiple groups of training samples, the method further includes:
[0113] By using a random flipping method, multiple image quality assessment score labels in multiple groups of training samples are transformed to obtain each assessment score label after the transformation;
[0114] The converted evaluation score labels are used to replace the image quality evaluation score labels in the multiple groups of training samples to obtain multiple new groups of training samples;
[0115] The image quality assessment model is trained using multiple new sets of training samples.
[0116] Specifically, in an embodiment of the present invention, multiple image quality assessment score labels in multiple groups of training samples can also be processed by utilizing random flipping (RF), and the prompt scores in different user evaluation requirement prompt information samples and the scores in the real image quality assessment score labels of the image samples to be evaluated can be converted between MOS and DMOS with a certain probability.
[0117] Specifically, in this embodiment, each image quality assessment score label in multiple groups of training samples is extracted to form a score list, which can also be assumed to be a list of n+1 scores S = [S1, S2, ..., S n ,G], then the n+1 image quality assessment score labels are subjected to RF conversion, and the resulting set f RF (S) can be expressed as:
[0118] f RF (S)=α-S=[α-S1,α-S2,…,α-S n ,α-G];
[0119] Among them, α represents the hyperparameter of model training, which is generally a constant.
[0120] Furthermore, according to the above conversion process, each evaluation score label after the conversion process is used to replace each image quality evaluation score label in the multiple sets of training samples, thereby obtaining multiple new sets of training samples. Furthermore, based on the above model training method, the IQA model can be optimized and trained using multiple new sets of training samples.
[0121] The method of the embodiment of the present invention, by adopting a random flipping strategy, converts the image quality assessment score labels in the IQA training data set between MOS and DMOS, and can also effectively enrich the evaluation requirements of the data set, so that the model can learn and understand more different evaluation requirement data during the training stage, and further improve the performance and generalization ability of the IQA model for image quality assessment.
[0122] In some embodiments, the IQA model of an embodiment of the present invention can be effectively mixed and trained on multiple IQA datasets. The advantage of mixed training is that it can increase the model training samples and improve the model performance and generalization ability. In order to demonstrate the performance of the method of the present invention, in this experiment, 5 IQA tasks were selected, including synthetic distorted image quality assessment, real distorted image quality assessment, face image quality assessment, AI generated image quality assessment and underwater image quality assessment, totaling 12 datasets (referred to as mixed datasets), namely LIVE dataset, CSIQ dataset, TID2013 dataset, Kadid-10k dataset, Average dataset, BID dataset, LIVEC dataset, SPAQ dataset, KonIQ10k dataset, GFIQA20k dataset, AGIQA3k / AIGCIQA2023 dataset and UWIQA dataset. The method of the present invention and the 21 latest existing IQA models were comprehensively compared in performance on these 5 IQA tasks.
[0123] Figure 2FIG. 1 is a schematic diagram showing a comparison between the image quality assessment method provided by the present invention and the existing method. Figure 2 As shown, compared with the hybrid training models (i.e., UNIQUE and StairIQA), the proposed method shows strong performance on the hybrid dataset without the need for complex dataset processing and redundant model structure. At the same time, the proposed method almost surpasses all the comparison models in the tasks of real distorted image quality assessment, face image quality assessment, AI generated image quality assessment, and underwater image quality assessment. On the BID and LIVEC datasets, the SROCC and PLCC of the proposed method surpass the optimal IQA model by 1.53% and 1.41%, and 2.07% and 1.21%, respectively. However, on the synthetic distorted image quality assessment task, the proposed method performs slightly lower than the deep learning-based FR-IQA method, i.e., TOPIQ-FR. It is worth noting that TOPIQ-FR is trained and tested using reference images as input to extract auxiliary features, which can greatly improve the performance. Nevertheless, the proposed method performs better than its variant (TOPIQ-NR) on most datasets.
[0124] The above results show that the evaluation requirement prompt can guide the IQA model in the method of the present invention to understand different evaluation requirements, and then determine the image quality evaluation score, thereby improving the performance of the method of the present invention.
[0125] The IQA model proposed in the embodiment of the present invention can be effectively migrated to other evaluation requirements, and shows strong generalization ability without fine-tuning on the new evaluation requirements. In order to demonstrate this ability, three FR-IQA models, namely the SSIM model, the FSIM model and the LPIPS model, are used in the embodiment of the present invention to simulate three different evaluation requirements. These models are applied to two synthetic distortion data sets (TID2013 and Kadid-10k) to generate new quality labels, forming six reorganized data sets. In these data sets, the labels generated by the SSIM model and the FSIM model are similar to MOS, indicating that higher scores reflect better quality. In contrast, the labels generated by the LPIPS model are similar to DMOS, which means that higher scores indicate worse quality. In this experiment, 10 image score pairs were extracted from the training sets of these six reorganized data sets as evaluation requirement prompts.
[0126] In an embodiment of the present invention, the method of the present invention is compared with the existing MANIQA method and MoNet method in the following training modes:
[0127] Specific Dataset Training (SDT): These models are trained on the original labels of TID2013 and Kadid-10k respectively;
[0128] Mixed Dataset Training (MDT): These models are trained on the mixed datasets mentioned above. Since the method of the present invention accepts evaluation requirement prompts as input to extract auxiliary features during the inference phase, in order to ensure fair comparison, two other fine-tuning modes are also designed for the comparison model:
[0129] Specific Dataset Training & Fine-tuning (SDT & FT): Based on the specific dataset training, the comparison model is fine-tuned on the corresponding selected evaluation requirement prompts;
[0130] Mixed Dataset Training & Fine-tuning (MDT&FT): Based on the mixed dataset training, the comparison model is fine-tuned on the corresponding selected evaluation requirement prompts.
[0131] After training, all these models were evaluated on the test sets of these 6 restructured datasets. Figure 3 FIG. 2 is a second schematic diagram comparing the results of the image quality assessment method provided by the present invention with those of the existing methods. Figure 3 As shown, even without any fine-tuning, the MDT in the method of the present invention shows excellent generalization ability only through evaluation requirement prompts. In contrast, the comparison models trained on specific datasets (MANIQA-SDT and MoNet-SDT) and mixed datasets (MANIQA-MDT and MoNet-MDT) have difficulty adapting to new evaluation requirements and show low generalization ability. The reason is that typical IQA models have difficulty detecting changes in requirements after training, which causes them to predict scores based only on the requirements learned from the training dataset. This affects their generalization ability, and the results also show that there are significant differences between various evaluation requirements.
[0132] In addition, due to the lack of guidance for MANIQA-MDT and MoNet-MDT to distinguish different datasets in mixed training, their results are even worse than those trained on specific datasets. However, thanks to the assistance of evaluation requirement prompts in mixed training, our method (MDT) will not be confused by the differences between various datasets.
[0133] Compared to MANIQA-SDT&FT and MoNet-SDT&FT, which have undergone additional fine-tuning, they still show limited generalization ability. This is because such a small amount of data is not enough for these models to fully understand new evaluation requirements. Since the method of the present invention (SDT) is only trained on a single dataset, it cannot adapt well to other evaluation requirements. However, on most datasets, it still shows better generalization ability than MANIQA-SDT&FT and MoNet-SDT&FT. Thanks to training on mixed datasets, the method of the present invention (MDT) has learned a variety of evaluation requirements, which allows the method of the present invention to easily adapt to new requirements with only a small number of evaluation requirement prompts without fine-tuning. In addition, when evaluated on a dataset created by LPIPS, it can be observed that the results of MANIQA and MoNet are negative. This is due to the difference between LPIPS (DMOS) and the training labels (MOS). Despite this, the method of the present invention is able to identify this difference and make accurate and reasonable predictions.
[0134] Furthermore, in order to verify the effectiveness of the key components of the proposed method, five variants were trained: a variant without mixed training (w / o mixed training), in which the proposed method was directly trained and tested on a single dataset; a variant without prompt (w / o prompt), in which all prompt-related components were removed; a variant without random scaling (w / orandom scale) and a variant without random flipping (w / o random flipping), in which the aforementioned random scaling strategy and random flipping strategy were removed respectively; and a variant without random scaling and flipping (w / o random scale&flipping), in which the aforementioned two strategies were removed at the same time. Except for the variant without mixed training, all other variants were trained and tested on a mixed dataset. Then, the generalization of these trained variants was tested.
[0135] Figure 4 is a schematic diagram of the performance test results of the image quality assessment method provided by the present invention, such as Figure 4As shown, removing any component will reduce the performance and generalization ability of the model. In addition, the model performance and generalization ability of the complete method of the present invention exceed those of the variant without mixed training. This is because the complete model can effectively learn general image quality features and various evaluation requirements from the mixed data set. At the same time, removing the hint will lead to a significant decrease in performance in mixed training and generalization testing, which shows that the hint can help the method of the present invention distinguish different evaluation requirements in mixed data sets and easily adapt to new requirements. In addition, although the variants that remove the random scaling strategy and the random flipping strategy perform close to the complete model in mixed training, they are significantly lower in generalization ability. This shows that without a data augmentation strategy, the model can find a shortcut to invalidate the hint effect, resulting in a decrease in generalization ability.
[0136] The image quality assessment device provided by the present invention is described below. The image quality assessment device described below and the image quality assessment method described above can be referenced to each other.
[0137] Figure 5 is a schematic diagram of the structure of the image quality assessment device provided by the present invention, such as Figure 5 As shown, it includes: an acquisition module 510 and an evaluation module 520 connected in sequence.
[0138] The acquisition module 510 is used to acquire the image to be evaluated and the user evaluation requirement prompt information of the image to be evaluated;
[0139] The evaluation module 520 is used to input the image to be evaluated and the user evaluation requirement prompt information into the image quality evaluation model to obtain the image quality score of the image to be evaluated output by the image quality evaluation model; the image quality evaluation model is trained based on the image samples and the corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include the image quality evaluation score labels corresponding to the image samples.
[0140] The image quality assessment device described in this embodiment can be used to execute the above-mentioned image quality assessment method embodiment. Its principles and technical effects are similar and will not be repeated here.
[0141] The image quality assessment device of the embodiment of the present invention introduces user assessment requirement prompt information, uses different image samples and corresponding user assessment requirement prompt information samples containing image quality assessment score labels to perform model training, and obtains an image quality assessment model, so that the model can learn these information that can represent the image quality assessment requirements and understand new user assessment requirements. Therefore, when the image to be evaluated and the user assessment requirement prompt information are obtained, the image quality assessment and scoring can be performed on the image to be evaluated in a targeted manner, thereby improving the scene adaptability of the image quality assessment. At the same time, without fine-tuning the model, a very small amount of prompt information can be used to achieve a good migration capability for unknown evaluation requirements, thereby greatly reducing the migration cost of the image quality assessment model to completely new evaluation requirements.
[0142] Figure 6 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the image quality assessment method provided by the above methods, the method comprising: obtaining an image to be assessed and user assessment requirement prompt information of the image to be assessed; inputting the image to be assessed and the user assessment requirement prompt information into an image quality assessment model to obtain an image quality score of the image to be assessed output by the image quality assessment model; the image quality assessment model is trained based on image samples and corresponding user assessment requirement prompt information samples; the user assessment requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
[0143] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image quality assessment method provided by the above-mentioned methods, which includes: obtaining an image to be evaluated and user assessment requirement prompt information of the image to be evaluated; inputting the image to be evaluated and the user assessment requirement prompt information into an image quality assessment model to obtain an image quality score of the image to be evaluated output by the image quality assessment model; the image quality assessment model is trained based on image samples and corresponding user assessment requirement prompt information samples; the user assessment requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
[0145] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the image quality assessment method provided by the above-mentioned methods, the method comprising: obtaining an image to be evaluated and user assessment requirement prompt information of the image to be evaluated; inputting the image to be evaluated and the user assessment requirement prompt information into an image quality assessment model to obtain an image quality score of the image to be evaluated output by the image quality assessment model; the image quality assessment model is trained based on image samples and corresponding user assessment requirement prompt information samples; the user assessment requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
[0146] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. 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. However, 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 embodiments of the present invention.
Claims
1. A method for evaluating image quality, characterized in that: include: Acquire an image to be evaluated and user evaluation requirement prompt information of the image to be evaluated; The image to be evaluated and the user evaluation requirement prompt information are input into an image quality assessment model to obtain an image quality score of the image to be evaluated output by the image quality assessment model; the image quality assessment model is trained based on image samples and corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include image quality assessment score labels corresponding to the image samples.
2. The image quality assessment method according to claim 1, characterized in that: The image quality assessment model includes an encoder, a feature fusion module and a regressor; the step of inputting the image to be assessed and the user assessment requirement prompt information into the image quality assessment model to obtain an image quality score of the image to be assessed output by the image quality assessment model includes: Inputting the image to be evaluated and the user evaluation requirement prompt information into the encoder for feature encoding respectively, to obtain a feature representation of the image to be evaluated and a feature representation of the evaluation requirement prompt information; Inputting the feature representation of the image to be evaluated and the feature representation of the evaluation requirement prompt information into the feature fusion module to obtain an image quality feature vector of the image to be evaluated output by the feature fusion module; The image quality feature vector of the image to be evaluated is input into the regressor to obtain the image quality score of the image to be evaluated output by the regressor.
3. The image quality assessment method according to any one of claims 1 or 2, characterized in that: Before inputting the image to be evaluated and the user evaluation requirement prompt information into the image quality evaluation model to obtain the image quality score of the image to be evaluated output by the image quality evaluation model, the method further includes: Taking the image samples and the corresponding user evaluation requirement prompt information samples as a group of training samples, obtaining multiple groups of training samples; The image quality assessment model is trained using the multiple groups of training samples.
4. The image quality assessment method according to claim 3, characterized in that: The step of training the image quality assessment model by using the multiple sets of training samples includes: For any set of training samples, input the training samples into the image quality assessment model, and output the prediction scores corresponding to the training samples; Using a preset loss function, a loss value is calculated according to the prediction score corresponding to the training sample and the image quality assessment score label in the training sample; Based on the loss value, adjusting the model parameters of the image quality assessment model until the number of model training times reaches a preset number; The model parameters obtained when the model training times reaches the preset times are used as the model parameters of the trained image quality assessment model.
5. The image quality assessment method according to claim 3, characterized in that: After obtaining multiple sets of training samples, the method further includes: By using a random scaling method, a plurality of image quality assessment score labels in the plurality of training samples are normalized to obtain each normalized assessment score label; Replacing the image quality assessment score labels in the plurality of training samples with the normalized assessment score labels to obtain a plurality of new training samples; The image quality assessment model is trained using the new multiple groups of training samples.
6. The image quality assessment method according to claim 3, characterized in that: After obtaining multiple sets of training samples, the method further includes: The plurality of image quality assessment score labels in the plurality of training samples are converted by random flipping to obtain respective converted assessment score labels; Replacing the image quality assessment score labels in the plurality of training samples with the assessment score labels after the conversion process, respectively, to obtain a plurality of new training samples; The image quality assessment model is trained using the new multiple groups of training samples.
7. An image quality assessment device, characterized in that: include: An acquisition module, used for acquiring an image to be evaluated and user evaluation requirement prompt information of the image to be evaluated; An evaluation module is used to input the image to be evaluated and the user evaluation requirement prompt information into an image quality evaluation model to obtain an image quality score of the image to be evaluated output by the image quality evaluation model; the image quality evaluation model is trained based on image samples and corresponding user evaluation requirement prompt information samples; the user evaluation requirement prompt information samples include image quality evaluation score labels corresponding to the image samples.
8. An electronic 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 program, the image quality assessment method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image quality assessment method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image quality assessment method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Image processing method, training method of image evaluation model and electronic equipment
CN121505620A
Image quality monitoring method and device based on video stream analysis
CN121582634A
