Target detection sample set optimization method and system, medium, program product and equipment

Through the reinforcement learning algorithm dynamically adjusting data value evaluation in the field of object detection, the problem of insufficient training data value evaluation in the existing technology is solved, and efficient sample screening and model performance improvement is achieved, suitable for complex detection scenarios and large-scale data sets .

CN119107518APending Publication Date: 2024-12-10GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411183083.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The value evaluation and optimization methods of training data in the existing object detection field rely on static standards, making it difficult to adapt to the variable detection environment, resulting in low-quality samples affecting model accuracy and training speed, high computational complexity, low processing efficiency, and difficult to cope with large-scale data. set requirements.

Method used

Design and train a data value evaluator, use reinforcement learning algorithm to dynamically adjust data value evaluation, divide the data set through the image and label information in the object detection scenario, pre-trained models for inference and evaluation, and combine reinforcement learning and multi-layer perceptron structure, Optimize data selection strategies and dynamically filter high-value samples.

Benefits of technology

It significantly improves the performance of the object detection model, reduces the computing burden, improves data processing efficiency, can adapt to complex detection scenarios, is suitable for large-scale object detection tasks, and improves the targetedness and robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107518A_ABST
    Figure CN119107518A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of sample cleaning, and provides a target detection sample set optimization method and system, a medium, a program product and equipment, and the method comprises the steps: obtaining an image and annotation information in a target detection scene, forming a sample data set, and dividing the sample data set into a first target detection data set and a second target detection data set; pre-training a target detection model by using the first target detection data set, and processing a target in the image according to the corresponding annotation information to obtain an evaluator data set; training a data value evaluator by utilizing reinforcement learning based on the evaluator data set; reasoning a second target detection data set by using a pre-trained target detection model, and performing data value evaluation on various reasoning results by using the trained data value evaluator to obtain quality values of corresponding samples; and cleaning the second target detection data set according to the obtained quality value. Redundant data can be remarkably reduced, and the training efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of sample cleaning, and in particular relates to a target detection sample set optimization method, system, medium, program product and equipment. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In the current field of target detection, although deep learning technology has made significant progress in image processing and feature extraction, there are still deficiencies in the value assessment and optimization of training data.

[0004] Traditional methods for evaluating and optimizing the value of training data mostly rely on static data screening criteria, which are difficult to adapt to the changing detection environment and cannot comprehensively evaluate samples from the target level, such as the target's own characteristics, target difficulty, and impact on the prediction model.

[0005] In addition, although existing value assessment techniques such as Data Shapley and LOO (Leave-One-Out) have made contributions in some aspects, they have high computational complexity and low processing efficiency, making it difficult to cope with the needs of large-scale data sets. These problems lead to a large number of low-quality samples in the training data, which seriously affects the detection accuracy and training speed of the model. Summary of the invention

[0006] In order to solve the above problems, the present invention proposes a method, system, medium, program product and equipment for optimizing a target detection sample set. The present invention designs and trains a data value evaluator, and dynamically adjusts the data value evaluator using a reinforcement learning algorithm, so as to accurately identify and screen out the data samples that are most valuable for model training. This can not only effectively improve the target detection performance of the model in complex backgrounds, but also significantly reduce redundant data and improve training efficiency, providing a reliable solution for large-scale target detection tasks.

[0007] According to some embodiments, the present invention adopts the following technical solutions:

[0008] A first aspect of the present invention provides a method for optimizing a target detection sample set.

[0009] A method for optimizing a target detection sample set comprises the following steps:

[0010] Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0011] Pre-training the target detection model using the first target detection data set, and processing the target in the image according to the corresponding annotation information to obtain an evaluator data set;

[0012] Based on the evaluator dataset, using reinforcement learning to train a data value evaluator;

[0013] Use the pre-trained target detection model to infer the second target detection data set to obtain different inference results, and use the trained data value evaluator to evaluate the data value of each inference result to obtain a quality value of the corresponding sample;

[0014] The second object detection data set is cleaned according to the obtained quality value, and the cleaned second object detection data set is used as the final training sample set.

[0015] In the above scheme, the images and annotation information in the target detection scenario are used as the initial data set, which can adapt to the complexity of the target detection scenario and help evaluate the samples from aspects such as the target's own characteristics and target difficulty. The data value evaluator is trained by reinforcement learning, which can continuously optimize the data selection strategy and dynamically adapt to the needs of the detection scenario. A part of the data set is used to pre-train the target detection model, and then the pre-trained target detection model is used to infer the other part of the data set. Based on the inference results, the value is evaluated, and the samples are evaluated from the perspective of predictive model impact, so as to more accurately quantify the data quality and eliminate low-value samples.

