Abnormity prompting method and device for target object and computer equipment

By using the probability and confidence joint matrix of the data set to clean and annotate in the exception recognition model of the target object, the problem of low model accuracy caused by manual annotation is solved, and the accuracy of exception recognition and the quality of the data set are improved.

CN119229164APending Publication Date: 2024-12-31HEFEI ZHONGKE LEINAO INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411071460.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, the exception recognition model of the target object is trained based on a manually annotated sample set, resulting in low model accuracy, which in turn affects the exception recognition accuracy of the target object.

Method used

By inputting the first data set into the first data classification model, the target data to be marked is determined, and the second data set is constructed based on the data set, and after cleaning, the exception recognition model is trained to improve the accuracy of the model.

Benefits of technology

The accuracy of the anomaly recognition model is improved, the impact of noise data on model fitting is reduced, and the accuracy and labeling efficiency of the data set are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229164A_ABST
    Figure CN119229164A_ABST
Patent Text Reader

Abstract

The invention discloses a target object abnormity prompting method and device and computer equipment. The computer device may determine a first sub-dataset based on the first probability and the second probability of each first data, and determine a second dataset based on the first sub-dataset; inputting the second data set into a second data classification model to obtain a third probability that each piece of second data in the second data set belongs to a positive category and a fourth probability that each piece of second data belongs to a negative category; and determining noise data from the second data set based on the third probability and the fourth probability of each piece of second data, cleaning the noise data in the second data set, training the cleaned second data set to obtain an anomaly recognition model, and processing the to-be-recognized image through the anomaly recognition model to obtain a to-be-recognized image. And under the condition that the output result of the anomaly recognition model represents that the target object is abnormal, the prompt information is sent, and the prompt information is used for prompting that the target object is abnormal, so that the accuracy of the anomaly recognition model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a method and device for providing an abnormality prompt for a target object, and a computer device. Background Art

[0002] Currently, a training set can be used to perform supervised model training on the model, wherein the training set may include samples and labels of the samples.

[0003] In the related art, it is usually necessary to manually annotate the samples in the sample set, and then the computer device can determine the annotated sample set as a training set, and train the anomaly recognition model of the target object based on the training set.

[0004] However, since the anomaly recognition model of the target object is trained based on a manually labeled sample set, the accuracy of the trained anomaly recognition model of the target object is low, which in turn leads to low accuracy in anomaly recognition of the target object. Summary of the invention

[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to propose a method for anomaly prompting of a target object, in which a computer device can use the cleaned second data set to perform model training to obtain an anomaly recognition model, which can effectively improve the accuracy of the anomaly recognition model, and further improve the accuracy of anomaly recognition of the target object.

[0006] A method for prompting an abnormality of a target object according to an embodiment of the present invention is applied to a computer device, and the method includes:

[0007] Inputting a first data set into a first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object;

[0008] Based on the first probability and the second probability of each first data, determine the first target data to be labeled from the first data set, label the first target data to be labeled to obtain a first sub-data set, and determine the second data set based on the first sub-data set;

[0009] Inputting the second data set into the second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category;

[0010] Determine noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set;

[0011] The cleaned second data set is trained to obtain an anomaly recognition model, and the image to be recognized is processed by the anomaly recognition model;

[0012] When the output result of the anomaly recognition model indicates that an abnormality exists in the target object, a prompt message is issued, and the prompt message is used to indicate that an abnormality exists in the target object.

[0013] In some embodiments of the present invention, the target object includes: a person's clothing, or fireworks.

[0014] In some embodiments of the present invention, determining the first target data to be labeled from the first data set based on the first probability and the second probability of each first data includes:

[0015] Obtaining a first preset threshold and a second preset threshold;

[0016] For each first data, determining the maximum value between the first probability and the second probability of the first data as the target probability of the first data, and determining the category corresponding to the target probability as the target category of the first data;

[0017] If the first data is determined to belong to the difficult positive category based on the first preset threshold, the target probability of the first data, and the target category, or if the first data is determined to belong to the difficult negative category based on the second preset threshold, the target probability of the first data, and the target category, the first data is determined to be the first target data to be labeled.

[0018] In some embodiments of the present invention, determining that the first data belongs to a difficult positive category based on a first preset threshold, a target probability of the first data, and a target category includes:

[0019] If the target category is a positive category and the target probability is less than a first preset threshold, it is determined that the first data belongs to a difficult positive category;

[0020] Determining that the first data belongs to a difficult negative category based on a second preset threshold, a target probability of the first data, and a target category includes:

[0021] If the target category is a negative category and the target probability is less than a second preset threshold, it is determined that the first data belongs to a difficult negative category.

[0022] In some embodiments of the present invention, obtaining the first preset threshold and the second preset threshold includes:

[0023] Repeat the model update process until the loss value is less than the preset loss value; wherein the model update process includes:

[0024] Determine a simple positive sample subset and a difficult positive sample subset from the sample set based on a first preset value, a historical sample target probability and a historical sample target category of each sample in the sample set, wherein the historical sample target category is used to indicate whether the sample is a positive sample or a negative sample;

[0025] Determine a simple negative sample subset and a difficult negative sample subset from the sample set based on a second preset value, a historical sample target probability and a historical sample target category of each sample;

[0026] Input the four sample subsets into the initial model, and determine the sample target category and sample target probability of each sample based on the output results of the initial model;

[0027] Determine the loss value based on the weight of each sample subset, and the sample target category and true category of each sample in the four sample subsets;

[0028] updating at least one of the first preset value and the second preset value, and updating at least one of the weights of the four sample subsets;

[0029] After the model updating process is completed, the initial model is determined as the first data classification model, the first preset value is determined as the first preset threshold, and the second preset value is determined as the second preset threshold.

[0030] In some embodiments of the present invention, based on the first preset value, the historical sample target probability and the historical sample target category of each sample in the sample set, determining the simple positive sample subset and the difficult positive sample subset from the sample set includes:

[0031] For each sample, if the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is less than a first preset value, it is determined that the sample belongs to the difficult positive sample subset;

[0032] If the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is greater than the third preset value, it is determined that the sample belongs to the simple positive sample subset, and the sum of the third preset value and the first preset value is 1.

[0033] In some embodiments of the present invention, based on the second preset value, the historical sample target probability and the historical sample target category of each sample, determining the simple negative sample subset and the difficult negative sample subset from the sample set includes:

[0034] For each sample, if the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is less than a second preset value, it is determined that the sample belongs to the difficult negative sample subset;

[0035] If the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is greater than the fourth preset value, it is determined that the sample belongs to the simple negative sample subset, and the sum of the second preset value and the fourth preset value is 1.

[0036] In some embodiments of the present invention, determining noise data from the second data set based on the third probability and the fourth probability of each second data includes:

[0037] For each second data, determining the maximum value of the third probability and the fourth probability of the second data as the predicted probability of the second data, and determining the category corresponding to the predicted probability as the predicted category of the second data;

[0038] Determine a confidence joint matrix based on the predicted categories and true categories of each second data, where the confidence joint matrix is ​​used to represent the number of predicted categories in the second data set that are the same as the true category, and the number of predicted categories that are different from the true category;

[0039] Normalize the confidence joint matrix to obtain the confidence joint distribution matrix;

[0040] Noise data is determined from the second data set based on the confidence joint distribution matrix and the predicted probability of each second data.

[0041] In some embodiments of the present invention, the second data classification model includes a plurality of sub-models; inputting the second data set into the second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category, including:

[0042] For each sub-model, the second data set is divided into a training set and a validation set, wherein the training sets and validation sets corresponding to different sub-models are different, and a data set formed by multiple validation sets of multiple sub-models is the second data set;

[0043] Use the training set to train the sub-model;

[0044] The validation set is input into the sub-model to obtain a third probability that each second data in the validation set belongs to the positive category and a fourth probability that each second data in the validation set belongs to the negative category.

[0045] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for prompting an abnormality of a target object is implemented.

[0046] A computer device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for prompting an abnormality of a target object is implemented.

[0047] According to an embodiment of the present invention, a target object abnormality prompt device includes:

[0048] A first determination module is used to input the first data set into the first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object; based on the first probability and the second probability of each first data, determine the first target data to be labeled from the first data set;

[0049] A labeling module, used for labeling the first target data to be labeled to obtain a first sub-dataset;

[0050] A second determination module is used to determine a second data set based on the first sub-data set; input the second data set into a second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data belongs to a negative category; and determine noise data from the second data set based on the third probability and the fourth probability of each second data;

[0051] A cleaning module, used for cleaning the noise data in the second data set;

[0052] A training module, used for training the cleaned second data set to obtain an anomaly recognition model;

[0053] A processing module, used for processing the image to be identified through an abnormality identification model;

[0054] The prompt module is used to issue a prompt message when the output result of the abnormality recognition model indicates that the target object has an abnormality, and the prompt message is used to indicate that the target object has an abnormality.

[0055] In summary, the embodiment of the present invention provides a method and device for abnormal prompting of a target object, which is applied to a computer device. Since the computer device inputs the first data set into the first data classification model, and obtains the first probability that each first data in the first data set belongs to the positive category and the second probability that each first data belongs to the negative category, the first target data to be labeled can be determined from the first data set based on the first probability and the second probability of each first data, which effectively improves the efficiency of screening the first target data compared to manually screening the first target data to be labeled. After the first target data to be labeled is labeled to obtain a first sub-data set, the second data set is determined based on the first sub-data set, and the second data set is input into the second data classification model, and the third probability that each second data in the second data set belongs to the positive category and the fourth probability that each second data belongs to the negative category is obtained, since the computer device can determine the noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set, then train the cleaned second data set to obtain an abnormal recognition model, and process the image to be identified through the abnormal recognition model, and when the output result of the abnormal recognition model indicates that the target object is abnormal, a prompt message is issued, and the prompt message is used to prompt that the target object is abnormal. Compared with directly using the manually annotated training set for model training, this solution uses the cleaned second data set for model training to obtain an anomaly recognition model, which can effectively improve the accuracy of the anomaly recognition model, and thus improve the accuracy of anomaly recognition of the target object.

[0056] Furthermore, since the computer device can clean the noise data in the second data set, the accuracy of the acquired second data set is improved, and the problems of poor model fitting and slow model training caused by noise data can be avoided in the subsequent model training process. Compared with the related art of manually determining the noise data in the labeled data, this solution effectively improves the efficiency of determining the noise data in the second data set, thereby improving the efficiency of obtaining the cleaned second data set.

[0057] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a flow chart of a method for abnormal prompting of a target object provided by an embodiment of the present invention;

[0059] Figure 2 is a flow chart of another method for abnormality prompting of a target object provided by an embodiment of the present invention;

[0060] Figure 3is a flowchart of obtaining a first data classification model, a first preset threshold and a second preset threshold provided by an embodiment of the present invention;

[0061] Figure 4 is a flow chart of another method for abnormality prompting of a target object provided by an embodiment of the present invention;

[0062] Figure 5 is a structural schematic diagram of a computer device provided by an embodiment of the present invention;

[0063] Figure 6 It is a block diagram of an abnormality prompt device for a target object provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0065] Figure 1 The present invention provides a flowchart of a method for abnormal prompting of a target object, which is applied to a computer device. Figure 1 , the method comprising:

