Definition identification method and apparatus, model training method and apparatus, and device, medium and product

The feature extraction network of the sharpness recognition model is pre-trained through an unsupervised pre-training method, which solves the problem of high manual annotation costs and improves the accuracy of sharpness recognition and training efficiency.

WO2024221818A1PCT designated stage expired Publication Date: 2024-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2023/129311
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-24
Filing Date
2023-11-02
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In the existing technology, sharpness recognition model training is performed using manually annotated content data sets, which results in high time and labor costs, limits the size of the data set, and thereby reduces the accuracy of sharpness recognition.

Method used

Using an unsupervised pre-training method, a huge pre-training content set is used to pre-train the feature extraction network of the clarity recognition model, combined with the prediction network to perform clarity recognition on the sample content, and the model parameters are updated based on the training loss.

Benefits of technology

It improves the training effect and recognition accuracy of the clarity recognition model, reduces the dependence on manual annotation, and improves training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023129311_31102024_PF_FP_ABST
    Figure CN2023129311_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A method for training a definition identification model, which method is executed by a computer device, wherein the definition identification model comprises a feature extraction network and a prediction network. The method comprises: acquiring a pre-training content set, sample content and a definition level label corresponding to the sample content (302); on the basis of content in the pre-training content set, performing unsupervised pre-training on a feature extraction network, so as to obtain a pre-trained feature extraction network (304); performing definition identification on the sample content by using the pre-trained feature extraction network and a prediction network, so as to obtain a predicted definition level (306); calculating a training loss on the basis of the predicted definition level and the definition level label (308); and according to the training loss, updating at least some model parameters of at least one of the pre-trained feature extraction network and the prediction network (310).
Need to check novelty before this filing date? Find Prior Art

Description

Clarity recognition and model training methods, devices, equipment, media and products

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023104723155, filed on April 24, 2023, entitled “Training method, device, equipment, medium and product for clarity recognition model,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device, medium, and product for training a clarity recognition model. Background Art

[0004] In information flow scenarios, content clarity is crucial. Generally speaking, the clearer the content displayed by an app, the more likely it is to attract users to click on it, increasing app usage time.

[0005] In related technologies, a clarity recognition model is trained using manually annotated content datasets. After the training is completed, the content is input into the clarity recognition model for identification to obtain the clarity of the content.

[0006] In the above technology, training is performed using manually annotated content datasets. However, since the time and labor costs of manual annotation are very high, the size of the manually annotated dataset is limited, resulting in low accuracy in content clarity recognition.

[0007] Summary of the Invention

[0008] The present application provides a method, apparatus, device, medium and product for training a clarity recognition model.

[0009] According to one aspect of the present application, a method for training a clarity recognition model is provided, which is executed by a computer device. The clarity recognition model includes a feature extraction network and a prediction network. The method includes:

[0010] Obtaining a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content;

[0011] Performing unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network;

[0012] Using the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level;

[0013] Calculating a training loss based on the predicted clarity level and the clarity level label; and

[0014] At least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network are updated based on the training loss.

[0015] According to one aspect of the present application, a method for identifying clarity is provided, which is executed by a computer device. The method includes:

[0016] Obtaining content to be identified for clarity;

[0017] Inputting the content into a pre-trained feature extraction network in a clarity recognition model for feature extraction to obtain content features, wherein the pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-trained content set; and

[0018] The clarity level of the content is obtained by performing clarity recognition on the content features based on the prediction network in the clarity recognition model.

[0019] According to one aspect of the present application, a device for training a clarity recognition model is provided, the device comprising:

[0020] An acquisition module, configured to acquire a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content;

[0021] A pre-training module, configured to perform unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network;

[0022] an identification module, configured to perform clarity identification on the sample content using the pre-trained feature extraction network and the prediction network to obtain a predicted clarity level;

[0023] a calculation module, configured to calculate a training loss based on the predicted clarity level and the clarity level label; and

[0024] An updating module is configured to update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss.

[0025] According to one aspect of the present application, a clarity recognition device is provided, comprising:

[0026] An acquisition module, used to acquire content to be identified for clarity;

[0027] a feature extraction module, configured to input the content into a pre-trained feature extraction network in a clarity recognition model for feature extraction to obtain content features, wherein the pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-trained content set;

[0028] The recognition module is used to perform clarity recognition on the content features based on the prediction network in the clarity recognition model to obtain the clarity level corresponding to the content.

[0029] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores at least one computer-readable instruction, and the at least one computer-readable instruction is loaded and executed by the processor to implement the training method of the clarity recognition model as described above, or the clarity recognition method as described above.

[0030] According to another aspect of the present application, a computer storage medium is provided, in which at least one computer-readable instruction is stored. The at least one computer-readable instruction is loaded and executed by a processor to implement the training method of the clarity recognition model as described above, or the clarity recognition method as described above.

[0031] According to another aspect of the present application, a computer program product is provided, which includes computer-readable instructions stored in a computer-readable storage medium; the computer-readable instructions are read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the training method of the clarity recognition model described in the above aspect, or the clarity recognition method described in the above aspect.

[0032] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0034] FIG1 is a schematic diagram of a method for training a clarity recognition model provided by an exemplary embodiment of the present application;

[0035] FIG2 is a schematic diagram of the architecture of a computer system provided by an exemplary embodiment of the present application;

[0036] FIG3 is a flowchart of a method for training a clarity recognition model provided by an exemplary embodiment of the present application;

[0037] FIG4 is a flowchart of a method for training a clarity recognition model provided by an exemplary embodiment of the present application;

[0038] FIG5 is a schematic diagram showing a comparison between a normal resolution and a unified resolution provided by an exemplary embodiment of the present application;

[0039] FIG6 is a schematic diagram of distortion types in real distorted content provided by an exemplary embodiment of the present application;

[0040] FIG7 is a schematic diagram of the degree of distortion of content provided by an exemplary embodiment of the present application;

[0041] FIG8 is a schematic diagram of obtaining enhanced real distorted content provided by an exemplary embodiment of the present application;

[0042] FIG9 is a schematic diagram of obtaining enhanced generative distortion content provided by an exemplary embodiment of the present application;

[0043] FIG10 is a schematic diagram of unsupervised pre-training provided by an exemplary embodiment of the present application;

[0044] FIG11 is a framework diagram of a training system for generating a clarity recognition model and training a clarity recognition model provided by an exemplary embodiment of the present application;

[0045] FIG12 is a flow chart of a clarity recognition method provided by an exemplary embodiment of the present application;

[0046] FIG13 is a flow chart of a clarity recognition method provided by an exemplary embodiment of the present application;

[0047] FIG14 is a flow chart of a clarity recognition method provided by an exemplary embodiment of the present application;

[0048] FIG15 is a block diagram of a training device for a clarity recognition model provided by an exemplary embodiment of the present application;

[0049] FIG16 is a schematic structural diagram of a clarity recognition device provided by an exemplary embodiment of the present application;

[0050] FIG17 is a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0052] First, several terms involved in the embodiments of this application are briefly introduced:

[0053] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0054] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0055] Computer vision (CV) is the science of making machines "see." Specifically, it refers to using cameras and computers to replace the human eye in identifying and measuring objects, and then further processing the images to create images more suitable for human observation or transmission to instrumentation. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems that can extract information from images or multidimensional data. Computer vision technologies generally include image processing, image recognition, image semantic understanding, image retrieval, video processing, video semantic understanding, video / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and common biometric recognition technologies.

[0056] The embodiment of the present application provides a method for training a clarity recognition model. As shown in FIG1 , the method can be executed by a computer device, which can be a terminal or a server.

[0057] Exemplarily, the computer device obtains a pre-trained content set, sample content 113, and a clarity level annotation 122 corresponding to the sample content 113; the computer device performs unsupervised pre-training on the feature extraction network based on the content in the pre-trained content set to obtain a pre-trained feature extraction network; the computer device uses the pre-trained feature extraction network and the prediction network 120 to perform clarity recognition on the sample content 113 to obtain a predicted clarity level 121; the computer device calculates the training loss based on the predicted clarity level 121 and the clarity level annotation 122; the computer device updates at least a portion of the model parameters of at least one of the pre-trained feature extraction network or the prediction network 120 according to the training loss.

[0058] A pre-training content set is a data set containing content used for unsupervised pre-training. The content can be graphical content, such as videos or images, and can be referred to as multimedia content.

[0059] Unsupervised pre-training means that the training samples do not contain labels of labeled samples, that is, there are only input variables during the training process, and no labeled output variables.

[0060] Optionally, the pre-trained content set includes real distorted content 101, generated distorted content 103, and reference content. Real distorted content 101 refers to content that inherently carries a type of distortion. For example, the type of distortion in real distorted content 101 is distortion caused by compression or loss during the content acquisition or storage process. The distortion in real distorted content 101 can be the distortion generated by the content in real application scenarios.

[0061] The real distorted content 101 includes at least one of a real distorted picture or a real distorted video.

[0062] Generatively distorted content 103 refers to content obtained by distorting it. Generative distortion can be content obtained by distorting the content during the training phase. Distortion processing refers to image processing of the content such that the processed image appears distorted compared to the original image, such as by adding noise, compressing, or blurring.

