Target detection model training method, system, terminal device and storage medium

By performing data augmentation and screening on unlabeled data, generating pseudo-labels and combining them with labeled data to train the model, the problem of poor generalization performance in target detection model training is solved, and the generalization performance and training efficiency of the model are improved.

CN114898176BActive Publication Date: 2025-09-23XIAMEN MEITUZHIJIA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210493670.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2025-09-23
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

In the existing object detection model training process, the generalization performance of the model trained based on limited labeled data is poor, resulting in low training efficiency.

Method used

By performing data gain on the unlabeled data, gain data is generated, and the difference between the unlabeled data and the gain data is determined using the first prediction result, the filtered data is screened out for pseudo-label setting, and the model is trained in combination with the labeled training data, and the pseudo-labels are gradually updated until the model converges.

Benefits of technology

It improves the generalization performance and training efficiency of the target detection model, reduces the cost of data labeling, and enhances the model's discrimination and generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114898176B_ABST
    Figure CN114898176B_ABST
Patent Text Reader

Abstract

The present invention provides a target detection model training method, system, terminal device, and storage medium. The method includes: inputting unlabeled data and gain data into a target detection model for target detection to obtain a first prediction result; determining the difference between the first prediction results of the unlabeled data and the gain data, filtering the unlabeled data according to the difference between the first prediction results to obtain filtered data; setting the prediction result after maximum value filtering as a pseudo-label corresponding to the filtered data; inputting the pseudo-label of the filtered data and labeled training data into the target detection model for target detection to obtain a second prediction result, training the target detection model according to the second prediction result, and synchronously updating the pseudo-label of the filtered data. The present invention synchronously updates the first prediction result and the pseudo-label of the filtered data, thereby improving the confidence of the pseudo-label, enhancing the effectiveness of the training model for the second prediction result, and improving the generalization performance of the target detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a target detection model training method, system, terminal device and storage medium. Background Art

[0002] Computer vision (CV) is an interdisciplinary field that studies how to achieve high-level semantic understanding of digital images or videos. It empowers machines with the ability to "see," leveraging the visual capabilities of the human brain (primarily the visual cortex). Object detection is one of the primary tasks within computer vision. Object detection typically involves finding the locations of all objects in a given image or video frame and assigning a specific category to each object.

[0003] In the existing target detection model training process, model training is all based on labeled training data. Due to the high cost of obtaining labeled data and the limited labeled data, the generalization performance of the model trained based on limited labeled data is poor, which reduces the training efficiency of the target detection model. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a target detection model training method, system, terminal device and storage medium, aiming to solve the problem of poor generalization performance of the model trained based on limited labeled data in the existing target detection model training process.

[0005] The embodiment of the present invention is implemented as follows: a target detection model training method, the method comprising:

[0006] Performing data gain on the unlabeled data to obtain gain data, and inputting the unlabeled data and the gain data into a target detection model to perform target detection to obtain a first prediction result;

[0007] determining, based on the first prediction result, a difference between the first prediction results of the unlabeled data and the gain data, and filtering the unlabeled data based on the difference between the first prediction results to obtain filtered data;

[0008] Performing maximum value screening on the prediction results of the screening data, and setting the prediction results after the maximum value screening as pseudo labels corresponding to the screening data;

[0009] Inputting the pseudo-labeled and labeled training data of the screening data into the target detection model to perform target detection to obtain a second prediction result;

[0010] The target detection model is trained according to the second prediction result, and the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain the first prediction result is returned, and the pseudo-label of the screened data is synchronously updated until the target detection model converges.

[0011] Furthermore, performing model training on the target detection model according to the second prediction result includes:

[0012] Calculating a weighted regression loss and a cross entropy classification loss of the labeled training data according to the second prediction result;

[0013] Calculating a weighted regression loss and an ordered classification loss of the pseudo-labels of the screening data according to the second prediction result;

[0014] The target detection model is trained according to the weighted regression loss and cross entropy classification loss of the labeled training data, and the weighted regression loss and ordered classification loss of the pseudo-labels of the screening data, and the pseudo-labels of the screening data are simultaneously updated.

[0015] Furthermore, the formula used to determine the difference between the first prediction results of the unlabeled data and the gain data according to the first prediction result is:

[0016]

[0017]

