Target image quality evaluation method and device, storage medium and electronic equipment

By introducing self-attention mechanism and training parameter update mechanism in the image quality evaluation model, the problem that the existing technology cannot meet the personalized needs of users is solved, adaptive image quality evaluation is realized, and images in applications such as security monitoring are improved Accuracy of capture.

CN119273609APending Publication Date: 2025-01-07HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310811443.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing image quality evaluation methods cannot meet the personalized needs of users, especially in applications such as security monitoring, which are difficult to meet the requirements of factors such as size, posture and clarity of the target image at the same time.

Method used

The self-attention mechanism is used to adaptively determine the weight of each quality factor in the quality evaluation model, and the parameters are updated according to user needs when training the model to ensure that the evaluation results meet personalized needs.

Benefits of technology

Adaptive image quality evaluation is realized, the evaluation results can be adjusted according to user needs, meet the personalized needs of different users, and improve the accuracy and quality of image capture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273609A_ABST
    Figure CN119273609A_ABST
Patent Text Reader

Abstract

The invention discloses a quality evaluation method of a target image. The quality evaluation method comprises the steps of inputting an acquired target image into a pre-trained quality evaluation model; in the quality evaluation model, processing the target image, and determining a factor feature vector and a factor score corresponding to each quality factor in quality evaluation; determining the weight of each quality factor based on the factor feature vector of each quality factor by using a self-attention mechanism in the quality evaluation model; performing weighting processing based on the factor score and the weight of each quality factor to obtain a comprehensive score of the target image, and taking the comprehensive score as a quality evaluation result of the target image; wherein in the process of training the quality evaluation model, the comprehensive score obtained after the training sample image is processed is compared with the reference score determined for the training sample image according to the user demand, and the comprehensive score is used for updating the parameters of the quality evaluation model. By applying the method and the device, the evaluation result meeting the personalized requirements of the user can be adaptively provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to image processing technology, and in particular to a target image quality assessment method, device, storage medium and electronic device. Background Art

[0002] With the continuous development of image processing technology, image-based target assessment systems have been increasingly widely used.

[0003] For example, in security monitoring or authentication (attendance, vehicle access) products, it is important to capture and analyze multiple images of a certain object. Such objects can be faces / human bodies / vehicles / license plates, etc. Because the object is moving, different target image sequences (video streams) with different postures, sizes, and clarity will be obtained, and each target image needs to be evaluated for quality. Therefore, after the security camera detects and tracks the object, it captures the object multiple times to obtain multiple target images, and then performs quality evaluation to obtain the optimal target image, so that the subsequent analysis is more accurate. The selection of the optimal frame is determined based on the quality evaluation result of the target image (such as the comprehensive quality score). This comprehensive quality evaluation result represents the comprehensive influence of factors such as posture, size, and clarity. However, one problem is that it is often difficult for the optimal image frame captured to meet the best size, posture, clarity, and occlusion at the same time. For example, multiple target images of an object either have a certain posture offset or a certain occlusion. At this time, different users will have their own personalized snapshot requirements. For example, user 1 prefers the camera to capture a frontal face image (occlusion can be tolerated), while user 2 prefers the camera to capture an unobstructed image (not very straight objects can be tolerated).

[0004] Currently, many image-based target assessment methods use quality evaluation models to perform comprehensive target assessments, but the quality assessment results often fail to meet the personalized needs of users. Summary of the invention

[0005] The present application provides a target image quality assessment method, device, storage medium and electronic device, which can adaptively provide assessment results that meet the personalized needs of users.

[0006] To achieve the above objectives, this application adopts the following technical solutions:

[0007] A method for evaluating the quality of a target image, comprising:

[0008] Input the acquired target image into a pre-trained quality assessment model;

[0009] In the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation;

[0010] Determine the weight of each quality factor based on the factor feature vector of each quality factor by using the self-attention mechanism in the quality assessment model;

[0011] Performing weighted processing based on the factor score and weight of each quality factor to obtain a comprehensive score of the target image as a quality assessment result of the target image;

[0012] In the process of training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image according to user needs, so as to update the parameters of the quality evaluation model.

[0013] Preferably, the method of training the quality evaluation model includes:

[0014] Performing first-stage training using the training sample images of the first stage to obtain a benchmark quality evaluation model; wherein, in the first-stage training, a comprehensive score obtained after the training sample images of the first stage are processed by the model is compared with a benchmark score determined for the training sample images of the first stage according to default requirements, so as to update the parameters of the benchmark quality evaluation model;

[0015] The second-stage fine-tuning training is performed on the benchmark quality assessment model using the second-stage training sample images to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores obtained after the second-stage training sample images are processed by the model are compared with the benchmark scores determined for the second-stage training sample images according to the user needs, so as to update the parameters of the self-attention mechanism.

[0016] Preferably, the method of training the quality evaluation model includes:

[0017] The quality assessment model is trained using training sample images, and the comprehensive scores obtained after the training sample images are processed by the model are compared with the benchmark scores determined for the training sample images based on user needs, so as to update the parameters of at least the self-attention mechanism part in the quality assessment model.

[0018] Preferably, the quality evaluation model includes a self-attention model and a factor sub-model corresponding to each quality factor;

[0019] Determining the factor characteristic vector and factor score corresponding to each quality factor in the quality evaluation includes: using each of the factor sub-models to process the input of the factor sub-model respectively to obtain the factor characteristic vector and factor score corresponding to the corresponding quality evaluation factor;

[0020] During the process of training the quality evaluation model, the parameters of the corresponding factor sub-models are updated according to the factor scores output by each factor sub-model, and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing; or, during the process of training the quality evaluation model, the parameters of each factor sub-model and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing.

[0021] Preferably, the method for determining the benchmark score of the training sample image includes:

[0022] receiving a score set for the training sample image according to user requirements or default requirements as the benchmark score;

[0023] or,