[0066] Step 101: Input a first data set into a first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category.

[0067] The computer device can input the first data set into the first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object.

[0068] Step 102: determine first target data to be labeled from the first data set based on the first probability and the second probability of each first data, label the first target data to be labeled to obtain a first sub-data set, and determine a second data set based on the first sub-data set.

[0069] The computer device inputs the first data set into the first data classification model, and after obtaining the first probability that each first data in the first data set belongs to the positive category and the second probability that each first data belongs to the negative category, the computer device can determine the first target data to be labeled from the first data set based on the first probability and the second probability of each first data, label the first target data to be labeled to obtain a first sub-data set, and determine the second data set based on the first sub-data set.

[0070] Step 103: Input the second data set into the second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category.

[0071] The computer device determines the first target data to be labeled from the first data set based on the first probability and the second probability of each first data, labels the first target data to be labeled to obtain a first sub-data set, and determines the second data set based on the first sub-data set. Then, the second data set can be input into the second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that it belongs to a negative category.

[0072] Step 104: determine noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set.

[0073] The computer device inputs the second data set into the second data classification model, and after obtaining the third probability that each second data in the second data set belongs to the positive category and the fourth probability that each second data belongs to the negative category, it can determine the noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set.

[0074] Step 105: train the cleaned second data set to obtain an anomaly recognition model, and process the image to be recognized by using the anomaly recognition model.

[0075] The computer device determines noise data from the second data set based on the third probability and the fourth probability of each second data, and after cleaning the noise data in the second data set, the cleaned second data set can be trained to obtain an anomaly recognition model, and the image to be recognized can be processed through the anomaly recognition model.

[0076] Step 106: When the output result of the abnormality recognition model indicates that the target object is abnormal, a prompt message is issued.

[0077] The computer device trains the cleaned second data set to obtain an anomaly recognition model, and after processing the image to be recognized through the anomaly recognition model, when the output result of the anomaly recognition model indicates that the target object has an anomaly, a prompt message can be issued, and the prompt message is used to prompt that the target object has an anomaly.

[0078] To summarize, an embodiment of the present invention provides an abnormal prompt method for a target object. Since the computer device inputs the first data set into the first data classification model and obtains the first probability that each first data in the first data set belongs to a positive category and the second probability that it belongs to a negative category, the first target data to be labeled can be determined from the first data set based on the first probability and the second probability of each first data. Compared with manual screening of the first target data to be labeled, the efficiency of screening the first target data is effectively improved.

[0079] After annotating the first target data to be annotated to obtain a first sub-dataset, determining the second data set based on the first sub-dataset, inputting the second data set into the second data classification model, and obtaining the third probability that each second data in the second data set belongs to the positive category and the fourth probability that each second data in the second data set belongs to the negative category, the computer device can determine the noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set, and then train the cleaned second data set to obtain an abnormality recognition model, and process the image to be recognized by the abnormality recognition model, and when the output result of the abnormality recognition model indicates that the target object is abnormal, a prompt message is issued, and the prompt message is used to prompt that the target object is abnormal. Compared with directly using the manually annotated training set for model training, this solution also cleans the data set after annotating the data set, and uses the cleaned second data set for model training to obtain an abnormality recognition model, which can effectively improve the accuracy of the abnormality recognition model, and thus improve the accuracy of abnormal recognition of the target object.

