A post-processing method, device and equipment of a classification task and a storage medium

By using a correlation correction matrix and a cascaded model to correct the classification results in multi-label video classification tasks, the problem of low accuracy caused by ignoring label correlation in existing technologies is solved, and higher classification accuracy is achieved.

CN115294397BActive Publication Date: 2026-01-02GUANGDONG LVAN IND & COMMERCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210969840.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-01-02
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

Existing technologies for multi-label video classification tasks use a uniform single threshold for classification, ignoring the correlation between labels, resulting in low classification accuracy.

Method used

The predicted probabilities are obtained by using the original classification model. The positive and negative examples of each category are converted into positive and negative examples according to the optimal threshold range. The classification results are then corrected using the correlation correction matrix and the cascade model to supplement the correlation information between the labels.

Benefits of technology

It significantly improves the prediction accuracy of multi-label classification tasks. By considering the correlation between labels to correct the classification results, it improves the accuracy of the classification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294397B_ABST
    Figure CN115294397B_ABST
Patent Text Reader

Abstract

The application discloses a post-processing method, device and equipment for a classification task and a storage medium. The method comprises the following steps: obtaining a prediction probability of a to-be-predicted video in each category by using an original classification model; converting the prediction probability of the to-be-predicted video in each category into positive and negative examples according to a best threshold interval of each category, and obtaining a first classification prediction result; determining a correlation correction matrix according to the correlation between each category in a training set, and correcting the first classification prediction result according to the correlation correction matrix to obtain a second classification prediction result; correcting the second classification prediction result by using a cascade model to obtain a final classification prediction result of the to-be-predicted video; wherein the categories in the cascade model are obtained according to the correlation correction matrix. The embodiment of the application can improve the prediction accuracy of a multi-label classification task.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, and in particular to a post-processing method and device for a classification task, an equipment and a storage medium. BACKGROUND

[0002] Human behavior recognition is an important topic in the field of computer vision. It has wide application value in behavior detection, video monitoring, human-computer interaction and other fields.

[0003] Human behavior recognition based on machine vision is to add a label of action type to a video containing human action. With the development of big data technology, multi-label data is becoming more and more complex, the number of labels is increasing, and the distribution of different labels in the data is also becoming more and more complex. For example, the TinyVIRT_V2 data set has 26 labels including running, walking, standing, greeting, carrying, etc. Each sample in the data set has one to multiple labels.

[0004] For multi-label video classification tasks, the common method is to convert it into multiple binary classification problems, each binary classification uses a 3D convolutional neural network for learning, and uses a sigmoid function to output a prediction probability value, and then sets a certain threshold to distinguish positive and negative examples. Due to the different sample distributions of the training set, the number of samples of each class differs greatly, and there is a certain correlation between each class. It is not reasonable to use a single threshold for all classes, and the correlation between labels is also ignored. SUMMARY

[0005] The present application provides a post-processing method, device, equipment and storage medium for a classification task to correct the classification results of multi-labels.

[0006] According to an aspect of the present application, a post-processing method for a classification task is provided, comprising:

[0007] Using an original classification model to obtain the prediction probability of a to-be-predicted video in each category;

[0008] According to the best threshold interval of positive and negative examples of each category, the prediction probability of the to-be-predicted video in each category is converted into positive and negative examples to obtain a first classification prediction result;

[0009] According to the correlation between each category in the training set, a correlation correction matrix is determined, and the first classification prediction result is corrected according to the correlation correction matrix to obtain a second classification prediction result;

[0010] Using a cascade model to correct the second classification prediction result to obtain the final classification prediction result of the to-be-predicted video; wherein the categories in the cascade model are obtained according to the correlation correction matrix.

[0011] According to another aspect of the present application, there is provided a post-processing device for a classification task, comprising:

[0012] a prediction probability determination module configured to obtain prediction probabilities of a to-be-predicted video in each category using an original classification model;