[0024] The training sample image is compared with the registered image, and the comparison similarity is used as the benchmark score.

[0025] Preferably, the method further comprises: selecting a captured image from the plurality of target images according to quality evaluation results of the plurality of target images.

[0026] Preferably, the quality evaluation model includes a self-attention model, a factor sub-model corresponding to each quality factor, a first convolutional neural network shared by all the factor sub-models, a multiplication module and a target loss function processing module;

[0027] The first convolutional neural network is used to extract image features of the input image and output them to each of the factor sub-models;

[0028] Each of the factor sub-models comprises in sequence: a second convolutional neural network corresponding to the factor sub-model, a first fully connected layer for outputting a feature vector having the distinguishing property of the quality factor, a second fully connected layer for outputting a factor score for measuring the distinguishing property of the quality factor, and a loss function processing unit for outputting a loss function of the factor sub-model and optimizing network parameters;

[0029] The self-attention model includes, in sequence, a splicing unit for performing a splicing operation, a third, fourth and fifth fully connected layers for respectively obtaining a query vector Q, a key vector K and a value vector V, a softmax processing unit for performing a normalized exponential function processing, and a sixth fully connected layer for obtaining the weight of each factor affecting the comprehensive score;

[0030] The multiplication module is used to perform corresponding multiplication operations on each weight output by the sixth fully connected layer and each factor score output by the second fully connected layer;

[0031] The target loss function processing module is used to determine the target loss function based on the output result of the multiplication module and optimize the network parameters.

[0032] A target image quality assessment device comprises: a receiving unit, a quality assessment unit and an output unit;

[0033] The receiving unit is used to receive a target image;

[0034] The quality evaluation unit is used to input the target image received by the receiving unit into a pre-trained quality evaluation model; in the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation; the weight of each quality factor is determined based on the factor feature vector of each quality factor by using the self-attention mechanism in the quality evaluation model; based on the factor score and weight of each quality factor, weighted processing is performed to obtain a comprehensive score of the target image, and the score is output as a quality estimation result of the target image;

[0035] In the process of training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image according to user needs, so as to update the parameters of the quality evaluation model.

[0036] Preferably, the device further comprises a training unit, which is used to train and generate the quality evaluation model;

[0037] In the training unit, the method of training and generating the quality assessment model includes:

[0038] Performing first-stage training using the training sample images of the first stage to obtain a benchmark quality evaluation model; wherein, in the first-stage training, a comprehensive score obtained after the training sample images of the first stage are processed by the model is compared with a benchmark score determined for the training sample images of the first stage according to default requirements, so as to update the parameters of the benchmark quality evaluation model;

[0039] Performing second-stage fine-tuning training on the benchmark quality assessment model using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores of the training sample images of the second stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the second stage according to the user needs, so as to update the parameters of the self-attention mechanism;

[0040] Alternatively, in the training unit, the method of training and generating the quality assessment model includes:

[0041] The saved benchmark quality assessment model is subjected to second-stage fine-tuning training using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, the parameters other than the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores of the training sample images of the second stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the second stage according to the user requirements, so as to update the parameters of the self-attention mechanism; the benchmark quality assessment model is obtained by performing first-stage training in advance using the training sample images of the first stage and is stored in the training unit; in the first-stage training, the comprehensive scores of the training sample images of the first stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the first stage according to the default requirements, so as to update the parameters of the benchmark quality assessment model.

[0042] Preferably, the device further comprises a training unit, which is used to train and generate the quality evaluation model;

[0043] In the training unit, the method of training and generating the quality assessment model includes:

[0044] The quality assessment model is trained using training sample images, and the comprehensive scores obtained after the training sample images are processed by the model are compared with the benchmark scores determined for the training sample images based on user needs, so as to update the parameters of at least the self-attention mechanism part in the quality assessment model.

[0045] Preferably, the quality evaluation model includes a self-attention model and a factor sub-model corresponding to each quality factor;

[0046] In the quality evaluation unit, determining the factor feature vector and factor score corresponding to each quality factor in the quality evaluation includes: using each of the factor sub-models to process the input of the factor sub-model respectively to obtain the factor feature vector and factor score corresponding to the corresponding quality evaluation factor;

[0047] During the process of training the quality evaluation model, the parameters of the corresponding factor sub-models are updated according to the factor scores output by each factor sub-model, and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing; or, during the process of training the quality evaluation model, the parameters of each factor sub-model and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing.

[0048] Preferably, in the training unit, the method for determining the benchmark score of the training sample image includes:

[0049] receiving a score set for the training sample image according to user requirements or default requirements as the benchmark score;

[0050] or,

[0051] The training sample image is compared with the registered image, and the comparison similarity is used as the benchmark score.

[0052] Preferably, the device further comprises an image selection unit for selecting a captured image from the plurality of target images according to quality evaluation results of the plurality of target images.

[0053] Preferably, the quality evaluation model includes a self-attention model, a factor sub-model corresponding to each quality factor, a first convolutional neural network shared by all the factor sub-models, a multiplication module and a target loss function processing module;

[0054] The first convolutional neural network is used to extract image features of the input image and output them to each of the factor sub-models;

[0055] Each of the factor sub-models comprises in sequence: a second convolutional neural network corresponding to the factor sub-model, a first fully connected layer for outputting a feature vector having the distinguishing property of the quality factor, a second fully connected layer for outputting a factor score for measuring the distinguishing property of the quality factor, and a loss function processing unit for outputting a loss function of the factor sub-model and optimizing network parameters;

[0056] The self-attention model includes, in sequence, a splicing unit for performing a splicing operation, a third, fourth and fifth fully connected layers for respectively obtaining a query vector Q, a key vector K and a value vector V, a softmax processing unit for performing a normalized exponential function processing, and a sixth fully connected layer for obtaining the weight of each factor affecting the comprehensive score;