[0018] Among them, b is the detection box regression result of the unlabeled data, is the detection box regression result of the i-th gain data corresponding to the unlabeled data, p is the detection box classification result of the unlabeled data, is the classification result of the detection frame of the i-th gain data corresponding to the unlabeled data, is the detection box regression difference value, is a detection box classification difference value, and the difference between the first prediction results includes the detection box regression difference value and the detection box classification difference value.

[0019] Furthermore, screening the unlabeled data according to the differences between the first prediction results includes:

[0020] Obtaining, according to the differences between the first prediction results, a detection box regression difference value and a detection box classification difference value corresponding to each sample data in the unlabeled data;

[0021] If the detection box regression difference value of any of the data is greater than a first threshold, and the detection box classification difference value of the data is greater than a second threshold, the data is filtered and its prediction result is subjected to non-maximum suppression to obtain a pseudo label of the filtered data.

[0022] Furthermore, the formula used to calculate the ordered classification loss of the pseudo-labels of the screening data according to the second prediction result is:

[0023]

[0024] in, is the set of all positive examples, is the number of negative examples that are greater than the predicted value of the positive examples, rank It is the number of positive and negative examples that are greater than or equal to the positive prediction value.

[0025] Furthermore, after setting the prediction result after the maximum value screening as a pseudo mark of the corresponding screening data, the method further includes:

[0026] According to the first prediction result, respectively obtaining a classification result probability value of each pseudo-label in the pseudo-labels of the screening data, and sorting the pseudo-labels according to the classification result probability value to obtain a sorted set;

[0027] Setting a weight value for each pseudo-marker according to the sorted set and the index value of each pseudo-marker;

[0028] Among them, the calculation formula used for the pseudo-label weight value w is:

[0029]

[0030] Pseudo-label The corresponding index value, It is a sorted set sorted from large to small according to the probability value of the classification result.

[0031] Furthermore, after setting the weight value of each pseudo-label according to the sorted set and the index value of each pseudo-label, the method further includes: calculating the weighted regression loss of the pseudo-label of the screened data according to the weight value:

[0032]

[0033] y is a pseudo label, Another object of the present invention is to provide a target detection model training system, the system comprising:

[0034] a data gain module, configured to perform data gain on the unlabeled data to obtain gain data, and input the unlabeled data and the gain data into a target detection model to perform target detection and obtain a first prediction result;

[0035] a data screening module, configured to determine, based on the first prediction result, a difference between the first prediction results of the unlabeled data and the gain data, and screen the unlabeled data based on the difference between the first prediction results to obtain screened data;

[0036] A pseudo-label setting module, configured to perform maximum value screening on the prediction results of the screening data, and set the prediction results after the maximum value screening as pseudo-labels of the corresponding screening data;

[0037] a model training module, configured to input the pseudo-labeled and labeled training data of the screening data into the target detection model to perform target detection and obtain a second prediction result;

[0038] Performing model training on the target detection model according to the second prediction result, and synchronously updating the pseudo-labels of the screening data;

[0039] According to the updated pseudo-label of the screening data, return to the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain a first prediction result until the target detection model converges.

[0040] Another object of an embodiment of the present invention is to provide a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0041] Another object of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0042] In an embodiment of the present invention, a first prediction result is obtained by inputting unlabeled data and gain data into a target detection model for target detection. Based on the first prediction result, the difference between the first prediction results of the unlabeled data and the gain data can be effectively determined. Based on the difference between the first prediction results, training data with a lower difference change after data gain can be effectively screened to obtain filtered data. By performing maximum value screening on the prediction results of the filtered data, pseudo-labels of the filtered data with higher stability can be effectively screened. By inputting the pseudo-labels of the filtered data and labeled training data into the target detection model for target detection, a second prediction result is obtained. Based on the second prediction result, the target detection model can be effectively trained, and the first prediction result and the pseudo-labels of the filtered data are synchronously updated when the second prediction result model is trained. The confidence of the pseudo-labels of the filtered data is gradually improved, the effectiveness of the second prediction result training model is further improved, and the generalization performance of the trained target detection model is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of the target detection model training method provided by the first embodiment of the present invention;

[0044] Figure 2 is a flow chart of the target detection model training method provided by the second embodiment of the present invention;

[0045] Figure 3 This is a flowchart of a specific implementation plan of the target detection model training method provided by the second embodiment of the present invention;

[0046] Figure 4 2 is a schematic diagram of the structure of the target detection model training system provided by the third embodiment of the present invention;