[0013] a first classification prediction module configured to convert the prediction probabilities of the to-be-predicted video in each category into positive and negative examples according to a best threshold interval of positive and negative examples of each category, and obtain a first classification prediction result;

[0014] a second classification prediction module configured to determine a correlation correction matrix according to correlations between categories in a training set, and correct the first classification prediction result according to the correlation correction matrix to obtain a second classification prediction result;

[0015] a final classification prediction module configured to correct the second classification prediction result using a cascade model to obtain a final classification prediction result of the to-be-predicted video; wherein categories in the cascade model are obtained according to the correlation correction matrix.

[0016] According to another aspect of the present application, there is provided an electronic device, comprising:

[0017] at least one processor; and

[0018] a memory connected to the at least one processor in communication; wherein,

[0019] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the post-processing method for a classification task according to any one of the embodiments of the present application.

[0020] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to perform the post-processing method for a classification task according to any one of the embodiments of the present application when executed by the processor.

[0021] The embodiments of the present application greatly improve the prediction accuracy of a multi-label classification task by sequentially correcting the classification result through a correlation correction matrix and a cascade model according to the correlations between categories after converting the multi-label classification task into multiple binary classification tasks.

[0022] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.

[0024] Figure 1 is a flow chart of a post-processing method of a classification task according to an embodiment of the present application;

[0025] Figure 2 is a flow chart of a post-processing method of a classification task according to another embodiment of the present application;

[0026] Figure 3 is a structural schematic diagram of a post-processing device of a classification task according to another embodiment of the present application;

[0027] Figure 4 is a structural schematic diagram of an electronic device for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the person skilled in the art better understand the present application, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should be within the scope of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0030] Figure 1A flowchart of a post-processing method of a classification task according to an embodiment of the present application. The embodiment can be applied to the case where the classification prediction result is corrected based on the correlation between multiple labels after the multi-label video classification task is converted into multiple binary classification problems. The method can be executed by a post-processing device of a classification task, which can be implemented in the form of hardware and / or software and can be configured in an electronic device with corresponding data processing capability. As shown in FIG. 10, the method comprises: Figure 1

[0031] S110, obtaining the prediction probability of the to-be-predicted video in each category by using the original classification model.

[0032] The to-be-predicted video contains human actions and can have one or more labels at the same time.

[0033] Specifically, the multi-label video classification task is converted into multiple binary classification problems. The labels of the training set are one-hot encoded. Assuming that the total number of categories of the training set is n, the label of each sample of the training set is an n-dimensional vector. Assuming that the first sample belongs to n1 and n2 target behaviors, the n1 and n2 positions in the label vector of the first sample are set to 1, and the remaining positions are set to 0. The labels of the remaining samples are processed in the same way. The training set is sent into a 3D convolutional neural network for learning. The output of the network is converted into the probability that the sample belongs to each category using a sigmoid function, and BEC LOSS is used as the loss function of the model.

[0034] The trained original classification model is used to predict the test set. Assuming that the total number of samples of the test set is q, the prediction probability value matrix with the shape of q x n can be output after the original classification model is used for prediction.

[0035] S120, converting the prediction probability of the to-be-predicted video in each category into positive and negative examples according to the best threshold interval of each category, to obtain a first classification prediction result.

[0036] Specifically, a best threshold interval is searched for each category according to the F1 value on the validation set of the original classification model. The positive examples are within the threshold interval, and the negative examples are outside the threshold interval, so as to obtain the first classification prediction result.

[0037] Optionally, before the prediction probability of the to-be-predicted video in each category is converted into positive and negative examples according to the best threshold interval of each category, the method further comprises:

[0038] A candidate array of threshold interval boundaries is constructed, and the elements in the candidate array are used as candidate boundaries of the threshold interval. The F1 value of the candidate threshold interval composed of each candidate boundary is calculated on the validation set, and the candidate threshold interval with the highest F1 value is used as the best threshold interval of the current category.​