[0080] Furthermore, since the computer device can clean the noise data in the second data set, the accuracy of the acquired second data set is improved, and the problems of poor model fitting and slow model training caused by noise data can be avoided in the subsequent model training process. Compared with the related art of manually determining the noise data in the labeled data, this solution effectively improves the efficiency of determining the noise data in the second data set, thereby improving the efficiency of obtaining the cleaned second data set.

[0081] Figure 2 1 is a flowchart of another method for abnormal prompting of a target object provided by an embodiment of the present invention, which can be applied to a computer device. Figure 2 , the method may include:

[0082] Step 201: Input a first data set into a first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category.

[0083] The computer device may input the first data set into the first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data belongs to a negative category. The first data is an image of a target object. Optionally, the target object may include: a person's clothing, or fireworks.

[0084] The positive category may be one, and the negative category may be one or more. For example, the positive category may be a shirt, and assuming that there are two negative categories, the negative category may include a T-shirt and a sweater.

[0085] Optionally, the computer device may obtain multiple first data from the web page by crawling technology, and the multiple first data may include labeled first data and unlabeled first data, and determine the multiple first data as a first data set. Each of the first data may be an image.

[0086] Step 202: Obtain a first preset threshold and a second preset threshold.

[0087] The computer device inputs the first data set into the first data classification model, obtains the first probability that each first data in the first data set belongs to the positive category and the second probability that each first data belongs to the negative category, and then obtains the first preset threshold and the second preset threshold. The first preset threshold and the second preset threshold can be pre-stored in the computer device.

[0088] Optionally, the computer device may repeatedly execute the model update process before step 201 until the loss value is less than the preset loss value, and after the model update process is completed, the trained initial model is determined as the first data classification model, the first preset value is determined as the first preset threshold, the second preset value is determined as the second preset threshold, and the first preset threshold and the second preset threshold may be stored. The computer device may pre-store the preset loss value.

[0089] refer to Figure 3 , the process of determining the first data classification model, the first preset threshold and the second preset threshold by the computer device may include the following steps 2021 to 2027, wherein the model update process may include the following steps 2021 to 2026:

[0090] Step 2021: Determine a simple positive sample subset and a difficult positive sample subset from the sample set based on a first preset value, a historical sample target probability and a historical sample target category of each sample in the sample set.

[0091] The computer device may determine a simple positive sample subset and a difficult positive sample subset from the sample set based on a first preset value, a historical sample target probability and a historical sample target category of each sample in the sample set.

[0092] The historical sample target category is used to indicate whether the sample is a positive sample or a negative sample. If the historical target sample category is a positive category, the computer device can determine that the sample is a positive sample. If the historical target sample category is a negative category, the computer device can determine that the sample is a negative sample. The computer device can pre-store a first preset value. Each sample in the sample set can be an image. The positive sample can be one, and the negative sample can be one or more.

[0093] When step 2021 is performed for the first time, for each sample, the computer device may determine the initial probability as the historical sample target probability of the sample, determine the initial category as the historical sample target category of the sample, and the first preset value may be the initial value. The initial probability and the initial value are both fixed values ​​pre-stored in the computer device, the initial category is a fixed category pre-stored in the computer device, and for example, the initial category is a positive category or a negative category.

[0094] When step 2021 is not executed for the first time, for each sample, the computer device may determine the sample target probability of the sample determined in step 2023 as the historical sample target probability of the sample, and determine the sample target category of the determined sample as the historical sample target category.

[0095] Optionally, for each sample, if the historical sample target category of the sample is a positive category and the historical sample target probability of the sample is less than a first preset value, the computer device may determine that the sample belongs to a difficult positive sample subset. If the historical sample target category of the sample is a positive category and the historical sample target probability of the sample is greater than a third preset value, the computer device may determine that the sample belongs to a simple positive sample subset. The sum of the third preset value and the first preset value is 1, and the third preset value is greater than the first preset value.

[0096] For example, the first preset value can be 0.2, and the third preset value can be 0.8. Assuming that the historical sample target category of the sample is a positive category, and the historical sample target probability of the sample is 0.1, since the historical sample target probability of the sample 0.1 is less than the first preset value 0.2, the computer device can determine that the sample is a difficult positive sample, and further determine that the sample belongs to the difficult positive sample subset.

[0097] Assuming that the historical sample target category of the sample is a positive category, and the historical sample target probability of the sample is 0.9, since the historical sample target probability of the sample 0.9 is greater than the third preset value 0.8, the computer device can determine that the sample is a simple positive sample, and further determine that the sample belongs to the simple positive sample subset.

[0098] In an embodiment of the present invention, if the historical sample target category of the sample is a positive category, the historical sample target probability of the sample is greater than or equal to a first preset value, and the historical sample target probability is less than or equal to a third preset value, it can be determined that the sample does not belong to the difficult positive sample subset and the simple positive sample subset, and therefore the sample will not be used for subsequent model training.

[0099] Step 2022: Based on the second preset value, the historical sample target probability and the historical sample target category of each sample, determine a simple negative sample subset and a difficult negative sample subset from the sample set.

[0100] After determining the simple positive sample subset and the difficult positive sample subset from the sample set based on the first preset value, the historical sample target probability and the historical sample target category of each sample in the sample set, the computer device can determine the simple negative sample subset and the difficult negative sample subset from the sample set based on the second preset value, the historical sample target probability and the historical sample target category of each sample. The computer device can pre-store the second preset value.

[0101] When step 2022 is performed for the first time, the second preset value may be an initial value pre-stored in the computer device.

[0102] Optionally, for each sample, if the historical sample target category of the sample is a negative category and the historical sample target probability of the sample is less than a second preset value, the computer device may determine that the sample belongs to a difficult negative sample subset. If the historical sample target category of the sample is a negative category and the historical sample target probability of the sample is greater than a fourth preset value, the computer device may determine that the sample belongs to a simple negative sample subset. The sum of the second preset value and the fourth preset value is 1, and the fourth preset value is greater than the second preset value.

[0103] For example, the second preset value may be 0.3, and the fourth preset value may be 0.7. Assuming that the historical sample target category of the sample is a negative category, and the historical sample target probability of the sample is 0.1, since the historical sample target probability of the sample 0.1 is less than the second preset value 0.3, the computer device may determine that the sample is a difficult negative sample, and further determine that the sample belongs to the difficult negative sample subset. Assuming that the historical sample target category of the sample is a negative category, and the historical sample target probability of the sample is 0.9, since the historical sample target probability of the sample 0.9 is greater than the fourth preset value 0.7, the computer device may determine that the sample is a simple negative sample, and further determine that the sample belongs to the simple negative sample subset.

[0104] If the historical sample target category of the sample is a negative category, the historical sample target probability of the sample is greater than or equal to the second preset value, and the historical sample target probability is less than or equal to the fourth preset value, it can be determined that the sample does not belong to the difficult negative sample subset and the simple negative sample subset, so the sample will not be used for subsequent model training.

[0105] Step 2023: input the four sample subsets into the initial model, and determine the sample target category and sample target probability of each sample based on the output result of the initial model.