[0063] For example, generative distorted content can be obtained after edge jaggedness is generated during the content compression process; generative distorted content can be obtained after white Gaussian noise is added to the content to cause white noise points; generative distorted content can be obtained after Gaussian blurring the content to cause pixel adhesion, but is not limited to this. The embodiments of the present application do not specifically limit words.

[0064] Reference content refers to pre-trained content that is not part of the real distorted content 101 and the generated distorted content 103. The reference content may be content that has not been processed to cause distortion, and may be a native image or video.

[0065] The clarity level label 122 refers to the clarity level labeled for the sample content 113 .

[0066] For example, the clarity level includes 10 levels, and as the level is higher, the clarity of the content is higher.

[0067] As shown in Figure 1 (a), the computer device processes the real distorted content 101 and the generative distorted content 103 in the pre-trained content set to obtain enhanced real distorted content 102 corresponding to the real distorted content 101 and enhanced generative distorted content 104 corresponding to the generative distorted content 103.

[0068] The enhanced real distorted content 102 refers to content obtained by performing data processing on the real distorted content 101. Compared with the real distorted content 101, at least one of the distortion type and the distortion degree of the content obtained after data processing is changed, while the content type does not change.

[0069] The enhanced generative distorted content 104 refers to content obtained by performing data processing on the generative distorted content 103. Compared with the generative distorted content 104, the content obtained after data processing has a changed content type, while the distortion type and distortion degree remain unchanged.

[0070] Optionally, each content has a unique content type.

[0071] Optionally, the distortion type includes Gaussian blur, lens blur, motion blur, color diffusion, color shift, color quantization, color saturation (different color saturations can be distinguished by color saturation 1, color saturation 2, etc.), image format JPEG (Joint Photographic Experts Group), image format 2000 (Joint Photographic Experts Group 2000, JPEG2000), white noise, white noise in color component, impulse noise, multiplicative noise, denoise, brighten, darken, mean shift, jitter, non-eccentricity patch, pixelate, quantization, color block, high sharpen, contrast change change), but is not limited thereto, and is not specifically limited in the embodiments of the present application.

[0072] Exemplarily, the computer device performs feature extraction on the real distorted content 101 and the generative distorted content 103 based on the first sub-feature extraction network 105 to obtain real distorted content features 107 corresponding to the real distorted content 101 and generative distorted features 108 corresponding to the generative distorted content 103; the computer device performs feature extraction on the enhanced real distorted content 102 and the enhanced generative distorted content 104 based on the second sub-feature extraction network 106 to obtain enhanced real distorted content features 109 corresponding to the enhanced real distorted content 102 and enhanced generative distorted features 110 corresponding to the enhanced generative distorted content 104.

[0073] The computer device extracts features from the reference content based on the first sub-feature extraction network 105 or the second sub-feature extraction network 106 to obtain reference features.

[0074] Exemplarily, after extracting features from each content, the computer device calculates a first loss function value 111 based on a first similarity between the real distorted content features 107 and the enhanced real distorted content features 109, and a second similarity between the real distorted content features 107 and the reference features. The computer device calculates a second loss function value 112 based on a third similarity between the generative distorted features 108 and the enhanced generative distorted features 110, and a fourth similarity between the generative distorted features 108 and the reference features. The computer device may obtain the third similarity between the generative distorted features and the enhanced generative distorted features; obtain a fourth similarity between the real distorted content features and the reference features; and calculate a second loss function value based on the third and fourth similarities.

[0075] The computer device adds the first loss function value 111 and the second loss function value 112, and based on the sum of the first loss function value 111 and the second loss function value 112, updates the network parameters of at least a part of the feature extraction network to obtain a pre-trained feature extraction network.

[0076] A pre-trained feature extraction network refers to a feature extraction network after pre-training of the feature extraction network is completed.

[0077] As shown in FIG1( b ), after obtaining the pre-trained feature extraction network, the computer device further trains the clarity recognition model.

[0078] The computer device inputs sample content 113 into first and second pre-trained sub-feature extraction networks 114 and 115 of the pre-trained feature extraction network, respectively, for feature extraction, thereby obtaining first sample content features 116, second sample content features 117, and third sample content features 118. The computer device then classifies the clarity level of third sample content features 118 based on prediction network 120, thereby obtaining a predicted clarity level 121.

[0079] The first pre-trained sub-feature extraction network 114 is obtained by unsupervised pre-training of the first sub-feature extraction network 105 .

[0080] The second pre-trained sub-feature extraction network 115 is obtained by unsupervised pre-training of the second sub-feature extraction network 106 .

[0081] The first sample content feature 116 is a feature vector output by the first pre-trained sub-feature extraction network 114 and subjected to coefficient adjustment.

[0082] The second sample content feature 117 is a feature vector output by the second pre-trained sub-feature extraction network 115 and subjected to coefficient adjustment.

[0083] The third sample content feature 118 is a feature vector output by the second pre-trained sub-feature extraction network 115 without coefficient adjustment.

[0084] Coefficient adjustment refers to dividing the content features by an adjustable hyperparameter. The hyperparameter selected in the embodiment of the present application is 4. Coefficient adjustment is used to adjust the loss function calculated between the content features to a stable trend.

[0085] The computer device obtains a first training loss 119 based on a relative entropy (also known as KL divergence) function value between the first sample content feature 116 and the second sample content feature 117 .

[0086] The computer device classifies the clarity level of the third sample content feature 118 based on the Sigmoid logistic regression function in the prediction network 120, and obtains a probability value for the third sample content feature 118 at each clarity level. The clarity level corresponding to the maximum probability value is selected as the predicted clarity level 121. The computer device obtains a second training loss 123 based on the cross-entropy function value between the predicted clarity level 121 and the clarity level label 122. The computer device updates the model parameters of at least one of the pre-trained feature extraction network or the prediction network 120 based on the first training loss 119 and the second training loss 123.

[0087] In summary, the method provided in this embodiment obtains a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content; performs unsupervised pre-training on the feature extraction network based on the content in the pre-trained content set to obtain a pre-trained feature extraction network; uses the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level; calculates the training loss based on the predicted clarity level and the clarity level annotations; and updates at least a portion of the model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss. The training method for the clarity recognition model provided in this application performs unsupervised pre-training on the feature extraction network in the clarity recognition model using a pre-trained content set with a huge amount of data. After obtaining the pre-trained feature extraction network, the clarity recognition model is further trained using sample content. Based on this, the training effect of the clarity recognition model can be improved, so that the clarity recognition model can have higher recognition accuracy when performing clarity recognition on content.

[0088] 2 shows a schematic diagram of the architecture of a computer system provided by an embodiment of the present application. The computer system may include: a terminal 100 and a server 200.

[0089] The terminal 100 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a personal computer (PC), an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, an unmanned vending terminal, etc. The terminal 100 may be installed with a client that runs a target application. The target application may be an application that references clarity recognition or other application that provides clarity recognition function, and this application does not limit this. In addition, this application does not limit the form of the target application, including but not limited to an application (Application, App) installed in the terminal 100, a mini-program, etc., and may also be in the form of a web page.

[0090] Server 200 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud computing services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Server 200 can be the backend server of the target application described above, used to provide backend services to the client of the target application.

[0091] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool that can be used on demand with flexibility and convenience. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as video websites, image websites, and more portals, require significant computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identification mark and will need to be transmitted to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require a strong system backend, which can only be achieved through cloud computing.