[0039] Specifically, due to the different sample distribution of the training set, the number of samples of each class is quite different, and there is a certain correlation between classes, so it is not reasonable to use a single threshold to distinguish positive and negative examples. Therefore, the present application searches for a best threshold interval for each class on the validation set based on the F1 value as the standard, and the output probability value within the threshold interval is a positive example, and the output probability value outside the threshold interval is a negative example. Assuming that the output probability value of the mth class is pm, and the searched threshold interval is [t m1 ,t m2 ], the final prediction result y m is:

[0040]

[0041] According to the prediction result y m , the precision P, recall R and F1 value are calculated.

[0042]

[0043]

[0044]

[0045] Among them, TP is the number of samples in the validation set whose label is 1 and whose prediction is also 1; FP is the number of samples in the validation set whose label is 0 and whose prediction is 1; FN is the number of samples in the validation set whose label is 1 and whose prediction is 0.

[0046] A candidate array of interval lower bounds is created with a numerical range of 0-1 and an interval of 0.01, and each element in the array is used as a different lower bound of each candidate threshold interval, and 1 is used as the same upper bound of each candidate threshold interval. The F1 values of all candidate threshold intervals are calculated on the validation set according to the F1 value calculation formula, and the lower bound of the candidate threshold interval with the highest F1 value is taken as the best threshold interval lower bound t m1 for the mth class. A candidate array of interval upper bounds is created with a numerical range of t m1 +0.2-1 and an interval of 0.01, and each element in the array is used as a different upper bound of each candidate threshold interval, and t m1 is used as the same lower bound of each candidate threshold interval. The F1 values of all candidate threshold intervals are calculated on the validation set according to the F1 value calculation formula, and the candidate threshold interval with the highest F1 value is taken as the best threshold interval [t m1 ,t m2 ] for the mth class, and the best threshold intervals of other classes are searched in the same way. Through threshold interval searching, the best threshold intervals of n classes are obtained.

[0047] Using the searched best threshold interval of each category, the test set prediction probability value is converted into positive and negative examples, and the test set prediction result in the form of qxn is obtained, that is, the first classification prediction result.

[0048] In S130, the correlation correction matrix is determined according to the correlation between each category in the training set, and the first classification prediction result is corrected according to the correlation correction matrix to obtain the second classification prediction result.

[0049] Specifically, for the prediction of the to-be-predicted video, there is usually a certain correlation between the categories thereof. Although the conversion of the multi-label video classification task into multiple binary classification problems can reduce the complexity of classification, this processing method for reducing the complexity will ignore the correlation between the labels. Therefore, the real correlation data between each category is obtained from the training set, and a correlation correction matrix is generated according to the correlation data, which records the correlation between each category and other categories. The second classification prediction result after correction supplements the correlation information between the categories that is lost due to the conversion of the multi-label classification task into multiple binary classification tasks, compared with the first classification prediction result.

[0050] Optionally, the determination of the correlation correction matrix according to the correlation between each category in the training set comprises:

[0051] A category correlation quantity statistical matrix is generated according to the belonging labels of each sample in the training set, the category correlation quantity statistical matrix is normalized to obtain a correlation coefficient matrix, and elements with a coefficient of 0 in the correlation coefficient matrix are assigned a specific value to obtain the correlation correction matrix; the specific value is a negative number.

[0052] Specifically, the category correlation quantity statistical matrix is generated according to the belonging labels of each sample in the training set, and the category correlation quantity statistical matrix records the number of overlapping samples between any two categories in the training set. The category correlation quantity statistical matrix is normalized to obtain a correlation coefficient that quantifies the correlation between any two categories, and a correlation coefficient matrix composed of the correlation coefficients is generated. The size of the correlation coefficient represents the correlation between the two categories, which is usually represented by 0-1. The larger the value of the correlation coefficient is, the higher the correlation between the two categories is; on the contrary, the smaller the value of the correlation coefficient is, the lower the correlation between the two categories is. The matrix elements with a correlation coefficient of 0 can be assigned a negative number (for example, -1) for subsequent matrix operations and correlation judgments.