[0016] In summary, the above scheme can comprehensively evaluate samples at the target level, help improve the performance of the target detection model, significantly reduce the computational burden, and improve data processing efficiency.

[0017] As an optional implementation, the data set is divided into a first target detection data set and a second target detection data set according to a set ratio.

[0018] As an optional implementation, the objects in the image are cropped according to the annotation information and stored according to different categories to obtain an evaluator data set.

[0019] As an optional implementation, based on the evaluator data set, the process of training the data value evaluator using reinforcement learning includes:

[0020] Extracting features from the evaluator data set using a feature extraction network to obtain a feature map, and flattening the extracted feature map into a feature vector;

[0021] Training the prediction layer to predict the classification result based on the feature vector to obtain prediction difference information;

[0022] Constructing a data value evaluator, wherein the data value evaluator takes the feature vector as input, extracts complex features from the input using a multi-layer perceptron structure, and combines the complex features with the predicted difference information;

[0023] Iteratively executing inner and outer loop training processes, the inner loop training process includes creating a new classification predictor according to the trained prediction layer, using the data value evaluator to perform score prediction on the feature map of each sample, obtaining a sample scoring matrix, determining whether each sample is selected to participate in this training, obtaining a data selection matrix, and using the data selection matrix to train the classification predictor;

[0024] The outer loop training process includes verifying the classification predictor after the inner loop, calculating the reward value of reinforcement learning according to the verification result, performing back propagation, and updating the parameters of the evaluator.

[0025] As a further implementation, the extracted feature map is flattened into a feature vector, and the feature vector is divided into two parts, one part is used for training the data value evaluator, and the other part is used for verification, and the feature vectors all have corresponding labels.

[0026] As a further implementation, the prediction layer is trained to predict the classification result based on the feature vector, and the process of obtaining the prediction difference information includes:

[0027] Initialize the prediction layer, and train the prediction layer using the feature vector and its label for training to obtain an initial model;

[0028] The prediction layer is trained using the feature vectors and their labels used for verification to obtain a verification model;

[0029] Use the initial model to predict the feature vectors and their labels for verification and calculate the initial F1 value;

[0030] The validation model is used to infer the feature vectors used for training and their labels to obtain the predicted differences.

[0031] As a further implementation method, the sample scoring matrix reflects the estimation of the potential value of each sample to the model training. The Bernoulli algorithm is used to dynamically select samples in a probabilistic manner to determine whether each sample is selected to participate in this training, thereby obtaining a data selection matrix. Each element value of the data selection matrix is ​​0 or 1, representing that the corresponding sample is not selected or selected, respectively.

[0032] As a further implementation, during the inner loop training process, in the process of calculating the loss function and performing back propagation to update the classification predictor weights, weighted loss calculation is achieved by multiplying the original loss value with the data selection matrix.

[0033] As a further implementation method, the classification predictor obtained after the inner loop is verified using the feature vector and its label for verification, and the F1 value after data evaluation optimization is obtained, and the reward value of reinforcement learning is calculated with the initial F1 value, and the reinforcement learning algorithm is used for back propagation to update the parameters of the evaluator.

[0034] As an optional implementation, the correct box, false detection box and missed detection box of each sample are obtained according to the inference result;

[0035] Use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples;

[0036] Use the trained data value evaluator to perform data value evaluation on the false detection frame to obtain the quality value of the corresponding sample. If the quality value of the corresponding sample is greater than the set value, the false detection frame is revised and the data value is re-evaluated. Otherwise, the false detection frame is regarded as a negative sample.

[0037] As an optional implementation, data value evaluation is performed on the correct box and the missed box, and the sample quality value S is obtained by weighting. quality :

[0038]

[0039] Among them, S TP and S FN The sum of the sample quality values ​​of the correct box and the missed box, N TP and N FN are the number of correct boxes and missed boxes respectively, and α and β are weight coefficients.

[0040] As an optional implementation, the final quality value of the sample is:

[0041] SCORE=ηS quality +γS difficult

[0042] Among them, η and γ are weight coefficients, S difficult is the sample quality value obtained by weighting the false positive boxes in the two cases, S quality The sample quality values ​​obtained for the correct box and the missed box.

[0043] As an optional implementation, the process of cleaning the second target detection data set according to the obtained quality values ​​includes deleting samples whose sample quality values ​​are lower than a set threshold and retaining the modified sample labels.

[0044] A second aspect of the present invention provides a target detection sample set optimization system.

[0045] A target detection sample set optimization system, comprising:

[0046] A data set division module is configured to obtain images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0047] A pre-training module is configured to use the first object detection data set to pre-train the object detection model, and process the object in the image according to the corresponding annotation information to obtain an evaluator data set;

[0048] A reinforcement learning module is configured to train a data value evaluator using reinforcement learning based on the evaluator dataset;