[0092] In some embodiments, the aforementioned servers can also be implemented as nodes in a blockchain system. Blockchain is a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of network transactions, used to verify the validity of the information (to prevent counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product and service layer, and an application service layer.

[0093] The terminal 100 and the server 200 may communicate with each other via a network, such as a wired or wireless network.

[0094] In the clarity recognition model training method and clarity recognition method provided in the embodiments of the present application, the execution subject of each step can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. Taking the solution implementation environment shown in Figure 2 as an example, the clarity recognition model training method and clarity recognition method can be executed by the terminal 100 (such as the client of the target application installed and running in the terminal 100 executes the clarity recognition model training method and clarity recognition method), or the clarity recognition model training method and clarity recognition method can be executed by the server 200, or the terminal 100 and the server 200 can cooperate to execute them, and this application does not limit this.

[0095] FIG3 is a flowchart of a method for training a clarity recognition model according to an exemplary embodiment of the present application. The method may be executed by a computer device, which may be the terminal 100 or the server 200 in FIG2 . The method includes:

[0096] Step 302: Obtain a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content.

[0097] The pre-training content set includes a dataset of content used for unsupervised pre-training. The amount of content in the pre-training content set is huge, and the content does not require manual labeling.

[0098] Optionally, the content includes at least one of a picture, a video, and a video cover.

[0099] Clarity level labeling refers to the clarity level of the sample content.

[0100] For example, the clarity level includes 10 levels, and as the level is higher, the clarity of the content is higher.

[0101] The method of obtaining the content includes at least one of the following:

[0102] 1. A computer device receives content. For example, a terminal is a terminal that initiates content recording. The terminal records content and, after recording is completed, uses the content as content in a pre-training content set or as sample content.

[0103] 2. The computer device obtains the content from the stored database.

[0104] It is worth noting that the above-mentioned method of obtaining content is only an illustrative example and is not limited to this embodiment of the present application.

[0105] Step 304: Perform unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network.

[0106] Unsupervised pre-training means that the training samples do not contain labels of labeled samples, that is, there are only input variables during the training process, and no labeled output variables.

[0107] A pre-trained feature extraction network refers to a feature extraction network after pre-training of the feature extraction network is completed.

[0108] The clarity recognition model includes a feature extraction network and a prediction network. Optionally, the computer device performs unsupervised pre-training on the feature extraction network based on images in the pre-training content set to obtain a pre-trained feature extraction network. The computer device also performs unsupervised pre-training on the feature extraction network based on videos in the pre-training content set to obtain a pre-trained feature extraction network.

[0109] Step 306: Use the pre-trained feature extraction network and prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level.

[0110] The prediction network is used to identify the clarity of the content and output the predicted clarity level.

[0111] After unsupervised pre-training of the feature extraction network in the clarity recognition model to obtain the pre-trained feature extraction network, the computer device uses sample content and clarity level annotations corresponding to the sample content to train the pre-trained feature extraction network and the prediction network in the clarity recognition model.

[0112] When the sample content is a sample picture, the computer device uses a pre-trained feature extraction network and a prediction network to perform clarity recognition on the sample picture to obtain a corresponding predicted clarity level.

[0113] When the sample content is a sample video, the computer device extracts video frames from the sample video, inputs the video frames into the pre-trained feature extraction network and prediction network for clarity recognition, and obtains the corresponding predicted clarity level.

[0114] Step 308: Calculate the training loss based on the predicted clarity level and the clarity level label.

[0115] The training loss refers to the difference between the input and output of the clarity recognition model. The training loss is used to measure the clarity recognition performance of the clarity recognition model.

[0116] Exemplarily, the sample content is input into a clarity recognition model for clarity recognition to obtain a predicted clarity level corresponding to the sample content. Based on the predicted clarity level corresponding to the sample content and the clarity level labeling corresponding to the sample content, the training loss is calculated.

[0117] Step 310: Update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss.

[0118] Model parameter updating refers to updating the network parameters in the clarity recognition model, or updating the network parameters of each network module in the model, or updating the network parameters of each network layer in the model, but is not limited to this, and the embodiments of the present application are not limited to this. At least a portion of the model parameters may include all model parameters of the pre-trained feature extraction network or a portion of all model parameters, and may include all model parameters of the prediction network or a portion of all model parameters. Specifically updating that portion of the model parameters can determine the model parameters related to it based on the training loss. The specific computer device can determine the model parameters that need to be adjusted based on the training loss through the back propagation algorithm, determine the adjustment range of the model parameters that need to be adjusted, and thereby update the corresponding model parameters in the corresponding network according to the adjustment range.

[0119] In summary, the method provided in this embodiment obtains a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content; performs unsupervised pre-training on the feature extraction network based on the content in the pre-trained content set to obtain a pre-trained feature extraction network; uses the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level; calculates the training loss based on the predicted clarity level and the clarity level annotations; and updates at least a portion of the model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss. The training method for the clarity recognition model provided in this application performs unsupervised pre-training on the feature extraction network in the clarity recognition model using a pre-trained content set with a huge amount of data. After obtaining the pre-trained feature extraction network, the clarity recognition model is further trained using sample content. Based on this, the training effect of the clarity recognition model can be improved, so that the clarity recognition model can have higher recognition accuracy when performing clarity recognition on content.

[0120] An embodiment of the present application provides a training system for a clarity recognition model, wherein the training system for the clarity recognition model runs a feature extraction network and a prediction network.

[0121] The computer device obtains a pre-training content set, performs unsupervised pre-training on a feature extraction network using the pre-training content set, and obtains a pre-trained feature extraction network.

[0122] The computer device obtains sample content and a clarity level label corresponding to the sample content, and uses a pre-trained feature extraction network and a prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level; the computer device calculates a training loss based on the predicted clarity level and the clarity level label; and the computer device updates at least a portion of the model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss.

[0123] Based on the training system of the clarity recognition model, the following training method of the clarity recognition model is provided.

[0124] FIG4 is a flowchart of a method for training a clarity recognition model according to an exemplary embodiment of the present application. The method may be executed by a computer device, which may be the terminal 100 or the server 200 in FIG2 . The method includes:

[0125] Step 402: Obtain a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content.

[0126] The pre-training content set includes a dataset of content used for unsupervised pre-training. The amount of content in the pre-training content set is huge, and the content does not require manual labeling.

[0127] Optionally, the content includes at least one of pictures and videos.

[0128] Clarity level labeling refers to the clarity level of the sample content.

[0129] For example, the clarity level includes 10 levels, and as the level is higher, the clarity of the content is higher.

[0130] Optionally, the clarity level labels corresponding to the sample content are manually labeled.

[0131] In order to collect a rich set of pre-trained content, so that the content in the pre-trained content set includes as many distortion types and content types as possible, taking pictures as an example, the embodiment of the present application includes 840,000 pieces of generative distorted content and 1,000,000 pieces of real distorted content when constructing the pre-trained content set. Among them, the 840,000 pieces of generative distorted content are synthesized from 140,000 original pictures through 25 traditional distortion processing algorithms, and each distortion type has 5 degrees of distortion.

[0132] Optionally, the distortion type includes at least one of Gaussian blur, lens blur, motion blur, color diffusion, color shift, color quantization, color saturation 1, color saturation 2, image format 2000 (Joint Photographic Experts Group 2000, JPEG2000), image format JPEG, white noise, white noise in color component, impulse noise, multiplicative noise, Denoise, Brighten, Darken, Mean shift, Jitter, Non-eccentricity patch, Pixelate, Quantization, Color block, High sharpen, and Contrast change, but is not limited to these. The embodiments of the present application do not make specific limitations on this.

[0133] To make model training more accurate, 100,000 sample contents were collected and annotated with clarity levels. However, during the annotation process, it was found that the resolution of the obtained content varied. Figure 5 shows a schematic diagram comparing the normal resolution and the unified resolution. Figure (a) shows the original resolution of the content, which is too large. Figure (b) shows the content after uniform scaling to the same resolution (1080*1920). This embodiment of the application adopts the principle of equal terminal width, that is, the content is uniformly scaled to a resolution suitable for the same terminal.

[0134] Step 404: Perform unsupervised pre-training on the feature extraction network based on the real distorted content, the generated distorted content, and the reference content to obtain a pre-trained feature extraction network.

[0135] Unsupervised pre-training means that the training samples do not contain labels of labeled samples, that is, there are only input variables during the training process, and no labeled output variables.

[0136] A pre-trained feature extraction network refers to a feature extraction network after pre-training of the feature extraction network is completed.

[0137] The pre-training content set includes real distorted content, generated distorted content, and reference content.

[0138] True distorted content refers to content that inherently carries distortion. For example, the distortion in true distorted content is caused by compression or loss during the content acquisition or storage process.

[0139] For example, Figure 6 shows a schematic diagram of distortion types in real distorted content. The distortion type in the first column of the figure is edge jaggedness 601 generated during content compression, the distortion type in the second column is white noise 602 generated by white Gaussian noise, and the distortion type in the third column is pixel sticking 603 generated by Gaussian blur. It should be noted that in reality, the distortion types in real distorted content are often more complex, with more than one type present.

[0140] For example, a schematic diagram of the distortion degree of content is shown in Figure 7. Figures (a) to (e) in the figure show five distortion degrees, and as the distortion degree increases, the clarity of the content gradually decreases.

[0141] Generative distorted content refers to content obtained by distorting content. Generative distorted content includes at least one distortion type.

[0142] For example, generative distorted content is obtained after edge jaggedness is generated during the compression process of the content; generative distorted content is obtained after white Gaussian noise is added to the content to cause white noise points; generative distorted content is obtained after Gaussian blurring the content to cause pixel adhesion, but is not limited to this. The embodiments of the present application do not specifically limit the words.

[0143] Reference content is the content that the pre-training content focuses on outside of the real distorted content and the generated distorted content.

[0144] Exemplarily, a computer device obtains real distorted content, generative distorted content, and reference content in a pre-trained content set; the computer device performs unsupervised pre-training on a feature extraction network based on the real distorted content, generative distorted content, and reference content to obtain a pre-trained feature extraction network.

[0145] Optionally, the computer device obtains enhanced real distorted content corresponding to the real distorted content and enhanced generative distorted content corresponding to the generative distorted content; the computer device performs feature extraction on the real distorted content, the enhanced real distorted content and the reference content based on the feature extraction network, and obtains real distorted content features corresponding to the real distorted content, enhanced real distorted content features corresponding to the enhanced real distorted content and reference features corresponding to the reference content; the computer device performs calculations based on the real distorted content features, the enhanced real distorted content features and the reference features to obtain a first loss function value.

[0146] The computer device performs feature extraction on the generative distorted content and the enhanced generative distorted content based on the feature extraction network, respectively, to obtain generative distortion features corresponding to the generative distorted content and enhanced generative distortion features corresponding to the enhanced generative distorted content; the computer device performs calculation based on the generative distortion features, the enhanced generative distortion features and the reference features to obtain a second loss function value.

[0147] The computer device updates at least a portion of network parameters in the feature extraction network based on the first loss function value and the second loss function value to obtain a pre-trained feature extraction network.

[0148] Optionally, the computer device adds the first loss function value and the second loss function value, and updates the network parameters of the feature extraction network based on the sum of the first loss function value and the second loss function value to obtain a pre-trained feature extraction network.

[0149] Enhanced real-world distorted content refers to content obtained by processing real-world distorted content. Compared to the real-world distorted content, the resulting content has at least one of the distortion type or distortion level changed, while the content type remains unchanged. Enhanced real-world distorted content can also refer to content obtained by modifying the content type of real-world distorted content, while not modifying the distortion type or distortion level.

[0150] For example, FIG8 shows a schematic diagram of obtaining enhanced real-world distorted content. The diagram includes real-world distorted content 801, enhanced real-world distorted content 802, and reference content 803. Real-world distorted content 801 and enhanced real-world distorted content 802 have the same content type characteristics and similar distortion type characteristics. Real-world distorted content 801 and reference content 803 have different content type characteristics and dissimilar distortion type characteristics. Enhanced real-world distorted content 802 in the diagram is obtained by modifying at least one of the distortion type or distortion level, without modifying the content type of real-world distorted content 801.

[0151] Optionally, the method of modifying at least one of the distortion type or the distortion degree includes at least one of scaling, blurring, and color change, but is not limited thereto and is not specifically limited in the embodiments of the present application.

[0152] Enhanced generative distorted content refers to content obtained by processing generative distorted content. Compared to the generative distorted content, the content type of the resulting data processing is changed, while the type and degree of distortion remain unchanged. Enhanced generative distorted content can also refer to content obtained by modifying the content type of generative distorted content without modifying the type and degree of distortion.

[0153] For example, FIG9 shows a schematic diagram of obtaining enhanced generative distorted content. The diagram includes generative distorted content 901 and enhanced generative distorted content 902. Generative distorted content 901 and enhanced generative distorted content 902 have different content type characteristics but similar distortion type characteristics. Enhanced generative distorted content 902 is obtained by modifying the content type, while not modifying the distortion type and degree of generative distorted content 901.

[0154] The feature extraction network includes a first sub-feature extraction network and a second sub-feature extraction network. The first sub-feature extraction network and the second sub-feature extraction network have the same structure but different parameters. For example, the first sub-feature extraction network has more structural layers than the second sub-feature extraction network. That is, the features extracted from the first sub-feature extraction network are more accurate than those extracted from the second sub-feature extraction network. In addition, the first sub-feature extraction network is larger than the second sub-feature extraction network, specifically much larger.

[0155] Optionally, the content feature includes at least one of a content type feature, a distortion type feature, and a distortion degree feature, but is not limited thereto and is not specifically limited in the embodiments of the present application.

[0156] Specifically, the feature extraction network is trained based on the real distorted content, including:

[0157] The computer device performs feature extraction on the real distorted content based on the first sub-feature extraction network to obtain real distorted content features; the computer device performs feature extraction on the enhanced real distorted content based on the second sub-feature extraction network to obtain enhanced real distorted content features; and the computer device performs feature extraction on the reference content based on the first sub-feature extraction network or the second sub-feature extraction network to obtain reference features.

[0158] Optionally, the computer device convolves the real distorted content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding real distorted content feature map; the computer device performs feature extraction on the real distorted content feature map based on the first feature extraction layer in the first sub-feature extraction network to obtain real distorted content features; the computer device convolves the enhanced real distorted content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced real distorted content feature map; the computer device performs feature extraction on the enhanced real distorted content feature map based on the second feature extraction layer in the second sub-feature extraction network to obtain enhanced real distorted content features.

[0159] Optionally, the feature extraction network uses the Swint self-attention model Swint-Transformer as the backbone network to extract feature maps. After obtaining the feature maps, a multilayer perceptron (MLP) is used to extract features to obtain content features. Content features include real distorted content features, enhanced real distorted content features, generative distortion features, and enhanced generative distortion features.

[0160] Optionally, the feature extraction network may also use the residual neural network ResNet as the backbone network backbone to extract the feature map. After obtaining the feature map, the fully connected layer is used to extract features to obtain content features.

[0161] The computer device calculates a first loss function value based on a first similarity between the real distorted content feature and the enhanced real distorted content feature, and a second similarity between the real distorted content feature and the reference feature.

[0162] The calculation formula of the first loss function value can be expressed as:

[0163] Where, L p represents the first loss function value, q represents the true distortion content feature, k + represents the enhanced real distortion content feature, k i represents the reference feature, τ represents the temperature coefficient, which is an adjustable hyperparameter, and i represents the content number.

[0164] Specifically, the feature extraction network is trained based on the generated distortion content, including:

[0165] The computer device performs feature extraction on the generative distortion content based on the first sub-feature extraction network to obtain a generative distortion feature; the computer device performs feature extraction on the enhanced generative distortion content based on the second sub-feature extraction network to obtain an enhanced generative distortion feature.

[0166] Optionally, the computer device convolves the generative distorted content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding generative distorted content feature map; the computer device performs feature extraction on the generative distorted content feature map based on the first feature extraction layer in the first sub-feature extraction network to obtain a generative distortion feature; the computer device convolves the enhanced generative distorted content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced generative distorted content feature map; the computer device performs feature extraction on the enhanced generative distorted content feature map based on the second feature extraction layer in the second sub-feature extraction network to obtain an enhanced real distorted content feature.

[0167] The computer device calculates a second loss function value based on a third similarity between the generative distortion feature and the enhanced generative distortion feature, and a fourth similarity between the real distortion content feature and the reference feature.

[0168] The calculation formula of the second loss function value can be expressed as:

[0169] Where, L i Represents the second loss function value, z i represents the generative distortion feature, z k represents the enhanced generative distortion feature, τ represents the temperature coefficient, which is an adjustable hyperparameter, i represents the content number, p(i) is the set of images with the same distortion type and degree, and N is the number of contents in the pre-trained content set.

[0170] For example, as shown in the schematic diagram of unsupervised pre-training in Figure 10, a computer device processes data on the real distorted content 1001 and the generative distorted content 1003 in the pre-training content set to obtain enhanced real distorted content 1002 corresponding to the real distorted content 1001 and enhanced generative distorted content 1004 corresponding to the generative distorted content 1003.

[0171] The computer device performs feature extraction on the real distorted content 1001 and the generative distorted content 1003 based on the first sub-feature extraction network 1005, and obtains real distorted content features 1007 corresponding to the real distorted content 1001 and generative distorted features 1008 corresponding to the generative distorted content 1003; the computer device performs feature extraction on the enhanced real distorted content 1002 and the enhanced generative distorted content 1004 based on the second sub-feature extraction network 1006, and obtains enhanced real distorted content features 1009 corresponding to the enhanced real distorted content 1002 and enhanced generative distorted features 1010 corresponding to the enhanced generative distorted content 1004.

[0172] After extracting features from each content, the computer device calculates a first loss function value 1011 based on the first similarity between the real distorted content feature 1007 and the enhanced real distorted content feature 1009, and the second similarity between the real distorted content feature 1007 and the reference feature; the computer device calculates a second loss function value 1012 based on the third similarity between the generative distortion feature 1008 and the enhanced generative distortion feature 1010, and the fourth similarity between the generative distortion feature 1008 and the reference feature.

[0173] The computer device adds the first loss function value 1011 and the second loss function value 1012, and updates the network parameters of the feature extraction network based on the sum of the first loss function value 1011 and the second loss function value 1012 to obtain a pre-trained feature extraction network.

[0174] It should be noted that the computer device performs unsupervised pre-training on the feature extraction network through real distorted content and generative distorted content. The real distorted content and generative distorted content can be input in sequence to perform unsupervised pre-training on the feature extraction network, or the real distorted content and generative distorted content can be input at the same time to perform unsupervised pre-training on the feature extraction network.

[0175] Step 406: Use the pre-trained feature extraction network and prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level.

[0176] The prediction network is used to identify the clarity of the content and output the predicted clarity level.

[0177] After unsupervised pre-training of the feature extraction network in the clarity recognition model to obtain the pre-trained feature extraction network, the computer device uses sample content and clarity level annotations corresponding to the sample content to train the pre-trained feature extraction network and the prediction network in the clarity recognition model.

[0178] The pre-trained feature extraction network includes a first pre-trained sub-feature extraction network and a second pre-trained sub-feature extraction network.

[0179] The first pre-trained sub-feature extraction network is obtained by unsupervised pre-training of the first sub-feature extraction network.

[0180] The second pre-trained sub-feature extraction network is obtained by unsupervised pre-training of the second sub-feature extraction network.

[0181] Exemplarily, the computer device inputs sample content into a first pre-trained sub-feature extraction network and a second pre-trained sub-feature extraction network in a pre-trained feature extraction network for feature extraction, thereby obtaining first, second, and third sample content features. The computer device then classifies the third sample content feature by a clarity level based on the prediction network to obtain a predicted clarity level.

[0182] The first sample content feature is a feature vector output by the first pre-trained sub-feature extraction network and subjected to coefficient adjustment.

[0183] The second sample content feature is a feature vector output by the second pre-trained sub-feature extraction network and subjected to coefficient adjustment.

[0184] The third sample content feature is a feature vector output by the second pre-trained sub-feature extraction network without coefficient adjustment.

[0185] Coefficient adjustment involves dividing content features by an adjustable hyperparameter. Coefficient adjustment is used to stabilize the loss function calculated between content features.

[0186] Step 408: Calculate the training loss based on the predicted clarity level and the clarity level label.

[0187] The training loss refers to the difference between the input and output of the clarity recognition model. The training loss is used to measure the clarity recognition performance of the clarity recognition model.

[0188] Exemplarily, the sample content is input into a clarity recognition model for clarity recognition to obtain a predicted clarity level corresponding to the sample content. Based on the predicted clarity level corresponding to the sample content and the clarity level labeling corresponding to the sample content, the training loss is calculated.

[0189] The computer device obtains a first training loss based on a relative entropy (also known as KL divergence) function value between the first sample content feature and the second sample content feature.

[0190] The calculation formula of the first training loss can be expressed as:

[0191] Where D KL represents the first training loss, (A||B) represents the relative entropy between the first sample content feature and the second sample content feature, and p A (v i ) represents the first sample content feature, p B (v i ) represents the second sample content feature.

[0192] The computer device classifies the clarity level of the third sample content feature based on a Sigmoid logistic regression function in the prediction network to obtain a probability value for the third sample content feature at each clarity level; the clarity level corresponding to the maximum probability value is selected as the predicted clarity level. The computer device obtains a second training loss based on a cross-entropy function value between the predicted clarity level and the clarity level label.

[0193] The calculation formula of the second training loss can be expressed as:

[0194] Where H(C,D) represents the second training loss, p C (v i ) represents the predicted clarity level, p D (v i) indicates the clarity level label.

[0195] The feature extraction network includes a first sub-feature extraction network and a second sub-feature extraction network. The first sub-feature extraction network and the second sub-feature extraction network are two networks with the same structure but different parameters. For example, the number of structural layers in the first sub-feature extraction network is greater than the number of structural layers in the second sub-feature extraction network. That is, the features extracted by the first sub-feature extraction network are more accurate than the features extracted by the second sub-feature extraction network. In addition, the volume of the first sub-feature extraction network is larger than that of the second sub-feature extraction network, and is much larger.

[0196] It should be noted that the features extracted from the first sub-feature extraction network are more accurate than those extracted from the second sub-feature extraction network. The purpose of the first training loss is to drive the second sub-feature extraction network to complete the training through the first sub-feature extraction network; the purpose of the second training loss is to realize the training of the prediction network by utilizing the cross-entropy function value between the predicted clarity level and the clarity level label.

[0197] In actual applications after training, since the second sub-feature extraction network is smaller in size, only the second sub-feature extraction network can be used for feature extraction, or both the first sub-feature extraction network and the second sub-feature extraction network can be used for feature extraction.

[0198] Step 410: Update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss.

[0199] Exemplarily, the computer device may update model parameters of at least one of the pre-trained feature extraction network or the prediction network according to the first training loss and the second training loss.

[0200] Optionally, the computer device may update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network according to the sum of the first training loss and the second training loss.

[0201] Model parameter updating refers to updating the network parameters in the clarity recognition model, or updating the network parameters of each network module in the model, or updating the network parameters of each network layer in the model, but is not limited to this, and the embodiments of the present application do not limit this.

[0202] Based on the loss function value, the loss function value is used as a training indicator to update the model parameters in the clarity recognition model until the loss function value converges, thereby obtaining a trained clarity recognition model.

[0203] The convergence of the loss function value means that the loss function value no longer changes, or the error difference between two adjacent iterations during the training of the clarity recognition model is less than a preset value, or the number of training times of the clarity recognition model reaches at least one of the preset times, but is not limited to this and is not limited to this in the embodiments of the present application.

[0204] Optionally, the target condition satisfied by training may be that the number of training iterations of the initial model reaches a target number, and the technician can pre-set the number of training iterations. Alternatively, the target condition satisfied by training may be that the loss value meets a target threshold condition, such as a loss value less than 0.00001, but is not limited to this and is not limited to this embodiment of the present application.

[0205] In summary, the method provided in this embodiment obtains a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content; performs unsupervised pre-training on the feature extraction network based on the content in the pre-trained content set to obtain a pre-trained feature extraction network; uses the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level; calculates the training loss based on the predicted clarity level and the clarity level annotations; and updates at least a portion of the model parameters of at least one of the pre-trained feature extraction network or the prediction network based on the training loss. The training method for the clarity recognition model provided in this application performs unsupervised pre-training on the feature extraction network in the clarity recognition model using a pre-trained content set with a huge amount of data. After obtaining the pre-trained feature extraction network, the clarity recognition model is further trained using sample content. Based on this, the training effect of the clarity recognition model can be improved, so that the clarity recognition model can have higher recognition accuracy when performing clarity recognition on content.

[0206] The method provided in this embodiment performs unsupervised pre-training on a feature extraction network based on real distorted content, generative distorted content, and reference content in a pre-training content set to obtain a pre-trained feature extraction network. The feature extraction network in the clarity recognition model is unsupervisedly pre-trained using a pre-training content set with a huge amount of data, thereby improving the training efficiency of the feature extraction network and avoiding the problem of low training efficiency caused by manual labeling.

[0207] The method provided in this embodiment modifies the content type, distortion type and distortion degree of the real distorted content and the generative distorted content to obtain enhanced real distorted content corresponding to the real distorted content and enhanced generative distorted content corresponding to the generative distorted content. Through the real distorted content and its corresponding enhanced real distorted content, the feature extraction network can focus on learning the characteristics of the content type during training, and through the generative distorted content and its corresponding enhanced generative distorted content, the feature extraction network can focus on learning the characteristics of the distortion type during training, thereby increasing the feature extraction capability of the feature extraction network and improving the training efficiency of the feature extraction network.

[0208] The method provided in this embodiment, after obtaining the pre-trained feature extraction network, further trains the clarity recognition model through sample content. Based on this, the training effect of the clarity recognition model can be improved, so that the clarity recognition model can have higher recognition accuracy when performing clarity recognition on content.

[0209] The training method of the clarity recognition model involved in the present application can be implemented based on the training system of the clarity recognition model. The scheme includes a clarity recognition model training system generation stage and a clarity recognition model training stage. Figure 11 is a framework diagram of a clarity recognition model training system generation and clarity recognition model training shown in an exemplary embodiment of the present application. As shown in Figure 11, in the clarity recognition model training system generation stage, the clarity recognition model training system generation device 1110 obtains the clarity recognition model training system through a pre-set pre-training content set and sample content, and then generates a training result of the clarity recognition model based on the clarity recognition model training system. In the clarity recognition model training stage, the clarity recognition model training device 1120 processes the input content based on the clarity recognition model training system to obtain the training result of the clarity recognition model.

[0210] Among them, the above-mentioned clarity recognition model training system generation device 1110 and the clarity recognition model training device 1120 can be computer devices. For example, the computer device can be a fixed computer device such as a personal computer or a server, or the computer device can also be a mobile computer device such as a tablet computer or an e-book reader.

[0211] Optionally, the definition recognition model training system generating device 1110 and the definition recognition model training device 1120 may be the same device, or they may be different devices. Furthermore, when the definition recognition model training system generating device 1110 and the definition recognition model training device 1120 are different devices, they may be the same type of device, such as both being servers. Alternatively, the definition recognition model training system generating device 1110 and the definition recognition model training device 1120 may be different types of devices, such as the definition recognition model training device 1120 being a personal computer or terminal, and the definition recognition model training system generating device 1110 being a server. The embodiment of the present application does not limit the specific types of the clarity recognition model training system generation device 1110 and the clarity recognition model training device 1120.

[0212] The above embodiment describes the training method of the clarity recognition model. Next, the clarity recognition method based on the clarity recognition model will be described. The clarity recognition method provided in the embodiment of the present application can also be applied to the clarity recognition scenarios of images, videos, and video covers.

[0213] FIG12 is a flowchart of a method for identifying clarity provided by an exemplary embodiment of the present application. The method may be executed by a computer device, which may be the terminal 100 or the server 200 in FIG2 . The method includes:

[0214] Step 1202: Obtain content to be identified for clarity.

[0215] The content includes at least one of a picture, a video, and a video cover.

[0216] The method of obtaining the content includes at least one of the following:

[0217] 1. A computer device receives content. For example, a terminal is a terminal that initiates content recording. The terminal records the content, and after the recording is completed, the content is used as content to be identified for clarity.

[0218] 2. The computer device obtains the content to be identified from the stored database.

[0219] It is worth noting that the above-mentioned method of obtaining content is only an illustrative example and is not limited to this embodiment of the present application.

[0220] Step 1204: Input the content into the pre-trained feature extraction network in the clarity recognition model for feature extraction to obtain content features.

[0221] The clarity recognition model includes a feature extraction network and a prediction network.

[0222] The pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-training content set.

[0223] The training process of the feature extraction network and the prediction network can be referred to steps 402-410 in the above embodiment, which will not be described in detail here.

[0224] Exemplarily, the computer device inputs the content into a pre-trained feature extraction network in a clarity recognition model to perform feature extraction to obtain content features.

[0225] Step 1206: Perform clarity recognition on the content features based on the prediction network in the clarity recognition model to obtain the clarity level corresponding to the content.

[0226] Clarity recognition refers to the process of rating the clarity of content based on the corresponding content features.

[0227] The clarity level is a rating of the clarity of the content.

[0228] For example, the clarity level includes 10 levels, and as the level is higher, the clarity of the content is higher.

[0229] Exemplarily, after obtaining content features corresponding to the content, the computer device performs clarity recognition on the content features based on a prediction network in a clarity recognition model to obtain a clarity level corresponding to the content.

[0230] In summary, the method provided in this embodiment obtains the content features corresponding to the content and inputs the content features into the clarity recognition model for clarity recognition to obtain the clarity level corresponding to the content. Based on the trained clarity recognition model, a more accurate clarity level result can be obtained.

[0231] FIG13 is a flowchart of a method for identifying clarity provided by an exemplary embodiment of the present application. The method may be executed by a computer device, which may be the terminal 100 or the server 200 in FIG2 . The method includes:

[0232] Step 1302: Obtain content to be identified for clarity.

[0233] The content includes at least one of a picture, a video, and a video cover.

[0234] Step 1304: Obtain a video frame from the video; input the video frame into a pre-trained feature extraction network for feature extraction to obtain video frame features.

[0235] The clarity recognition model includes a feature extraction network and a prediction network.

[0236] The pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-training content set.

[0237] The training process of the feature extraction network and the prediction network can be referred to steps 402-410 in the above embodiment, which will not be described in detail here.

[0238] Exemplarily, in the case where the content is a video, the computer device obtains a video frame in the video; inputs the video frame into a pre-trained feature extraction network to perform feature extraction to obtain video frame features;

[0239] Step 1306: Perform clarity recognition on the video frame features based on the prediction network in the clarity recognition model to obtain the clarity level corresponding to the video.

[0240] Clarity recognition refers to the process of rating the clarity of content based on the corresponding content features.

[0241] The clarity level is a rating of the clarity of the content.

[0242] Exemplarily, after obtaining the video features corresponding to the video, the computer device classifies the clarity levels of the video frame features based on the logistic regression function Sigmoid in the prediction network to obtain the probability values ​​of the video frame features at each clarity level; the computer device determines the video frame clarity level corresponding to each video frame based on the probability value; the computer device aggregates the video frame clarity levels to obtain the clarity level corresponding to the video.

[0243] Optionally, the computer device groups the video frames to be identified for clarity, determines the video frame clarity levels corresponding to the video frames in each group; performs a single weighted average processing on the video frame clarity levels in each group to obtain the video frame group clarity level corresponding to each group; the computer device performs a double weighted average processing on the video frame group clarity levels corresponding to each group to obtain the clarity level corresponding to the video.

[0244] The formula for single-weighted average processing can be expressed as:

[0245] Where x n is the video frame clarity level of the nth frame, EMA N (x n) is the clarity level of the video frame group, and each video frame group includes N video frames.

[0246] The formula for double weighted average processing can be expressed as:

[0247] Where x n is the video frame clarity level of the nth frame, EMA N (x n ) is the clarity level of the video frame group, the video frame group includes N frames of video frames, EMA M [EMA N (x n )] is the clarity level corresponding to the video including M groups of video frame groups.

[0248] For example, if a video is 100 seconds long and one frame is one second, there will be 100 frames. The extracted video frames are divided into M groups of N frames in chronological order. First, the clarity level of each video frame is recorded and aggregated to obtain the clarity level of each group. Then, the clarity levels of each group are aggregated to obtain the clarity level corresponding to the entire video.

[0249] For example, as shown in the flowchart of the clarity recognition method in FIG14 , after the account on the distribution terminal publishes content 1401, the computer device saves the picture / video 1402 in the content 1401. In the case that the content 1401 is a video, the computer device extracts the video frame and the cover image of the video, and inputs the video frame and the cover image of the video into the trained clarity recognition model 1403 for clarity recognition, and obtains the corresponding clarity level 1404. The clarity level is divided into 10 levels. In the application scenario where the video has a cover image, the clarity level of the cover image is less than or equal to level 4. In this case, the video is directly filtered, that is, the video is not recommended to the consumer terminal 1405; in an immersive scene where the video has no cover image and is played directly, if the clarity level corresponding to the entire video is less than or equal to level 3, the video is directly filtered, that is, the video is not recommended to the consumer terminal 1405; if the clarity level corresponding to the entire video is between levels 3-7, the video is distributed with reduced weight, that is, the video is recommended less to the consumer terminal 1405; if the clarity level corresponding to the entire video is greater than level 7, the video is distributed with weighted weight, that is, the video is recommended more to the consumer terminal 1405.

[0250] For example, in actual application of the trained definition recognition model, 15,000 videos with a definition level less than or equal to level 3 can be filtered every day.

[0251] After downgrading low-definition content, the average video view (VV) for low-definition videos decreased by 0.0345%, the average viewing time increased by 0.7628%, the retention rate (a video recommended today will still be recommended tomorrow) increased by 0.0703%, the number of logins on consumer terminals increased by 0.1123%, and the content's exposure increased by 0.5157%. The impact on the distribution structure: the average VV of key creators increased by 0.9974%, the average VV of professionally generated content (PGC) increased by 3.6621%, and the average VV of user-generated content (UGC) increased by 1.1916%.

[0252] After filtering and distributing low-definition and obviously disturbing content, average VV decreased by 0.6715%, average viewing time increased by 0.0359%, retention increased by 0.0844%, and the number of logins on consumer terminals increased by 0.2027%. The impact on the distribution structure: the average VV share of key creators increased by 2.2221%, the average playback VV share of featured content increased by 0.8871%, average revenue per user increased by 1.1093%, the average total viewing time of high-end users increased by 1.67%, the average playback time of high-end users increased by 2.32%, and the average VV of high-end users increased by 3.38%.

[0253] Discontinuous recommendations for low-definition content reduced average VV by 1.69%.

[0254] In summary, the method provided in this embodiment obtains the video features corresponding to the video and inputs the video features into the clarity recognition model for clarity recognition to obtain the clarity level corresponding to the video. Based on the trained clarity recognition model, a more accurate clarity level result can be obtained.

[0255] FIG15 shows a schematic diagram of a device for training a clarity recognition model according to an exemplary embodiment of the present application. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device includes:

[0256] An acquisition module 1501 is configured to acquire a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content;

[0257] A pre-training module 1502 is configured to perform unsupervised pre-training on a feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network;

[0258] Identification module 1503, configured to perform clarity identification on the sample content using a pre-trained feature extraction network and a prediction network to obtain a predicted clarity level;

[0259] A calculation module 1504 is configured to calculate a training loss based on the predicted clarity level and the clarity level label;

[0260] The updating module 1505 is configured to update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network according to the training loss.

[0261] In one possible implementation, the acquisition module 1501 is used to obtain real distorted content, generative distorted content and reference content in the pre-trained content set; real distorted content refers to content that carries a distortion type, generative distorted content refers to content obtained after distorting the content, and reference content is content other than real distorted content and generative distorted content.

[0262] In a possible implementation, the pre-training module 1502 is configured to perform unsupervised pre-training on a feature extraction network based on real distorted content, generated distorted content, and reference content to obtain a pre-trained feature extraction network.

[0263] In one possible implementation, the acquisition module 1501 is used to obtain enhanced real distorted content corresponding to the real distorted content and enhanced generative distorted content corresponding to the generative distorted content. Compared with the real distorted content, at least one of the distortion type or the distortion degree of the enhanced real distorted content is changed, and the content type remains unchanged. Compared with the generative distorted content, the content type of the enhanced generative distorted content is changed, and the distortion type and the distortion degree remain unchanged.

[0264] In one possible implementation, the pre-training module 1502 is used to perform feature extraction on the real distorted content, the enhanced real distorted content and the reference content based on the feature extraction network, to obtain the real distorted content features corresponding to the real distorted content, the enhanced real distorted content features corresponding to the enhanced real distorted content and the reference features corresponding to the reference content; and to perform calculations based on the real distorted content features, the enhanced real distorted content features and the reference features to obtain a first loss function value.

[0265] In one possible implementation, the pre-training module 1502 is used to perform feature extraction on the generative distorted content and the enhanced generative distorted content based on the feature extraction network, respectively, to obtain generative distortion features corresponding to the generative distorted content and enhanced generative distortion features corresponding to the enhanced generative distorted content; and to perform calculations based on the generative distortion features, the enhanced generative distortion features and the reference features to obtain a second loss function value.

[0266] In one possible implementation, the updating module 1505 is configured to update at least a portion of network parameters in the feature extraction network based on the first loss function value and the second loss function value to obtain a pre-trained feature extraction network.

[0267] In one possible implementation, the pre-training module 1502 is used to perform feature extraction on real distorted content based on the first sub-feature extraction network to obtain real distorted content features; perform feature extraction on enhanced real distorted content based on the second sub-feature extraction network to obtain enhanced real distorted content features; and perform feature extraction on reference content based on the first sub-feature extraction network or the second sub-feature extraction network to obtain reference features.

[0268] In one possible implementation, the pre-training module 1502 is used to convolve the real distorted content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding real distorted content feature map; and perform feature extraction on the real distorted content feature map based on the first feature extraction layer in the first sub-feature extraction network to obtain real distorted content features.

[0269] In one possible implementation, the pre-training module 1502 is used to convolve the enhanced real distorted content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced real distorted content feature map; and perform feature extraction on the enhanced real distorted content feature map based on the second feature extraction layer in the second sub-feature extraction network to obtain enhanced real distorted content features.

[0270] In a possible implementation, the calculation module 1504 is configured to calculate a first loss function value based on a first similarity between the real distorted content feature and the enhanced real distorted content feature, and a second similarity between the real distorted content feature and the reference feature.

[0271] In one possible implementation, the pre-training module 1502 is configured to perform feature extraction on the generative distortion content based on the first sub-feature extraction network to obtain generative distortion features; and perform feature extraction on the enhanced generative distortion content based on the second sub-feature extraction network to obtain enhanced generative distortion features.

[0272] In one possible implementation, the pre-training module 1502 is used to convolve the generative distortion content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding generative distortion content feature map; and perform feature extraction on the generative distortion content feature map based on the first feature extraction layer in the first sub-feature extraction network to obtain a generative distortion feature.

[0273] In one possible implementation, the pre-training module 1502 is used to convolve the enhanced generative distorted content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced generative distorted content feature map; and perform feature extraction on the enhanced generative distorted content feature map based on the second feature extraction layer in the second sub-feature extraction network to obtain enhanced real distorted content features.

[0274] In a possible implementation, the calculation module 1504 is configured to calculate a second loss function value based on a third similarity between the generative distortion feature and the enhanced generative distortion feature, and a fourth similarity between the true distorted content feature and the reference feature.

[0275] In one possible implementation, the identification module 1503 is used to input the sample content into the first pre-trained sub-feature extraction network and the second pre-trained sub-feature extraction network respectively for feature extraction to obtain a first sample content feature, a second sample content feature, and a third sample content feature; the first sample content feature is a feature vector output by the first pre-trained sub-feature extraction network and subjected to coefficient adjustment, the second sample content feature is a feature vector output by the second pre-trained sub-feature extraction network and subjected to coefficient adjustment, and the third sample content feature is a feature vector output by the second pre-trained sub-feature extraction network and not subjected to coefficient adjustment; the third sample content feature is classified into clarity levels based on the logistic regression function Sigmoid in the prediction network to obtain a probability value of the third sample content feature at each clarity level; and the predicted clarity level is determined based on the probability value.

[0276] In a possible implementation, the calculation module 1504 is configured to obtain a first training loss based on a relative entropy function value between the first sample content feature and the second sample content feature.

[0277] In one possible implementation, the calculation module 1504 is configured to obtain a second training loss based on a cross entropy function value between the predicted clarity level and the clarity level label.

[0278] In a possible implementation, the calculation module 1504 is configured to obtain a training loss based on the first training loss and the second training loss.

[0279] FIG16 shows a schematic diagram of the structure of a clarity recognition device provided by an exemplary embodiment of the present application. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device includes:

[0280] An acquisition module 1601 is used to acquire content to be identified for clarity;

[0281] Feature extraction module 1602 is used to input the content into the pre-trained feature extraction network in the clarity recognition model to extract features and obtain content features; the pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using the pre-trained content set;

[0282] The recognition module 1603 is configured to perform clarity recognition on content features based on the prediction network in the clarity recognition model to obtain a clarity level corresponding to the content.

[0283] The content includes a video; in a possible implementation, the acquisition module 1601 is configured to acquire video frames in the video.

[0284] In a possible implementation, the feature extraction module 1602 is configured to input the video frame into a pre-trained feature extraction network for feature extraction to obtain video frame features.

[0285] In one possible implementation, the identification module 1603 is used to classify the clarity level of video frame features based on the logistic regression function Sigmoid in the prediction network to obtain the probability value of the video frame features at each clarity level; determine the video frame clarity level corresponding to each video frame according to the probability value; and aggregate the video frame clarity levels to obtain the clarity level corresponding to the video.

[0286] In one possible implementation, the identification module 1603 is used to group the video frames to be identified for clarity, determine the video frame clarity levels corresponding to the video frames in each group; perform a single weighted average processing on the video frame clarity levels in each group to obtain the video frame group clarity level corresponding to each group; perform a double weighted average processing on the video frame group clarity levels corresponding to each group to obtain the clarity level corresponding to the video.

[0287] FIG17 shows a block diagram of a computer device 1700 according to an exemplary embodiment of the present application. The computer device can be implemented as a server in the above-mentioned solution of the present application. The computer device 1700 includes a central processing unit (CPU) 1701, a system memory 1704 including a random access memory (RAM) 1702 and a read-only memory (ROM) 1703, and a system bus 1705 connecting the system memory 1704 and the central processing unit 1701. The computer device 1700 also includes a mass storage device 1706 for storing an operating system 1709, application programs 1710, and other program modules 1711.

[0288] The mass storage device 1706 is connected to the central processing unit 1701 via a mass storage controller (not shown) connected to the system bus 1705. The mass storage device 1706 and its associated computer-readable media provide non-volatile storage for the computer device 1700. In other words, the mass storage device 1706 may include a computer-readable medium (not shown) such as a hard disk or a Compact Disc Read-Only Memory (CD-ROM) drive.

[0289] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, Erasable Programmable Read Only Memory (EPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1704 and mass storage device 1706 can be collectively referred to as memory.

[0290] According to various embodiments of the present disclosure, the computer device 1700 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1700 may be connected to a network 1708 via a network interface unit 1707 connected to the system bus 1705, or the network interface unit 1707 may be used to connect to other types of networks or remote computer systems (not shown).

[0291] The memory also includes at least one segment of computer-readable instructions, which are stored in the memory. The central processing unit 1701 implements the training method of the clarity recognition model shown in the above-mentioned embodiments, or all or part of the steps in the clarity recognition method, by executing the at least one segment of the program.

[0292] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer-readable instruction, and the at least one computer-readable instruction is loaded and executed by the processor to implement the clarity recognition model provided by the above-mentioned method embodiments, or the training method of the clarity recognition method.

[0293] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one computer-readable instruction. The at least one computer-readable instruction is loaded and executed by a processor to implement the training method of the clarity recognition model provided by the above-mentioned method embodiments, or the clarity recognition method.

[0294] An embodiment of the present application also provides a computer program product, which includes computer-readable instructions stored in a computer-readable storage medium; the computer-readable instructions are read and executed by a processor of a computer device from the computer-readable storage medium, so that the computer device executes to implement the training method of the clarity recognition model provided in the above-mentioned method embodiments, or the clarity recognition method.

[0295] It is understandable that in the specific implementation of this application, multimodal content, data, historical data, portraits, and other data related to user data processing related to user identity or characteristics, when the above embodiments of this application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0296] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0297] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for training a clarity recognition model, executed by a computer device, wherein the clarity recognition model includes a feature extraction network and a prediction network, and the method includes: Obtaining a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content; Performing unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network; Using the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level; Calculating a training loss based on the predicted clarity level and the clarity level label; and At least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network are updated based on the training loss.

