Classification model training method and device, classification method and device, equipment and storage medium

Through the symmetry consistent metric loss function and data enhancement technology, the semi-supervised learning algorithm is optimized, which solves the problem of unsupervised loss value offset in the existing technology and improves the precision and accuracy of the classification model.

CN118691882APending Publication Date: 2024-09-24BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410741973.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The unsupervised loss value determined based on relative entropy or information divergence in existing semi-supervised learning algorithms is easily affected by the order of probability distribution, resulting in lower classification accuracy of the classification model, which in turn leads to poor classification effect.

Method used

The symmetry consistent metric loss function is used to determine the enhanced data of the unlabeled data by obtaining labeled data and unlabeled data, and input it as training data into the initial classification model. The supervised and unsupervised loss functions are combined for model training, using The back propagation algorithm optimizes the model until the preset conditions are met and the target classification model is obtained.

Benefits of technology

It improves the classification accuracy of the classification model, ensures the accuracy of the information learned by the model, reduces information drift, and improves the accuracy of image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691882A
    Figure CN118691882A
Patent Text Reader

Abstract

The embodiment of the invention discloses a classification model training method and device, a classification method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: obtaining labeled data and unlabeled data; determining enhanced label-free data corresponding to the label-free data; inputting the labeled data, the real type of the labeled data, the unlabeled data and the enhanced unlabeled data as training data into the initial classification model, performing model training on the initial classification model, and calculating a loss function; and performing model optimization based on a back propagation algorithm until a preset optimization condition is met, and obtaining a trained target classification model. According to the technical scheme, the loss function comprises the unsupervised loss function composed of the supervised loss function and the symmetry consistency measurement loss function, so that the target classification model learns relatively accurate information of the labeled data and the unlabeled data, relatively accurate probability distribution of the to-be-classified data can be determined according to the target classification model, and the classification accuracy of the to-be-classified data is improved. And classification precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a classification model training method, classification method, device, equipment and storage medium. Background Art

[0002] Recently, with the development of deep learning, neural network models have been widely used in speech recognition, image classification, target detection and other fields. In the field of image classification, neural network models have achieved many research results, and in many cases have achieved recognition speed and accuracy close to that of humans. In image classification tasks, training neural network models usually requires a large amount of labeled data, but the labeling process often requires a lot of manual experience and time costs. Semi-supervised learning algorithms can use unlabeled data and labeled data to train neural network models to obtain the classification model required for image classification.

[0003] In the prior art, a semi-supervised learning algorithm can determine a supervised loss value based on labeled data, and determine an unsupervised loss value corresponding to unlabeled data based on relative entropy or information divergence. Specifically, the unsupervised loss value corresponding to the unlabeled data can be determined according to the difference value between the probability distribution corresponding to the unlabeled data and the probability distribution of enhanced unlabeled data corresponding to the unlabeled data, and then the overall loss value can be determined based on the supervised loss value and the unsupervised loss value. The neural network model can be trained based on the overall loss value determined by the supervised loss value and the unsupervised loss value to obtain the classification model required for image classification.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:

[0005] The unsupervised loss value determined based on relative entropy or information divergence is easily affected by the order of probability distribution and may be offset, resulting in lower classification accuracy of the classification model and, in turn, poor classification effect. Summary of the invention

[0006] The present invention provides a classification model training method, classification method, device, equipment and storage medium to achieve accurate classification of data.

[0007] In a first aspect, an embodiment of the present invention provides a method for training a classification model, comprising:

[0008] Acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to the unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data;

[0009] Input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, perform model training on the initial classification model, and calculate the loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetric consistent measure loss function;

[0010] The model is optimized based on the back propagation algorithm until the preset optimization conditions are met to obtain the trained target classification model.

[0011] In a second aspect, an embodiment of the present invention further provides a classification method, including:

[0012] Input the image data to be classified into a pre-trained target classification model, and obtain the probability distribution of the target classification model output, wherein the loss function of training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function;

[0013] The data type of the image data to be classified is determined according to the probability distribution.

[0014] In a third aspect, an embodiment of the present invention further provides a training device for a classification model, comprising:

[0015] An acquisition module, used to acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to each unlabeled data, wherein the labeled data is labeled image data, and the unlabeled data is unlabeled image data;

[0016] A training module, used to input labeled data, true types of labeled data, unlabeled data, and enhanced unlabeled data as training data into an initial classification model, perform model training on the initial classification model, and calculate a loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistent measure loss function;

[0017] The optimization module is used to optimize the model based on the back propagation algorithm until the preset optimization conditions are met to obtain the target classification model.

[0018] In a fourth aspect, an embodiment of the present invention further provides a classification device, including:

[0019] An input module is used to input the image data to be classified into a pre-trained target classification model and obtain the probability distribution of the target classification model output, wherein the loss function of training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function;

[0020] The determination module is used to determine the data type of the image data to be classified according to the probability distribution.

[0021] In a fifth aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0022] one or more processors;

[0023] a storage device for storing one or more programs,

[0024] When one or more programs are executed by one or more processors, the one or more processors implement a training method for any classification model in the first aspect or any classification method in the second aspect.