[0106] After the computer device divides the sample set into a simple positive sample subset, a difficult positive sample subset, a simple negative sample subset and a difficult negative sample subset, the four sample subsets can be input into the initial model, and the sample target category and sample target probability of each sample can be determined based on the output results of the initial model.

[0107] The output result of the initial model may include a first probability of each sample belonging to a positive class and a second probability of each sample belonging to a negative class. For each sample, the computer device may determine the maximum value of the first probability of the sample and the second probability of the sample as the sample target probability, and determine the class corresponding to the sample target probability as the sample target class.

[0108] Step 2024: Determine the loss value based on the weight of each sample subset, and the sample target category and true category of each sample in the four sample subsets.

[0109] After determining the sample target category and sample target probability of each sample based on the output results of the initial model, the computer device can determine the loss value based on the weights of each sample subset, and the sample target category and true category of each sample in the four sample subsets.

[0110] Optionally, the computer device may input the weight of each sample subset in the four sample subsets, as well as the sample target category and the true category of each sample into the loss function to obtain a loss value output by the loss function.

[0111] Step 2025: Check whether the loss value is less than a preset loss value.

[0112] After determining the loss value based on the weights of each sample subset, and the sample target category and true category of each sample in the four sample subsets, the computer device can detect whether the loss value is less than the preset loss value. If the loss value is greater than or equal to the preset loss value, step 2026 can be executed, and if the loss value is less than the preset loss value, step 2027 can be executed.

[0113] Step 2026: Update at least one of the first preset value and the second preset value, and update at least one of the weights of the four sample subsets.

[0114] If the computer device determines that the loss value is greater than or equal to the preset loss value, at least one of the first preset value and the second preset value may be updated, and at least one of the weights of the four sample subsets may be updated. Thereafter, steps 2021 to 2025 may be performed again until the loss value is less than the preset loss value.

[0115] Step 2027: determine the initial model as the first data classification model, determine the first preset value as the first preset threshold, and determine the second preset value as the second preset threshold.

[0116] If the computer device determines that the loss value is less than the preset loss value, the initial model can be determined as the first data classification model, the first preset value can be determined as the first preset threshold, and the second preset value can be determined as the second preset threshold. Thus, the computer device can obtain the first preset threshold and the second preset threshold.

[0117] Step 203: For each first data, determine the maximum value between the first probability and the second probability of the first data as the target probability of the first data, and determine the category corresponding to the target probability as the target category of the first data.

[0118] After the computer device obtains the first preset threshold and the second preset threshold, for each first data, the maximum value of the first probability and the second probability of the first data can be determined as the target probability of the first data, and the category corresponding to the target probability can be determined as the target category of the first data.

[0119] Step 204 : Detect whether the first data is first target data to be labeled based on the first preset threshold, the second preset threshold, the target probability of the first data, and the target category of the first data.

[0120] For each first data, the computer device determines the maximum value between the first probability and the second probability of the first data as the target probability of the first data, and determines the category corresponding to the target probability as the target category of the first data. Then, it can detect whether the first data is the first target data to be labeled based on the first preset threshold, the second preset threshold, the target probability of the first data, and the target category of the first data.

[0121] If it is determined based on the first preset threshold, the second preset threshold, the target probability of the first data, and the target category of the first data that the first data is not the first target data to be labeled, step 205 may be performed. If it is determined based on the first preset threshold, the second preset threshold, the target probability of the first data, and the target category of the first data that the first data is the first target data to be labeled, step 206 may be performed.

[0122] Optionally, if the first data is determined to be a difficult positive sample based on a first preset threshold, the target probability of the first data, and the target category, or if the first data is determined to be a difficult negative sample based on a second preset threshold, the target probability of the first data, and the target category, then it can be determined that the first data is data that is inaccurately predicted by the first data classification model, and therefore the first data can be determined to be the first target data to be labeled.

[0123] If the first data is determined to be a simple positive sample based on the first preset threshold, the target probability of the first data, and the target category, or if the first data is determined to be a simple negative sample based on the second preset threshold, the target probability of the first data, and the target category, then it can be determined that the first data is data that can be accurately predicted by the first data classification model, and therefore it can be determined that the first data is not the first target data to be labeled.

[0124] If the target category is a positive category and the target probability is less than a first preset threshold, it can be determined that the first data belongs to a difficult positive sample. If the target category is a negative category and the target probability is less than a second preset threshold, it can be determined that the first data belongs to a difficult negative sample.

[0125] If the target category is a positive category and the target probability is greater than the third preset threshold, it can be determined that the first data belongs to a simple positive sample. If the target category is a negative category and the target probability is greater than the fourth preset threshold, it can be determined that the first data is a simple negative sample. The sum of the first preset threshold and the third preset threshold is equal to 1, and the sum of the second preset threshold and the fourth preset threshold is equal to 1.

[0126] If the target category is a positive category, the target probability is greater than or equal to the first preset threshold and less than or equal to the third preset threshold, then it is determined that the first data is not the first target data to be labeled. If the target category is a negative category, the target probability is greater than or equal to the second preset threshold and less than or equal to the fourth preset threshold, then it is determined that the first data is not the first target data to be labeled.

[0127] Step 205: Store the first data.

[0128] If it is determined based on the first preset threshold, the second preset threshold, the target probability of the first data and the target category of the first data that the first data is not the first target data to be labeled, the computer device can store the first data, thereby obtaining a second sub-data set.

[0129] Step 206: annotate the first target data to be annotated to obtain a first sub-dataset, and determine a second data set based on the first sub-dataset.

[0130] After determining the first target data to be labeled from the first data set based on the first probability and the second probability of each first data, the computer device can label the first target data to be labeled to obtain a first sub-data set to obtain the true category of each first target data, and determine the second data set based on the first sub-data set.

[0131] In an embodiment of the present invention, the first target data to be labeled can be labeled by manual labeling, by an automatic labeling model, or by human-computer collaboration, thereby reducing the workload of manual labeling, reducing labeling costs, and improving labeling efficiency. The human-computer collaboration method can refer to manual rough labeling and fine labeling by an automatic labeling model.

[0132] In the process of labeling the first target data to be labeled by using the automatic labeling model, the computer device may divide the first target data to be labeled into sub-data sets of different categories, and label the sub-data sets of the category by using the automatic labeling model of the corresponding category.

[0133] The computer device may determine the first sub-data set as the second data set, or may determine the first sub-data set and the second sub-data set as the second data set.

[0134] It can be understood that in the embodiment of the present invention, the first target data to be labeled usually contains important features or patterns that the model has not yet mastered. By labeling the first target data to be labeled, more accurate data can be provided to the model in subsequent model training, so that the model can more accurately identify and understand the complex relationships, internal laws and structures of the data, thereby improving the model's prediction ability and enhancing the model's robustness and stability.

[0135] It is understandable that in the embodiment of the present invention, the first target data to be labeled often represents the edge cases of the first data distribution in the first data set or the outliers of the first data, which may appear frequently in practical applications. By labeling the first target data to be labeled, the model can better handle the edge cases of the first data distribution or the outliers of the first data in subsequent model training, thereby improving the generalization ability of the model and improving the performance of the model.