2. According to the method of claim 1, the step of performing unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain the pre-trained feature extraction network comprises: Acquire real distorted content, generated distorted content and reference content in the pre-trained content set, wherein the reference content is content in the pre-trained content set other than the real distorted content and the generated distorted content; The unsupervised pre-training is performed on the feature extraction network based on the real distorted content, the generated distorted content and the reference content to obtain the pre-trained feature extraction network.

3. The method according to claim 2, wherein the unsupervised pre-training of the feature extraction network based on the real distorted content, the generated distorted content and the reference content to obtain the pre-trained feature extraction network comprises: Acquire enhanced real distorted content corresponding to the real distorted content and enhanced generated distorted content corresponding to the generated distorted content, wherein compared with the real distorted content, at least one of the distortion type or the distortion degree of the enhanced real distorted content is changed, and the content type remains unchanged; compared with the generated distorted content, the content type of the enhanced generated distorted content is changed, and the distortion type and the distortion degree remain unchanged; Based on the feature extraction network, feature extraction is performed on the real distorted content, the enhanced real distorted content and the reference content respectively, so as to obtain real distorted content features corresponding to the real distorted content, enhanced real distorted content features corresponding to the enhanced real distorted content and reference features corresponding to the reference content; Calculating based on the real distorted content feature, the enhanced real distorted content feature and the reference feature to obtain a first loss function value; Based on the feature extraction network, feature extraction is performed on the generative distortion content and the enhanced generative distortion content respectively, so as to obtain generative distortion features corresponding to the generative distortion content and enhanced generative distortion features corresponding to the enhanced generative distortion content; Calculating based on the generative distortion feature, the enhanced generative distortion feature and the reference feature to obtain a second loss function value; Based on the first loss function value and the second loss function value, at least a portion of network parameters in the feature extraction network are updated to obtain the pre-trained feature extraction network.