[0057] The multiplication module is used to perform corresponding multiplication operations on each weight output by the sixth fully connected layer and each factor score output by the second fully connected layer;

[0058] The target loss function processing module is used to determine the target loss function based on the output result of the multiplication module and optimize the network parameters.

[0059] A computer-readable storage medium stores computer instructions, which, when executed by a processor, can implement any of the above-mentioned image-based target assessment methods.

[0060] An electronic device comprising at least a computer-readable storage medium and a processor;

[0061] The processor is used to read the executable instructions from the computer-readable storage medium and execute the instructions to implement any of the above-mentioned image-based target assessment methods.

[0062] As can be seen from the above technical solution, in this application, the original image of the target is input into the pre-trained quality evaluation model; the original image is processed by the quality evaluation model to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation, and the self-attention mechanism introduced in the quality evaluation model is used to determine the weight of each quality factor based on the factor feature vector of each quality factor; and then the factor score and weight of each quality factor are weighted to obtain the comprehensive score of the target as the output of the quality evaluation model, that is, the quality estimation result of the target. Among them, when training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the same training sample image according to user needs, which is used to update the parameters of the quality evaluation model. In the above processing, on the one hand, through the introduction of the self-attention mechanism, the weight value of each quality factor can be adaptively obtained based on the factor feature vector, without the need to manually set the weight; on the other hand, the benchmark score in the training process is obtained based on user needs, so that the quality evaluation model can reflect the personalized needs of users and provide evaluation results that meet the personalized needs of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram of the basic process of the image-based target assessment method in this application;

[0064] Figure 2 This is an example diagram of the quality assessment model structure;

[0065] Figure 3 This is a schematic diagram of the training of the quality assessment model;

[0066] Figure 4 Schematic diagram of the basic structure of the image-based target assessment device in this application;

[0067] Figure 5It is a schematic diagram of the basic structure of the electronic device in this application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical means and advantages of this application more clear, the following is a further detailed description of this application in conjunction with the accompanying drawings. It should be noted that all data involved in this specification will only be obtained and used under the premise that the relevant users are aware and authorized.

[0069] In the current image-based target assessment method, the quality assessment model includes multiple quality factors. The influence of different quality factors on the overall assessment results is fixed and cannot meet the personalized needs of users. In some quality assessment models, although the influence of quality factors on the overall assessment results can be adjusted by the weights of quality factors, the weights need to be set manually. On the one hand, sufficient technical experience is required to set the weights, and the accuracy of the set weights cannot be guaranteed. On the other hand, after the weights are determined, the weight values ​​cannot be adjusted in real time during the processing of the quality assessment model. For the above reasons, the quality assessment results obtained by the current target assessment method are often unable to adaptively meet the personalized needs of users.

[0070] The present application provides an image-based target evaluation method. On the one hand, a self-attention mechanism is introduced to deeply explore the relationship between multiple quality factors in the quality evaluation model, and the weight value of each quality factor is adaptively determined; on the other hand, when training the quality evaluation model, a baseline score of the training sample image is determined according to user needs, and the parameters of the quality evaluation model are updated accordingly, so that the quality evaluation results of the model can meet the personalized needs of users.

[0071] Figure 1 FIG. 1 is a schematic diagram of the basic process of the image-based target assessment method in this application. Figure 2 As shown, the method includes:

[0072] Step 101: input the acquired target image into a pre-trained quality assessment model.

[0073] The target image is obtained and input into the quality evaluation model. The quality evaluation model is used to process the target image and obtain a comprehensive score of the target image as the model output, that is, the quality evaluation result of the target image. The target image is a single-frame image, for example, an image captured by a security camera.

[0074] Step 102: In the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation.

[0075] In the processing of the quality evaluation model, based on the target image, the factor feature vector corresponding to each quality factor is extracted, and the factor score corresponding to each quality factor is determined, which reflects the evaluation of each quality factor.

[0076] The process of obtaining the factor feature vector and factor score corresponding to each quality factor can be implemented in various existing ways. For example, a factor sub-model can be set for each quality factor in the quality evaluation model, and the factor sub-model is used to obtain the factor feature vector and factor score of the corresponding quality factor.

[0077] Step 103, using the self-attention mechanism in the quality evaluation model, based on the factor feature vector of each quality factor, determines the weight of each quality factor.

[0078] In this step, the self-attention mechanism introduced in the quality evaluation model is used to determine the weight of each quality factor according to the relationship between different quality factors and the factor feature vector of each quality factor.

[0079] The self-attention mechanism is used to explore the relationship between each input. In this application, the input processed by the self-attention part is the factor feature vector of each quality factor, which reflects the characteristic information of each quality factor. Through the processing of the self-attention part, the relationship between the feature vectors of each factor can be explored and utilized to determine the weight of each quality factor. In this way, no manual setting is required. In the process of processing the quality evaluation model, the weight distribution between each quality factor can be adaptively obtained for the input target image.

[0080] In specific implementation, a self-attention model can be set in the quality evaluation model. The model can adopt the existing typical self-attention model architecture, use the factor feature vector of each quality factor obtained in step 202 as the input of the self-attention model, and output the weight of each quality factor. The parameters of the self-attention model are continuously updated through the training process of the quality evaluation model.

[0081] Step 104 , weighted processing is performed based on the factor score and weight of each quality factor to obtain a comprehensive score of the target image as a quality assessment result of the target image.

[0082] In the quality assessment model, the factor score of each quality factor is obtained through the aforementioned step 102, and the weight of each quality factor is obtained through step 103. These factor scores and corresponding weights are used for weighted processing, and the result obtained is the comprehensive score of the target image. The comprehensive score is also the output of the quality assessment model and the quality assessment result of the target image.