[0136] It is understandable that in the embodiment of the present invention, during the model training process, if the first target data to be labeled is not labeled, in the subsequent model training, only simple samples are used to train the model, then the model may be biased against these samples and ignore other important but more difficult samples. Therefore, by labeling the first target data to be labeled, the model can reduce data bias in the subsequent model training.

[0137] It is understandable that, in the embodiment of the present invention, if the first target data to be labeled already has a label before labeling, then after the first target data to be labeled is labeled, the erroneous label can be corrected to improve the accuracy and consistency of the label, thereby improving the labeling quality. Moreover, as time goes by, the distribution and characteristics of the first data may change. Labeling the first target data to be labeled can ensure that the label is consistent with the distribution of the current data, thereby better reflecting the true situation of the data.

[0138] Step 207: Input the second data set into the second data classification model to obtain a third probability that each second data in the second data set belongs to the positive category and a fourth probability that each second data in the second data set belongs to the negative category.

[0139] After the computer device labels the first target data to be labeled to obtain a first sub-data set and determines the second data set based on the first sub-data set, the second data set can be input into a second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that it belongs to a negative category.

[0140] The second data classification model may include multiple sub-models. Figure 4 The computer device inputs the second data set into the second data classification model to obtain the third probability that each second data in the second data set belongs to the positive category and the fourth probability that each second data in the second data set belongs to the negative category. The process may include the following steps 2071 to 2073:

[0141] Step 2071: For each sub-model, divide the second data set into a training set and a validation set.

[0142] For each sub-model, the computer device may divide the second data set into a training set and a validation set, wherein the training sets and validation sets corresponding to different sub-models are different, and a data set formed by multiple validation sets of multiple sub-models is the second data set.

[0143] Assume that the second data classification model includes 5 sub-models, namely the first sub-model to the fifth sub-model, and the second data set includes 100 samples, which are divided into 5 sample subsets, namely the first sample subset to the fifth sample subset, and each sample subset includes 20 samples.

[0144] For the first sub-model, the computer device may determine the first to fourth sample subsets as training sets, and determine the fifth sample subset as a validation set.

[0145] For the second sub-model, the computer device may determine the second to fifth sample subsets as training sets, and determine the first sample subset as a validation set.

[0146] For the third sub-model, the computer device may determine the first sample subset, the third sample subset to the fifth sample subset as training sets, and determine the second sample subset as a validation set.

[0147] For the fourth sub-model, the computer device may determine the first sample subset, the second sample subset, the fourth sample subset, and the fifth sample subset as training sets, and determine the third sample subset as a validation set.

[0148] For the fifth sub-model, the computer device may determine the first sample subset to the third sample subset and the fifth sample subset as a training set, and determine the fourth sample subset as a validation set.

[0149] Step 2072: Use the training set to train the sub-model.

[0150] For each sub-model, after the computer device divides the first data set into a training set and a validation set, the training set can be used to train the sub-model.

[0151] Taking the first sub-model as an example, the computer device can use the first sample subset to the fourth sample subset to train the first sub-model.

[0152] Step 2073: Input the validation set into the sub-model to obtain a third probability that each second data in the validation set belongs to the positive category and a fourth probability that each second data in the validation set belongs to the negative category.

[0153] After the computer device trains the sub-model using the training set, the validation set can be input into the sub-model to obtain the third probability that each second data in the validation set belongs to the positive category and the fourth probability that it belongs to the negative category. Thus, the computer device can obtain the third probability that each second data in the second data set belongs to the positive category and the fourth probability that it belongs to the negative category.

[0154] Taking the first sub-model as an example, the computer device may input the fifth sample subset into the first sub-model to obtain a third probability that each second data in the fifth sample subset belongs to a positive category and a fourth probability that each second data in the fifth sample subset belongs to a negative category.

[0155] It can be understood that in an embodiment of the present invention, by inputting the second data set (i.e., the labeled first target data) into the second data classification model to train the second data classification model, the second data classification model can more accurately identify and understand the complex relationships of the data, so that the second data classification model can better process the data, thereby improving the performance of the second data classification model.

[0156] Step 208: For each second data, determine the maximum value between the third probability and the fourth probability of the second data as the predicted probability of the second data, and determine the category corresponding to the predicted probability as the predicted category of the second data.

[0157] The computer device inputs the second data set into the second data classification model, and after obtaining the third probability that each second data in the second data set belongs to the positive category and the fourth probability that it belongs to the negative category, for each second data, the maximum value of the third probability and the fourth probability of the second data can be determined as the predicted probability of the second data, and the category corresponding to the predicted probability is determined as the predicted category of the second data.

[0158] Step 209: Determine a confidence joint matrix based on the predicted category and the true category of each second data.

[0159] After the computer device determines the prediction probability and prediction category of each second data, it can determine the confidence joint matrix based on the prediction category and the true category of each second data. The confidence joint matrix is ​​used to represent the number of predicted categories in the second data set that are the same as the true category, and the number of predicted categories that are different from the true category, such as the confidence joint matrix shown in Table 1

[0160] Assuming that the predicted category and the actual category both include category 1, category 2 or category 3, the computer device can count the number of predicted categories and the actual category being category 1, the number of predicted categories being category 1 and the actual category being category 2, or the number of actual categories being category 3.

[0161] The number of cases where the predicted category and the true category are category 2, the number of cases where the predicted category is category 2 and the true category is category 1, or the number of cases where the true category is category 3.

[0162] The number of cases where the predicted category and the true category are category 3, the number of cases where the predicted category is category 3 and the true category is category 1, or the number of cases where the true category is category 2.

[0163] Referring to Table 1, assuming that the total number n of second data in the second data set is 400, Indicates that the predicted category is category i, y * Indicates that the true category is category j, where y *=j, j∈{1,2,3}. In Table 1, And y * =1, the number of predicted categories and true categories in the second data set is category 1, which is 100. And y * =2, the number of cases in the second data set where the predicted category is category 1 and the true category is category 2 is 40.

[0164] Table 1

[0165] Step 210: normalize the confidence joint matrix to obtain a confidence joint distribution matrix, and based on the confidence joint distribution matrix and the predicted probability of each second data, determine the noise data from the second data set, and clean the noise data in the second data set.

[0166] After the computer device determines the confidence joint matrix based on the predicted category and the true category of each second data, the confidence joint matrix can be normalized to obtain a confidence joint distribution matrix, and based on the confidence joint distribution matrix and the predicted probability of each second data, the noise data can be determined from the second data set and the noise data in the second data set can be cleaned.

[0167] Optionally, before normalizing the confidence joint matrix, the computer device may first calibrate the confidence joint matrix, and then normalize the calibrated matrix to obtain a confidence joint distribution matrix.

[0168] The elements in the matrix after calibration whose predicted category is i and whose true category is j Can satisfy:

[0169]

[0170] Among them, N1 is the total number of true categories, S i is the total number of predicted categories i in the confidence joint matrix that are different from the true category.

[0171] For example, assuming N1 is 3, refer to Table 1 for the confidence joint matrix After calibration, the predicted category is i=1 and the true category is j=3. Can be:

[0172]

[0173] Optional, the confidence joint distribution matrix Can satisfy:

[0174]

[0175] Wherein, n is the total number of second data in the second data set.

