Model training method, quality evaluation method, device, equipment and product
By using high-resolution, high-prospect rate images and image degradation processing technology to train hierarchical network structures, the problem of lack of annotation data in deep learning visual scoring methods is solved, and fine-grained quality and aesthetic information of images or videos is achieved. The capture improves the accuracy of the model and the diversity of data.
Patent Information
- Application Number
- CN202410789780.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-01
AI Technical Summary
Due to the lack of annotation data, existing deep learning-based visual scoring methods are difficult to achieve local or even fine-grained perception at the pixel level, and cannot effectively capture local quality and aesthetic information of images or videos.
By obtaining high-resolution, high-foreground-rate images as pre-training data sets, and using image degradation processing methods such as geometric transformation, frequency transformation, and color transformation to degrade the images, build a hierarchical network structure and feature fusion layer, and train Pre-train models to learn fine-grained quality and aesthetic information.
Improves the accuracy of the model in downstream tasks, reduces the need for large amounts of annotated data, enhances data diversity during pre-training, and effectively captures the overall and local quality and aesthetic information of images or videos, approaching the scoring of the human visual system .
Smart Images

Figure CN118736347A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of visual data processing, and in particular to a model training method, a quality assessment method, a model training device, a quality assessment device, an electronic device and a computer program product. Background Art
[0002] The goal of Image Quality Assessment (IQA), Visual Quality Assessment (VQA), and Image Aesthetics Assessment (IAA) is to evaluate the quality and aesthetics of visual content. Although these tasks have been studied separately for quite a long time, their core goal is to mimic the human visual system (HVS) and generate accurate scores that are consistent with human perception. In recent years, the surge in user-generated content (UGC) and artificial intelligence-generated content (AIGC) has become a trend, and the complexity and relevance of factors related to quality and aesthetics in emerging content are unprecedented. Analyzing only one type of factor is not enough to align human perception. In response to task similarities and development trends, the three tasks are collectively referred to as visual scoring (VS) below.
[0003] Deep Learning (DL) methods have achieved good performance in visual scoring tasks. However, the lack of labeled data limits the capabilities of data-driven deep learning methods. This is because visual scoring tasks are highly subjective and the cost of collecting subjective scores (Mean Opinion Score, MOS) is very high. Therefore, the size of visual scoring supervised datasets is usually only one-tenth or even one-hundredth of other high-level visual task datasets. Summary of the invention
[0004] The present disclosure provides a model training method, a quality assessment method, a model training device, a quality assessment device, an electronic device and a computer program product, so as to at least solve the problem that the pre-training scheme of large-scale data in the related art can only extract the quality and aesthetic attributes of the whole image or video, but cannot achieve fine-grained perception of the local or even pixel level. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a model training method is provided, comprising: obtaining a pre-training image set, the pre-training image set comprising a plurality of pre-training images, the pre-training images being images having a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold; performing image degradation processing on the pre-training images to obtain degraded images, the image degradation processing comprising one or more of geometric transformation processing, frequency transformation processing and color transformation processing; obtaining a pre-constructed pre-training model, and reconstructing the degraded images by the pre-training model to obtain a reconstructed image; and training the pre-training model according to the reconstructed image to obtain model parameters of the trained pre-training model.
[0006] In an exemplary embodiment of the present disclosure, obtaining a pre-trained image set includes: obtaining an initial image set, wherein the initial image set includes a plurality of initial images; comparing the resolution of each of the initial images with the resolution threshold, and comparing the foreground rate of each of the initial images with the foreground rate threshold to obtain a parameter comparison result; and based on the parameter comparison result, selecting images having a resolution higher than the resolution threshold and a foreground rate higher than the foreground rate threshold from the plurality of initial images as the pre-training images.
[0007] In an exemplary embodiment of the present disclosure, performing image degradation processing on the pre-trained image to obtain the degraded image includes: obtaining pre-defined basic degradation operations, where the basic degradation operations include one or more of resizing, sharpening, blurring, adding noise, color jittering, and color space transformation; performing image degradation processing on the pre-trained image based on the basic degradation operations to obtain the degraded image.
[0008] In an exemplary embodiment of the present disclosure, performing image degradation processing on the pre-trained image based on the basic degradation operations to obtain the degraded image includes: performing a first combination processing on at least one of the basic degradation operations in a sequential combination manner to obtain a first degradation combination sequence; and performing image degradation processing on the pre-trained image based on the first degradation combination sequence to obtain the degraded image.
[0009] In an exemplary embodiment of the present disclosure, performing image degradation processing on the pre-trained image based on the basic degradation operation to obtain the degraded image includes: performing a second combination processing on at least one of the basic degradation operations in a random combination manner to obtain a second degradation combination sequence, wherein the random combination manner includes one or more of rearranging the degradation operation sequence, skipping the execution of the degradation operation, and performing the degradation operation at a high order; performing image degradation processing on the pre-trained image based on the second degradation combination sequence to obtain the degraded image.
[0010] In an exemplary embodiment of the present disclosure, the pre-trained model includes a hierarchical network structure, a feature fusion layer and a decoder, and the pre-trained model is used to reconstruct the degraded image to obtain a reconstructed image, including: obtaining a pre-constructed hierarchical network structure, the hierarchical network structure includes a multi-level encoder; obtaining multiple encoding stages corresponding to the multi-level encoder, and determining the scale features of the degraded image at each encoding stage; projecting the multiple scale features to obtain dimensionally aligned projection features; integrating the multiple projection features based on the feature fusion layer to obtain fused features; and using the decoder to perform image reconstruction on the fused features to obtain the reconstructed image.
[0011] In an exemplary embodiment of the present disclosure, the pre-trained model includes a mask layer, and determining the scale characteristics of the degraded image at each encoding stage includes: using the mask layer to perform image masking on the degraded image to obtain a degraded mask image; determining the encoding scale corresponding to the degraded mask image at each encoding stage; based on the multi-level encoder, determining the scale characteristics of different encoding scales corresponding to the degraded mask image at each encoding stage.
[0012] According to a second aspect of an embodiment of the present disclosure, a quality assessment method is provided, comprising: obtaining visual content to be evaluated, and obtaining a model structure and model parameters of a pre-trained model obtained through pre-training processing, wherein the pre-trained model is trained based on a model training method; inputting the visual content to be evaluated into the pre-trained model, and performing quality assessment processing on the visual content to be evaluated based on the model structure and the model parameters to obtain a quality assessment score.
[0013] According to a third aspect of an embodiment of the present disclosure, a model training device is provided, comprising: an image set acquisition module, used to acquire a pre-trained image set, wherein the pre-trained image set comprises a plurality of pre-trained images, wherein the pre-trained images are images having a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold; an image degradation module, used to perform image degradation processing on the pre-trained images to obtain degraded images, wherein the image degradation processing comprises one or more of geometric transformation processing, frequency transformation processing and color transformation processing; an image reconstruction module, used to acquire a pre-constructed pre-trained model, and reconstruct the degraded images by the pre-trained model to obtain a reconstructed image; and a model training module, used to train the pre-trained model according to the reconstructed image to obtain model parameters of the trained pre-trained model.
[0014] In an exemplary embodiment of the present disclosure, the image set acquisition module includes an image set acquisition unit: acquiring an initial image set, the initial image set including a plurality of initial images; comparing the resolution of each of the initial images with the resolution threshold, and comparing the foreground rate of each of the initial images with the foreground rate threshold to obtain a parameter comparison result; and based on the parameter comparison result, screening images having a resolution higher than the resolution threshold and a foreground rate higher than the foreground rate threshold from the plurality of initial images as the pre-training images.
[0015] In an exemplary embodiment of the present disclosure, the image degradation module includes an image degradation unit, which is used to: obtain predefined basic degradation operations, where the basic degradation operations include one or more of resizing, sharpening, blurring, adding noise, color jittering, and color space transformation; perform image degradation processing on the pre-trained image based on the basic degradation operations to obtain the degraded image.
[0016] In an exemplary embodiment of the present disclosure, the image degradation unit includes a first degradation processing subunit, which is used to: perform a first combination processing on at least one of the basic degradation operations in a sequential combination manner to obtain a first degradation combination sequence; and perform image degradation processing on the pre-trained image based on the first degradation combination sequence to obtain the degraded image.
[0017] In an exemplary embodiment of the present disclosure, the image degradation unit includes a second degradation processing subunit, which is used to: perform a second combination processing on at least one of the basic degradation operations in a random combination manner to obtain a second degradation combination order, wherein the random combination manner includes one or more of rearranging the degradation operation order, skipping the degradation operation, and performing the degradation operation at a high order; based on the second degradation combination order, perform image degradation processing on the pre-trained image to obtain the degraded image.
[0018] In an exemplary embodiment of the present disclosure, the pre-trained model includes a hierarchical network structure, a feature fusion layer and a decoder, and the image reconstruction module includes an image reconstruction unit, which is used to: obtain a pre-constructed hierarchical network structure, the hierarchical network structure includes a multi-level encoder; obtain multiple encoding stages corresponding to the multi-level encoder, and determine the scale features of the degraded image at each encoding stage; perform projection processing on the multiple scale features to obtain dimensionally aligned projection features; integrate the multiple projection features based on the feature fusion layer to obtain fused features; use the decoder to perform image reconstruction processing on the fused features to obtain the reconstructed image.
[0019] In an exemplary embodiment of the present disclosure, the pre-trained model includes a mask layer, and the image reconstruction unit includes a scale feature determination subunit, which is used to: use the mask layer to perform image masking on the degraded image to obtain a degraded mask image; determine the encoding scale corresponding to the degraded mask image in each encoding stage; based on the multi-level encoder, determine the scale features of different encoding scales corresponding to the degraded mask image in each encoding stage.
[0020] According to a fourth aspect of an embodiment of the present disclosure, a quality assessment device is provided, comprising: a model acquisition module, used to acquire visual content to be evaluated, and acquire a model structure and model parameters of a pre-trained model obtained through pre-training processing, wherein the pre-trained model is trained based on a model training method; a quality assessment module, used to input the visual content to be evaluated into the pre-trained model, and perform quality assessment processing on the visual content to be evaluated based on the model structure and the model parameters to obtain a quality assessment score.
[0021] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement any one of the model training methods or quality assessment methods described above.
[0022] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the model training methods or quality assessment methods described above.
[0023] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements any one of the above-described model training methods or quality assessment methods.
[0024] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0025] On the one hand, by using high-resolution, high-foreground rate images as pre-training datasets, the model can learn fine-grained quality and aesthetic information during the pre-training stage, improve the accuracy of the model in downstream tasks, and reduce the need for a large amount of labeled data; on the other hand, by adopting special image degradation processing to present rich quality and aesthetic factors to the model, the data diversity during pre-training can be improved.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0028] Figure 1 The figure is a flowchart of a model training method according to an exemplary embodiment.
[0029] Figure 2 It is an overall architecture diagram of a model constructed by a model training method shown according to an exemplary embodiment.
[0030] Figure 3 is a pre-trained image with a high foreground rate feature according to an exemplary embodiment.
[0031] Figure 4 is a schematic diagram of a degraded image obtained after image degradation processing according to an exemplary embodiment.
[0032] Figure 5 The figure is a flow chart of a quality assessment method according to an exemplary embodiment.
[0033] Figure 6 It is a block diagram of a model training device according to an exemplary embodiment.
[0034] Figure 7 It is a block diagram of a quality assessment device according to an exemplary embodiment.
[0035] Figure 8 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0036] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0038] In order to solve the problem of limited supervised data, some pre-training schemes for large-scale data have been proposed. For example, the pre-training framework based on contrastive learning learns quality-related information on synthetic and real distorted images. Similarly, the image self-supervised learning method based on the contrastive learning framework designs a sophisticated degradation space to extract features that are sensitive to quality and aesthetics. In addition, the quality and aesthetics-aware pretraining (QPT) scheme introduces a variety of degradation and synthesis methods to simulate real-world distortion conditions, thereby greatly expanding the scale of pre-training data.
[0039] However, the above pre-training schemes are all based on contrastive learning to design pre-training frameworks, which can only extract the overall quality or aesthetic information of images or videos, but cannot capture the rich local quality and aesthetic information of images or videos, which is inconsistent with the characteristics of HVS that is sensitive to overall and local quality and aesthetics.
[0040] Based on this, according to the embodiments of the present disclosure, a model training method, a quality assessment method, a model training device, a quality assessment device, an electronic device, a computer-readable storage medium, and a computer program product are proposed.
[0041] first, Figure 1 is a flow chart of a model training method according to an exemplary embodiment. Figure 1 As shown, the model training method can be used in a computer device, wherein the computer device described in the present disclosure may include mobile terminal devices such as mobile phones, tablet computers, laptops, PDAs, and fixed terminal devices such as desktop computers. This exemplary embodiment uses the method applied to a computer device as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a computer device and a server, and is implemented through the interaction between the computer device and the server. Specifically, the following steps are included.
[0042] In step S110 , a pre-training image set is obtained, where the pre-training image set includes a plurality of pre-training images, where the pre-training images are images with a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold.
[0043] In an exemplary embodiment of the present disclosure, the pre-training image set may be an image set for model training of the pre-training model, and the pre-training image set is composed of a plurality of pre-training images that meet the conditions. The pre-training image may be an image with a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold.
[0044] For pre-training data, ImageNet dataset is usually used for pre-training. However, the images of ImageNet are usually low-resolution and lack complex details. Pre-training only on these data lacking details is not enough for the model to fully perceive fine-grained quality and aesthetic information. For this reason, the present disclosure proposes to use high-resolution images for pre-training. In addition to high resolution, the foreground ratio of the image is also crucial for pre-training. Since the foreground area encodes more semantic and texture information than the background area, pre-training on high-resolution images can ensure the sensitivity of the model to high-level and low-level visual attributes. Data with high foreground rates ensures that while expanding the details, the model can also learn high-level semantic information. Therefore, images with a resolution higher than the resolution threshold and a foreground rate higher than the foreground rate threshold are used as pre-training images, and the screened multiple pre-training images are used as pre-training image sets.
[0045] In step S120, image degradation processing is performed on the pre-trained image to obtain a degraded image, where the image degradation processing includes one or more of geometric transformation processing, frequency transformation processing, and color transformation processing.
[0046] In an exemplary embodiment of the present disclosure, image degradation refers to the decrease in image quality due to imperfections in the imaging system, recording device, transmission medium and processing method during the formation, recording, processing and transmission of the image. Image degradation processing may be a degradation processing operation performed on a pre-trained image to simulate a user's actual usage scenario. A degraded image may be an image generated after degradation processing is performed on a pre-trained image.
[0047] After obtaining the pre-trained image set, each pre-trained image in the pre-trained image set is subjected to image degradation processing to simulate the real user operation when the user produces visual content (such as videos, images, etc.) to obtain a degraded image. Image degradation processing mainly includes geometric transformation processing, frequency transformation processing, and color transformation processing. In the image degradation processing process, image degradation processing can be performed only on one dimension, or multiple dimensions can be combined for image degradation processing.
[0048] Specifically, the image degradation processing in the geometric transformation dimension may be a process of transforming a pre-trained image into another image according to a specific rule or law. For example, the geometric transformation processing (i.e., the image degradation processing in the geometric transformation dimension) may include resizing, translation, flipping, scaling, rotation, affine transformation, perspective transformation, distortion, etc. The frequency of an image is an indicator of the intensity of grayscale changes in an image, and is the gradient of grayscale in a plane space. The frequency transformation processing (i.e., the image degradation processing in the frequency transformation dimension) may be a process of adjusting grayscale changes in an image. For example, the image degradation processing in the frequency transformation dimension may include blurring, sharpening, adding noise, etc. The color transformation processing (i.e., the image degradation processing in the color transformation dimension) may be a process of transforming an image represented by a red, green, and blue system into an image represented by a brightness, hue, and saturation system. The image degradation processing in the color transformation dimension may include color jittering and color space transformation, etc.
[0049] In step S130, a pre-built pre-trained model is obtained, and the degraded image is reconstructed by the pre-trained model to obtain a reconstructed image.
[0050] In an exemplary embodiment of the present disclosure, the pre-trained model may be a pre-built model structure of a pre-trained version for quality and aesthetic assessment, and the pre-trained model may be used for subsequent quality assessment tasks of visual content. The reconstruction process may be a process of restoring the original image according to the inverse process of image degradation, so that the restored image is as close as possible to the original image (such as the pre-trained image). The reconstructed image may be an image generated by reconstructing the degraded image using the reconstruction process.
[0051] After obtaining the degraded image, a pre-built pre-trained model is obtained. For example, the pre-trained model can be constructed using the Quality and Aesthetics-aware Pretraining Vision2 (QPTV2). The pre-trained model includes an encoder and a decoder. The degraded image is input into the pre-trained model, and the degraded image is first encoded using multiple encoders, and then the decoder is used to reconstruct the obtained encoded features to obtain a reconstructed image.
[0052] In step S140, the pre-trained model is trained according to the reconstructed image to obtain model parameters of the trained pre-trained model.
[0053] In an exemplary embodiment of the present disclosure, the model parameters of the pre-trained model may be relevant parameters of the pre-trained model after model training.
[0054] After obtaining the reconstructed image, a loss function is constructed according to the reconstructed image and the original pre-trained image, so as to train the pre-trained model according to the constructed loss function. The goal of the model training is to make the reconstructed image as close as possible to the original pre-trained image. After the pre-training is completed, the model parameters of the trained pre-trained model are determined so that the model parameters of the obtained pre-trained model can be used in subsequent downstream task processing.
[0055] According to the model training method in this example embodiment, on the one hand, by using high-resolution, high-foreground rate images as pre-training data sets, the model can learn fine-grained quality and aesthetic information in the pre-training stage, improve the accuracy of the model in downstream tasks, and reduce the demand for large amounts of labeled data; on the other hand, by using special image degradation processing to present rich quality and aesthetic factors to the model, the data diversity during pre-training is improved.
[0056] The model training method in this example embodiment will be further described below.
[0057] In an exemplary embodiment of the present disclosure, for step S110, a pre-training image set is obtained, including: obtaining an initial image set, the initial image set including multiple initial images; comparing the resolution of each initial image with a resolution threshold, and comparing the foreground rate of each initial image with a foreground rate threshold to obtain a parameter comparison result; based on the parameter comparison result, selecting images whose resolution is higher than the resolution threshold and whose foreground rate is higher than the foreground rate threshold from the multiple initial images as pre-training images.
[0058] Among them, the initial image set can be an image dataset commonly used in the field of image processing, for example, the initial image set can include the ImageNet image set, the Unsplash full dataset (UF dataset), the Segment Anything 1-Billion mask dataset (SA-1B dataset), and the image datasets of different 2k resolutions (DIVerse2K resolution image, DIV2K) datasets. The initial image can be an image included in the initial image set. The parameter comparison result can be a comparison result obtained by comparing the image parameters of the initial image with the pre-configured parameter thresholds. For example, in this embodiment, the resolution and foreground rate of the initial image are respectively compared with the pre-configured thresholds to screen out the pre-trained images.
[0059] The original Masked Image Modeling (MIM) is usually pre-trained using the ImageNet dataset. In order to solve the problems existing in using the ImageNet image set as pre-training data, such as using low-resolution images that lack complex details, and pre-training only on these lack-of-details data is not enough for the model to fully perceive fine-grained quality and aesthetic information. This disclosure proposes to use high-resolution and high-foreground rate images as pre-training images. Figure 2 , Figure 2 It is an overall architecture diagram of a model constructed by a model training method according to an exemplary embodiment. Specifically, the present disclosure selects a batch of high-resolution and high-foreground rate images from an initial data set, and the initial image set may include an ImageNet image set, a UF data set, a SA-1B data set, and a DIV2K data set, etc., and performs image screening from the above four initial image sets.
[0060] The specific screening process is: compare the resolution of each initial image with the resolution threshold, and compare the foreground rate of each initial image with the foreground rate threshold to obtain the parameter comparison result. If the parameter comparison result shows that the resolution of an initial image is higher than the resolution threshold and the foreground rate is higher than the foreground rate threshold, then the initial image is used as a pre-training image. Through the above screening method, a batch of pre-training images are obtained. Figure 3 , Figure 3 It is a pre-trained image with high foreground coverage features according to an exemplary embodiment. Using high resolution (HR) and high foreground coverage (HFC) images as pre-training images can help the model utilize fine-grained quality and aesthetic information in the pre-training stage, and the model can also learn high-level semantic information.
[0061] In an exemplary embodiment of the present disclosure, for step S120, image degradation processing is performed on the pre-trained image to obtain a degraded image, including: obtaining pre-defined basic degradation operations, the basic degradation operations including one or more of resizing, sharpening, blurring, adding noise, color jittering and color space transformation; performing image degradation processing on the pre-trained image based on the basic degradation operations to obtain a degraded image.
[0062] Among them, the basic degradation operation can be a basic operation for degrading the pre-trained image, and the basic degradation operation cannot be further subdivided. Resizing can be an operation for adjusting the size of the image. Sharpening can be a fast focus blur edge, improving the clarity or focus of a certain part of the image, and making the color of a specific area of the image more vivid. Blurring can be to reduce the noise added to the image during image preprocessing, for example, removing some trivial details in the image before extracting a large target. Adding noise can be used to simulate the interference that the image may encounter during actual acquisition or transmission, which is helpful to evaluate the performance of the image processing algorithm in a noisy environment. Color jittering can be to randomly transform the color of each pixel in the image to make the image present a jittering effect. Color space transformation refers to the process of converting color values in one color space into color values in another color space.
[0063] For degradation processing, the original MIM can achieve excellent results in visual tasks such as classification and detection by using only simple degradation, so previous MIM works pay less attention to the design of degradation. However, simple degradation can only deal with the quality and aesthetic factors presented in common scenes, ignoring the quality and aesthetic factors introduced by complex situations such as compression, transmission and non-professional shooting in the real world. To comprehensively cover the quality and aesthetic factors of the real world, refer to Figure 4 , Figure 4 The figure is a schematic diagram of a degraded image obtained after image degradation processing according to an exemplary embodiment. The present disclosure comprehensively considers six basic degradation operations from three aspects of geometric transformation processing, frequency transformation processing and color transformation processing, including resizing, sharpening, blurring, adding noise, color jittering and color space transformation (CST).
[0064] After determining the above basic degradation operations, the pre-training images can be degraded based on the basic degradation operations to comprehensively cover the quality and aesthetic factors introduced by complex situations such as compression, transmission and non-professional shooting in the real world during the pre-training process.
[0065] In an exemplary embodiment of the present disclosure, image degradation processing is performed on a pre-trained image based on basic degradation operations to obtain a degraded image, including: using a sequential combination method to perform a first combination processing on at least one basic degradation operation to obtain a first degradation combination sequence; based on the first degradation combination sequence, image degradation processing is performed on the pre-trained image to obtain a degraded image.
[0066] The sequential combination mode may be an operation combination mode of sequentially executing multiple basic degenerate operations. The first combination processing may be a combination mode of sequentially executing multiple basic degenerate operations. The first degenerate combination sequence may be an execution sequence of the basic degenerate operations obtained by using the first combination processing mode.
[0067] In addition to using basic degradation operations to degrade the pre-trained images, the present disclosure also proposes a variety of different degradation combinations. Figure 2 In this embodiment, a sequential combination method is used as a combination strategy for degradation operations. For example, one or more basic degradation operations are combined in a sequential combination to obtain a first degradation combination order, and each basic degradation operation is performed in accordance with the first degradation combination order (i.e., in sequence), and image degradation processing is performed on the pre-trained image to obtain a degraded image. When the sequential combination method is used for image degradation processing, blur processing can be performed on the pre-trained image first, and then the CST operation can be performed on the pre-trained image; or the execution order of the two can be reversed to obtain a degraded image. By using basic degradation operations for image degradation processing, the quality and aesthetic factors of the real world can be fully covered in the pre-training stage.
[0068] In an exemplary embodiment of the present disclosure, image degradation processing is performed on a pre-trained image based on basic degradation operations to obtain a degraded image, including: performing a second combination processing on at least one basic degradation operation in a random combination manner to obtain a second degradation combination order, wherein the random combination manner includes one or more of rearranging the degradation operation order, skipping the degradation operation, and performing the degradation operation at a high order; based on the second degradation combination order, performing image degradation processing on the pre-trained image to obtain a degraded image.
[0069] Among them, the random combination method can be a combination method of randomly executing one or more basic degenerate operations. The second combination processing can be a combination method of randomly combining and executing multiple basic degenerate operations. The second degenerate combination order can be the execution order of the basic degenerate operations obtained by the second combination processing method. Rearranging the degenerate operation order can be a processing method of disrupting the execution order of the basic degenerate operations. Jumping to execute degenerate operations can be an operation method of selectively executing a certain part of the basic degenerate operations. High-order execution of degenerate operations can be an operation method of repeatedly executing the degenerate combination method that has been generated.
[0070] In addition to performing each degradation operation in a sequential combination manner, inspired by the progress in the field of super-resolution, this embodiment also proposes a second combination processing of basic degradation operations in a random combination manner. Specifically, the random combination manner may include advanced combination manners including shuffling, skipping, and high-order execution of degradation operations to obtain complex degradation effects.
[0071] Continue to refer Figure 2 ,from Figure 2 It can be seen that rearranging the degradation operation order may mean that the above six basic degradation operations can be performed in any order; skipping the degradation operation may mean that only individual basic degradation operations are performed; and high-order degradation operation may mean that the generated degradation operation combination can be repeatedly performed. For example, the six basic degradation operations in geometric transformation processing, frequency transformation processing, and color transformation processing are randomly combined to obtain a second degradation combination order; and then, according to the second degradation combination order, the image degradation operation is performed on the pre-trained image to obtain a degraded image. In addition, after the image degradation operation is completed, it is defaulted that all degradation operations are followed by random cropping operations. By using a random combination method for image degradation processing, the quality and aesthetic factors introduced by complex situations such as compression, transmission, and non-professional shooting in the real world can be further covered.
[0072] In an exemplary embodiment of the present disclosure, for step S130, a pre-trained model is used to reconstruct the degraded image to obtain a reconstructed image, including: obtaining a pre-constructed hierarchical network structure, the hierarchical network structure includes a multi-level encoder; obtaining multiple encoding stages corresponding to the multi-level encoder, and determining the scale features of the degraded image at each encoding stage; projecting the multiple scale features to obtain dimensionally aligned projection features; integrating the multiple projection features based on a feature fusion layer to obtain fused features; and using a decoder to perform image reconstruction on the fused features to obtain a reconstructed image.
[0073] The hierarchical network structure may be a network structure that uses encoders to extract different image scale features at different encoding stages, for example, the hierarchical network structure includes a plurality of multi-level encoders at different encoding stages. The feature fusion layer may be a network layer for performing feature fusion processing on scale features extracted at multiple different encoding stages. The decoder may be a decoder structure for reconstructing the extracted fusion features to restore the original pre-trained image. The multi-level encoder may be an encoder that extracts features based on different scales at different encoding stages. The encoding stage may be a stage with different feature extraction requirements, for example, each encoding stage is based on a different scale. The scale feature may be a feature obtained by extracting features using different scales. The projection feature may be a feature generated by projecting the scale features at different encoding stages and aligning the feature spaces output by the different encoding stages. The fusion feature may be a feature obtained by fusion processing multiple projection features.
[0074] As for the model structure, in order to perceive quality and aesthetic information at different scales, the present invention uses a hierarchical encoder architecture and introduces a network structure of multi-scale feature fusion. Figure 2 , the pre-trained model can include a mask layer, a hierarchical network structure, a feature fusion layer, and a decoder. The hierarchical network structure can better learn multi-scale features by utilizing image-related inductive biases. For example, the hierarchical network structure can use a hierarchical vision transformer (HiViT) as an encoder, and the hierarchical network structure includes a multi-level encoder.
[0075] refer to Figure 2 First, multiple encoding stages corresponding to the multi-level encoder are obtained. For example, in this embodiment, the multi-level encoder can provide three different encoding stages. In order to perceive quality and aesthetic information at different scales, different scale features are used for feature extraction at different encoding stages, and the scale features obtained by the multi-level encoder after feature extraction of the degraded image at each encoding stage are determined.
[0076] In an exemplary embodiment of the present disclosure, the scale characteristics of the degraded image at each encoding stage are determined, including: using a mask layer to perform image masking on the degraded image to obtain a degraded mask image; determining the encoding scale corresponding to the degraded mask image at each encoding stage; based on a multi-level encoder, determining the scale characteristics of different encoding scales corresponding to the degraded mask image at each encoding stage.
[0077] The mask layer may be a network layer that performs mask processing on an image. The image mask processing may be a process of masking a pixel region of a specified proportion in a degraded image. The degraded mask image may be an image obtained after performing image mask processing on the degraded image. The encoding scale may be the scale size based on which encoders at different encoding stages perform encoding processing.
[0078] After the degraded image is generated, the degraded image is input into a pre-built pre-trained model, and the mask layer of the pre-trained model is used to perform image masking on the degraded image to obtain a degraded mask image; for example, the image masking may be to cover or mask 80% of the pixel area in the degraded image to obtain a degraded mask image. Next, the degraded mask image is input into a weight inflation layer for weight adjustment, and the weight-adjusted image is input into a multi-level encoder, which provides multiple different encoding stages. In order to perceive quality and aesthetic information at different scales, each encoding stage has a different encoding scale. For example, the encoding scales of the three encoding stages can be set to 224, 112, and 56, etc.
[0079] Using multi-level encoder F e The degraded mask image is encoded by the encoders at different encoding stages to obtain the scale features of the degraded mask image at different encoding scales corresponding to each encoding stage. The scale features of multiple encoding scales output during the pre-training process are X = {x i} 1≤i≤N , where N represents the number of stages. The pre-trained model adopts a mask modeling framework and introduces multi-scale features, which can effectively capture fine-grained and coarse-grained quality and aesthetics-related factors.
[0080] After obtaining the scale features of multiple different encoding stages, the present disclosure designs a feature fusion layer based on this, which is used to fuse the scale features of different scales output by different encoding stages. The feature fusion process is as follows: First, the scale features x of different encoding stages are i Projection processing is performed, and the scale features x at different encoding stages are i After the projection layer P i (·) Align the feature spaces output from different stages to obtain the projected feature X = {P i (x i )} 1≤i≤N ; Then, the projection features X of all stages are integrated through the feature fusion layer F(·) to obtain the integrated features Y = F(X).
[0081] After obtaining the integrated feature Y, the integrated feature Y will be input into the decoder F dPixel reconstruction is performed to obtain a reconstructed image, and a loss function is constructed based on the reconstructed image and the original pre-trained image to train the pre-trained model. Furthermore, the feature fusion layer is only introduced in the pre-training stage and does not affect fine-tuning. After the pre-training process is completed, the trained pre-trained model does not include the feature fusion layer structure. After obtaining the reconstructed image, a loss function is constructed between the reconstructed image and the pre-trained image so that the training goal of the model is to make the reconstructed image as close to the pre-trained image as possible, and the pre-trained model is obtained. The pre-trained model uses a hierarchical encoder architecture and introduces multi-scale feature fusion. It can use image-related inductive biases to better learn multi-scale features, so that the model can focus on the overall and local quality and aesthetic information of the image or video, thereby aligning the human visual system. The model obtained after model pre-training can achieve good performance in downstream quality and aesthetic evaluation tasks with simple fine-tuning.
[0082] Specifically, the model training method proposed in the present disclosure is compared with the related no-reference image quality assessment method (NoReference Image Quality Assessment, NR-IQA), no-reference video quality assessment method (NoReference Video Quality Assessment, NR-VQA) and image aesthetics assessment method, and the results are shown in Table 1, Table 2 and Table 3, respectively.
[0083] For no-reference image quality assessment, QPT V2 achieves state-of-the-art or near-state-of-the-art results on six datasets. On the LIVE dataset, the best Pearson's Linear Correlation Coefficient (PLCC) is improved from 0.968 to 0.973, and the Spearman's Rank Correlation Coefficient (SRCC) is improved from 0.969 to 0.972; on the TID2013 dataset, the best PLCC is improved from 0.883 to 0.885, and the SRCC is improved from 0.863 to 0.874; on the FLIVE dataset, the best SRCC is improved from 0.610 to 0.649; and on the CLIVE dataset, the best SRCC is improved from 0.895 to 0.897.
[0084] For no-reference video quality assessment, QPT V2 achieved SOTA or near-SOTA results on four datasets. On the LSVQ_test dataset, the best PLCC was improved from 0.882 to 0.889, and the SRCC was improved from 0.883 to 0.886; on the LIVE-VQC dataset, the best PLCC was improved from 0.844 to 0.853, and the SRCC was improved from 0.823 to 0.827; on the KoNViD-1k dataset, the best SRCC was improved from 0.865 to 0.866. For image aesthetics evaluation, QPTV2 achieved SOTA results on the AVA dataset, improving the best PLCC from 0.780 to 0.875, and the SRCC from 0.766 to 0.865. It is worth noting that QPT V2 can achieve results on par with previous SOTA methods using only 60% of the image aesthetics data.
[0085] The results in Table 4 demonstrate the superiority of QPT V2 over other pre-training methods in downstream tasks. The results in Table 5 demonstrate the effectiveness of the pre-training data proposed in this disclosure, Tables 6 and 7 demonstrate the effectiveness of the degradation design proposed in this disclosure, and Tables 8 and 9 demonstrate the effectiveness of the multi-scale feature fusion proposed in this disclosure.
[0086] Table 1: Performance of QPT V2 on six IQA datasets: LIVE, TID2013, KADID, FLIVE, CLIVE, and KonIQ10K
[0087]
[0088]
[0089] Table 2: Performance of QPT V2 on four VQA datasets: LSVQ_test, LSVQ_1080p, LIVE-VQC, and KoNViD-1k
[0090]
[0091]
[0092] Table 3: Performance of QPT V2 on the IAA dataset AVA_test
[0093]
[0094]
[0095] Table 4: Comparison of QPT V2 with three other pre-training methods and methods without pre-training
[0096]
[0097] Table 5: Ablation experiment of QPT V2 pre-training data. Pre-training on images with high resolution or high foreground rate alone cannot achieve the best results, which proves the effectiveness of the pre-training data proposed in this paper.
[0098]
[0099] Table 6: Ablation experiments of QPT V2 degradation types, which prove the effectiveness of the degradation space designed in this disclosure and confirm that color space transformation can help the model extract quality and aesthetic factors in the pre-training stage.
[0100]
[0101]
[0102] Table 7: Ablation experiments on QPT V2 degradation combinations, demonstrating that neither linear combinations nor complex combinations of multiple degradations can further promote the model to extract quality and aesthetic factors in the pre-training stage
[0103]
[0104] Table 8: Ablation experiment of multi-scale feature fusion position of QPT V2 model, which proves that fusing deep and shallow features helps the model focus on high-level semantic information and low-level information
[0105]
[0106] Table 9: Ablation experiment of multi-scale feature fusion strategy of QPT V2 model, where the first two columns are the implementation methods of projection layer, and the last two layers are the implementation methods of fusion layer. The experiment proves that simple linear fusion layer and learnable weighted average are the best feature fusion strategies.
[0107]
[0108] In summary, the model training method disclosed in the present invention obtains a pre-training image set, the pre-training image set includes multiple pre-training images, and the pre-training images are images with a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold; performs image degradation processing on the pre-training images to obtain degraded images, and the image degradation processing includes one or more of geometric transformation processing, frequency transformation processing, and color transformation processing; obtains a pre-constructed pre-training model, and the pre-training model reconstructs the degraded image to obtain a reconstructed image; trains the pre-training model according to the reconstructed image to obtain the model parameters of the trained pre-training model. On the one hand, by using high-resolution and high-foreground rate images as pre-training data sets, the model can be helped to learn fine-grained quality and aesthetic information in the pre-training stage, improve the accuracy of the model in downstream tasks, and reduce the need for a large amount of labeled data; on the other hand, by adopting special image degradation processing to present rich quality and aesthetic factors to the model, the data diversity during pre-training is improved. On the other hand, by imitating the human visual system and introducing multi-scale feature fusion in the model structure, fine-grained and coarse-grained quality and aesthetic related factors can be effectively captured.
[0109] also, Figure 5 is a flow chart of a quality assessment method according to an exemplary embodiment. Figure 5 As shown, the quality assessment method can be used in a computer device. This exemplary embodiment uses the method applied to a computer device as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a computer device and a server, and is implemented through the interaction between the computer device and the server. Specifically, the following steps are included.
[0110] In step S510, the visual content to be evaluated is obtained, and the model structure and model parameters of the pre-trained model obtained through pre-training processing are obtained, where the pre-trained model is trained based on the model training method.
[0111] In an exemplary embodiment of the present disclosure, the visual content to be evaluated may be visual content to be evaluated for quality and aesthetics, for example, the visual content to be evaluated may include videos and images. The model structure of the pre-trained model may be a model structure for subsequent quality and aesthetics evaluation tasks, and the model structure of the pre-trained model after the pre-training process does not include a feature fusion layer.
[0112] In the task of quality and aesthetic evaluation of visual content, the visual content to be evaluated is obtained, for example, the visual content to be evaluated may include videos and images, etc., and the quality and aesthetic evaluation of the visual content to be evaluated is performed using a pre-trained model obtained through pre-training. Before the pre-training process, a model structure of the pre-training model is constructed, and after the pre-training process, model parameters of the pre-training model are determined.
[0113] In step S520, the visual content to be evaluated is input into the pre-trained model, and quality evaluation processing is performed on the visual content to be evaluated based on the model structure and model parameters to obtain a quality evaluation score.
[0114] In an exemplary embodiment of the present disclosure, the quality assessment process may be a process of performing quality and aesthetic assessment on the visual content to be assessed. The quality assessment score may be a score result obtained after performing quality and aesthetic assessment on the visual content to be assessed.
[0115] The acquired visual content to be evaluated is input into the pre-trained model, and the model structure and model parameters after pre-training can be directly used to perform quality evaluation on the visual content to be evaluated to obtain a quality evaluation score, i.e., a visual scoring (VS). Furthermore, in order to achieve a better quality evaluation effect, when performing a quality evaluation task, the model parameters can be adjusted according to specific task requirements, so that the adjusted model parameters are more in line with the task requirements to perform the quality evaluation task. The present disclosure does not make any special limitation on the method of adjusting the model parameters according to the task requirements.
[0116] According to the quality assessment method in this example embodiment, on the one hand, by extracting features related to quality and aesthetics through pre-training, the accuracy of the model in tasks such as image quality assessment, video quality assessment, and image aesthetics assessment can be improved. On the other hand, good performance was achieved on the test data sets of image quality assessment, video quality assessment, and image aesthetics assessment, and it was superior to other pre-training methods.
[0117] also, Figure 6 is a block diagram of a model training device according to an exemplary embodiment. Figure 6 The model training device 600 includes: an image set acquisition module 610, an image degradation module 620, an image reconstruction module 630 and a model training module 640.
[0118] Specifically, the image set acquisition module 610 is used to acquire a pre-trained image set, which includes multiple pre-trained images, and the pre-trained images are images with a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold; the image degradation module 620 is used to perform image degradation processing on the pre-trained images to obtain degraded images, and the image degradation processing includes one or more of geometric transformation processing, frequency transformation processing and color transformation processing; the image reconstruction module 630 is used to acquire a pre-built pre-trained model, and the pre-trained model reconstructs the degraded image to obtain a reconstructed image; the model training module 640 is used to train the pre-trained model according to the reconstructed image to obtain the model parameters of the trained pre-trained model.
[0119] In an exemplary embodiment of the present disclosure, the image set acquisition module 610 includes an image set acquisition unit: acquiring an initial image set, the initial image set including multiple initial images; comparing the resolution of each initial image with a resolution threshold, and comparing the foreground rate of each initial image with a foreground rate threshold to obtain a parameter comparison result; based on the parameter comparison result, selecting images whose resolution is higher than the resolution threshold and whose foreground rate is higher than the foreground rate threshold from the multiple initial images as pre-training images.
[0120] In an exemplary embodiment of the present disclosure, the image degradation module 620 includes an image degradation unit, which is used to: obtain predefined basic degradation operations, where the basic degradation operations include one or more of resizing, sharpening, blurring, adding noise, color jittering, and color space transformation; perform image degradation processing on the pre-trained image based on the basic degradation operations to obtain a degraded image.
[0121] In an exemplary embodiment of the present disclosure, the image degradation unit includes a first degradation processing subunit, which is used to: perform a first combination processing on at least one basic degradation operation in a sequential combination manner to obtain a first degradation combination sequence; and perform image degradation processing on a pre-trained image based on the first degradation combination sequence to obtain a degraded image.
[0122] In an exemplary embodiment of the present disclosure, the image degradation unit includes a second degradation processing subunit, which is used to: perform a second combination processing on at least one basic degradation operation in a random combination manner to obtain a second degradation combination order, where the random combination manner includes one or more of rearranging the degradation operation order, skipping the degradation operation, and performing the degradation operation at a high order; and perform image degradation processing on a pre-trained image based on the second degradation combination order to obtain a degraded image.
[0123] In an exemplary embodiment of the present disclosure, the pre-trained model includes a hierarchical network structure, a feature fusion layer and a decoder, and the image reconstruction module 630 includes an image reconstruction unit, which is used to: obtain a pre-constructed hierarchical network structure, the hierarchical network structure includes a multi-level encoder; obtain multiple encoding stages corresponding to the multi-level encoder, and determine the scale features of the degraded image at each encoding stage; perform projection processing on multiple scale features to obtain dimensionally aligned projection features; integrate multiple projection features based on the feature fusion layer to obtain fused features; use a decoder to perform image reconstruction processing on the fused features to obtain a reconstructed image.
[0124] In an exemplary embodiment of the present disclosure, the pre-trained model includes a mask layer, and the image reconstruction unit includes a scale feature determination subunit, which is used to: use the mask layer to perform image masking on the degraded image to obtain a degraded mask image; determine the coding scale corresponding to the degraded mask image at each coding stage; based on a multi-level encoder, determine the scale features of different coding scales corresponding to the degraded mask image at each coding stage.
[0125] Next, Figure 7 is a block diagram of a quality assessment device according to an exemplary embodiment. Figure 7 The quality assessment device 700 includes: a model acquisition module 710 and a quality assessment module 720.
[0126] Specifically, the model acquisition module 710 is used to obtain the visual content to be evaluated, and obtain the model structure and model parameters of the pre-trained model obtained through pre-training processing, where the pre-trained model is trained based on the model training method; the quality assessment module 720 is used to input the visual content to be evaluated into the pre-trained model, and based on the model structure and model parameters, perform quality assessment processing on the visual content to be evaluated to obtain a quality assessment score.
[0127] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0128] Reference below Figure 8 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0129] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0130] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0131] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .
[0132] The storage unit 820 may include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0133] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0134] The electronic device 800 may also communicate with one or more external devices 870 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0135] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of the device to complete the above model training method and quality assessment method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0136] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, any one of the model training methods and quality assessment methods described above is implemented.
[0137] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0138] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A model training method, characterized in that: include: Acquire a pre-training image set, wherein the pre-training image set includes a plurality of pre-training images, wherein the pre-training images are images with a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold; Performing image degradation processing on the pre-trained image to obtain a degraded image, wherein the image degradation processing includes one or more of geometric transformation processing, frequency transformation processing, and color transformation processing; Acquire a pre-built pre-trained model, and use the pre-trained model to reconstruct the degraded image to obtain a reconstructed image; The pre-trained model is trained according to the reconstructed image to obtain model parameters of the trained pre-trained model.
2. The method according to claim 1, characterized in that The obtaining of the pre-training image set comprises: Acquire an initial image set, wherein the initial image set includes a plurality of initial images; Comparing the resolution of each of the initial images with the resolution threshold, and comparing the foreground rate of each of the initial images with the foreground rate threshold, to obtain a parameter comparison result; According to the parameter comparison result, images having a resolution higher than a resolution threshold and a foreground rate higher than a foreground rate threshold are selected from the multiple initial images as the pre-training images.
3. The method according to claim 1, characterized in that The performing image degradation processing on the pre-trained image to obtain a degraded image includes: Obtaining a predefined basic degradation operation, wherein the basic degradation operation includes one or more of resizing, sharpening, blurring, adding noise, color dithering, and color space conversion; The pre-trained image is subjected to image degradation processing based on the basic degradation operation to obtain the degraded image.
4. The method according to claim 3, characterized in that The performing image degradation processing on the pre-trained image based on the basic degradation operation to obtain the degraded image includes: Using a sequential combination method, performing a first combination process on at least one of the basic degenerate operations to obtain a first degenerate combination sequence; Based on the first degradation combination sequence, image degradation processing is performed on the pre-trained image to obtain the degraded image.
5. The method according to claim 3, characterized in that: The performing image degradation processing on the pre-trained image based on the basic degradation operation to obtain the degraded image includes: Performing a second combination process on at least one of the basic degenerate operations in a random combination manner to obtain a second degenerate combination order, wherein the random combination manner includes one or more of rearranging the order of the degenerate operations, skipping the execution of the degenerate operations, and executing the degenerate operations at a higher order; Based on the second degradation combination sequence, image degradation processing is performed on the pre-trained image to obtain the degraded image.
6. The method according to claim 1, characterized in that The pre-trained model includes a hierarchical network structure, a feature fusion layer and a decoder, and the pre-trained model is used to reconstruct the degraded image to obtain a reconstructed image, including: Acquire a pre-built hierarchical network structure, wherein the hierarchical network structure includes a multi-level encoder; Acquire multiple encoding stages corresponding to the multi-level encoder, and determine the scale feature of the degraded image at each encoding stage; Performing projection processing on the multiple scale features to obtain dimensionally aligned projection features; Based on the feature fusion layer, a plurality of the projection features are integrated to obtain a fusion feature; The decoder is used to perform image reconstruction processing on the fused features to obtain the reconstructed image.
7. The method according to claim 6, characterized in that The pre-trained model includes a mask layer, and the determining of the scale feature of the degraded image at each encoding stage includes: Using the mask layer to perform image masking on the degraded image to obtain a degraded mask image; Determining the encoding scale corresponding to the degradation mask image in each encoding stage; Based on the multi-level encoder, scale features of different encoding scales corresponding to the degradation mask image at each encoding stage are determined.
8. A quality assessment method, characterized in that: include: Acquire visual content to be evaluated, and acquire a model structure and model parameters of a pre-trained model obtained through pre-training, wherein the pre-trained model is trained based on the model training method according to any one of claims 1 to 7; The visual content to be evaluated is input into the pre-trained model, and quality evaluation processing is performed on the visual content to be evaluated based on the model structure and the model parameters to obtain a quality evaluation score.
9. A model training device, characterized in that: include: An image set acquisition module, used to acquire a pre-trained image set, wherein the pre-trained image set includes a plurality of pre-trained images, wherein the pre-trained images are images whose resolution is higher than a resolution threshold and whose foreground rate is higher than a foreground rate threshold; An image degradation module, used for performing image degradation processing on the pre-trained image to obtain a degraded image, wherein the image degradation processing includes one or more of geometric transformation processing, frequency transformation processing and color transformation processing; An image reconstruction module, used to obtain a pre-built pre-trained model, and to reconstruct the degraded image using the pre-trained model to obtain a reconstructed image; The model training module is used to train the pre-trained model according to the reconstructed image to obtain model parameters of the pre-trained model after training.
10. A quality assessment device, characterized in that: include: A model acquisition module, used to acquire visual content to be evaluated, and to acquire a model structure and model parameters of a pre-trained model obtained through pre-training, wherein the pre-trained model is trained based on the model training method according to any one of claims 1 to 7; The quality assessment module is used to input the visual content to be assessed into the pre-trained model, and based on the model structure and the model parameters, perform quality assessment processing on the visual content to be assessed to obtain a quality assessment score.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the model training method as described in any one of claims 1 to 7, or to implement the quality assessment method as described in claim 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the model training method as described in any one of claims 1 to 7, or implements the quality assessment method as described in claim 8.
Citation Information
Cited By
Degradation area perception image restoration model training method and image restoration method
CN120182118A
Training method of degraded region-aware image restoration model and image restoration method
CN120182118B