[0083] As described above, the processing of the target image by the quality evaluation model is completed through the processing of steps 102-104. In this application, in order to enable the trained quality evaluation model to meet the personalized needs of users, when training the quality evaluation model, a benchmark score is determined for the training sample image based on user needs, and the comprehensive score obtained after the quality evaluation model processes the training sample image is compared with the benchmark score of the training sample image, and the comparison result is used to update the parameters of the quality evaluation model. In this way, the trained quality evaluation model can reflect the personalized needs of users.

[0084] So far, Figure 1 The basic flow of the target image quality assessment method shown ends.

[0085] The following uses a typical quality evaluation model structure and its application in security products to evaluate the quality of captured images as an example to illustrate the above Figure 1 specific processing process. Figure 2 The following is an example of the quality evaluation model structure. The quality evaluation model includes four quality factors: clarity, occlusion, pitch angle, and yaw angle. Figure 2 As shown, the quality evaluation model includes four factor sub-models corresponding to four quality factors, namely, clarity sub-model, occlusion sub-model, pitch angle sub-model and deflection angle sub-model, and the quality evaluation model also includes a self-attention model. Among them, the input target image is processed by the shared part (such as image feature extraction, etc.) and then input into the four factor sub-models respectively. Each factor sub-model processes the sub-model input to obtain the factor feature vector and factor score of the corresponding quality factor. Specifically, the clarity sub-model outputs clarity features and clarity scores after processing, the occlusion sub-model outputs occlusion features and occlusion scores after processing, the pitch angle sub-model outputs pitch angle features and pitch angle scores after processing, and the deflection angle sub-model outputs deflection angle features and deflection angle scores after processing. Each factor feature vector (specifically including clarity features, occlusion features, pitch angle features and deflection angle features) is input into the self-attention model, and the weights of each quality factor are obtained after processing by the self-attention model, namely, clarity weight, occlusion weight, pitch angle weight and deflection angle weight. Then, the factor scores of the corresponding quality factors are weighted by using the weights, and the processing result is used as the comprehensive score of the captured image. The weighted processing can adopt various existing methods, such as weighted summation.

[0086] After the comprehensive scores of a set of input target images are completed, they can be submitted to the snapshot application, which selects the best target image as the adopted snapshot image based on these comprehensive scores.

[0087] The above target image quality assessment method needs to be based on a pre-trained quality assessment model. The following describes the specific training method of the quality assessment model. Figure 2 The basic structure of the quality assessment model shown in Figure 3 The training diagram of the quality evaluation model shown in FIG. The detailed composition of each factor sub-model and the self-attention model is only an example, and the specific implementation is not limited to this. Figure 3 The structure or operation of each corresponding layer in , where each factor sub-model includes a corresponding convolutional neural network and two fully connected layers:

[0088] data: preprocessed training sample images;

[0089] CNN: Convolutional neural network, used to extract image features. The position here is represented as the shared convolution parameter part of all sub-models;

[0090] clarity_cnn: a convolutional neural network specific to the clarity branch (corresponding to the clarity sub-model);

[0091] visible_cnn: Convolutional neural network specific to the visibility branch (corresponding to the occlusion sub-model);

[0092] pitch_cnn: a convolutional neural network specific to the pitch angle branch (corresponding to the pitch angle sub-model);

[0093] yaw_cnn: a convolutional neural network specific to the deflection angle branch (corresponding to the deflection angle sub-model);

[0094] clarity_fc1: fully connected layer 1 of the clarity branch, outputting a feature vector with clarity discrimination;

[0095] visible_fc1: fully connected layer 1 of the visibility branch, outputting a feature vector with visibility discrimination;

[0096] pitch_fc1: fully connected layer 1 of the pitch angle branch, outputting a feature vector with pitch angle discrimination;

[0097] yaw_fc1: fully connected layer 1 of the deflection angle branch, outputting a feature vector with deflection angle discrimination;

[0098] clarity_fc2: Fully connected layer 2 of the clarity branch, outputs a value that measures the clarity discrimination, such as a clarity score;

[0099] visible_fc2: fully connected layer 2 of the visibility branch, outputting a value that measures the visibility discriminability, such as the occlusion score;

[0100] pitch_fc2: fully connected layer 2 of the pitch angle branch, outputting a value that measures the discriminability of the pitch angle, such as the pitch angle score;

[0101] yaw_fc2: fully connected layer 2 of the deflection angle branch, outputting a value that measures the discriminability of the deflection angle, such as the deflection angle score;

[0102] clarity_loss: loss function of the clarity branch, which optimizes network parameters through the gradient back-propagation algorithm;

[0103] visible_loss: loss function of the visibility branch, which optimizes network parameters through the gradient back-propagation algorithm;

[0104] pitch_loss: the loss function of the pitch angle branch, which optimizes the network parameters through the gradient back propagation algorithm;

[0105] yaw_loss: loss function of the deflection angle branch, which optimizes the network parameters through the gradient back propagation algorithm;

[0106] concat: concatenation operation;

[0107] Q_fc: fully connected layer, which plays the role of obtaining the query vector Q;

[0108] K_fc: fully connected layer, which plays the role of obtaining the key vector K;

[0109] V_fc: fully connected layer, which plays the role of obtaining the value vector V;

[0110] T: The superscript T is the matrix transpose operation;

[0111] Softmax: Normalized exponential function, which can "compress" a K-dimensional vector z containing any real number into another K-dimensional real vector σ(z), so that each element ranges between (0,1) and the sum of all elements is 1;

[0112] att_fc: fully connected layer, which plays the role of obtaining the influence weight of each factor on the comprehensive score;

[0113] multiply: multiplication operation; for example: clarity_new = w1*clarity score, visible_new = w2*occlusion score, pitch_new = w3*pitch angle score, yaw_new = w4*yaw angle score;