[0176] For example, the computer device may calculate the confidence joint matrix shown in Table 1 After calibration, the matrix after calibration is normalized to obtain the confidence joint distribution matrix shown in Table 2. For the convenience of illustration, the values ​​in Table 2 are only rounded to 2 decimal places.

[0177] Table 2

[0178]

[0179] Optionally, the computer device may screen the second data of each category according to a prune by class (PBC) rule to determine the noise data.

[0180] In the case where the predicted category is each of category 1, category 2, and category 3, the computing device can obtain the first value in the confidence joint distribution matrix where the predicted category and the true category are both the same category, determine the first product of the first value, the second value, and the total number of second data in the second data set, round the first product to obtain a third value, and arrange the predicted probabilities of the second data with the same predicted category and true category in ascending order, and determine the second data with the first three values ​​in the arranged second data as noise data. The computer device can pre-store the second value, and the second value is less than or equal to 1.

[0181] Referring to Table 2, taking the predicted category as category 1 and the second value as 0.5 as an example, at this time, the first value is 0.09, and the first product is 18 (ie, 0.09×0.5×400=18). The computer device can arrange the second data whose predicted category is 1 and the actual category is 1 in ascending order according to the predicted probability of the second data, and determine the first 18 second data in the arranged second data as noise data.

[0182] In the case where the predicted category is each of category 1, category 2, and category 3, the computing device can obtain the sum of the two values ​​in the confidence joint distribution matrix where the predicted category is different from the true category to obtain a fourth value. Determine the second product of the fourth value, the fifth value, and the total number of second data in the second data set, round the second product to obtain a sixth value, and arrange the predicted probabilities of the second data where the predicted category is different from the true category in ascending order, and determine the second data of the first sixth value in the arranged second data as noise data. The computer device can pre-store the fifth value, and the fifth value is less than or equal to 1.

[0183] Referring to Table 2, taking the predicted category as category 1 and the fifth value as 0.6 as an example, at this time, the fourth value is 0.04 (i.e. 0.03+0.01=0.04), and the second product is 9 (i.e. 0.04×0.6×400=9.6, 9.6 is rounded), the computer device can arrange the second data whose predicted category is 1 and whose actual categories are category 2 and category 3 in ascending order according to the predicted probability of the second data, and determine the first 9 second data in the arranged second data as noise data.

[0184] Step 211: train the cleaned second data set to obtain an anomaly recognition model, and process the image to be recognized by the anomaly recognition model.

[0185] The computer device normalizes the confidence joint matrix to obtain the confidence joint distribution matrix, and based on the confidence joint distribution matrix and the predicted probability of each second data, determines the noise data from the second data set, and after cleaning the noise data in the second data set, the cleaned second data set can be trained to obtain an anomaly recognition model, and the image to be recognized is processed by the anomaly recognition model.

[0186] For example, the anomaly recognition model may be a fireworks detection model or a clothing detection model.

[0187] Step 212: When the output result of the abnormality recognition model indicates that the target object has an abnormality, a prompt message is issued.

[0188] The computer equipment trains the cleaned second data set to obtain an anomaly recognition model, and after processing the image to be recognized through the anomaly recognition model, when the output result of the anomaly recognition model indicates that the target object has an anomaly, a prompt message is issued, and the prompt message is used to prompt that the target object has an anomaly.

[0189] Assume that the anomaly recognition model can be a fireworks detection model, and the image to be recognized is a fireworks image. After the fireworks detection model processes the fireworks image, if the output result of the fireworks detection model indicates that the fireworks are abnormal, the computer device can issue a prompt message, and the prompt message can be "fireworks are abnormal".

[0190] It is understandable that, in the embodiment of the present invention, the prediction performance of the model at different confidence levels can be determined through the confidence joint matrix. In addition, the confidence joint matrix can reveal the types of errors made by the model at different confidence levels, thereby helping to understand in which cases the model is prone to errors, and adjust the model or data preprocessing strategy accordingly. In this way, the overall performance of the model can be evaluated more accurately, and it can be determined which predictions within which confidence ranges are prone to errors, making the performance evaluation of the model more detailed.

[0191] It is understandable that in the embodiments of the present invention, the prediction confidence of the model (i.e., the certainty of the model in its prediction results) may sometimes be inaccurate. Through the confidence joint matrix, it is possible to check whether the confidence of the model matches its actual performance, and perform necessary calibration to improve the reliability of the model.

[0192] It is understandable that in the embodiments of the present invention, different models may show different patterns on the confidence union matrix. By observing and analyzing these matrices, models can be selected or adjusted to optimize specific performance indicators (such as recall rate, precision, etc.).

[0193] It is understandable that in the embodiments of the present invention, in the classification task, it is usually necessary to set a decision threshold according to the prediction confidence of the model. The confidence joint matrix can help determine the appropriate threshold to maximize the performance index or meet specific application requirements. And for multi-classification tasks, the confidence joint matrix can show the prediction performance of each category at different confidence levels, thereby providing a more comprehensive performance evaluation.

[0194] Optionally, cleaning the noise data of the computer device may include deleting or correcting the noise data. The cleaned second data set can be used for model training. In an embodiment of the present invention, due to different usage scenarios of the model, different requirements for data accuracy are imposed. For example, fireworks detection belongs to high-risk safety defect detection. Since there are omissions in the fireworks detection process, serious safety accidents may occur. Therefore, in the process of training the fireworks detection model, higher accuracy requirements are imposed on the data set for training the fireworks detection model. Therefore, in an embodiment of the present invention, after cleaning the noise data in the second data set, for different usage scenarios of the model, the computer device may directly use the second data set for training the model, or the computer device may continue to execute steps 201 to 209 once or multiple times to further select and clean the noise data in the second data set, thereby further improving the data quality of the second data set.

[0195] In an embodiment of the present invention, after cleaning the noise data in the second data set, the computer device can also obtain unlabeled data from the unlabeled data pool, and can use the obtained unlabeled data and the cleaned second data set as the first data set, and continue to perform steps 201 to 209 once or multiple times, and so on, so as to update the first data classification model and the second data classification model, and improve the accuracy of the first data classification model and the second data classification model. In addition, after cleaning the noise data in the second data set, the computer device can also use the cleaned second data set as the second data set to perform steps 207 and 210 again, and so on, so as to realize multiple cleaning of the second data set and multiple updates of the second data classification model.

[0196] To summarize, an embodiment of the present invention provides an abnormal prompt method for a target object. Since the computer device inputs the first data set into the first data classification model and obtains the first probability that each first data in the first data set belongs to a positive category and the second probability that it belongs to a negative category, the first target data to be labeled can be determined from the first data set based on the first probability and the second probability of each first data. Compared with manual screening of the first target data to be labeled, the efficiency of screening the first target data is effectively improved.

[0197] After annotating the first target data to be annotated to obtain a first sub-dataset, determining the second data set based on the first sub-dataset, inputting the second data set into the second data classification model, and obtaining the third probability that each second data in the second data set belongs to the positive category and the fourth probability that each second data in the second data set belongs to the negative category, the computer device can determine the noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set, and then train the cleaned second data set to obtain an abnormality recognition model, and process the image to be recognized through the abnormality recognition model, and when the output result of the abnormality recognition model indicates that the target object is abnormal, a prompt message is issued, and the prompt message is used to prompt that the target object is abnormal. Compared with directly using the manually annotated training set for model training, this solution uses the cleaned second data set for model training to obtain an abnormality recognition model, which can effectively improve the accuracy of the abnormality recognition model, and thus improve the accuracy of abnormal recognition of the target object.