[0053] Optionally, the generation of the category correlation quantity statistical matrix according to the belonging labels of each sample in the training set comprises:

[0054] Obtain other labels of each sample in the training set under any label, and determine the number of overlapping samples of the label and other labels; generate a class-related quantity statistical matrix according to the number of overlapping samples of each label and other labels.

[0055] Specifically, assuming that the total number of classes of the multi-label classification is n, the shape of the class-related quantity statistical matrix is n x n, as follows.

[0056]

[0057] The mth column in the matrix is the number of overlapping samples when the mth label exists in the training set, that is, the number of samples with two labels. For example, N mm is the number of samples with the mth label in the training set, N m1 is the number of overlapping samples when the mth label exists in the training set, and the rest of the elements are similar.

[0058] The above matrix is normalized, and each element in the mth column is divided by N mm . Each element in the mth column of the normalized matrix represents the correlation coefficient between the mth class and the rest of the classes, where the mth column mth row is 1, the rest of the mth column is between 0 and 1, and equal to 0 indicates no correlation, equal to 1 indicates complete correlation, greater than 0 and less than 1 indicates partial correlation, and the greater the value, the greater the correlation. Modify the elements equal to 0 in the matrix to a specific value, for example, -1, that is, set the correlation coefficient of complete irrelevance to -1, to obtain the final correlation correction matrix.

[0059]

[0060] (Modify the elements equal to 0 in the matrix to -1) Multiply the first classification prediction result by the correlation correction matrix to obtain an intermediate matrix, set the elements greater than or equal to 0 in the intermediate matrix to 1 and the elements less than 0 to 0, to obtain the second classification prediction result Y q×n .

[0061]

[0062] (Modify the elements equal to 0 in the matrix to -1)

[0063] (Set the elements greater than or equal to 0 in the matrix to 1 and the elements less than 0 to 0)

[0064] S140, using a cascaded model to correct the second classification prediction result to obtain the final classification prediction result of the video to be predicted.

[0065] wherein the classes in the cascaded model are obtained according to the correlation correction matrix.

[0066] Specifically, the cascade model is retrained with the cascade classification categories obtained from the correlation correction matrix as labels during training. Since the total number of cascade classification categories is less than the total number of original classification categories, the category learning is more sufficient, and the classification accuracy of the cascade model is higher than that of the original classification model. The second classification prediction result is corrected through the prediction result of the cascade model, and the correction result is taken as the final classification prediction result of the to-be-predicted video.

[0067] The embodiment of the application greatly improves the prediction accuracy of the multi-label classification task by converting the multi-label classification task into multiple binary classification tasks, and then correcting the classification result through the correlation correction matrix and the cascade model according to the correlation between categories.

[0068] Figure 2 A flowchart of a post-processing method of a classification task is provided for another embodiment of the application, which is optimized and improved on the basis of the above-mentioned embodiment. As shown in Figure 2 The method comprises:

[0069] S210, obtaining the prediction probability of the to-be-predicted video in each category using the original classification model.

[0070] S220, converting the prediction probability of the to-be-predicted video in each category into positive and negative examples according to the best threshold interval of each category, to obtain the first classification prediction result.

[0071] S230, determining the correlation correction matrix according to the correlation between each category in the training set, and correcting the first classification prediction result according to the correlation correction matrix to obtain the second classification prediction result.

[0072] S240, obtaining the first category and the second category corresponding to the minimum element in the correlation correction matrix; clustering the original classification categories with the first category and the second category to convert them into cascade classification categories; retraining the original classification model based on the cascade classification categories, and taking the retrained model as the cascade model.