[0049] The reasoning and evaluation module is configured to use the pre-trained target detection model to perform reasoning on the second target detection data set to obtain different reasoning results, and use the trained data value evaluator to perform data value evaluation on each reasoning result to obtain a quality value of the corresponding sample;

[0050] The sample cleaning module is configured to clean the second object detection data set according to the obtained quality value, and use the cleaned second object detection data set as the final training sample set.

[0051] A third aspect of the present invention provides a computer-readable storage medium.

[0052] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.

[0053] A fourth aspect of the present invention provides a computer program product.

[0054] A computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in the above method are implemented.

[0055] A fifth aspect of the present invention provides an electronic device.

[0056] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.

[0057] Compared with the prior art, the present invention has the following beneficial effects:

[0058] 1. The present invention innovatively proposes a target detection sample set optimization method. By introducing a reinforcement learning strategy, a data value evaluator is trained, and a flexible and efficient value evaluation standard is formulated. The data value evaluator continuously optimizes the data selection strategy during the reinforcement learning process, dynamically adapts to the needs of different detection scenarios, can screen out high-value training samples, improve training efficiency, and provide a reliable solution for large-scale target detection tasks.

[0059] 2. The target annotation of the target detection data set in the present invention is more complicated than that of the classification data set, covering specific application problems such as bounding boxes and category labels. The image and annotation information in the target detection scenario is used as the initial data set, and the samples can be evaluated from the aspects of the target's own characteristics and target difficulty. The data value evaluator is trained by reinforcement learning, which can continuously optimize the data selection strategy and dynamically adapt to the needs of the detection scenario. A part of the data in the data set is used to pre-train the target detection model, and then the pre-trained target detection model is used to infer the other part of the data set. Based on the inference results, the value is evaluated, and the samples are evaluated from the perspective of the impact on the prediction model, thereby realizing the ability to comprehensively evaluate the samples from the target level.

[0060] 3. The present invention optimizes the data selection process, applies the Bernoulli algorithm to decide whether each sample is selected, and dynamically selects samples in a probabilistic manner. It not only takes into account the evaluation results of data value, but also introduces randomness to maintain the diversity and robustness of model training, and reduces the interference of invalid training samples on model updates, further improving the efficiency of the training process and the targeting of the target, avoiding direct enumeration and calculation, and is suitable for large-scale data sets.

[0061] 4. The present invention can replace the target detection scene according to needs and adapt to the complexity of the target detection scene. It can be applied to many fields such as power inspection, image recognition, traffic detection, security monitoring, automatic driving, etc. and has wide applicability.

[0062] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0064] Figure 1 is a schematic diagram of a flow chart of a method for optimizing a target detection sample set according to an embodiment;

[0065] Figure 2is a schematic diagram of a prediction layer initialization process of an embodiment;

[0066] Figure 3 is a schematic diagram of the structure of a data value evaluator according to an embodiment;

[0067] Figure 4 This is a schematic diagram of an inner circulation process of an embodiment;

[0068] Figure 5 This is a schematic diagram of an external circulation process of an embodiment;

[0069] Figure 6 is a schematic diagram of evaluation criteria of an embodiment;

[0070] Figure 7 is a schematic diagram of a target detection sample set optimization system flow in one embodiment;

[0071] Figure 8 The electronic device structure diagram of an embodiment is shown. DETAILED DESCRIPTION

[0072] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0073] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0074] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0075] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.

[0076] Embodiment 1

[0077] As described in the background technology, in the existing target detection process, there are many low-quality samples in the value assessment and optimization of training data, the computational complexity is high, the processing efficiency is low, and it is difficult to meet the needs of large-scale data sets. The present embodiment provides a method for optimizing a target detection sample set by introducing a reinforcement learning strategy, designing and training a data value evaluator, which continuously optimizes the data selection strategy during the reinforcement learning process, dynamically adapts to the needs of different detection scenarios, and thus screens out high-value training samples. In addition, combined with a customized value assessment standard, it is possible to more accurately quantify data quality and eliminate low-value samples. After experiments / simulations, this embodiment significantly reduces the computational burden and improves data processing efficiency while improving the performance of the target detection model, and has broad application prospects.

[0078] This embodiment describes the solution by taking the detection of equipment defects in a complex environment power inspection scenario as an application scenario.

[0079] Of course, this does not mean that the method provided in this embodiment can only be used in this scenario.

[0080] A target detection sample set optimization method, such as Figure 1 As shown, the following steps are included:

[0081] S1: Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0082] S2: pre-training a target detection model using the first target detection data set, processing targets in the image according to corresponding annotation information, and obtaining an evaluator data set; and training a data value evaluator using reinforcement learning based on the evaluator data set;