[0114] quality_loss: target quality loss function, which can be a comparison result between the comprehensive score output by the quality evaluation model (for example: comprehensive score = w*clearity_new*visible_new*pitch_new*yaw_new+b, where w and b are preset parameters) and the benchmark score of the training sample image, such as the absolute value or square of the deviation, etc. The benchmark score can be determined based on the comparison similarity between the training sample image and the registered image of the target, or it can be the subjective quality score received by the user, which is not limited in this application. The target quality loss function is used to optimize the network parameters through the gradient back propagation algorithm.

[0115] Based on the above Figure 2 and Figure 3 , preferably, the training process of the quality evaluation model can be divided into two stages:

[0116] 1. Phase 1:

[0117] The first stage training is performed using the first stage training sample images to obtain a benchmark quality evaluation model. In the first stage training, the comprehensive score obtained after the first stage training sample images are calculated and processed by the model (that is, the benchmark quality evaluation model in the training process) is compared with the benchmark score determined for the first stage training sample images according to the default requirements, so as to update the parameters of the benchmark quality evaluation model.

[0118] In more detail, in the first stage, a large number of training sample images are used to train the model and generate a benchmark quality evaluation model. The specific process may include:

[0119] 1. Obtain a large number of training sample images. In the quality assessment of captured images, the training sample images can be a large number of captured images;

[0120] 2. Input each training sample image Figure 2 The following descriptions are all based on the processing of a training sample image A as an example. Each factor sub-model outputs the factor feature vector and factor score of the corresponding quality factor, reflecting the evaluation of the quality factor; and in each factor sub-model, the currently obtained factor score is compared with the benchmark score of the corresponding quality factor determined for the training sample image A (such as the benchmark score of clarity, the benchmark score of occlusion, the benchmark score of pitch angle, and the benchmark score of yaw angle), and the loss function of the corresponding quality factor is determined. The parameters of the corresponding factor sub-model are updated according to the loss function. Here, the benchmark score of each quality factor in the first stage is usually scored according to the general standard;

[0121] 3. The factor feature vectors output by all factor sub-models for the training sample image A are fused through the self-attention model to obtain the influence weight of each quality factor on the comprehensive score;

[0122] 4. For the training sample image A, the weights of each quality factor are weighted to the factor scores of all quality factors to obtain the comprehensive score of the training sample image A; the comprehensive score is compared with the benchmark score determined for the training sample image A, the target quality loss function is determined, and the parameters of the self-attention model are updated according to the loss function. Here, the benchmark score of the training sample image A in the first stage can be determined based on the user's default requirements (such as general requirements in the industry), for example, it can be the quality score given to the training sample image A based on general requirements; or, the benchmark score can also be the similarity comparison result between the training sample image A and the target registered image under the default requirements;

[0123] The above is the model training and parameter updating process in one cycle. Through multiple rounds of parameter updating process, when the model meets the training termination condition, the training is terminated and the latest model is used as the benchmark quality evaluation model. In the above first stage of model training, the parameter update of each factor sub-model is based on the loss function of each factor sub-model, and the parameter update of the self-attention model is based on the target quality loss function. Such a training process makes the training of each factor sub-model independent of each other, so that the factor sub-model generated by the training can more accurately reflect the evaluation results of the corresponding quality factors. In fact, optionally, the above parameter update for each factor sub-model can also be performed according to the target quality loss function. The factor sub-model generated in this way contains the relationship between different sub-models, but the model accuracy of the single sub-model itself will be slightly deviated. In specific implementation, the appropriate training and parameter update method can be selected according to actual needs.

[0124] 2. The second stage:

[0125] The second-stage training sample images are used to perform the second-stage fine-tuning training on the benchmark quality evaluation model generated in the first stage to obtain a quality evaluation model. In the second-stage fine-tuning training, other parameters except the self-attention model parameters are kept unchanged, and the comprehensive score obtained after the second-stage training sample images are calculated and processed by the model (i.e., the quality evaluation model in the training process) is compared with the benchmark score determined for the second-stage training sample images according to user needs, which is used to update the parameters of the self-attention model.

[0126] In more detail, in the first stage, a baseline quality evaluation model is generated after training with a large number of training sample images. For each target image, a comprehensive quality score can be obtained through the factor scores and corresponding influence weights output by the model. This can be used as the default recommended quality evaluation method for target images. However, in different scenarios, users have different requirements for target capture, that is, capture has personalized needs or tendencies. For example, in scene one, the user's need may be to prioritize capturing unobstructed targets, and the corresponding quality evaluation results of unobstructed images should be high scores; in scene two, the user's need may be to prioritize capturing targets with positive postures, and the corresponding quality evaluation results of images with small posture deflection angles and pitch angles should be high scores. In response to the personalized capture needs of different users, the second stage of training is carried out to generate a quality evaluation model. The specific training process may include:

[0127] 1. Fix all parameters in the baseline quality evaluation model except the self-attention model, and release the parameters of the self-attention model;

[0128] 2. Receive the scoring or sorting of the second-stage training sample images according to the personalized needs, or determine the similarity between the training sample images and the registered images that meet the personalized needs, and obtain the benchmark score of the second-stage training sample images based on the scoring, sorting or similarity comparison;

[0129] 3. Input the training sample images of the second stage into the benchmark quality evaluation model for fine-tuning the model. Specifically, after obtaining the comprehensive score of the training sample images, compare them with the benchmark score to obtain the target quality loss function, and update the parameters of the self-attention model based on the target quality loss function. Since the second stage is model fine-tuning, only the self-attention model parameters need to be updated, and other parameters remain unchanged. After the training is completed, the weights of each quality factor output by the self-attention model will be more in line with the personalized needs of the scene.

[0130] It should be noted here that since the quality evaluation model is composed of two parts: a separate calculation of the scores of each quality factor item and a weighted calculation of the scores output by the self-attention model to obtain a comprehensive score, the calculation process of each quality factor item can be relatively standard and does not change with the user's snapshot requirements. Therefore, the corresponding network parameters do not need to be updated for the scene, but only the parameters of the self-attention model are updated, and these parameters are very few, which is convenient for training in the scene.