[0047] Figure 5 It is a schematic structural diagram of a terminal device provided in the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0049] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.

[0050] Example 1

[0051] See also Figure 1, is a flow chart of a target detection model training method provided by the first embodiment of the present invention. The target detection model training method can be applied to any terminal device. The target detection model training method includes the following steps:

[0052] Step S10, performing data gain on the unlabeled data to obtain gain data, and inputting the unlabeled data and the gain data into a target detection model to perform target detection to obtain a first prediction result;

[0053] Among them, the unlabeled data stores at least one unlabeled training sample, which does not carry any labeling information. The labeling information includes target classification information and target position information. By performing data gain on the unlabeled data, the effect of image feature transformation of the unlabeled data can be achieved.

[0054] Furthermore, in this step, before inputting the unlabeled data and the gain data into the target detection model for target detection, the step further includes: obtaining labeled training data, and pre-training the target detection model based on the labeled training data;

[0055] Among them, the labeled training data stores at least one labeled training sample, which carries annotation information. In this step, by calculating the detection box SmoothL1 weighted regression loss and cross entropy classification loss in the target detection model, the network parameters of the target detection model are optimized and updated according to the detection box SmoothL1 weighted regression loss and cross entropy classification loss to obtain a pre-trained target detection model , and input the unlabeled data and gain data into the target detection model Perform target detection and obtain the first prediction result.

[0056] Optionally, in this step, performing data gain on the unlabeled data to obtain gain data includes:

[0057] Processing the unlabeled data by one or more combinations of image blurring, color enhancement, or Gaussian noise to obtain the gain data;

[0058] Among them, each unlabeled training sample in the unlabeled data is ,conduct A kind of pixel-level data gain, such as image blur, color enhancement and Gaussian noise, etc., to obtain the corresponding gain data , that is, each unlabeled training sample Each corresponds to a gain data, for example, when the unlabeled data includes unlabeled training samples a 、 b and c When a 、 b and c The image is processed by one or more combinations of image blur, color enhancement or Gaussian noise, and the gain data obtained is the gain data E a , gain data E b and gain data E c , and a With gain data E a 、 b With gain data E b 、 c With gain data E c Corresponding input target detection model Perform target detection and obtain the first prediction result.

[0059] Step S20, determining the difference between the first prediction results of the unlabeled data and the gain data according to the first prediction result, and screening the unlabeled data according to the difference between the first prediction results to obtain screened data;

[0060] The difference between the first prediction results is used to characterize the data difference between the unlabeled data and the corresponding gain data. The difference between the first prediction results between the unlabeled training samples in the unlabeled data and the corresponding gain data can be effectively determined through the first prediction results. Based on the difference between the first prediction results, training data with a low difference change after data gain can be effectively screened to obtain screened data.

[0061] For example, according to the first prediction result, determine a With gain data E a 、 b With gain data E b 、 c With gain data E c The difference between the first prediction results is obtained by a , the difference between the first prediction results S b The difference S between the first prediction result c .

[0062] Optionally, in this step, the unlabeled data and the

[0063] The formula used to calculate the difference between the first prediction results of the gain data is:

[0064]

[0065]

[0066] Among them, b is the detection box regression result of unlabeled data, is the detection box regression result of the i-th gain data corresponding to the unlabeled data, and p is the detection box classification result of the unlabeled data. is the classification result of the detection frame of the i-th gain data corresponding to the unlabeled data, is the detection box regression difference value, is the detection box classification difference value, the difference between the first prediction results includes the detection box regression difference value and the detection box classification difference value, that is, the difference S between the first prediction results a , the difference between the first prediction results S b The difference S between the first prediction result c , both include the detection box regression difference value and the detection box classification difference value between the corresponding unlabeled training samples and the gain data.

[0067] Furthermore, in this step, screening the unlabeled data according to the differences between the first prediction results includes:

[0068] Obtaining, according to the differences between the first prediction results, a detection box regression difference value and a detection box classification difference value corresponding to each sample data in the unlabeled data;

[0069] If the detection box regression difference value of any of the data is greater than a first threshold, and the detection box classification difference value of the data is greater than a second threshold, the data is filtered, and non-maximum suppression is performed on the prediction result to obtain a pseudo label of the filtered data;