[0025] In the sixth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, characterized in that the computer executable instructions, when executed by a computer processor, are used to execute a training method for any classification model in the first aspect or any classification method in the second aspect.

[0026] The embodiments of the above invention have the following advantages or beneficial effects:

[0027] An embodiment of the present invention provides a training method for a classification model, comprising: obtaining labeled data and unlabeled data, determining enhanced unlabeled data corresponding to the unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data; inputting the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into an initial classification model, performing model training on the initial classification model, and calculating a loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; performing model optimization based on a back propagation algorithm until preset optimization conditions are met, thereby obtaining a trained target classification model. The above technical scheme can firstly obtain labeled data and unlabeled data, and determine the enhanced unlabeled data corresponding to the unlabeled data, so as to obtain labeled data and unlabeled data and enhance the data of unlabeled data. Secondly, the labeled data, the real type of the labeled data, the unlabeled data and the enhanced unlabeled data can be input into the initial classification model as training data. The initial classification model is supervised by the labeled data and the real labels of each labeled data to determine the supervised loss function. The initial classification model is unsupervised by the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to determine the unsupervised loss function. Then, the loss function used to optimize the model can be determined according to the supervised loss function and the unsupervised loss function. The model is optimized by the back propagation algorithm until the preset optimization conditions are met. The trained target classification model can be obtained to determine the target classification model. The loss function adopted by the trained target classification model includes the supervised loss function and the unsupervised loss function. The unsupervised loss function is a symmetry consistent metric loss function, so that the target classification model learns more accurate information about the labeled data and the unlabeled data. According to the target classification model, a more accurate probability distribution of the data to be classified can be determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A flowchart of a classification model training method provided by an embodiment of the present invention;

[0029] Figure 2 A flowchart of another classification model training method provided by an embodiment of the present invention;

[0030] Figure 3 A flowchart of determining a loss value in another classification model training method provided by an embodiment of the present invention;

[0031] Figure 4 A flow chart of a classification method provided by an embodiment of the present invention;

[0032] Figure 5A flowchart of another classification method provided by an embodiment of the present invention;

[0033] Figure 6 A schematic diagram of the structure of a classification model training device provided by an embodiment of the present invention;

[0034] Figure 7 A schematic diagram of the structure of a classification device provided by an embodiment of the present invention;

[0035] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0037] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0038] In common classification tasks, the raw data that can be collected is usually sufficient. However, data labeling often requires a lot of manual experience and time cost, resulting in relatively less labeled data that can be used for model training. The performance of neural network models in classification tasks is often positively correlated with the amount of labeled data, that is, the more labeled data there is, the better the performance of the neural network model, and vice versa. When there is insufficient labeled data, neural network models often fall into the problem of overfitting, and the network's generalization ability is very poor, which is insufficient to support the needs of practical applications. In practical applications, unlabeled data still has a certain amount of information available for model training. How to effectively use unlabeled data for model training is an urgent problem to be solved. Semi-supervised learning (SSL) algorithm can be used as a powerful solution to this problem.

[0039] At present, there are many research results on semi-supervised learning algorithms, among which the algorithm using the consistency learning criterion is more effective, and the more representative algorithm is the unsupervised data enhancement method. The unsupervised data enhancement method can effectively utilize unlabeled data, improve the network's normalization ability through the information difference before and after unlabeled data enhancement, and then enhance the classification performance of the neural network model and reduce the demand for labeled data.

[0040] Specifically, the loss value of the neural network model is determined based on the labeled data and the unlabeled data. On the one hand, the neural network model can be supervised and trained based on the labeled data to obtain the supervised loss value. On the other hand, the neural network model can be unsupervised and trained based on the unlabeled data and the enhanced unlabeled data corresponding to the unlabeled data to obtain the unsupervised loss value. Specifically, the unlabeled data and the enhanced unlabeled data corresponding to the unlabeled data can be input into the neural network model. The neural network model can output the original probability distribution corresponding to the unlabeled data and the enhanced probability distribution corresponding to the enhanced unlabeled data. The unsupervised loss value is determined based on the difference between the original probability distribution and the enhanced probability distribution. Furthermore, the loss value of the neural network model is determined based on the supervised loss value and the unsupervised loss value.

[0041] Existing technologies generally use relative entropy or information divergence to calculate unsupervised loss values. The calculation results will change with the order of the original probability distribution and the enhanced probability distribution, causing the sample information learned by the neural network model to be offset, affecting the final training effect of the neural network model, and further resulting in low classification accuracy of the classification model, and poor classification effect based on the classification model.

[0042] Therefore, the present application proposes a classification model training method to obtain a classification model with higher classification accuracy.

[0043] The training method of the classification model proposed in this application will be described in detail below with reference to diagrams and embodiments.

[0044] Figure 1 The flowchart of a classification model training method provided by an embodiment of the present invention is applicable to situations where the classification accuracy of the classification model needs to be improved. The method can be executed by a classification model training device, which can be implemented by software and / or hardware. Figure 1 The method specifically comprises the following steps:

[0045] Step 110: Acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to the unlabeled data.

[0046] Among them, the labeled data is labeled image data, and the unlabeled data is unlabeled image data.