[0083] S3: Use the pre-trained target detection model to infer the second target detection data set to obtain different inference results, and use the trained data value evaluator to evaluate the data value of each inference result to obtain the quality value of the corresponding sample to achieve quantification;

[0084] S4: Cleaning the second target detection data set according to the obtained quality value, and using the cleaned second target detection data set as the final training sample set to train and obtain a high-performance target detection model.

[0085] The specific process of step S1 includes: collecting a large number of images and annotation files containing defects in the transmission line taken by drones. Taking the data of small-sized hardware inspection of transmission lines by drones as an example, a sample data set is formed, and the training data set and the test data set are divided into a ratio of 9:1.

[0086] The test data set does not participate in the training process and is only used to evaluate model performance.

[0087] The training data set is divided into the first target detection data set and the second target detection data set in a ratio of 3:7.

[0088] Of course, in other embodiments, the type of data set / image can be adjusted according to the scenario / requirements of target detection. For example, when applied to vehicle detection, vehicle images and annotation information of various vehicle models and vehicle colors including license plate information can be obtained.

[0089] Similarly, in other embodiments, the training data set and the test data set can be divided into other ratios, or divided into a first target detection data set and a second target detection data set according to other ratios, depending on the requirements of target detection and the size of the initial data set, etc., which are not enumerated here.

[0090] The annotation file may be a file containing annotation information such as an annotation box and the like.

[0091] In step S2, the target detection model (or benchmark target detection model) and the reinforcement learning-based training data value evaluator (hereinafter referred to as the evaluator or evaluator model) are mainly trained.

[0092] In this step, it is also necessary to crop the targets in the image according to the annotation information and store them according to different categories to obtain an evaluator data set suitable for reinforcement learning training of the data value evaluator.

[0093] Of course, in other embodiments, depending on the target detection scenario, different requirements for precision, accuracy or speed, other preprocessing processes may be performed on the target in the image, such as magnification, sharpening, grayscale, etc., which will not be described in detail here.

[0094] In this embodiment, the target detection model is described by taking YOLOv8 as an example, and the benchmark target detection model is trained using the first target detection data set.

[0095] Similarly, in other embodiments, the solution provided in this embodiment can be applied to other target detection models, such as YOLOv5, YOLOv7, Mask R-CNN, EfficientDet, RetinaNet, etc., according to requirements such as target detection accuracy, and the like, which are not exhaustively listed here.

[0096] The specific process of step S2 includes:

[0097] (1) Obtaining feature vectors for data value evaluator training

[0098] A feature extraction network is trained to extract features from the evaluator data set to obtain feature maps. The feature maps can better represent the information of the original data through multi-layer nonlinear transformations of the feature extraction network. The extracted feature maps are then flattened into feature vectors for training the data value evaluator.

[0099] In this embodiment, the feature extraction network can select existing technologies, such as VGGNet, DenseNet, FPN, etc., which will not be described in detail here.

[0100] The feature vectors and their labels used to train the estimator model are denoted as x_train and y_train, hereinafter referred to as the training set; the feature vectors and their labels used for validation are denoted as x_val and y_val, hereinafter referred to as the validation set.

[0101] (2) Initialize the prediction layer and evaluator structure

[0102] Initialize a prediction layer, denoted as pred_model. The purpose of this prediction layer is to predict the classification results based on the feature vectors in the dataset.

[0103] The prediction layer initialization process is as follows Figure 2 As shown in the figure, the prediction layer pred_model is trained using the data x_train and y_train in the training set. Through this process, an initial model is obtained, which is recorded as ori_model. This model reflects the knowledge and patterns learned from the training data.

[0104] Next, in order to evaluate the performance of the model on unknown data and provide a relatively stable benchmark, the prediction layer pred_model is trained using the data x_val and y_val on the validation set to obtain a validation model, denoted as val_model. The validation model is not used for the final task prediction, but as a reference for evaluating the generalization ability of the initial model.

[0105] The initial model ori_model is then used to predict the validation set data and calculate the F1 value, which is recorded as the variable valid_perf. valid_perf not only reflects the performance of the model on the validation set, but also serves as the initial value for subsequent calculations of reinforcement learning incentives, thereby guiding the data value evaluator to more accurately evaluate the contribution of each data point to the model performance. In this way, the weights of data points during training can be dynamically adjusted, model training can be optimized, and the performance and robustness of the final model can be improved.

[0106] The validation model val_model is used to infer each data in the training set to obtain the predicted difference y_hat_diff. The purpose of this strategy is to evaluate and optimize the importance or value of each data point in the training data by simulating the data distribution of the real world.

[0107] In machine learning, validation sets are often used to provide a performance estimate that is independent of the training process. By evaluating the training set using a model trained on the validation set, you can get a performance baseline that is not affected by overfitting to the training set. This helps to more accurately assess the quality of a data point because it is based on the model's ability to perform on unseen data.