[0073] Specifically, the two categories n1 (first category) and n2 (second category) corresponding to the smallest element in the correlation correction matrix are extracted. If there are multiple smallest elements, one is randomly selected. Clustering is then performed on these two categories. Categories with a correlation greater than 0.5 with n1 are grouped into group k1, and those with a correlation greater than 0.5 with n2 are grouped into group k2. If a category has a correlation greater than 0.5 with both categories, it is grouped into the group with the higher correlation. For the remaining categories, one is randomly selected, and those with a correlation greater than 0.5 are grouped into group 1. This process is repeated for the remaining categories until no categories remain. Finally, the total number of categories n is divided into k groups, thus clustering the original classification categories into cascaded classification categories. The k-classification model (i.e., the cascaded model) is then retrained using a 3D convolutional neural network.

[0074] S250. Obtain the cascaded classification category prediction result of the video to be predicted through the cascaded model; fuse the cascaded classification category prediction result and the second classification prediction result to obtain the final classification prediction result of the video to be predicted.

[0075] Specifically, on the validation set, the optimal threshold interval for k classes is searched using F1 as the criterion. Then, the trained k-class classification model is used to predict the video to be predicted, and the searched optimal threshold interval for k classes is used to distinguish between positive and negative examples, thus obtaining the cascaded classification prediction results of the k-class classification model. The search process for the optimal threshold interval for k classes is the same as that for the optimal threshold interval for n classes, and will not be elaborated on here.

[0076]

[0077] The cascaded classification prediction results Y of k-classification q×k Transform into Y′ q×n The specific process is as follows: First, form a q*n matrix with all elements equal to 0. Assume the first sample's classification prediction result is k1, and group k1 includes three categories: n1, n3, and n5. Then, set the elements in the first row and the first, third, and fifth columns of the q*n matrix to 1. Repeat this process for the remaining samples. Then, set the cascaded classification prediction result Y′... q×n The second classification prediction result Y obtained by correcting with the correlation correction matrix q×n Multiplying the corresponding positions yields the final classification prediction result for the video to be predicted.

[0078] Y q×n =Y q×n ·Y′ q×n

[0079] Optionally, the original classification model and the cascaded model have the same neural network structure, and the number of original classification categories in the original classification model is greater than the number of cascaded classification categories in the cascaded model.

[0080] Specifically, the cascade model and the original classification model are both used to process the video to be predicted, and if the neural network structures of the two are consistent, there is no need to re-construct a new neural network structure. Meanwhile, because the number of samples in k classification is increased and the category learning is more sufficient, the accuracy of k classification is higher than that of n classification.

[0081] The embodiment of the application divides all labels into k groups (k is less than the total number of categories n) according to the correlation correction matrix, re-trains using the original classification model (3D convolutional neural network), obtains the k classification result, and fuses the k classification result and the n classification result to further correct the multi-label classification result.

[0082] Figure 3 A structural schematic diagram of a post-processing device for a classification task provided by another embodiment of the application is shown in FIG. 4. Figure 3 As shown in the figure, the device includes:

[0083] A prediction probability determination module 310 is configured to obtain the prediction probability of a video to be predicted in each category using an original classification model;

[0084] A first classification prediction module 320 is configured to convert the prediction probability of the video to be predicted in each category into positive and negative examples according to the best threshold interval of positive and negative examples of each category, and obtain a first classification prediction result;

[0085] A second classification prediction module 330 is configured to determine a correlation correction matrix according to the correlation between each category in the training set, and correct the first classification prediction result according to the correlation correction matrix to obtain a second classification prediction result;

[0086] A final classification prediction module 340 is configured to correct the second classification prediction result using a cascade model to obtain a final classification prediction result of the video to be predicted; wherein the categories in the cascade model are obtained according to the correlation correction matrix.

[0087] The post-processing device for a classification task provided by the embodiment of the application can execute the post-processing method for a classification task provided by any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method

[0088] Optionally, the second classification prediction module 330 includes:

[0089] A statistical matrix generation unit is configured to generate a category correlation quantity statistical matrix according to the labels to which each sample in the training set belongs;