[0047] Specifically, the obtained labeled data may include the data body and true type of the labeled data. After obtaining the labeled data, the true type of the labeled data may be determined. After obtaining the unlabeled data, data enhancement may be performed on the unlabeled data to obtain enhanced unlabeled data corresponding to the unlabeled data.

[0048] The data enhancement operation for image data can be understood as performing geometric transformation and / or color change on the image data. The geometric changes include flipping, translation, rotation, adding noise, etc., and the color changes include brightness, contrast, saturation, channel shuffling, etc. After obtaining the unlabeled image data, the enhanced unlabeled image data corresponding to the unlabeled image data can be obtained by performing geometric transformation and / or color transformation on the unlabeled data, thereby realizing data enhancement of the unlabeled image data.

[0049] In the embodiment of the present invention, the acquisition of labeled data and unlabeled data and the data enhancement of unlabeled data are achieved.

[0050] Step 120: input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, perform model training on the initial classification model, and calculate the loss function.

[0051] Among them, the loss function includes supervised loss function and unsupervised loss function, and the unsupervised loss function is a symmetry consistent measurement loss function.

[0052] Specifically, the labeled data, the true labels of each labeled data, the unlabeled data, and the enhanced unlabeled data corresponding to each unlabeled data can be input into the initial classification model as training data. The initial classification model is a convolutional neural network model. The initial classification model can be supervised based on the labeled data and the true labels of each labeled data to determine the supervised loss function. After the supervised loss function is selected, the difference between the probability distribution output by the initial classification model and the true label can be calculated according to the supervised loss function. The initial classification model can be unsupervised based on the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to determine the unsupervised loss function. The symmetry consistent metric loss function can be used to calculate the unsupervised loss value to determine the loss value in the range [0, +∞).

[0053] Furthermore, a loss function is determined based on the supervised loss function and the unsupervised loss function, and the loss function can be used to optimize the model.

[0054] In the embodiment of the present invention, after the labeled data, the real type of the labeled data, the unlabeled data, and the enhanced unlabeled data are input into the initial classification model as training data, the supervised training of the initial classification model is realized through the labeled data and the real labels of each labeled data, and the supervised loss function is determined, and the unsupervised training of the initial classification model is realized through the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data, and the unsupervised loss function is determined. Furthermore, the loss function used to optimize the model is determined according to the supervised loss function and the unsupervised loss function.

[0055] Step 130: Optimize the model based on the back propagation algorithm until the preset optimization conditions are met to obtain a trained target classification model.

[0056] Among them, the preset optimization condition can be that the number of iterations is not less than a preset number.

[0057] Specifically, in the process of performing supervised training on the initial classification model based on labeled data and the true labels of each labeled data, and performing unsupervised training on the initial classification model based on unlabeled data and enhanced unlabeled data corresponding to each unlabeled data, the initial classification model can be optimized based on the back propagation algorithm until the number of iterations of the model optimization is not less than a preset number, so as to obtain a trained target classification model.

[0058] In an embodiment of the present invention, a target classification model that has been trained is determined by a back-propagation algorithm, and the loss function used by the trained target classification model includes a supervised loss function and an unsupervised loss function. The unsupervised loss function is a symmetry consistency metric loss function, so that the target classification model learns more accurate information about labeled data and unlabeled data. According to the target classification model, a more accurate probability distribution of the data to be classified can be determined.

[0059] The training method of the classification model provided by the embodiment of the present invention includes: obtaining labeled data and unlabeled data; determining enhanced unlabeled data corresponding to the unlabeled data; inputting the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, training the initial classification model, and calculating the loss function; optimizing the model based on the back propagation algorithm until the preset optimization conditions are met, and obtaining a trained target classification model. The above technical scheme can firstly obtain labeled data and unlabeled data, and determine the enhanced unlabeled data corresponding to the unlabeled data, so as to obtain labeled data and unlabeled data and enhance the data of unlabeled data. Secondly, the labeled data, the real type of the labeled data, the unlabeled data and the enhanced unlabeled data can be input into the initial classification model as training data. The initial classification model is supervised by the labeled data and the real labels of each labeled data to determine the supervised loss function. The initial classification model is unsupervised by the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to determine the unsupervised loss function. Then, the loss function used to optimize the model can be determined according to the supervised loss function and the unsupervised loss function. The model is optimized by the back propagation algorithm until the preset optimization conditions are met. The trained target classification model can be obtained to determine the target classification model. The loss function adopted by the trained target classification model includes the supervised loss function and the unsupervised loss function. The unsupervised loss function is a symmetry consistent metric loss function, so that the target classification model learns more accurate information about the labeled data and the unlabeled data. According to the target classification model, a more accurate probability distribution of the data to be classified can be determined.

[0060] Figure 2 This is a flowchart of another classification model training method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to situations where the classification accuracy of the classification model needs to be improved. The embodiment of the present invention is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2 , the training method of the classification model provided by the embodiment of the present invention includes:

[0061] Step 210: Obtain labeled data and unlabeled data.

[0062] Specifically, the acquired image data containing the real label can be determined as labeled data, and the acquired image data not containing the real label can be determined as unlabeled data.