4. The method according to claim 3, wherein the feature extraction network comprises a first sub-feature extraction network and a second sub-feature extraction network, wherein the first sub-feature extraction network and the second sub-feature extraction network are two networks with the same structure and different parameters; The extracting features of the real distorted content, the enhanced real distorted content and the reference content based on the feature extraction network to obtain real distorted content features corresponding to the real distorted content, enhanced real distorted content features corresponding to the enhanced real distorted content and reference features corresponding to the reference content includes: Extracting features of the real distorted content based on the first sub-feature extraction network to obtain features of the real distorted content; Extracting features of the enhanced real distorted content based on the second sub-feature extraction network to obtain features of the enhanced real distorted content; Based on the first sub-feature extraction network or the second sub-feature extraction network, feature extraction is performed on the reference content to obtain the reference feature.

5. The method according to claim 4, wherein the extracting features of the real distorted content based on the first sub-feature extraction network to obtain the real distorted content features comprises: Convolving the real distorted content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding real distorted content feature map; Based on the first feature extraction layer in the first sub-feature extraction network, feature extraction is performed on the real distorted content feature map to obtain the real distorted content feature.

6. The method according to claim 4 or 5, wherein the step of extracting features of the enhanced real distorted content based on the second sub-feature extraction network to obtain the features of the enhanced real distorted content comprises: Convolving the enhanced real distortion content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced real distortion content feature map; Based on the second feature extraction layer in the second sub-feature extraction network, feature extraction is performed on the enhanced real distorted content feature map to obtain the enhanced real distorted content feature.