[0108] After initializing the prediction layer, you need to define the structure of the estimator model, such as Figure 3 As shown, in this embodiment, the input of the data value evaluator is x_train, y_train and y_hat_diff. Among them, x_train and y_train first enter a multi-layer perceptron structure as input. The multi-layer perceptron is a feedforward artificial neural network constructed by stacking multiple fully connected layers (i.e., perceptrons) and is suitable for extracting complex features and patterns from input data. The network can capture the complex nonlinear relationship between sample features and labels through multiple fully connected layers and nonlinear RELU layers.

[0109] The processed features are then further combined with the predicted difference information y_hat_diff. The output is compressed to between 0 and 1 through the Sigmoid function to obtain a quantitative value assessment, indicating the importance of each data point in improving the model performance.

[0110] Of course, in other embodiments, other functions may be used to quantify the output to objectively illustrate the importance of each data point in improving the model performance.

[0111] (3) Data Value Evaluator Training Process

[0112] The process of training the data value evaluator is divided into two parts: the outer loop and the inner loop. The outer loop is reinforcement learning, and the inner loop is traditional deep learning.

[0113] Specifically, Figure 4 As shown, at the beginning of each iteration of the inner loop, a new classification predictor (denoted as new_model) is first created based on the trained initial prediction layer. This step is achieved by copying the existing prediction layer in order to maintain the independence of the model in each iteration, thereby avoiding the influence of training bias of past iterations on the new iteration. The creation of a new model provides a clean baseline for data-driven model updates, ensuring that the starting point of each round of iterative training is consistent.

[0114] At the same time, the evaluator is used to predict the score of the feature map of each sample in the training batch to obtain the sample scoring matrix, which reflects the estimation of the potential value of each sample to the model training. Then, the value information of the data itself is used to guide the training process, thereby improving the pertinence and efficiency of model training.

[0115] Next, the Bernoulli algorithm is further applied to determine whether each sample is selected to participate in this training, and the data selection matrix is ​​obtained. The value of each element in this matrix is ​​0 or 1, which means that the corresponding sample is not selected or selected. The dynamic selection of samples in a probabilistic way not only takes into account the evaluation results of data value, but also introduces randomness to maintain the diversity and robustness of model training.

[0116] In the process of calculating the loss function and back-propagating to update the weights of new_model, weighted loss calculation is achieved by multiplying the original loss value with the data selection matrix. This means that only the selected samples will contribute to the loss value, and the loss of the unselected samples is set to zero. This not only reduces the interference of invalid training samples on model updates, but also further improves the efficiency of the training process and the pertinence of the target.

[0117] like Figure 5 As shown, the outer loop uses the validation set to validate the prediction model obtained after the inner loop, obtains the F1 value after data evaluation optimization, and calculates it with the initial F1 value valid_perf to obtain the reward value reward of reinforcement learning. Use the REINFORCE algorithm for back propagation to update the evaluator model parameters.

[0118] Of course, in some other embodiments, other reinforcement learning algorithms may be selected for back propagation, such as the Actor-Critic algorithm, etc., which are not exhaustively listed here.

[0119] In step S3, taking a single image as an example, an evaluation criterion for comprehensive evaluation of the sample is proposed, such as Figure 6 As shown, the benchmark target detection model is used to infer the second target detection dataset, and the correct box, false detection box and missed detection box of each sample are obtained according to the inference results.

[0120] (1) For the correct boxes and missed boxes, use the trained evaluator model to evaluate the data value. The sample quality score (or sample quality value, the same below) is obtained by weighting:

[0121]

[0122] Where S TP and S FN The sum of the scores of the correct box and the missed box, NTP and N FN are the number of correct boxes and missed boxes respectively, and α and β are weight coefficients.

[0123] (2) Although the false positive boxes are generally regarded as a reflection of insufficient model performance, they can actually play a positive role in data value assessment.

[0124] First, the evaluator model is used to evaluate the value of the false positive boxes. If the score is high, it is considered that the original annotation of the data set may be wrong. Such false positive boxes are input into the classification predictor to revise the category information and then re-enter the evaluator for scoring.

[0125] For false positive boxes with low scores, they can be used as negative samples (i.e., areas that do not contain targets) when training the target detection model. This helps the model learn to distinguish between targets and non-targets, thereby reducing false positives in the future. If false positives occur frequently on certain types of backgrounds or objects, this may indicate that the model has weak generalization ability for these situations. Targeted training with these images can enhance the model's ability to identify complex or changing backgrounds and improve the model's generalization ability. Therefore, it is necessary to complement and map such false positive boxes into high-scoring samples. Finally, the false positive boxes in the two cases are weighted to obtain the sample difficulty score S difficult .