[0063] The labeled data may be labeled image data, and the unlabeled data may be unlabeled image data. The target classification model trained based on the labeled image data and the unlabeled image data may be used to classify the image data. Of course, the labeled data may also be labeled file data, and the unlabeled data may also be unlabeled file data. The target classification model trained based on the labeled file data and the unlabeled file data may be used to classify the file data.

[0064] In the embodiment of the present invention, the acquisition of labeled data and unlabeled data is achieved.

[0065] Step 220: Determine enhanced unlabeled data corresponding to the unlabeled data.

[0066] In one implementation, step 220 may specifically include:

[0067] Determine a data enhancement strategy and a set of data enhancement operations corresponding to the data enhancement strategy; select a first preset number of data enhancement operations from the data enhancement operation set; determine a target data enhancement operation based on the operation intensity of each selected data enhancement operation; perform data enhancement on the unlabeled data based on the target data enhancement operation to obtain enhanced unlabeled data corresponding to the unlabeled data.

[0068] Among them, the data augmentation strategy can be RandAugment, and the data augmentation operation set corresponding to RandAugment is (identity, auto contrast, equalize, rotate, solarize, color, posterize, contrast, brightness, sharpness, shear-x, shear-y, translate-x, translate-y).

[0069] Specifically, first, a data enhancement strategy and a set of data enhancement operations corresponding to the data enhancement strategy can be determined. Secondly, a first preset number of data enhancement operations can be selected from the set of data enhancement operations corresponding to the data enhancement strategy. The specific value of the first preset number can be set according to actual needs and is not specifically limited here. Then, according to the operation intensity of the selected first preset number of data enhancement operations, a target data enhancement operation is determined, and data enhancement is performed on the unlabeled data based on the target data enhancement operation to obtain enhanced unlabeled data corresponding to the unlabeled data, thereby achieving data enhancement of the unlabeled data.

[0070] It should be noted that when determining the target data enhancement operation, the operation strength of each selected data enhancement operation can be determined first, and then the target data enhancement operation can be determined based on the selected data enhancement operations and the combination of the operation strengths of each data enhancement operation. Of course, the operation strength of each data enhancement operation can also be set according to actual needs, and is not specifically limited here.

[0071] In the embodiment of the present invention, data enhancement of unlabeled data is implemented to obtain enhanced unlabeled data corresponding to the unlabeled data.

[0072] Step 230: input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, perform model training on the initial classification model, and calculate the loss function.

[0073] In one implementation, step 230 may specifically include:

[0074] A second preset number of target labeled data is selected from the labeled data, and a third preset number of target unlabeled data is selected from the unlabeled data; the probability distribution of each target labeled data, each target unlabeled data, and each target enhanced unlabeled data corresponding to each target unlabeled data is determined; a supervised loss function is determined based on the probability distribution of each target labeled data and the true type of each target labeled data; an unsupervised loss function is determined based on the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data; a loss function is determined based on the supervised loss function and the unsupervised loss function.

[0075] Furthermore, according to the probability distribution of the labeled data of each target and the actual type of the labeled data of each target, a supervised loss function is determined, including:

[0076] According to the probability distribution of each target's labeled data and the true type of each target's labeled data, the probability that the predicted type of each target's labeled data is consistent with the true type is determined; according to each probability, a supervised loss function is determined.

[0077] Furthermore, according to the probability distribution of the unlabeled data of each target and the probability distribution of the enhanced unlabeled data of each target, an unsupervised loss function is determined, including:

[0078] Determine the absolute difference between the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data; and determine the unsupervised loss function based on each absolute difference.

[0079] Specifically, the labeled data, the real labels of the labeled data, the unlabeled data, and the enhanced unlabeled data can be input into the initial classification model as training data, and the initial classification model is supervised based on the labeled data and the real labels of each labeled data to determine the supervised loss function, and the initial classification model is unsupervised based on the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to determine the unsupervised loss function. Then, the loss function is determined according to the supervised loss function and the unsupervised loss function.

[0080] On the one hand, in one iteration of model training, a second preset number of target labeled data can be extracted from the labeled data, and after the probability distribution of each target labeled data is determined, a supervised loss function is determined based on the probability distribution and true type of each target labeled data.

[0081] For example, according to the data distribution p of labeled data L (x) Randomly extract a second preset number of target labeled data Get a small batch set of labeled data. i Indicates that the target has labeled data, y i represents the true label of the target labeled data, i represents the label of the target labeled data, and m1 represents the second preset number.

[0082] According to the basic structure of the convolutional neural network model, the cross entropy function can be used as a metric when calculating the supervised loss value. After the loss function is selected, the difference between the probability distribution output by the initial classification model and the true label can be calculated based on the loss function.

[0083] Therefore, when the initial classification model is supervisedly trained based on the labeled data and the true labels of each labeled data, the supervised loss function can be determined based on Formula 1 to determine the difference between the probability distribution output by the initial classification model and the true label.

[0084]

[0085] Among them, x1 represents the target labeled data, θ represents the network parameters, and f * represents the perfect classifier expected to be learned, N represents the number of data types, c represents the data type of the target labeled data, 1(y i ==c) is a sign function, if it is True inside, then 1(y i ==c) is 1, if it is False inside, then 1(y i ==c) is 0.