7. The method according to any one of claims 3 to 6, wherein the step of calculating based on the real distorted content feature, the enhanced real distorted content feature and the reference feature to obtain a first loss function value comprises: The first loss function value is calculated based on a first similarity between the real distorted content feature and the enhanced real distorted content feature, and a second similarity between the real distorted content feature and the reference feature.

8. The method according to any one of claims 3 to 6, wherein the feature extraction network comprises a first sub-feature extraction network and a second sub-feature extraction network, and the feature extraction of the generative distortion content and the enhanced generative distortion content based on the feature extraction network is performed to obtain generative distortion features corresponding to the generative distortion content and enhanced generative distortion features corresponding to the enhanced generative distortion content, comprising: Extracting features of the generative distortion content based on a first sub-feature extraction network to obtain the generative distortion features; Based on the second sub-feature extraction network, feature extraction is performed on the enhanced generative distortion content to obtain the enhanced generative distortion feature.

9. The method according to claim 8, wherein extracting features from the generative distortion content based on the first sub-feature extraction network to obtain the generative distortion features comprises: Convolving the generative distortion content based on the first convolutional layer in the first sub-feature extraction network to obtain a corresponding generative distortion content feature map; Based on the first feature extraction layer in the first sub-feature extraction network, feature extraction is performed on the generative distortion content feature map to obtain the generative distortion feature.