[0198] Furthermore, since the computer device can clean the noise data in the second data set, the accuracy of the acquired second data set is improved, and the problems of poor model fitting and slow model training caused by noise data can be avoided in the subsequent model training process. Compared with the related art of manually determining the noise data in the labeled data, this solution effectively improves the efficiency of determining the noise data in the second data set, thereby improving the efficiency of obtaining the cleaned second data set.

[0199] The embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the abnormality prompt method of the target object shown in the above embodiment is implemented. For example, Figure 1 , Figure 2 or Figure 4 The exception notification method of the target object shown.

[0200] Figure 5 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, such as Figure 5As shown, the computer device 50 may include a memory 501, a processor 502, and a computer program stored in the memory 501 and executable on the processor 502. When the processor 502 executes the computer program, the abnormality prompt method for the target object shown in the above embodiment is implemented. Figure 1 , Figure 2 or Figure 4 The exception notification method of the target object shown.

[0201] Figure 6 is a block diagram of an abnormality prompt device for a target object provided by an embodiment of the present invention, such as Figure 6 As shown, the device comprises:

[0202] The first determination module 601 is used to input the first data set into the first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object; based on the first probability and the second probability of each first data, determine the first target data to be labeled from the first data set;

[0203] A labeling module 602, configured to label the first target data to be labeled to obtain a first sub-data set;

[0204] The second determination module 603 is used to determine the second data set based on the first sub-data set; input the second data set into the second data classification model to obtain a third probability that each second data in the second data set belongs to the positive category and a fourth probability that each second data belongs to the negative category; and determine the noise data from the second data set based on the third probability and the fourth probability of each second data;

[0205] A cleaning module 604, used for cleaning the noise data in the second data set;

[0206] A training module 605 is used to train the cleaned second data set to obtain an anomaly recognition model;

[0207] A processing module 606, used for processing the image to be identified by using an abnormality identification model;

[0208] The prompt module 607 is used to issue a prompt message when the output result of the abnormality recognition model indicates that the target object has an abnormality, and the prompt message is used to prompt that the target object has an abnormality.

[0209] Optionally, target objects include: people's clothing, or fireworks.

[0210] Optionally, the first determination module 601 is used to:

[0211] Obtaining a first preset threshold and a second preset threshold;

[0212] For each first data, determining the maximum value between the first probability and the second probability of the first data as the target probability of the first data, and determining the category corresponding to the target probability as the target category of the first data;

[0213] If the first data is determined to belong to the difficult positive category based on the first preset threshold, the target probability of the first data, and the target category, or if the first data is determined to belong to the difficult negative category based on the second preset threshold, the target probability of the first data, and the target category, the first data is determined to be the first target data to be labeled.

[0214] Optionally, the first determination module 601 is used to:

[0215] If the target category is a positive category and the target probability is less than a first preset threshold, it is determined that the first data belongs to a difficult positive category;

[0216] If the target category is a negative category and the target probability is less than a second preset threshold, it is determined that the first data belongs to a difficult negative category.

[0217] Optionally, the first determination module 601 is used to:

[0218] Repeat the model update process until the loss value is less than the preset loss value; wherein the model update process includes:

[0219] Determine a simple positive sample subset and a difficult positive sample subset from the sample set based on a first preset value, a historical sample target probability and a historical sample target category of each sample in the sample set, wherein the historical sample target category is used to indicate whether the sample is a positive sample or a negative sample;

[0220] Determine a simple negative sample subset and a difficult negative sample subset from the sample set based on a second preset value, a historical sample target probability and a historical sample target category of each sample;

[0221] Input the four sample subsets into the initial model, and determine the sample target category and sample target probability of each sample based on the output results of the initial model;

[0222] Determine the loss value based on the weight of each sample subset, and the sample target category and true category of each sample in the four sample subsets;

[0223] updating at least one of the first preset value and the second preset value, and updating at least one of the weights of the four sample subsets;

[0224] After the model updating process is completed, the initial model is determined as the first data classification model, the first preset value is determined as the first preset threshold, and the second preset value is determined as the second preset threshold.

[0225] Optionally, the first determination module 601 is used to:

[0226] For each sample, if the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is less than a first preset value, it is determined that the sample belongs to the difficult positive sample subset;

[0227] If the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is greater than the third preset value, it is determined that the sample belongs to the simple positive sample subset, and the sum of the third preset value and the first preset value is 1.

[0228] Optionally, the first determination module 601 is used to:

[0229] For each sample, if the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is less than a second preset value, it is determined that the sample belongs to the difficult negative sample subset;

[0230] If the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is greater than the fourth preset value, it is determined that the sample belongs to the simple negative sample subset, and the sum of the second preset value and the fourth preset value is 1.

[0231] Optionally, the second determining module 603 is configured to:

[0232] For each second data, determining the maximum value of the third probability and the fourth probability of the second data as the predicted probability of the second data, and determining the category corresponding to the predicted probability as the predicted category of the second data;

[0233] Determine a confidence joint matrix based on the predicted categories and true categories of each second data, where the confidence joint matrix is ​​used to represent the number of predicted categories in the second data set that are the same as the true category, and the number of predicted categories that are different from the true category;

[0234] Normalize the confidence joint matrix to obtain the confidence joint distribution matrix;

[0235] Noise data is determined from the second data set based on the confidence joint distribution matrix and the predicted probability of each second data.

[0236] Optionally, the second determining module 603 is configured to:

[0237] For each sub-model, the first data set is divided into a training set and a validation set, wherein the training sets and validation sets corresponding to different sub-models are different, and a data set formed by multiple validation sets of multiple sub-models is the second data set;

[0238] Use the training set to train the sub-model;

[0239] The validation set is input into the sub-model to obtain a third probability that each second data in the validation set belongs to the positive category and a fourth probability that each second data in the validation set belongs to the negative category.

[0240] To summarize, an embodiment of the present invention provides an abnormal prompt device for a target object. Since the abnormal prompt device for the target object inputs a first data set into a first data classification model and obtains a first probability that each first data in the first data set belongs to a positive category and a second probability that it belongs to a negative category, the first target data to be labeled can be determined from the first data set based on the first probability and the second probability of each first data. Compared with manual screening of the first target data to be labeled, the efficiency of screening the first target data is effectively improved.

[0241] After annotating the first target data to be annotated to obtain the first sub-dataset, determining the second data set based on the first sub-dataset, inputting the second data set into the second data classification model, and obtaining the third probability that each second data in the second data set belongs to the positive category and the fourth probability that it belongs to the negative category, the abnormal prompt device of the target object can determine the noise data from the second data set based on the third probability and the fourth probability of each second data, and clean the noise data in the second data set, and then train the cleaned second data set to obtain the abnormal recognition model, and process the image to be recognized by the abnormal recognition model, and issue a prompt message when the output result of the abnormal recognition model indicates that the target object is abnormal, and the prompt message is used to prompt that the target object is abnormal. Compared with directly using the manually annotated training set for model training, this solution uses the cleaned second data set for model training to obtain the abnormal recognition model, which can effectively improve the accuracy of the abnormal recognition model, and thus improve the accuracy of abnormal recognition of the target object.