[0086] On the other hand, in one iteration of model training, a third preset number of target unlabeled data can be extracted from the unlabeled data, and after determining the enhanced target unlabeled data corresponding to each target unlabeled data, the unsupervised loss function can be determined according to the probability distribution of each target unlabeled data and the probability distribution of the enhanced target unlabeled data corresponding to each target unlabeled data.

[0087] For example, according to the data distribution p of labeled data U (x) Randomly extract a third preset number of target unlabeled data Get a small batch set of unlabeled data. i represents the target unlabeled data, i represents the label of the target unlabeled data, and m2 represents the third preset number.

[0088] When calculating the unsupervised loss value, a symmetric consistent metric loss function can be used to determine the loss value in the range [0, +∞). For example, the absolute log-likelihood estimation (ALE) can be used to determine the absolute difference between the probability distribution of each target unlabeled data and the probability distribution of the target enhanced unlabeled data corresponding to each target unlabeled data, and then determine the unsupervised loss function.

[0089] Therefore, when the initial classification model is trained unsupervisedly based on the unlabeled data and the target enhanced unlabeled data corresponding to each unlabeled data, the unsupervised loss function can be determined based on Formula 2 to determine the difference between the probability distribution of the target unlabeled data output by the initial classification model and the probability distribution of the target enhanced unlabeled data corresponding to the target unlabeled data.

[0090]

[0091] Among them, x2 represents the target unlabeled data, represents the data enhancement operation, represents the enhanced target unlabeled data, represents a replicated version of the backbone network parameters θ, Does not participate in back propagation and gradient update, represents the probability distribution of the target unlabeled data, represents the probability distribution of the target enhanced unlabeled data corresponding to the target unlabeled data, c represents the predicted type of the target unlabeled data, and y i Indicates the probability that the data type of the target unlabeled data is the predicted type.

[0092] Furthermore, the loss function used for model training can be determined Among them, λ represents the weight factor of the unsupervised loss value, which is used to balance the supervised loss value and the unsupervised loss value. In this application, λ can be 1. Based on this loss function, the initial training model can be trained so that the initial training model learns the information of the supervised data and the accurate information of the unsupervised data.

[0093] Figure 3 A flowchart of determining a loss value in another classification model training method provided by an embodiment of the present invention, such as Figure 3 As shown, when the labeled data is labeled image data and the unlabeled data is unlabeled image data, the labeled image data can be input into the initial classification model to determine the probability distribution of the labeled image data, and the supervised loss value can be determined based on the probability distribution of the labeled image data and the real image type. At the same time, the unlabeled image data and the enhanced unlabeled image data obtained by performing image enhancement on the unlabeled image data can also be input into the initial classification model to determine the probability distribution of the unlabeled image data and the probability distribution of the enhanced unlabeled image data, and the unsupervised loss value can be determined based on the probability distribution of the unlabeled image data and the probability distribution of the enhanced unlabeled image data, and then the loss value can be determined based on the supervised loss value and the unsupervised loss value.

[0094] In the embodiment of the present invention, after the labeled data, the real type of the labeled data, the unlabeled data, and the enhanced unlabeled data are input into the initial classification model as training data, the supervised training of the initial classification model is realized through the labeled data and the real labels of each labeled data, and the supervised loss function is determined, and the unsupervised training of the initial classification model is realized through the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data, and the unsupervised loss function is determined. Furthermore, the loss function used to optimize the model is determined according to the supervised loss function and the unsupervised loss function.

[0095] Step 240: Optimize the model based on the back propagation algorithm until the preset optimization conditions are met to obtain a trained target classification model.

[0096] Among them, the preset optimization conditions can be: the number of iterations is not less than the preset number, the iteration time is not less than the preset time, or the loss function converges.

[0097] Specifically, in the process of performing supervised training on the initial classification model based on labeled data and the true labels of each labeled data, and performing unsupervised training on the initial classification model based on unlabeled data and enhanced unlabeled data corresponding to each unlabeled data, the initial classification model can be optimized based on the back propagation algorithm until the number of iterations is not less than the preset number, the iteration time is not less than the preset time, or the loss function converges, so as to obtain a trained target classification model.

[0098] In an embodiment of the present invention, a target classification model that can be used for data classification is obtained by optimizing the model through the back-propagation algorithm, and the target classification model learns relatively accurate information about labeled data and unlabeled data. According to the target classification model, a relatively accurate probability distribution of the data to be classified can be determined.