[0131] Since the second stage performs model fine-tuning, the number of training sample images in the second stage can be greatly reduced compared to the first stage, and the required training processing resources are also greatly reduced. Therefore, the first stage training is usually completed in advance on a device with large-scale computing power, and the second stage training can be completed on the scene.

[0132] The quality evaluation model generated through the training in the above two stages can adaptively determine the weights of various quality factors during the image quality evaluation process and perform image quality evaluation based on the personalized needs of users.

[0133] The above image quality assessment performed in the snapshot application of a security camera is only an example. In fact, the above image quality assessment method can be applied in many fields.

[0134] In addition, the training of the entire quality evaluation model is completed through two stages in the above training process. In fact, the training of the quality evaluation model that meets the personalized needs of users can also be completed directly through only one stage. Among them, its training process is similar to the training of the first stage mentioned above, the only difference is that the benchmark score of the training sample image used to generate the loss function is based on the personalized needs of the user, that is, the quality evaluation model is trained using the training sample image, and the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image based on the user's needs, which is used to update the parameters in the quality evaluation model. Of course, when updating the parameters, the loss function of each factor sub-model can be used to update the parameters of the sub-model, and the target quality loss function can be used to update the parameters of the self-attention model; or, the target quality loss function can be used to update the parameters of each factor sub-model and the self-attention model. Among them, the personalized needs of users can also be default general needs.

[0135] The above is a specific implementation of the quality assessment method of the target image in the present application. In the above processing method of the present application, since the self-attention processing part is based on the factor feature vectors of each quality factor, the weight of each quality factor is obtained by mining the relationship between the feature vectors of different factors. Based on this, for different input images, the feature vectors of each factor may be different, and even if the factor scores of different quality factors are the same, the corresponding weights may be different.

[0136] The present application also provides a target image quality assessment device, which can be used to implement the above-mentioned quality assessment method. Figure 4 Figure 1 is a basic structural diagram of the quality assessment device. Figure 4 As shown, the device includes: a receiving unit, a quality evaluation unit and an output unit.

[0137] Wherein, the receiving unit is used to receive the target image;

[0138] The quality evaluation unit is used to input the target image received by the receiving unit into a pre-trained quality evaluation model; in the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation; the weight of each quality factor is determined based on the factor feature vector of each quality factor by using the self-attention mechanism in the quality evaluation model; weighted processing is performed based on the factor score and weight of each quality factor to obtain a comprehensive score of the target image, and the score is output as a quality estimation result of the target image;

[0139] In the process of training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image according to user needs, so as to update the parameters of the quality evaluation model.

[0140] Optionally, the device may further include a training unit for training and generating a quality assessment model;

[0141] In the training unit, the first method of training and generating a quality evaluation model may specifically include:

[0142] Performing first-stage training using the training sample images of the first stage to obtain a benchmark quality evaluation model; wherein, in the first-stage training, a comprehensive score obtained after the training sample images of the first stage are processed by the model is compared with a benchmark score determined for the training sample images of the first stage according to the default requirements, so as to update the parameters of the benchmark quality evaluation model;

[0143] The benchmark quality assessment model is subjected to a second-stage fine-tuning training using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive score obtained after the training sample images of the second stage are processed by the model is compared with the benchmark score determined for the training sample images of the second stage according to the user needs, so as to update the parameters of the self-attention mechanism;

[0144] In the training unit, the second method of training and generating the quality evaluation model may specifically include:

[0145] The saved benchmark quality assessment model is subjected to second-stage fine-tuning training using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores of the training sample images of the second stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the second stage according to the user requirements, so as to update the parameters of the self-attention mechanism; the benchmark quality assessment model is obtained by performing first-stage training in advance using the training sample images of the first stage and is stored in the training unit; in the first-stage training, the comprehensive scores obtained after processing the training sample images of the first stage are compared with the benchmark scores determined for the training sample images of the first stage according to the default requirements, so as to update the parameters of the benchmark quality assessment model.

[0146] In fact, in the training of the above two quality evaluation models, the complete training process includes two stages of training. In the first method, the first and second stage training are completed in the training unit, which correspondingly requires a higher computing power of the device; in the second method, the training unit only completes the second stage training, and the first stage training can be completed in other devices, so that the computing power requirements of the device can be appropriately reduced.

[0147] In the training unit, the third training method for generating the quality assessment model may specifically include:

[0148] The quality evaluation model is trained using the training sample images, and the comprehensive score obtained after processing the training sample images is compared with the benchmark score determined for the training sample images according to user needs, which is used to update the parameters of at least the self-attention mechanism part in the quality evaluation model. Therefore, in the third training method, the training process of the complete quality evaluation model only includes one stage, so the computing power requirements of the device are still relatively high.

[0149] Optionally, the structure of the quality assessment model may include a self-attention model and a factor sub-model corresponding to each quality factor;

[0150] In the quality evaluation unit, the process of determining the factor feature vector and the factor score corresponding to each quality factor in the quality evaluation may specifically include: using each factor sub-model to process the input of the factor sub-model respectively to obtain the factor feature vector and the factor score corresponding to the corresponding quality evaluation factor;

[0151] In the process of training the quality evaluation model, the parameters of the corresponding factor sub-model are updated according to the factor scores output by each factor sub-model, and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing; or, in the process of training the quality evaluation model, the parameters of each factor sub-model and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing.

[0152] Optionally, in the training unit, the method for determining the benchmark score of the training sample image may include:

[0153] Receive a score set for the training sample image according to user requirements or default requirements as a baseline score; or,

[0154] The training sample images are compared with the registered images, and the comparison similarity is used as the benchmark score.

[0155] Optionally, the device may further include an image selection unit, configured to select a captured image from a plurality of target images according to quality evaluation results of the plurality of target images.