[0070] Among them, the first threshold and the second threshold can both be set as parameter values ​​according to needs. The first threshold is used to detect whether the detection box regression difference value between the unlabeled training sample and the corresponding gain data meets the detection box regression condition. If the detection box regression difference value of any data is greater than the first threshold, and the detection box classification difference value of the data is greater than the second threshold, the data is filtered, and its prediction result is non-maximum suppressed to obtain a pseudo label for the filtered data.

[0071] Step S30, performing maximum value screening on the prediction results of the screening data, and setting the prediction results after the maximum value screening as pseudo labels corresponding to the screening data;

[0072] Among them, the non-maximum suppression algorithm (NMS) can be used to perform maximum value screening on the prediction results of the filtered data, and the retained prediction results are set as pseudo labels of the corresponding filtered data. , thereby effectively improving the accuracy of each pseudo-label in the pseudo-label of the screening data.

[0073] Optionally, in this step, after setting the prediction result after the maximum value screening as a pseudo-label of the corresponding screening data, the method further includes:

[0074] According to the first prediction result, respectively obtaining a classification result probability value of each pseudo-label in the pseudo-labels of the screening data, and sorting the pseudo-labels according to the classification result probability value to obtain a sorted set;

[0075] Setting a weight value of each pseudo-marker according to the sorted set and the index value of each pseudo-marker;

[0076] Among them, the pseudo labels are sorted according to the probability values ​​of the classification results corresponding to the pseudo labels of the filtered data, and the weight values ​​corresponding to the pseudo labels are set. is a sorted set sorted from large to small according to the probability value of the classification result, Pseudo-label The corresponding index value, is the length of the sorted set, the weight value of each pseudo-marker Set the formula as follows:

[0077]

[0078] Among them, the weight To adapt the weights, they will be updated when the pseudo-labels of the filtered data are updated again;

[0079] Furthermore, this step also includes: calculating the weighted regression loss of the pseudo-label of the screening data according to the weight value:

[0080]

[0081] y is a pseudo label, The regression results obtained by inputting the pseudo-labeled data into the model.

[0082] Step S40, inputting the pseudo-labels of the screening data and the labeled training data into the target detection model to perform target detection and obtain a second prediction result;

[0083] Among them, the data will be filtered Pseudo-labeling And labeled training data is input to the target detection model Perform target detection and obtain a second prediction result;

[0084] Step S50: training the target detection model according to the second prediction result, returning to the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain the first prediction result, and synchronously updating the pseudo-label of the screened data until the target detection model converges;

[0085] The step of returning to the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain a first prediction result, and synchronously updating the pseudo-labels of the filtered data, so as to gradually improve the confidence of the pseudo-labels of the filtered data;

[0086] In this embodiment, by inputting unlabeled data and gain data into the target detection model for target detection, a first prediction result is obtained. Based on the first prediction result, the difference between the first prediction results of the unlabeled data and the gain data can be effectively determined. Based on the difference between the first prediction results, training data with lower difference changes after data gain can be effectively screened to obtain filtered data. By performing maximum value screening on the prediction results of the filtered data, pseudo-labels of the filtered data with higher stability can be effectively screened. By inputting the pseudo-labels of the filtered data and labeled training data into the target detection model for target detection, a second prediction result is obtained. Based on the second prediction result, the target detection model can be effectively trained, thereby improving the generalization performance of the trained target detection model and thereby improving the training efficiency of the target detection model.

[0087] Example 2

[0088] See also Figure 2 , is a flow chart of the target detection model training method provided by the second embodiment of the present invention, which is used to further refine step S50, including the steps of:

[0089] Step S51, calculating the weighted regression loss and cross entropy classification loss of the labeled training data according to the second prediction result;

[0090] According to the second prediction result, the SmoothL1 weighted regression loss and the cross entropy classification loss are calculated for the labeled training data;

[0091] Step S52, calculating the weighted regression loss and ordered classification loss of the pseudo-labels of the screening data according to the second prediction result;

[0092] Among them, the pseudo-label calculation of the screening data is weighted SmoothL1 weighted regression loss and ordered classification loss, optionally, in this step, the ordered classification loss of the pseudo-label of the screening data is calculated according to the second prediction result The formula used is:

[0093]

[0094] in, is the set of all positive examples, is the number of negative examples that are greater than the predicted value of the positive examples, rank It is the number of positive and negative examples that are greater than or equal to the positive prediction value.