[0099] The training method of the classification model provided by the embodiment of the present invention includes: obtaining labeled data and unlabeled data; determining the enhanced unlabeled data corresponding to the unlabeled data; inputting the labeled data, the real type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, training the initial classification model, and calculating the loss function; optimizing the model based on the back propagation algorithm until the preset optimization conditions are met, and obtaining the trained target classification model. The above technical scheme can first obtain labeled data and unlabeled data to achieve the acquisition of labeled data and unlabeled data, and then determine the enhanced unlabeled data corresponding to the unlabeled data to achieve data enhancement of the unlabeled data, and obtain the corresponding enhanced unlabeled data corresponding to the unlabeled data, and then input the labeled data, the real type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, and perform supervised training on the initial classification model through the labeled data and the real labels of each labeled data to achieve the determination of the supervised loss function, and perform unsupervised training on the initial classification model through the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to achieve the determination of the unsupervised loss function, and then perform unsupervised training on the initial classification model through the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to achieve the determination of the unsupervised loss function, and then perform unsupervised training on the initial classification model through the unlabeled data and the enhanced unlabeled data corresponding to each unlabeled data to achieve the determination of the unsupervised loss function, and then perform unsupervised training on the initial classification model through the unlabeled data and the enhanced unlabeled data corresponding to the ... The loss function used to optimize the model can be determined based on the supervised loss function and the unsupervised loss function, and the model can be optimized through the back propagation algorithm until the number of iterations is not less than the preset number of times, the iteration time is not less than the preset time, or the loss function converges, and the trained target classification model can be obtained, and the target classification model can be determined. The loss function used to train the target classification model includes a supervised loss function and an unsupervised loss function. The unsupervised loss function is a symmetry consistent measure loss function. The symmetry consistent measure loss function can specifically determine the loss value based on the absolute value log-likelihood estimation. The absolute value log-likelihood estimation has the property of input symmetry. According to the absolute value log-likelihood estimation, the loss value with a value range of [0, +∞) can be determined. Therefore, the target classification model trained according to the supervised loss function and the unsupervised loss function determined according to the absolute value log-likelihood estimation can learn more accurate information about labeled data and unlabeled data, reducing information offset. Furthermore, a more accurate classification result can be determined according to the target classification model.

[0100] Figure 4The flowchart of a classification method provided by an embodiment of the present invention is applicable to situations where the classification accuracy needs to be improved. The method can be executed by a classification device, which can be implemented by software and / or hardware. Figure 4 The method specifically comprises the following steps:

[0101] Step 410: input the image data to be classified into a pre-trained target classification model, and obtain the probability distribution of the target classification model output.

[0102] The target classification model is trained by labeled data and unlabeled data. The loss function used to train the target classification model consists of a supervised loss function and an unsupervised loss function. The supervised loss function is used to determine the loss value corresponding to the labeled data, and the unsupervised loss function is used to determine the loss value corresponding to the unlabeled data. In addition, the unsupervised loss function can be a symmetry consistency metric loss function, and the loss value can be determined based on the absolute value log-likelihood estimate. Therefore, according to the target classification model, a more accurate classification result of the image data to be classified can be determined.

[0103] Specifically, the image data to be classified is input as input data into a pre-trained target classification model, and the target classification model can determine the probability distribution of the image data to be classified, and the probability distribution can indicate the probability that the image data to be classified is each image type.

[0104] Since the target classification model has learned relatively accurate information about labeled data and unlabeled data, a relatively accurate probability distribution of the image data to be classified can be determined based on the target classification model.

[0105] In an embodiment of the present invention, a target classification model obtained by training a loss function composed of an unsupervised loss function composed of a supervised loss function and a symmetry consistency metric loss function is used to determine a more accurate probability distribution of the image data to be classified.

[0106] Step 420: Determine the data type of the image data to be classified according to the probability distribution.

[0107] Specifically, after determining the probability distribution of the image data to be classified, the image type corresponding to the maximum probability in the probability distribution can be determined as the data type of the image data to be classified, thereby determining the image type of the image data to be classified and further classifying the image data to be classified.

[0108] In the embodiment of the present invention, the image type of the image data to be classified is determined according to the probability distribution of the image data to be classified, so as to classify the image data to be classified.

[0109] The classification method provided by the embodiment of the present invention includes: inputting the image data to be classified into a pre-trained target classification model, and obtaining the probability distribution of the target classification model output; determining the data type of the image data to be classified according to the probability distribution. In the above technical scheme, after the image data to be classified is input into the target classification model trained by the loss function composed of the unsupervised loss function composed of the supervised loss function and the symmetry consistency metric loss function, the target classification model can determine a relatively accurate probability distribution of the image data to be classified, and then determine the image type of the image data to be classified according to the probability distribution of the image data to be classified, thereby realizing the classification of the image data to be classified and improving the classification accuracy.

[0110] Figure 5 This is a flowchart of another classification method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to situations where the classification accuracy needs to be improved. The embodiment of the present invention is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 5 , the classification method provided by the embodiment of the present invention includes:

[0111] Step 510: input the image data to be classified into a pre-trained target classification model, and obtain the probability distribution of the target classification model output.

[0112] As mentioned above, the image data to be classified is input as input data into a pre-trained target classification model, and the target classification model can determine the probability distribution of the image data to be classified, and the probability distribution can indicate the probability that the image data to be classified is each image type.

[0113] In the embodiment of the present invention, a relatively accurate probability distribution of the image data to be classified is determined by using a target classification model.

[0114] Step 520: Determine the data type corresponding to the maximum probability in the probability distribution as the data type of the image data to be classified.