[0126] Finally, the final score of the sample is obtained by weighting again:

[0127] SCORE=ηS quality +γS difficult (2)

[0128] Among them, η and γ are weight coefficients, S difficult is the sample quality value obtained by weighting the false positive boxes in the two cases, S quality Sample quality values ​​obtained for correct boxes and missed boxes.

[0129] In step S4, the process of cleaning the second object detection data set according to the quantization result includes: deleting low-scoring samples and retaining the modified labels. The cleaned second object detection data set is used to train the object detection model to obtain a higher performance object detection model.

[0130] Compared with the target detection model trained using the second target detection data set before cleaning, the target detection model trained by the method proposed in this embodiment has improvements in both recall rate and precision rate.

[0131] In summary, this embodiment uses a reinforcement learning algorithm to dynamically adjust the data value evaluator, thereby accurately identifying and screening the most valuable data samples for model training. In this way, not only can the model's target detection performance in complex backgrounds be effectively improved, but also redundant data can be significantly reduced, training efficiency can be improved, and a reliable solution can be provided for large-scale target detection tasks.

[0132] The target annotation of target detection datasets is more complex than that of classification datasets, covering bounding boxes, category labels, etc. The data value assessment cannot be performed directly at the image level. This embodiment realizes the ability to comprehensively evaluate samples from the target level, such as the target's own characteristics, target difficulty, and the impact on the prediction model. It solves the problem that existing data value assessment algorithms cannot comprehensively evaluate target detection datasets.

[0133] Embodiment 2

[0134] A target detection sample set optimization system, such as Figure 7 As shown, including:

[0135] The data set division module is configured to obtain images and annotation information in the target detection scene to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set. The execution process of this module can be specifically referred to the process of step S1 in the first embodiment, which will not be repeated here;

[0136] A pre-training module is configured to use the first object detection data set to pre-train a benchmark object detection model, and process the object in the image according to the corresponding annotation information to obtain an evaluator data set;

[0137] A reinforcement learning module is configured to train a data value evaluator using reinforcement learning based on the evaluator dataset;

[0138] The execution process of the above two modules can be specifically referred to the process of step S2 of the first embodiment, which will not be repeated here;

[0139] The reasoning and evaluation module is configured to use the pre-trained benchmark target detection model to perform reasoning on the second target detection data set to obtain different reasoning results, and use the trained data value evaluator to perform data value evaluation on each reasoning result to obtain a quality value of the corresponding sample;

[0140] The execution process of this module can be specifically referred to the process of step S3 in the first embodiment, which will not be repeated here;

[0141] The sample cleaning module is configured to clean the second object detection data set according to the obtained quality value, and use the cleaned second object detection data set as the final training sample set.

[0142] The execution process of this module may be specifically referred to the process of step S4 of the first embodiment, which will not be repeated here.

[0143] It can be understood that the above-mentioned units / modules can be separately or completely combined into one or several other units / modules, or one (some) of the units can be further divided into multiple functionally smaller units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.

[0144] The above modules of the system are divided based on logical functions. In practical applications, the function of one module can also be implemented by multiple modules, or the functions of multiple modules can be implemented by one module. For example, the reasoning and evaluation module of this embodiment may include:

[0145] An inference module is configured to use the pre-trained benchmark target detection model to infer the second target detection data set, and obtain a correct box, a false detection box, and a missed detection box for each sample according to the inference result;

[0146] A first value evaluation module is configured to use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples;

[0147] The second value assessment module is configured to use the trained data value evaluator to perform data value assessment on the false detection frame to obtain a quality value of the corresponding sample. If the quality value of the corresponding sample is greater than a set value, the false detection frame is revised and the data value is reassessed again. Otherwise, the false detection frame is regarded as a negative sample.

[0148] Similarly, in other embodiments of the present application, the system may also include other units / modules. In actual applications, these functions may also be implemented with the assistance of other units, and may be implemented by collaboration of multiple units.

[0149] According to another embodiment of the present application, the system described in this embodiment can be constructed and the method of Embodiment 1 can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Embodiment 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.

[0150] Embodiment 3

[0151] This implementation provides an electronic device, such as Figure 8 As shown, the electronic device includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.

[0152] Among them, the communication interface 1002 is used to receive and send data, the computer-readable storage medium 1003 can be stored in the memory of the electronic device, the computer-readable storage medium 1003 is used to store a computer program, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.

[0153] Processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.

[0154] The processor 1001 is configured to execute the following process:

[0155] Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0156] Pre-training a benchmark object detection model using the first object detection data set, and processing objects in the image according to corresponding annotation information to obtain an evaluator data set;

[0157] Based on the evaluator dataset, training a data value evaluator using reinforcement learning;