[0095] Step S53: updating the parameters of the target detection model according to the weighted regression loss and cross entropy classification loss of the labeled training data, and the weighted regression loss and ordered classification loss of the pseudo-labels of the screened data, and returning to the step of inputting the unlabeled data and the gain data into the target detection model for target detection until the target detection model converges;

[0096] See also Figure 3 , which is a flow chart of a specific implementation plan of this embodiment, wherein, after the parameter update of the target detection model for the current iteration is completed according to the weighted regression loss and cross entropy classification loss of the labeled training data, and the weighted regression loss and ordered classification loss of the pseudo-labels of the screened data, the process returns to execute steps S10 and S20 to achieve the effect of updating the pseudo-labels of the screened data, thereby improving the accuracy and quality of the pseudo-labels during the training process of the target detection model, introducing reliable discrimination information for the target detection model, and continuing to iteratively update the parameters of the target detection model according to the continuously updated pseudo-labels, thereby improving the discrimination ability of the target detection model and improving the model training efficiency.

[0097] In this embodiment, a semi-supervised target detection method based on ordered information is used, and the difference orderliness is used to screen out high-quality pseudo-labels from unlabeled data. The confidence orderliness is further used to assign larger weighted regression loss training weights to more reliable pseudo-labels, and ordered classification losses are used for constraints at the same time. The pseudo-labels are continuously updated through iterative model training, the quality of the pseudo-labels is improved, and reliable discriminant information is introduced into the target detection model, thereby further improving the discrimination ability of the target detection model. While relying only on limited labeled data, this embodiment can improve the generalization ability and performance of the target detection model through a large amount of unlabeled data. In practical applications, a high-performance target detection model can be provided, while greatly reducing the cost of data labeling and accelerating the implementation of intelligent target detection products.

[0098] Example 3

[0099] See also Figure 4 , is a schematic diagram of the structure of a target detection model training system 100 provided in a third embodiment of the present invention, comprising: a data gain module 10, a data screening module 11, a pseudo-label setting module 12, and a model training module 13, wherein:

[0100] The data gain module 10 is configured to perform data gain on the unlabeled data to obtain gain data, and input the unlabeled data and the gain data into a target detection model to perform target detection and obtain a first prediction result.

[0101] The data screening module 11 is configured to determine the difference between the first prediction results of the unlabeled data and the gain data according to the first prediction result, and screen the unlabeled data according to the difference between the first prediction results to obtain screened data.

[0102] The data screening module 11 is further configured to: determine the difference between the first prediction results of the unlabeled data and the gain data according to the first prediction result using the following formula:

[0103]

[0104]

[0105] Among them, b is the detection box regression result of the unlabeled data, is the detection box regression result of the i-th gain data corresponding to the unlabeled data, p is the detection box classification result of the unlabeled data, is the classification result of the detection frame of the i-th gain data corresponding to the unlabeled data, is the detection box regression difference value, is a detection box classification difference value, and the difference between the first prediction results includes the detection box regression difference value and the detection box classification difference value.

[0106] Optionally, the data screening module 11 is further configured to: obtain, according to the differences between the first prediction results, a detection box regression difference value and a detection box classification difference value corresponding to each sample data in the unlabeled data;

[0107] If the detection box regression difference value of any of the data is greater than a first threshold, and the detection box classification difference value of the data is greater than a second threshold, the data is filtered and its prediction result is subjected to non-maximum suppression to obtain a pseudo label of the filtered data.

[0108] The pseudo-label setting module 12 is configured to perform maximum value screening on the prediction results of the screening data, and set the prediction results after the maximum value screening as pseudo-labels corresponding to the screening data.

[0109] The pseudo-label setting module 12 is further configured to: obtain, according to the first prediction result, a classification result probability value of each pseudo-label in the pseudo-labels of the screening data, and sort the pseudo-labels according to the classification result probability value to obtain a sorted set;

[0110] Setting a weight value for each pseudo-marker according to the sorted set and the index value of each pseudo-marker;

[0111] Among them, the calculation formula used for the pseudo-label weight value w is:

[0112]

[0113] Pseudo-label The corresponding index value, It is a sorted set sorted from large to small according to the probability value of the classification result.

[0114] Furthermore, the pseudo-label setting module 12 is further configured to calculate the weighted regression loss of the pseudo-label of the screening data according to the weight value:

[0115]

[0116] y is a pseudo label, The regression results obtained by inputting the pseudo-labeled data into the model.