[0156] Optionally, the quality evaluation model includes a self-attention model, a factor sub-model corresponding to each quality factor, a first convolutional neural network shared by all factor sub-models, a multiplication module, and a target loss function processing module;

[0157] The first convolutional neural network is used to extract image features of the input image and output them to each factor sub-model;

[0158] Each of the factor sub-models includes, in sequence: a second convolutional neural network corresponding to the factor sub-model, a first fully connected layer for outputting a feature vector having the distinguishing property of the quality factor, a second fully connected layer for outputting a factor score for measuring the distinguishing property of the quality factor, and a loss function processing unit for outputting a loss function of the factor sub-model and optimizing network parameters;

[0159] The self-attention model includes a concatenation unit for concatenation operation, a third, fourth and fifth fully connected layers for obtaining a query vector Q, a key vector K and a value vector V respectively, a softmax processing unit for normalized exponential function processing, and a sixth fully connected layer for obtaining the weight of each factor affecting the comprehensive score;

[0160] A multiplication module, used to perform a corresponding multiplication operation on each weight output by the sixth fully connected layer and each factor score output by the second fully connected layer;

[0161] The target loss function processing module is used to determine the target loss function based on the output result of the multiplication module and optimize the network parameters.

[0162] The present application also provides a computer-readable storage medium, which stores instructions, and when the instructions are executed by a processor, the steps in the method for evaluating the quality of a target image as described above can be executed. In practical applications, the computer-readable medium can be included in each device / apparatus / system in the above embodiments, or it can exist independently without being assembled into the device / apparatus / system. Instructions are stored in a computer-readable storage medium, and when the instructions stored in the computer-readable storage medium are executed by a processor, the steps in the method for evaluating the quality of a target image as described above can be executed.

[0163] According to the embodiments disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, but it is not used to limit the scope of protection of the present application. In the embodiments disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0164] Figure 5 This application also provides a basic structural diagram of an electronic device. Figure 5 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0165] The electronic device may include a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 502 is executed, a method for evaluating the quality of a target image may be implemented.

[0166] Specifically, in practical applications, the electronic device may further include components such as a power supply 503, an input / output unit 504, etc. Those skilled in the art may understand that Figure 5 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0167] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, thereby monitoring the electronic device as a whole.

[0168] The memory 502 can be used to store software programs and modules, that is, the above-mentioned computer-readable storage medium. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0169] The electronic device also includes a power supply 503 for supplying power to various components, which can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, etc.

[0170] The electronic device may also include an input and output unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick or optical signal input related to user settings and function control. The input unit output 504 may also be used to display information input by the user or information provided to the user and various graphical user interfaces, which may be composed of graphics, text, icons, videos and any combination thereof.

[0171] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for evaluating the quality of a target image, characterized in that: include: Input the acquired target image into a pre-trained quality assessment model; In the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation; Determine the weight of each quality factor based on the factor feature vector of each quality factor by using the self-attention mechanism in the quality assessment model; Performing weighted processing based on the factor score and weight of each quality factor to obtain a comprehensive score of the target image as a quality assessment result of the target image; In the process of training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image according to user needs, so as to update the parameters of the quality evaluation model.

2. The method according to claim 1, characterized in that Methods for training the quality assessment model include: Performing first-stage training using the training sample images of the first stage to obtain a benchmark quality evaluation model; wherein, in the first-stage training, a comprehensive score obtained after the training sample images of the first stage are processed by the model is compared with a benchmark score determined for the training sample images of the first stage according to default requirements, so as to update the parameters of the benchmark quality evaluation model; The second-stage fine-tuning training is performed on the benchmark quality assessment model using the second-stage training sample images to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores obtained after the second-stage training sample images are processed by the model are compared with the benchmark scores determined for the second-stage training sample images according to the user needs, so as to update the parameters of the self-attention mechanism.

3. The method according to claim 1, characterized in that Methods for training the quality assessment model include: The quality assessment model is trained using training sample images, and the comprehensive scores obtained after the training sample images are processed by the model are compared with the benchmark scores determined for the training sample images based on user needs, so as to update the parameters of at least the self-attention mechanism part in the quality assessment model.

4. The method according to claim 1, 2 or 3, characterized in that: The quality evaluation model includes a self-attention model and a factor sub-model corresponding to each quality factor; Determining the factor characteristic vector and factor score corresponding to each quality factor in the quality evaluation includes: using each of the factor sub-models to process the input of the factor sub-model respectively to obtain the factor characteristic vector and factor score corresponding to the corresponding quality evaluation factor; During the process of training the quality evaluation model, the parameters of the corresponding factor sub-models are updated according to the factor scores output by each factor sub-model, and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing; or, during the process of training the quality evaluation model, the parameters of each factor sub-model and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing.

5. The method according to claim 1, 2 or 3, characterized in that: The method for determining the benchmark score of the training sample image includes: receiving a score set for the training sample image according to user requirements or default requirements as the benchmark score; or, The training sample image is compared with the registered image, and the comparison similarity is used as the benchmark score.

6. The method according to claim 1, characterized in that The method further comprises: selecting a captured image from the plurality of target images according to quality evaluation results of the plurality of target images.

7. The method according to claim 1, characterized in that The quality evaluation model includes a self-attention model, a factor sub-model corresponding to each quality factor, a first convolutional neural network shared by all the factor sub-models, a multiplication module and a target loss function processing module; The first convolutional neural network is used to extract image features of the input image and output them to each of the factor sub-models; Each of the factor sub-models comprises in sequence: a second convolutional neural network corresponding to the factor sub-model, a first fully connected layer for outputting a feature vector having the distinguishing property of the quality factor, a second fully connected layer for outputting a factor score for measuring the distinguishing property of the quality factor, and a loss function processing unit for outputting a loss function of the factor sub-model and optimizing network parameters; The self-attention model includes, in sequence, a splicing unit for performing a splicing operation, a third, fourth and fifth fully connected layers for respectively obtaining a query vector Q, a key vector K and a value vector V, a softmax processing unit for performing a normalized exponential function processing, and a sixth fully connected layer for obtaining the weight of each factor affecting the comprehensive score; The multiplication module is used to perform corresponding multiplication operations on each weight output by the sixth fully connected layer and each factor score output by the second fully connected layer; The target loss function processing module is used to determine the target loss function based on the output result of the multiplication module and optimize the network parameters.