[0090] A coefficient matrix generation unit is configured to perform normalization processing on the category correlation quantity statistical matrix to obtain a correlation coefficient matrix;

[0091] The matrix element assignment unit is configured to assign elements with a coefficient of 0 in the correlation coefficient matrix to a specific value to obtain a correlation correction matrix; and the eigenvalue is a negative number.

[0092] Optionally, the statistical matrix generation unit comprises:

[0093] The overlapping sample acquisition sub-unit is configured to acquire other labels to which each sample under any label in the training set belongs, and determine the number of overlapping samples of the label and the other labels.

[0094] The statistical matrix generation sub-unit is configured to generate a class-related quantity statistical matrix according to the number of overlapping samples of each label and other labels.

[0095] Optionally, the device further comprises:

[0096] The candidate boundary determination unit is configured to construct a threshold interval boundary candidate array, and take elements in the candidate array as candidate boundaries of the threshold interval.

[0097] The threshold interval determination unit is configured to calculate the F1 value of a candidate threshold interval composed of each candidate boundary on the verification set, and take the candidate threshold interval with the highest F1 value as the best threshold interval of the current class.

[0098] Optionally, the device further comprises:

[0099] The clustering benchmark acquisition module is configured to acquire a first class and a second class corresponding to the minimum element in the correlation correction matrix.

[0100] The classification class clustering module is configured to cluster original classification classes of an original classification model with the first class and the second class as the center, and convert the original classification classes into cascade classification classes.

[0101] The cascade model training module is configured to retrain the original classification model based on the cascade classification classes, and take the retrained model as a cascade model.

[0102] Optionally, the final classification prediction module 340 comprises:

[0103] The cascade classification prediction unit is configured to acquire a cascade classification class prediction result of the video to be predicted through the cascade model.

[0104] The prediction result fusion unit is configured to fuse the cascade classification class prediction result and the second classification prediction result to obtain a final classification prediction result of the video to be predicted.

[0105] Optionally, the neural network structures of the original classification model and the cascade model are the same, and the number of original classification classes of the original classification model is greater than the number of cascade classification classes of the cascade model.

[0106] The post-processing apparatus for the classification task further explained can also execute the post-processing method for the classification task provided by any embodiment of the present application, with the function modules and beneficial effects corresponding to the execution method.

[0107] Figure 4 A structural schematic diagram of an electronic device 40 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.

[0108] As shown in Figure 4 The electronic device 40 includes at least one processor 41, and a memory, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., connected in communication with the at least one processor 41, where the memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 42 or loaded into the random access memory (RAM) 43 from the storage unit 48. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0109] Various components in the electronic device 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, a speaker, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0110] The processor 41 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, and the like. The processor 41 performs various methods and processes described above, such as the post-processing method for a classification task.

[0111] In some embodiments, the post-processing method for a classification task can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded onto the RAM 43 and executed by the processor 41, one or more steps of the post-processing method for a classification task described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to perform the post-processing method for a classification task by any other suitable means, such as by means of firmware.

[0112] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0113] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a machine or a remote machine or a server.

[0114] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0116] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0117] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0118] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.

[0119] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A post-processing method of a classification task, characterized in that, The method comprises the following steps: obtaining prediction probabilities of a to-be-predicted video in each category by using an original classification model; converting the prediction probabilities of the to-be-predicted video in each category into positive and negative examples according to the best threshold interval of the positive and negative examples of each category to obtain a first classification prediction result; determining a correlation correction matrix according to the correlation between each category in the training set, and correcting the first classification prediction result according to the correlation correction matrix to obtain a second classification prediction result; correcting the second classification prediction result by using a cascade model to obtain a final classification prediction result of the to-be-predicted video, wherein the categories in the cascade model are obtained according to the correlation correction matrix; wherein the correlation correction matrix is determined according to the correlation between each category in the training set, comprising: generating a category correlation quantity statistical matrix according to the labels of each sample in the training set; normalizing the category correlation quantity statistical matrix to obtain a correlation coefficient matrix; assigning a specific value to the elements with a coefficient of 0 in the correlation coefficient matrix to obtain a correlation correction matrix; the specific value is a negative number; wherein, before the second classification prediction result is corrected by using the cascade model, it further comprises: obtaining a first category and a second category corresponding to the smallest element in the correlation correction matrix; clustering the original classification categories of the original classification model with the first category and the second category as the center to convert them into cascade classification categories; retraining the original classification model based on the cascade classification categories, and using the retrained model as the cascade model.