[0158] Use the pre-trained benchmark target detection model to infer the second target detection data set, and obtain the correct box, false detection box and missed detection box of each sample according to the inference result;

[0159] Use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples;

[0160] Use the trained data value evaluator to evaluate the data value of the false positive frame to obtain the quality value of the corresponding sample. If the quality value of the corresponding sample is greater than the set value, revise the false positive frame and re-evaluate the data value. Otherwise, take the false positive frame as a negative sample.

[0161] The second target detection data set is cleaned according to the obtained quality value, and the cleaned second target detection data set is used as the final training sample set for training the benchmark target detection model to obtain the target detection model.

[0162] Or the process of steps S1-S4 in embodiment 1 is not repeated here.

[0163] Embodiment 4:

[0164] This implementation provides a computer-readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides a storage space that stores the processing system of the electronic device.

[0165] In addition, the storage space also stores one or more instructions suitable for being loaded and executed by the processor, and these instructions may be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor.

[0166] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process:

[0167] Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0168] Pre-training a benchmark object detection model using the first object detection data set, and processing objects in the image according to corresponding annotation information to obtain an evaluator data set;

[0169] Based on the evaluator dataset, training a data value evaluator using reinforcement learning;

[0170] Use the pre-trained benchmark target detection model to infer the second target detection data set, and obtain the correct box, false detection box and missed detection box of each sample according to the inference result;

[0171] Use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples;

[0172] Use the trained data value evaluator to evaluate the data value of the false positive frame to obtain the quality value of the corresponding sample. If the quality value of the corresponding sample is greater than the set value, revise the false positive frame and re-evaluate the data value. Otherwise, take the false positive frame as a negative sample.

[0173] The second target detection data set is cleaned according to the obtained quality value, and the cleaned second target detection data set is used as the final training sample set for training the benchmark target detection model to obtain the target detection model.

[0174] Or the process of steps S1-S4 in embodiment 1 is not repeated here.

[0175] Embodiment five:

[0176] The present implementation provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the following process:

[0177] Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set;

[0178] Pre-training a benchmark object detection model using the first object detection data set, and processing objects in the image according to corresponding annotation information to obtain an evaluator data set;

[0179] Based on the evaluator dataset, training a data value evaluator using reinforcement learning;

[0180] Use the pre-trained benchmark target detection model to infer the second target detection data set, and obtain the correct box, false detection box and missed detection box of each sample according to the inference result;

[0181] Use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples;

[0182] Use the trained data value evaluator to evaluate the data value of the false positive frame to obtain the quality value of the corresponding sample. If the quality value of the corresponding sample is greater than the set value, revise the false positive frame and re-evaluate the data value. Otherwise, take the false positive frame as a negative sample.

[0183] The second target detection data set is cleaned according to the obtained quality value, and the cleaned second target detection data set is used as the final training sample set for training the benchmark target detection model to obtain the target detection model.

[0184] Or the process of steps S1-S4 in embodiment 1 is not repeated here.

[0185] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0186] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0187] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.

Claims

1. A target detection sample set optimization method, characterized in that: The following steps are involved: Acquire images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set; Pre-training the target detection model using the first target detection data set, and processing the target in the image according to the corresponding annotation information to obtain an evaluator data set; Based on the evaluator dataset, using reinforcement learning to train a data value evaluator; Use the pre-trained target detection model to infer the second target detection data set to obtain different inference results, and use the trained data value evaluator to evaluate the data value of each inference result to obtain a quality value of the corresponding sample; The second object detection data set is cleaned according to the obtained quality value, and the cleaned second object detection data set is used as the final training sample set.

2. The target detection sample set optimization method according to claim 1, characterized in that: The data set is divided into a first target detection data set and a second target detection data set according to a set ratio.

3. The target detection sample set optimization method according to claim 1, characterized in that: According to the annotation information, the objects in the image are cropped and stored according to different categories to obtain the evaluator data set.

4. The target detection sample set optimization method according to claim 1, characterized in that: Based on the evaluator dataset, the process of training the data value evaluator using reinforcement learning includes: Extracting features from the evaluator data set using a feature extraction network to obtain a feature map, and flattening the extracted feature map into a feature vector; Training the prediction layer to predict the classification result based on the feature vector to obtain prediction difference information; Constructing a data value evaluator, wherein the data value evaluator takes the feature vector as input, extracts complex features from the input using a multi-layer perceptron structure, and combines the complex features with the predicted difference information; Iteratively executing inner and outer loop training processes, the inner loop training process includes creating a new classification predictor according to the trained prediction layer, using the data value evaluator to perform score prediction on the feature map of each sample, obtaining a sample scoring matrix, determining whether each sample is selected to participate in this training, obtaining a data selection matrix, and using the data selection matrix to train the classification predictor; The outer loop training process includes verifying the classification predictor after the inner loop, calculating the reward value of reinforcement learning according to the verification result, performing back propagation, and updating the parameters of the evaluator.