8. A target image quality assessment device, characterized in that: include: Receiving unit, quality evaluation unit and output unit; The receiving unit is used to receive a target image; The quality evaluation unit is used to input the target image received by the receiving unit into a pre-trained quality evaluation model; in the quality evaluation model, the target image is processed to determine the factor feature vector and factor score corresponding to each quality factor in the quality evaluation; the weight of each quality factor is determined based on the factor feature vector of each quality factor by using the self-attention mechanism in the quality evaluation model; based on the factor score and weight of each quality factor, weighted processing is performed to obtain a comprehensive score of the target image, and the score is output as a quality estimation result of the target image; In the process of training the quality evaluation model, the comprehensive score obtained after processing the training sample image is compared with the benchmark score determined for the training sample image according to user needs, so as to update the parameters of the quality evaluation model.

9. The device according to claim 8, characterized in that The device further comprises a training unit, which is used to train and generate the quality assessment model; In the training unit, the method of training and generating the quality assessment model includes: Performing first-stage training using the training sample images of the first stage to obtain a benchmark quality evaluation model; wherein, in the first-stage training, a comprehensive score obtained after the training sample images of the first stage are processed by the model is compared with a benchmark score determined for the training sample images of the first stage according to default requirements, so as to update the parameters of the benchmark quality evaluation model; Performing second-stage fine-tuning training on the benchmark quality assessment model using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, other parameters except the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores of the training sample images of the second stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the second stage according to the user needs, so as to update the parameters of the self-attention mechanism; Alternatively, in the training unit, the method of training and generating the quality assessment model includes: The saved benchmark quality assessment model is subjected to second-stage fine-tuning training using the training sample images of the second stage to obtain the quality assessment model; wherein, in the second-stage fine-tuning training, the parameters other than the parameters of the self-attention mechanism are kept unchanged, and the comprehensive scores of the training sample images of the second stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the second stage according to the user requirements, so as to update the parameters of the self-attention mechanism; the benchmark quality assessment model is obtained by performing first-stage training in advance using the training sample images of the first stage and is stored in the training unit; in the first-stage training, the comprehensive scores of the training sample images of the first stage obtained after being processed by the model are compared with the benchmark scores determined for the training sample images of the first stage according to the default requirements, so as to update the parameters of the benchmark quality assessment model.

10. The device according to claim 8, characterized in that The device further comprises a training unit, which is used to train and generate the quality assessment model; In the training unit, the method of training and generating the quality assessment model includes: The quality assessment model is trained using training sample images, and the comprehensive scores obtained after the training sample images are processed by the model are compared with the benchmark scores determined for the training sample images based on user needs, so as to update the parameters of at least the self-attention mechanism part in the quality assessment model.

11. The device according to claim 8, 9 or 10, characterized in that The quality evaluation model includes a self-attention model and a factor sub-model corresponding to each quality factor; In the quality evaluation unit, determining the factor feature vector and factor score corresponding to each quality factor in the quality evaluation includes: using each of the factor sub-models to process the input of the factor sub-model respectively to obtain the factor feature vector and factor score corresponding to the corresponding quality evaluation factor; During the process of training the quality evaluation model, the parameters of the corresponding factor sub-models are updated according to the factor scores output by each factor sub-model, and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing; or, during the process of training the quality evaluation model, the parameters of each factor sub-model and the parameters of the self-attention model are updated according to the comprehensive scores obtained after processing.

12. The device according to claim 8, 9 or 10, characterized in that In the training unit, the method of determining the benchmark score of the training sample image includes: receiving a score set for the training sample image according to user requirements or default requirements as the benchmark score; or, The training sample image is compared with the registered image, and the comparison similarity is used as the benchmark score.

13. The device according to claim 8, characterized in that The device further comprises an image selection unit, which is used for selecting a captured image from the plurality of target images according to quality evaluation results of the plurality of target images.

14. The device according to claim 8, characterized in that The quality evaluation model includes a self-attention model, a factor sub-model corresponding to each quality factor, a first convolutional neural network shared by all the factor sub-models, a multiplication module and a target loss function processing module; The first convolutional neural network is used to extract image features of the input image and output them to each of the factor sub-models; Each of the factor sub-models comprises in sequence: a second convolutional neural network corresponding to the factor sub-model, a first fully connected layer for outputting a feature vector having the distinguishing property of the quality factor, a second fully connected layer for outputting a factor score for measuring the distinguishing property of the quality factor, and a loss function processing unit for outputting a loss function of the factor sub-model and optimizing network parameters; The self-attention model includes, in sequence, a splicing unit for performing a splicing operation, a third, fourth and fifth fully connected layers for respectively obtaining a query vector Q, a key vector K and a value vector V, a softmax processing unit for performing a normalized exponential function processing, and a sixth fully connected layer for obtaining the weight of each factor affecting the comprehensive score; The multiplication module is used to perform corresponding multiplication operations on each weight output by the sixth fully connected layer and each factor score output by the second fully connected layer; The target loss function processing module is used to determine the target loss function based on the output result of the multiplication module and optimize the network parameters.

15. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the target image quality assessment method described in any one of claims 1 to 7 can be implemented.

16. An electronic device, characterized in that: The electronic device includes at least a computer-readable storage medium and also includes a processor; The processor is used to read the executable instructions from the computer-readable storage medium and execute the instructions to implement the target image quality assessment method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent monitoring method and device for highland barley planting and storage medium

    CN119476736A