2. The method of claim 1, wherein, The generation of the category correlation quantity statistical matrix according to the labels of each sample in the training set comprises: obtaining other labels of each sample under any label in the training set, and determining the number of overlapping samples of the label and other labels; generating a category correlation quantity statistical matrix according to the number of overlapping samples of each label and other labels.

3. The method of claim 1, wherein, Before the prediction probabilities of the to-be-predicted video in each category are converted into positive and negative examples according to the best threshold interval of the positive and negative examples of each category, it further comprises: constructing a threshold interval boundary candidate array, and using the elements in the candidate array as candidate boundaries of the threshold interval; calculating the F1 value of the candidate threshold interval composed of each candidate boundary on the validation set, and taking the candidate threshold interval with the highest F1 value as the best threshold interval of the current category.

4. The method of claim 1, wherein, The final classification prediction result of the to-be-predicted video is obtained by correcting the second classification prediction result by using the cascade model, comprising: obtaining the cascade classification category prediction result of the to-be-predicted video by using the cascade model; fusing the cascade classification category prediction result and the second classification prediction result to obtain the final classification prediction result of the to-be-predicted video.

5. The method according to any one of claims 1 to 4, characterized in that, The neural network structures of the original classification model and the cascade model are the same, and the number of original classification categories of the original classification model is greater than the number of cascade classification categories of the cascade model.

6. A post-processing apparatus for a classification task, characterized in that The method comprises the following steps: a prediction probability determination module for obtaining prediction probabilities of a to-be-predicted video in each category by using an original classification model; The first classification prediction module is configured to convert the prediction probability of the to-be-predicted video in each category into positive and negative examples according to the best threshold interval of positive and negative examples in each category, and obtain a first classification prediction result. The second classification prediction module is configured to determine a correlation correction matrix according to the correlation between categories in the training set, and correct the first classification prediction result according to the correlation correction matrix to obtain a second classification prediction result. The final classification prediction module is configured to correct the second classification prediction result using a cascade model to obtain a final classification prediction result of the to-be-predicted video, wherein the categories in the cascade model are obtained according to the correlation correction matrix. The second classification prediction module includes: The statistical matrix generation unit is configured to generate a category correlation quantity statistical matrix according to the labels of each sample in the training set. The coefficient matrix generation unit is configured to normalize the category correlation quantity statistical matrix to obtain a correlation coefficient matrix. The matrix element assignment unit is configured to assign elements with a coefficient of 0 in the correlation coefficient matrix to a specific value to obtain a correlation correction matrix, wherein the specific value is a negative number. The device further includes: The clustering reference acquisition module is configured to obtain a first category and a second category corresponding to the smallest element in the correlation correction matrix. The classification category clustering module is configured to cluster the original classification categories of the original classification model with the first category and the second category as the center to convert into cascade classification categories. The cascade model training module is configured to retrain the original classification model based on the cascade classification categories, and use the retrained model as the cascade model.

7. An electronic device, comprising: The electronic device includes: At least one processor; and a memory connected in communication with the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the post-processing method of the classification task in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the post-processing method of the classification task in any one of claims 1-5 when executed.

Citation Information

Patent Citations

  • Information classification method, related device and server

    CN110503155A

  • Data classification method and device, equipment and medium

    CN112182214A