10. The method according to claim 8 or 9, wherein extracting features from the enhanced generative distortion content based on a second sub-feature extraction network to obtain the enhanced generative distortion features comprises: Convolving the enhanced generative distortion content based on the second convolutional layer in the second sub-feature extraction network to obtain a corresponding enhanced generative distortion content feature map; Based on the second feature extraction layer in the second sub-feature extraction network, feature extraction is performed on the enhanced generative distorted content feature map to obtain the enhanced real distorted content feature.

11. The method according to any one of claims 3 to 10, wherein the step of calculating based on the generative distortion feature, the enhanced generative distortion feature and the reference feature to obtain a second loss function value comprises: Obtaining a third similarity between the generative distortion feature and the enhanced generative distortion feature; Acquire a fourth similarity between the real distorted content feature and the reference feature; The second loss function value is calculated based on the third similarity and the fourth similarity.

12. The method according to any one of claims 1 to 11, wherein the pre-trained feature extraction network comprises a first pre-trained sub-feature extraction network and a second pre-trained sub-feature extraction network, wherein the first pre-trained sub-feature extraction network is obtained by the first sub-feature extraction network through the unsupervised pre-training, and the second pre-trained sub-feature extraction network is obtained by the second sub-feature extraction network through the unsupervised pre-training; The using the pre-trained feature extraction network and the prediction network to perform clarity recognition on the sample content to obtain a predicted clarity level includes: Inputting the sample content into the first pre-trained sub-feature extraction network and the second pre-trained sub-feature extraction network respectively for feature extraction, obtaining a first sample content feature, a second sample content feature and a third sample content feature, wherein the first sample content feature is a feature vector output by the first pre-trained sub-feature extraction network and subjected to coefficient adjustment, the second sample content feature is a feature vector output by the second pre-trained sub-feature extraction network and subjected to coefficient adjustment, and the third sample content feature is a feature vector output by the second pre-trained sub-feature extraction network and subjected to no coefficient adjustment; Classifying the third sample content feature by clarity level based on the logistic regression function in the prediction network to obtain a probability value of the third sample content feature at each clarity level; The predicted clarity level is determined according to the probability value.