[0117] A model training module 13 is configured to input the pseudo-labeled and labeled training data of the screening data into the target detection model to perform target detection and obtain a second prediction result;

[0118] The target detection model is trained according to the second prediction result, and the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain the first prediction result is returned, and the pseudo-label of the screened data is synchronously updated until the target detection model converges.

[0119] The model training module 13 is further configured to: calculate the weighted regression loss and the cross entropy classification loss of the labeled training data according to the second prediction result;

[0120] Calculating a weighted regression loss and an ordered classification loss of the pseudo-labels of the screening data according to the second prediction result;

[0121] The target detection model is trained according to the weighted regression loss and cross entropy classification loss of the labeled training data, and the weighted regression loss and ordered classification loss of the pseudo-labels of the screening data, and the pseudo-labels of the screening data are simultaneously updated.

[0122] Optionally, the model training module 13 is further configured to: calculate the ordered classification loss of the pseudo-labels of the screening data according to the second prediction result using the formula:

[0123]

[0124] in, is the set of all positive examples, is the number of negative examples that are greater than the predicted value of the positive examples, rank It is the number of positive and negative examples that are greater than or equal to the positive prediction value.

[0125] In this embodiment, by inputting unlabeled data and gain data into the target detection model for target detection, a first prediction result is obtained. Based on the first prediction result, the difference between the first prediction results of the unlabeled data and the gain data can be effectively determined. Based on the difference between the first prediction results, training data with lower difference changes after data gain can be effectively screened to obtain filtered data. By performing maximum value screening on the prediction results of the filtered data, pseudo-labels of the filtered data with higher stability can be effectively screened. By inputting the pseudo-labels of the filtered data and the labeled training data into the target detection model for target detection, a second prediction result is obtained. Based on the second prediction result, the target detection model can be effectively trained, and the first prediction result and the pseudo-labels of the filtered data are updated synchronously when the second prediction result training model is trained. The confidence of the pseudo-labels of the filtered data is gradually improved, the effectiveness of the second prediction result training model is further improved, and the generalization performance of the trained target detection model is improved.

[0126] Example 4

[0127] Figure 5 This is a structural block diagram of a terminal device 2 provided in the fourth embodiment of the present application. Figure 5 As shown, the terminal device 2 of this embodiment includes: a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program for the target detection model training method. When the processor 20 executes the computer program 22, the steps in each embodiment of the target detection model training method described above are implemented, such as Figure 1 S10 to S50 as shown, or Figure 2 Alternatively, the processor 20 executes the computer program 22 to implement the above Figure 4 The functions of each unit in the corresponding embodiment are, for example, Figure 4 For details on the functions of units 10 to 13, please refer to Figure 4 The relevant descriptions in the corresponding embodiments are not repeated here.

[0128] Exemplarily, the computer program 22 may be divided into one or more units, each of which is stored in the memory 21 and executed by the processor 20 to implement the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 22 in the terminal device 2. For example, the computer program 22 may be divided into a data gain module 10, a data screening module 11, a pseudo-label setting module 12, and a model training module 13, with the specific functions of each unit being as described above.

[0129] The terminal device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will understand that Figure 4 It is only an example of the terminal device 2 and does not constitute a limitation on the terminal device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0130] The processor 20 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0131] The memory 21 can be an internal storage unit of the terminal device 2, such as a hard drive or memory of the terminal device 2. The memory 21 can also be an external storage device of the terminal device 2, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped with the terminal device 2. Furthermore, the memory 21 can include both an internal storage unit of the terminal device 2 and an external storage device. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 can also be used to temporarily store data that has been output or is about to be output.

[0132] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0133] If the integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be either non-volatile or volatile. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunications signals.

[0134] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A target detection model training method, characterized in that: The method comprises: Performing data gain on the unlabeled data to obtain gain data, and inputting the unlabeled data and the gain data into a target detection model to perform target detection to obtain a first prediction result; determining, based on the first prediction result, a difference between the first prediction results of the unlabeled data and the gain data, and filtering the unlabeled data based on the difference between the first prediction results to obtain filtered data; Performing maximum value screening on the prediction results of the screening data, and setting the prediction results after the maximum value screening as pseudo labels corresponding to the screening data; Inputting the pseudo-labeled and labeled training data of the screening data into the target detection model to perform target detection to obtain a second prediction result; Training the target detection model based on the second prediction result, returning to the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain the first prediction result, and synchronously updating the pseudo-labels of the filtered data until the target detection model converges; The screening of the unlabeled data according to the differences between the first prediction results includes: Obtaining, according to the differences between the first prediction results, a detection box regression difference value and a detection box classification difference value corresponding to each sample data in the unlabeled data; If the detection box regression difference value of any of the data is greater than a first threshold, and the detection box classification difference value of the data is greater than a second threshold, the data is filtered and its prediction result is subjected to non-maximum suppression to obtain a pseudo label of the filtered data.