[0115] Specifically, after determining the probability distribution of the image data to be classified, the data type corresponding to the maximum probability in the probability distribution can be determined as the image type of the image data to be classified, thereby determining the image type of the image data to be classified and further classifying the image data to be classified.

[0116] In the embodiment of the present invention, the image type of the image data to be classified is determined according to the probability distribution of the image data to be classified, so as to classify the image data to be classified.

[0117] The classification method provided by the embodiment of the present invention includes: inputting the image data to be classified into a pre-trained target classification model, and obtaining the probability distribution of the target classification model output; determining the data type corresponding to the maximum probability in the probability distribution as the data type of the image data to be classified. In the above technical scheme, after the image data to be classified is input into the target classification model trained by the loss function composed of the unsupervised loss function composed of the supervised loss function and the symmetry consistency metric loss function, the target classification model can determine a relatively accurate probability distribution of the image data to be classified, and then the data type corresponding to the maximum probability in the probability distribution can be determined as the image type of the image data to be classified, thereby realizing the classification of the image data to be classified and improving the classification accuracy.

[0118] Figure 6 A schematic diagram of the structure of a classification model training device provided in an embodiment of the present invention. The device and the classification methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the classification device can refer to the embodiment of the classification model training method.

[0119] The specific structure of the training device of the classification model is as follows Figure 6 As shown, including:

[0120] An acquisition module 610 is used to acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to each unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data;

[0121] A training module 620 is used to input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into the initial classification model, perform model training on the initial classification model, and calculate the loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function;

[0122] The optimization module 630 is used to optimize the model based on the back propagation algorithm until the preset optimization conditions are met to obtain the target classification model.

[0123] Based on the above embodiment, the acquisition module 610 is specifically used for:

[0124] Acquire labeled data and unlabeled data; determine a data enhancement strategy and a set of data enhancement operations corresponding to the data enhancement strategy; select a first preset number of data enhancement operations from the data enhancement operation set; determine a target data enhancement operation based on the operation intensity of each selected data enhancement operation; perform data enhancement on the unlabeled data based on the target data enhancement operation to obtain enhanced unlabeled data corresponding to the unlabeled data.

[0125] Based on the above embodiment, the training module 620 is specifically used for:

[0126] A second preset number of target labeled data is selected from the labeled data, and a third preset number of target unlabeled data is selected from the unlabeled data; the probability distribution of each target labeled data, each target unlabeled data, and each target enhanced unlabeled data corresponding to each target unlabeled data is determined; a supervised loss function is determined based on the probability distribution of each target labeled data and the true type of each target labeled data; an unsupervised loss function is determined based on the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data; a loss function is determined based on the supervised loss function and the unsupervised loss function.

[0127] In one implementation, determining a supervised loss function based on the probability distribution of labeled data for each target and the true type of labeled data for each target includes:

[0128] According to the probability distribution of each target's labeled data and the true type of each target's labeled data, the probability that the predicted type of each target's labeled data is consistent with the true type is determined; according to each probability, a supervised loss function is determined.

[0129] In one implementation, the unsupervised loss function is determined based on the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data, including:

[0130] Determine the absolute difference between the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data; and determine the unsupervised loss function based on each absolute difference.

[0131] The classification model training device provided in the embodiment of the present invention can execute the classification model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the classification model training method.

[0132] It is worth noting that in the embodiment of the training device of the above-mentioned classification model, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0133] Figure 7 This is a schematic diagram of the structure of a classification device provided by an embodiment of the present invention. The device and the classification methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the classification device can refer to the embodiment of the above classification method.

[0134] The specific structure of the classification device is as follows Figure 7 As shown, including:

[0135] An input module 710 is used to input the image data to be classified into a pre-trained target classification model and obtain the probability distribution of the target classification model output, wherein the loss function of training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function;

[0136] The determination module 720 is used to determine the data type of the image data to be classified according to the probability distribution.

[0137] Based on the above embodiment, the determination module 720 is specifically used for:

[0138] The data type corresponding to the maximum probability in the probability distribution is determined as the data type of the image data to be classified.

[0139] The classification device provided in the embodiment of the present invention can execute the classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the classification method.

[0140] It is worth noting that in the embodiment of the above-mentioned classification device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0141] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 8 A block diagram of an exemplary computer device 8 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The computer device 8 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0142] like Figure 8 As shown, the computer device 8 is in the form of a general-purpose computing electronic device. The components of the computer device 8 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0143] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0144] The computer device 8 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 8, including volatile and non-volatile media, removable and non-removable media.

[0145] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 8 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0146] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0147] The computer device 8 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 8, and / or any device that enables the computer device 8 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 8 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. Figure 8 As shown, the network adapter 20 communicates with other modules of the computer device 8 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with computer device 8, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0148] The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, such as implementing the training method or classification method of the classification model provided in the embodiment of the present invention.

[0149] Among them, the training method of the classification model includes:

[0150] Obtain labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to the unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data; input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data into the initial classification model as training data, perform model training on the initial classification model, and calculate the loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; optimize the model based on the back propagation algorithm until the preset optimization conditions are met, and obtain the trained target classification model.

[0151] The classification method includes:

[0152] The image data to be classified is input into a pre-trained target classification model, and the probability distribution of the target classification model output is obtained, wherein the loss function of training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; the data type of the image data to be classified is determined according to the probability distribution.

[0153] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the classification method provided by any embodiment of the present invention.

[0154] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the training method or classification method of the classification model provided by the embodiment of the present invention is implemented, for example.

[0155] Among them, the training method of the classification model includes:

[0156] Obtain labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to the unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data; input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data into the initial classification model as training data, perform model training on the initial classification model, and calculate the loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; optimize the model based on the back propagation algorithm until the preset optimization conditions are met, and obtain the trained target classification model.

[0157] The classification method includes:

[0158] The image data to be classified is input into a pre-trained target classification model, and the probability distribution of the target classification model output is obtained, wherein the loss function of training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; the data type of the image data to be classified is determined according to the probability distribution.

[0159] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0160] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0161] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0162] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0163] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0164] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A classification model training method, characterized in that: include: Acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to the unlabeled data, wherein the labeled data is labeled image data and the unlabeled data is unlabeled image data; Inputting the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into an initial classification model, performing model training on the initial classification model, and calculating a loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; The model is optimized based on the back propagation algorithm until the preset optimization conditions are met to obtain the trained target classification model.

2. The training method of the classification model according to claim 1, characterized in that: Determining enhanced unlabeled data corresponding to the unlabeled data includes: Determine a target data enhancement operation according to the operation intensity of each selected data enhancement operation; The unlabeled data is data enhanced based on the target data enhancement operation to obtain enhanced unlabeled data corresponding to the unlabeled data.

3. The training method of the classification model according to claim 2, characterized in that: Before determining the target data augmentation operation according to the operation intensity of each selected data augmentation operation, the following is also included: Determine a data enhancement strategy and a set of data enhancement operations corresponding to the data enhancement strategy; A first preset number of data enhancement operations are selected from the set of data enhancement operations.

4. The training method of the classification model according to any one of claims 1 to 3, characterized in that: Inputting the labeled data, the true category of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into an initial classification model for model training, and calculating a loss function, including: Selecting a second preset number of target labeled data from the labeled data, and selecting a third preset number of target unlabeled data from the unlabeled data; Determine the probability distribution of each target labeled data, each target unlabeled data, and each target enhanced unlabeled data corresponding to each target unlabeled data; Determine a supervised loss function according to the probability distribution of the labeled data of each target and the true type of the labeled data of each target; Determining an unsupervised loss function according to the probability distribution of each of the target unlabeled data and the probability distribution of each of the target enhanced unlabeled data; The loss function is determined according to the supervised loss function and the unsupervised loss function.

5. The training method of the classification model according to claim 4, characterized in that: According to the probability distribution of the labeled data of each target and the true type of the labeled data of each target, a supervised loss function is determined, including: Determine the probability that the predicted type of each target labeled data is consistent with the true type according to the probability distribution of each target labeled data and the true type of each target labeled data; According to each of the probabilities, the supervised loss function is determined.

6. The training method of the classification model according to claim 4, characterized in that: Determining an unsupervised loss function according to the probability distribution of each target unlabeled data and the probability distribution of each target enhanced unlabeled data includes: Determining an absolute difference between a probability distribution of each of the target unlabeled data and a probability distribution of each of the target enhanced unlabeled data; The unsupervised loss function is determined according to each of the absolute differences.

7. A classification method, characterized in that: include: Inputting the image data to be classified into a pre-trained target classification model, and obtaining the probability distribution of the target classification model output, wherein the loss function for training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; The data type of the image data to be classified is determined according to the probability distribution.

8. The classification method according to claim 7, characterized in that: Determining the data type of the image data to be classified according to the probability distribution includes: The data type corresponding to the maximum probability in the probability distribution is determined as the data type of the image data to be classified.

9. A training device for a classification model, characterized in that: include: An acquisition module, used to acquire labeled data and unlabeled data, and determine enhanced unlabeled data corresponding to each of the unlabeled data, wherein the labeled data is labeled image data, and the unlabeled data is unlabeled image data; A training module, used to input the labeled data, the true type of the labeled data, the unlabeled data, and the enhanced unlabeled data as training data into an initial classification model, perform model training on the initial classification model, and calculate a loss function, wherein the loss function includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; The optimization module is used to optimize the model based on the back propagation algorithm until the preset optimization conditions are met to obtain the target classification model.

10. A classification device, characterized in that: include: An input module, used to input the image data to be classified into a pre-trained target classification model, and obtain the probability distribution of the target classification model output, wherein the loss function for training the target classification model includes a supervised loss function and an unsupervised loss function, and the unsupervised loss function is a symmetry consistency metric loss function; A determination module is used to determine the data type of the image data to be classified according to the probability distribution.

11. A computer device, characterized in that: The computer device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the classification model as described in any one of claims 1-6 or the classification method as described in any one of claims 7-8.

12. A storage medium containing computer executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to execute the training method of the classification model as described in any one of claims 1-6 or the classification method as described in any one of claims 7-8.

Citation Information

Cited By

  • Self-supervised mixed domain adaptive multi-garbage classification device and control and identification method

    CN119976121A