[0242] Furthermore, since the abnormality prompt device of the target object can clean the noise data in the second data set, the accuracy of the acquired second data set is improved, and the problems of poor model fitting degree and slow model training caused by noise data can be avoided in the subsequent model training process. Compared with the related art of manually determining the noise data in the labeled data, this solution effectively improves the efficiency of determining the noise data in the second data set, and thus improves the efficiency of obtaining the cleaned second data set.

[0243] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0244] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0245] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0246] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0247] In addition, the terms "first", "second", etc. used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the present embodiment. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of the features. In the description of the present invention, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.

[0248] In the present invention, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific implementation situation.

[0249] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0250] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for abnormality prompting of a target object, characterized in that: Applied to a computer device, the method comprises: Inputting a first data set into a first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object; Based on the first probability and the second probability of each of the first data, determine the first target data to be labeled from the first data set, label the first target data to be labeled to obtain a first sub-data set, and determine the second data set based on the first sub-data set; Inputting the second data set into a second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category; determining noise data from the second data set based on the third probability and the fourth probability of each of the second data, and cleaning the noise data in the second data set; Training the cleaned second data set to obtain an anomaly recognition model, and processing the image to be recognized by using the anomaly recognition model; When the output result of the abnormality recognition model indicates that the target object has an abnormality, a prompt message is issued, where the prompt message is used to prompt that the target object has an abnormality.

2. The method according to claim 1, characterized in that The target objects include: people's clothing, or fireworks.

3. The method according to claim 1, characterized in that Determining first target data to be labeled from the first data set based on the first probability and the second probability of each of the first data includes: Obtaining a first preset threshold and a second preset threshold; For each of the first data, determining the maximum value between the first probability and the second probability of the first data as the target probability of the first data, and determining the category corresponding to the target probability as the target category of the first data; If it is determined that the first data belongs to the difficult positive category based on the first preset threshold, the target probability of the first data, and the target category, or if it is determined that the first data belongs to the difficult negative category based on the second preset threshold, the target probability of the first data, and the target category, the first data is determined as the first target data to be labeled.

4. The method according to claim 3, characterized in that Determining, based on the first preset threshold, the target probability of the first data, and the target category, that the first data belongs to a difficult positive category includes: If the target category is the positive category and the target probability is less than the first preset threshold, determining that the first data belongs to the difficult positive category; Determining, based on the second preset threshold, the target probability and the target category of the first data, that the first data belongs to a difficult negative category includes: If the target category is the negative category and the target probability is less than the second preset threshold, it is determined that the first data belongs to the difficult negative category.

5. The method according to claim 3, characterized in that: Obtaining a first preset threshold and a second preset threshold includes: Repeat the model updating process until the loss value is less than the preset loss value; wherein the model updating process includes: Determine a simple positive sample subset and a difficult positive sample subset from the sample set based on a first preset value, a historical sample target probability and a historical sample target category of each sample in the sample set, wherein the historical sample target category is used to indicate whether the sample is a positive sample or a negative sample; Determine a simple negative sample subset and a difficult negative sample subset from the sample set based on a second preset value, a historical sample target probability and a historical sample target category of each of the samples; Inputting four sample subsets into an initial model, and determining a sample target category and a sample target probability of each of the samples based on an output result of the initial model; Determine a loss value based on the weight of each of the sample subsets, and the sample target category and the true category of each of the samples in the four sample subsets; updating at least one of the first preset value and the second preset value, and updating at least one of the weights of the four sample subsets; After the model updating process is completed, the initial model is determined as the first data classification model, the first preset value is determined as the first preset threshold, and the second preset value is determined as the second preset threshold.

6. The method according to claim 5, characterized in that Based on the first preset value, the historical sample target probability and the historical sample target category of each sample in the sample set, determining a simple positive sample subset and a difficult positive sample subset from the sample set, including: For each of the samples, if the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is less than the first preset value, then determining that the sample belongs to the difficult positive sample subset; If the historical sample target category of the sample is a positive sample, and the historical sample target probability of the sample is greater than a third preset value, it is determined that the sample belongs to the simple positive sample subset, and the sum of the third preset value and the first preset value is 1.

7. The method according to claim 5, characterized in that Based on the second preset value, the historical sample target probability and the historical sample target category of each of the samples, determining a simple negative sample subset and a difficult negative sample subset from the sample set, including: For each of the samples, if the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is less than the second preset value, then determining that the sample belongs to the difficult negative sample subset; If the historical sample target category of the sample is a negative sample, and the historical sample target probability of the sample is greater than a fourth preset value, it is determined that the sample belongs to the simple negative sample subset, and the sum of the second preset value and the fourth preset value is 1.

8. The method according to any one of claims 1 to 7, characterized in that: Determining noise data from the second data set based on the third probability and the fourth probability of each of the second data comprises: For each second data, determining the maximum value between the third probability and the fourth probability of the second data as the predicted probability of the second data, and determining the category corresponding to the predicted probability as the predicted category of the second data; Determine a confidence joint matrix based on the predicted categories and the true categories of each of the second data, wherein the confidence joint matrix is ​​used to represent the number of the predicted categories in the second data set that are the same as the true category and the number of the predicted categories that are different from the true category; Normalizing the confidence joint matrix to obtain a confidence joint distribution matrix; Based on the confidence joint distribution matrix and the predicted probability of each of the second data, noise data is determined from the second data set.

9. The method according to any one of claims 1 to 7, characterized in that: The second data classification model includes a plurality of sub-models; the second data set is input into the second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category, including: For each of the sub-models, the second data set is divided into a training set and a validation set, wherein the training sets and validation sets corresponding to different sub-models are different, and a data set formed by multiple validation sets of multiple sub-models is the second data set; Using the training set to train the sub-model; The validation set is input into the sub-model to obtain a third probability that each second data in the validation set belongs to a positive category and a fourth probability that each second data in the validation set belongs to a negative category.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the abnormality prompt method for a target object according to any one of claims 1 to 9 is implemented.

11. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the abnormality prompt method for the target object according to any one of claims 1 to 9 is implemented.

12. A target object abnormality prompt device, characterized in that: The device comprises: A first determination module is configured to input a first data set into a first data classification model to obtain a first probability that each first data in the first data set belongs to a positive category and a second probability that each first data in the first data set belongs to a negative category, wherein the first data is an image of a target object; and determine first target data to be labeled from the first data set based on the first probability and the second probability of each first data; A labeling module, used for labeling the first target data to be labeled to obtain a first sub-data set; a second determination module, configured to determine a second data set based on the first sub-data set; input the second data set into a second data classification model to obtain a third probability that each second data in the second data set belongs to a positive category and a fourth probability that each second data in the second data set belongs to a negative category; and determine noise data from the second data set based on the third probability and the fourth probability of each second data; A cleaning module, used for cleaning the noise data in the second data set; A training module, used for training the cleaned second data set to obtain an anomaly recognition model; A processing module, used for processing the image to be identified by using the abnormality identification model; The prompt module is used to issue a prompt message when the output result of the abnormality recognition model indicates that the target object has an abnormality, and the prompt message is used to prompt that the target object has an abnormality.