2. The target detection model training method according to claim 1, wherein: The performing model training on the target detection model according to the second prediction result includes: Calculating a weighted regression loss and a cross entropy classification loss of the labeled training data according to the second prediction result; Calculating a weighted regression loss and an ordered classification loss of the pseudo-labels of the screening data according to the second prediction result; The target detection model is trained according to the weighted regression loss and cross entropy classification loss of the labeled training data, and the weighted regression loss and ordered classification loss of the pseudo-labels of the screening data, and the pseudo-labels of the screening data are simultaneously updated.

3. The target detection model training method according to claim 1, wherein: The formula used to determine the difference between the first prediction results of the unlabeled data and the gain data according to the first prediction result is: Among them, b is the detection box regression result of the unlabeled data, is the detection box regression result of the i-th gain data corresponding to the unlabeled data, p is the detection box classification result of the unlabeled data, is the classification result of the detection frame of the i-th gain data corresponding to the unlabeled data, is the detection box regression difference value, is a detection box classification difference value, and the difference between the first prediction results includes the detection box regression difference value and the detection box classification difference value.

4. The target detection model training method according to claim 2, wherein: The formula used to calculate the ordered classification loss of the pseudo-labels of the screening data according to the second prediction result is: in, is the set of all positive examples, is the number of negative examples that are greater than the predicted value of the positive examples, rank It is the number of positive and negative examples that are greater than or equal to the positive prediction value.

5. The target detection model training method according to claim 1, wherein: After setting the prediction result after the maximum value screening as a pseudo mark of the corresponding screening data, the method further includes: According to the first prediction result, respectively obtaining a classification result probability value of each pseudo-label in the pseudo-labels of the screening data, and sorting the pseudo-labels according to the classification result probability value to obtain a sorted set; Setting a weight value of each pseudo-marker according to the sorted set and the index value of each pseudo-marker; Among them, the calculation formula used for the pseudo-label weight value w is: Pseudo-label The corresponding index value, It is a sorted set sorted from large to small according to the probability value of the classification result.

6. The target detection model training method according to claim 5, wherein: After setting the weight value of each pseudo-marker according to the sorted set and the index value of each pseudo-marker, the method further includes: Based on the weight values, calculate the weighted regression loss of the pseudo-labeled filtered data: y is a pseudo label, The regression results obtained by inputting the pseudo-labeled data into the model.

7. A target detection model training system, characterized in that: The system comprises: a data gain module, configured to perform data gain on the unlabeled data to obtain gain data, and input the unlabeled data and the gain data into a target detection model to perform target detection and obtain a first prediction result; a data screening module, configured to determine, based on the first prediction result, a difference between the first prediction results of the unlabeled data and the gain data, and screen the unlabeled data based on the difference between the first prediction results to obtain screened data; A pseudo-label setting module, configured to perform maximum value screening on the prediction results of the screening data, and set the prediction results after the maximum value screening as pseudo-labels of the corresponding screening data; a model training module, configured to input the pseudo-labeled and labeled training data of the screening data into the target detection model to perform target detection and obtain a second prediction result; Performing model training on the target detection model according to the second prediction result, returning to the step of inputting the unlabeled data and the gain data into the target detection model for target detection to obtain the first prediction result, and synchronously updating the pseudo-label of the screened data until the target detection model converges; The data screening module is further configured to: obtain, according to the differences between the first prediction results, a detection box regression difference value and a detection box classification difference value corresponding to each sample data in the unlabeled data; If the detection box regression difference value of any of the data is greater than a first threshold, and the detection box classification difference value of the data is greater than a second threshold, the data is filtered and its prediction result is subjected to non-maximum suppression to obtain a pseudo label of the filtered data.

8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method for compensating image data illumination and paper feeding type scanning device applying same

    CN101557455A

  • Portrait-based image repairing method and device, electronic equipment and storage medium

    CN112330573A