5. The target detection sample set optimization method according to claim 4, characterized in that: The extracted feature map is flattened into a feature vector, and the feature vector is divided into two parts, one part is used for training the data value evaluator, and the other part is used for verification, and the feature vectors all have corresponding labels.

6. The target detection sample set optimization method according to claim 4, characterized in that: The process of training the prediction layer to predict the classification result based on the feature vector and obtaining the prediction difference information includes: Initialize the prediction layer, and train the prediction layer using the feature vector and its label for training to obtain an initial model; Use the feature vectors and their labels for validation to train the prediction layer and obtain a validation model; Use the initial model to predict the feature vectors and their labels for verification and calculate the initial F1 value; The validation model is used to infer the feature vectors used for training and their labels to obtain the predicted differences.

7. The target detection sample set optimization method according to claim 4, characterized in that: The sample scoring matrix reflects the estimation of the potential value of each sample to the model training. The Bernoulli algorithm is used to dynamically select samples in a probabilistic manner to determine whether each sample is selected to participate in this training, and a data selection matrix is ​​obtained. Each element value of the data selection matrix is ​​0 or 1, representing that the corresponding sample is not selected or selected, respectively.

8. The target detection sample set optimization method according to claim 4, characterized in that: During the inner loop training process, in the process of calculating the loss function and performing back propagation to update the classification predictor weights, weighted loss calculation is achieved by multiplying the original loss value with the data selection matrix.

9. The target detection sample set optimization method according to claim 4, characterized in that: The feature vector and its label used for verification are used to verify the classification predictor obtained after the inner loop, and the F1 value after data evaluation optimization is obtained. It is calculated with the initial F1 value to obtain the reward value of reinforcement learning, and the reinforcement learning algorithm is used for back propagation to update the parameters of the evaluator.

10. The target detection sample set optimization method according to claim 1, characterized in that: According to the inference results, the correct box, false detection box and missed detection box of each sample are obtained; Use the trained data value evaluator to perform data value evaluation on the correct box and the missed box to obtain quality values ​​of corresponding samples; Use the trained data value evaluator to perform data value evaluation on the false detection frame to obtain the quality value of the corresponding sample. If the quality value of the corresponding sample is greater than the set value, the false detection frame is revised and the data value is re-evaluated. Otherwise, the false detection frame is regarded as a negative sample.

11. The target detection sample set optimization method according to claim 10, characterized in that: Perform data value evaluation on the correct box and the missed box, and obtain the sample quality value S by weighting quality : Among them, S TP and S FN The sum of the sample quality values ​​of the correct box and the missed box, N TP and N FN are the number of correct boxes and missed boxes respectively, and α and β are weight coefficients.

12. The target detection sample set optimization method according to claim 11, characterized in that: The final quality value of the sample is: SCORE=ηS quality +γS difficult Among them, η and γ are weight coefficients, S difficult is the sample quality value obtained by weighting the false positive boxes in the two cases, S quality The sample quality values ​​obtained for the correct box and the missed box.

13. The target detection sample set optimization method according to claim 4, characterized in that: The process of cleaning the second target detection data set according to the obtained quality values ​​includes deleting samples whose sample quality values ​​are lower than a set threshold and retaining the modified sample labels.

14. A target detection sample set optimization system, characterized in that: include: A data set division module is configured to obtain images and annotation information in a target detection scenario to form a sample data set, and divide the sample data set into a first target detection data set and a second target detection data set; A pre-training module is configured to use the first object detection data set to pre-train the object detection model, and process the object in the image according to the corresponding annotation information to obtain an evaluator data set; A reinforcement learning module is configured to train a data value evaluator using reinforcement learning based on the evaluator dataset; The reasoning and evaluation module is configured to use the pre-trained target detection model to perform reasoning on the second target detection data set to obtain different reasoning results, and use the trained data value evaluator to perform data value evaluation on each reasoning result to obtain a quality value of the corresponding sample; The sample cleaning module is configured to clean the second object detection data set according to the obtained quality value, and use the cleaned second object detection data set as the final training sample set.

15. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of a target detection sample set optimization method according to any one of claims 1 to 13.

16. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in the target detection sample set optimization method described in any one of claims 1 to 13 are completed.

17. An electronic device, characterized in that: The method comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the target detection sample set optimization method described in any one of claims 1 to 13 are completed.

Citation Information

Cited By

  • Automatic training data screening method and device, electronic equipment and storage medium

    CN120911634A

  • Large-model multi-dimensional data filtering method and system based on adaptive reinforcement learning

    CN121903002A