13. The method according to claim 12, wherein the training loss comprises a first training loss and a second training loss; The calculating the training loss based on the predicted clarity level and the clarity level label comprises: Obtaining the first training loss based on a relative entropy function value between the first sample content feature and the second sample content feature; Obtaining the second training loss based on a cross entropy function value between the predicted clarity level and the clarity level label; The training loss is obtained based on the first training loss and the second training loss.

14. According to the method according to any one of claims 1 to 13, the content in the pre-training content set, the sample content and the sample content are all multimedia content, and the multimedia content includes at least one of a picture or a video.

15. A method for identifying clarity, executed by a computer device, the method comprising: Acquire content to be identified for clarity; Inputting the content into a pre-trained feature extraction network in a clarity recognition model to extract features and obtain content features, wherein the pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-trained content set; and The clarity level of the content is obtained by performing clarity recognition on the content features based on the prediction network in the clarity recognition model.

16. The method of claim 15, wherein the content comprises a video; The step of inputting the content into a pre-trained feature extraction network in a clarity recognition model to extract features and obtain content features includes: Obtaining a video frame in the video; Inputting the video frame into the pre-trained feature extraction network to extract features and obtain video frame features; The performing clarity recognition on the content feature based on the prediction network in the clarity recognition model to obtain the clarity level corresponding to the content includes: Based on the logistic regression function in the prediction network, the video frame features are classified into definition levels to obtain probability values ​​of the video frame features at each definition level; Determine a video frame definition level corresponding to each video frame according to the probability value; The video frame definition levels are aggregated to obtain the definition level corresponding to the video.

17. The method according to claim 16, wherein aggregating the video frame definition levels to obtain the definition level corresponding to the video comprises: Grouping the video frames to be identified for clarity, and determining the video frame clarity levels corresponding to the video frames in each group; Performing a weighted average process on the video frame definition levels in each group to obtain a video frame definition level corresponding to each group; The definition level of the video frame group corresponding to each group is processed by double weighted average to obtain the definition level of the video frame group corresponding to each group. of the clarity level.

18. A training device for a clarity recognition model, the device comprising: An acquisition module, used to acquire a pre-trained content set, sample content, and clarity level annotations corresponding to the sample content; A pre-training module, used for performing unsupervised pre-training on the feature extraction network based on the content in the pre-training content set to obtain a pre-trained feature extraction network; An identification module, configured to use the pre-trained feature extraction network and the prediction network to perform clarity identification on the sample content to obtain a predicted clarity level; A calculation module, configured to calculate a training loss based on the predicted clarity level and the clarity level annotation; and An updating module is used to update at least a portion of model parameters of at least one of the pre-trained feature extraction network or the prediction network according to the training loss.

19. A clarity recognition device, comprising: An acquisition module, used for acquiring content to be identified for clarity; A feature extraction module, used for inputting the content into a pre-trained feature extraction network in a clarity recognition model to extract features and obtain content features, wherein the pre-trained feature extraction network is obtained by unsupervised pre-training of the feature extraction network in the clarity recognition model using a pre-training content set; The recognition module is used to perform clarity recognition on the content features based on the prediction network in the clarity recognition model to obtain the clarity level corresponding to the content.

20. A computer device, comprising: A processor and a memory, wherein the memory stores at least one computer-readable instruction, and the at least one computer-readable instruction is loaded and executed by the processor to implement the method according to any one of claims 1 to 17.

21. A computer storage medium, wherein at least one computer readable instruction is stored in the computer readable storage medium, and the at least one computer readable instruction is loaded and executed by a processor to implement the method according to any one of claims 1 to 17.

22. A computer program product, comprising computer-readable instructions, wherein the computer-readable instructions are stored in a computer-readable storage medium, and the computer-readable instructions are read and executed by a processor of a computer device from the computer-readable storage medium, so that the computer device executes the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Image definition recognition method and device and storage medium

    CN108898579A

  • A method and apparatus for evaluating video sharpness

    CN111314733A

  • Multi-target prediction method and device, equipment and storage medium

    CN113392359A

  • Model training method and device, electronic equipment and storage medium

    CN114722826A

  • Training method and apparatus for image data augmentation network, and storage medium

    WO2022067874A1

Cited By

  • Image enhancement method and device, model and training method thereof, and electronic equipment

    CN119067886A