Target Detection Label Assignment Optimization System Based on Feedback Mechanism
Through the object detection tag allocation system based on the feedback mechanism, combined with multi-dimensional matching indicators and network prediction results, the positive and negative samples are dynamically adjusted, which solves the limitations of the traditional tag allocation strategy and improves the training efficiency and detection performance of the object detection model.
Patent Information
- Application Number
- CN202510222732.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-02-27
AI Technical Summary
In the existing target detection technology, the label allocation strategy with fixed threshold cannot dynamically adapt to the diversity of the target and changes in the training process, resulting in uneven allocation of positive and negative samples, insufficient utilization of negative samples, and lack of feedback optimization mechanisms, which affects the model training efficiency and detection performance.
The object detection label allocation system based on the feedback mechanism is adopted, and the multi-dimensional matching scores of the anchor box and the target box are calculated through interleaving, shape matching and outline matching, positive and negative samples are dynamically screened, and feedback optimization is performed based on the network prediction results, and sample distribution is dynamically adjusted and hard negative samples are selected.
The refinement and adaptability of label allocation are realized, the model's robustness and training efficiency for complex backgrounds are improved, the redundant sample interference is reduced, the model's ability to distinguish difficult-to-classify samples is enhanced, and overfitting is avoided.
Smart Images

Figure CN119992069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of object detection, and more specifically, to an object detection label assignment optimization system based on a feedback mechanism. Background Art
[0002] In the field of object detection, label assignment is a crucial step in the model training process. Traditional label assignment methods mainly include anchor-based and anchor-free strategies:
[0003] Anchor-based label assignment strategy: By setting a fixed intersection over union (IoU) threshold to divide positive and negative samples. For example, samples with IoU greater than 0.5 are positive samples, and those less than 0.4 are negative samples. Although this method is simple and intuitive, due to the fixed threshold being unable to dynamically adapt to the shapes, sizes, and scene complexities of different objects, the accuracy of label assignment is limited.
[0004] Anchor-free label assignment strategy: Select positive samples based on the prior knowledge of the center points of the object bounding boxes. Although it can make full use of the regional characteristics of the object bounding boxes, it cannot dynamically adjust to uncertainties such as the deformation and occlusion of the object bounding boxes.
[0005] Main defects of existing methods: Limitations of fixed thresholds: The fixed IoU threshold ignores object diversity and dynamic changes during the training process, resulting in uneven distribution of positive and negative samples. Lack of feedback optimization mechanism: Traditional label assignment methods cannot dynamically adjust the positive and negative sample division strategy according to the network prediction results. Insufficient utilization of negative samples: Ordinary negative samples are difficult to provide valuable supervision information, and the potential of hard negative samples has not been fully exploited. Therefore, a dynamic, adaptive object detection label assignment system with a feedback optimization mechanism is needed to improve the training efficiency and detection performance of the model. Summary of the Invention
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] An object detection label assignment optimization system based on a feedback mechanism, including a data input module, a matching score calculation module, a dynamic sample screening module, a negative sample generation module, and a dynamic feedback optimization module;
[0008] The data input module is used to receive image data and initial information of object bounding boxes and anchor boxes;
[0009] The matching score calculation module is used to calculate the matching score between the anchor box and the object bounding box based on the data information received by the data input module, in combination with the prediction results of the classification head and the regression head;
[0010] The dynamic sample screening module is used to screen positive sample anchor boxes according to the matching scores, and successively obtain the initial positive sample candidate set and the preferred positive sample set;
[0011] The negative sample generation module is used to generate a negative sample set after removing positive sample anchor boxes from all anchor boxes;
[0012] The dynamic feedback optimization module is used to optimize the matching score calculation module and the dynamic sample screening module based on the network prediction results during the training process.
[0013] The matching score calculation module includes:
[0014] The intersection over union calculation unit is used to calculate the overlap degree between the anchor box and the target box;
[0015] The shape matching calculation unit is used to calculate the shape matching degree based on the aspect ratio of the anchor box and the target box;
[0016] The contour matching calculation unit is used to extract the coverage degree of the contour information of the target box covered by the anchor box through pseudo-labels;
[0017] The comprehensive score generation unit is used to generate the matching score by synthesizing the above results according to the weighted formula.
[0018] In a preferred embodiment, when generating the preferred positive sample set, the dynamic sample screening module uses the Top-k method to select positive samples from the initial positive sample candidate set, and then aggregates them to obtain the preferred positive sample set. It is optimized through the dynamic feedback optimization module for dynamic initialization to obtain.
[0019] In a preferred embodiment, the dynamic feedback optimization module includes a network prediction feedback unit and a moving average adjustment unit;
[0020] The network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples;
[0021] The moving average adjustment unit is used to smoothly adjust the value in the Top-k method through historical matching data.
[0022] In a preferred embodiment, the logic used by the matching score calculation module is:
[0023] The overlap degree is obtained through the following formula:
[0024] ; represents the anchor box, represents the target box, Represents the overlapping area between the anchor box and the target box, Represents the total coverage area of the anchor box and the target box, Represents the degree of overlap;
[0025] The shape matching degree is obtained through the following formula:
[0026] ; 、 Represents the width and height of the anchor box, 、 Represents the width and height of the target box, Is a preset non-zero shape matching coefficient, Represents the shape matching degree;
[0027] The coverage degree is obtained through the following formula:
[0028] ; Represents the total number of pixels in the anchor box, Represents the probability value of the pseudo-label within the pixels of the anchor box;
[0029] The matching score is generated by synthesizing the above results through the following weighted formula:
[0030] ; 、 、 Are all preset non-zero weight coefficients, Is the matching score.
[0031] In a preferred embodiment, the dynamic sample screening module is used to screen positive sample anchor boxes according to the matching score, and obtaining the initial positive sample candidate set refers to:
[0032] Obtain the matching score corresponding to each anchor box, and summarize all the anchor boxes corresponding to the non-zero items of the matching score to obtain the initial positive sample candidate set.
[0033] In the Top-k method, Through the dynamic feedback optimization module for the dynamic initial The logic optimized is:
[0034] Calculate the characteristic influence value of the target box: ; Represents the characteristic influence value of the target box, Represents the area of the target box, Is a preset area ratio coefficient;
[0035] Calculate the network prediction result influence value: ; Represents the network prediction result influence value, represents the classification prediction score of the i-th anchor box, n represents the total number of anchor boxes, is a preset non-zero prediction adjustment coefficient;
[0036] Calculate the anchor box distribution influence value: ; represents the anchor box distribution influence value, represents the variance of the set of matching scores between the anchor box and the target box, represents the mean of the set of matching scores between the anchor box and the target box, is a preset non-zero distribution adjustment coefficient;
[0037] Dynamic initial The formula for is: ;
[0038] In the The determination formula for in the Top-k method is: ; represents the dynamic initial value obtained from the previous training, is a preset smoothing coefficient, and its value range is [0, 1].
[0039] In a preferred embodiment, the network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples, which means:
[0040] Obtain the sample set during the current training process:
[0041] Positive sample set: The first anchor boxes with the highest matching scores screened during the current training process;
[0042] Negative sample set: All other anchor boxes not selected as positive samples;
[0043] Select hard negative samples from the current negative sample set, that is, the remaining samples in the initial positive sample candidate set that are not selected into the preferred positive sample set;
[0044] Recombine the current hard negative samples and the historical training set used in the previous training according to the following ratio: ; is the recombined training combination set, which is used to optimize the currently used network prediction model, is the historical training set used in the previous training, is the set of hard negative samples obtained from the current training, , are both preset recombination ratio coefficients.
[0045] Technical effects and advantages of the present invention:
[0046] By combining multi-dimensional matching metrics such as intersection over union, shape matching, and contour matching, the present invention dynamically generates positive and negative sample sets that are more suitable for training, avoiding the limitations of traditional fixed-threshold allocation, supporting diverse shape, size, and position characteristics of different target boxes, and achieving refined label allocation. The dynamic adjustment mechanism for the number of positive samples ensures a reasonable ratio of positive and negative samples according to the target distribution and the current prediction state of the model, avoiding the problem of unbalanced sample allocation. Hard negative samples with challenges are preferentially selected, enabling the model to better distinguish targets from complex backgrounds and improving the robustness of the classification head to difficult-to-classify samples.
[0047] By extracting the local contour features of the anchor box and the target box through the contour matching unit, the model can more accurately capture the key regions of the target, enhancing its adaptability to complex scenarios such as deformation and occlusion. The present invention introduces a network prediction feedback unit, which dynamically optimizes the sample selection logic by analyzing the positive and negative sample division results during the training process in real time. By combining historical training data with current data, the stability and continuity of training are maintained, effectively improving the training efficiency. By preferentially selecting positive sample sets to eliminate redundant anchor boxes, the interference of invalid samples is reduced; the negative sample set is optimized to enhance the contribution of training samples to the classification task. Through the dynamic feedback mechanism, the samples generated during the current training process are combined with historical data to generate diverse training sets, effectively avoiding model overfitting. A sliding average adjustment unit is introduced in terms of the number of samples and the allocation strategy, enabling the model to maintain training stability in dynamically changing sample allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings;
[0049] Figure 1 It is the schematic diagram of the target detection label allocation optimization system based on the feedback mechanism in the present invention.
[0050] Figure 2 It is the schematic diagram of the matching score calculation module in the present invention.
[0051] Figure 3 It is the schematic diagram of the dynamic feedback optimization module in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0053] Reference Figures 1-3 The following examples are obtained: Example 1
[0054] An optimization system for target detection label assignment based on a feedback mechanism, including a data input module, a matching score calculation module, a dynamic sample screening module, a negative sample generation module, and a dynamic feedback optimization module;
[0055] The data input module is used to receive image data and the initial information of target boxes and anchor boxes; it provides basic training data for the system, including image data and the initial information of target boxes and anchor boxes. It provides the initial matching information between anchor boxes and target boxes, laying the foundation for the calculations of subsequent modules, supporting diverse inputs, and adapting to different scenarios and target detection requirements.
[0056] The matching score calculation module is used to calculate the matching score between anchor boxes and target boxes based on the data information received by the data input module, in combination with the prediction results of the classification head and the regression head; it calculates the matching score between anchor boxes and target boxes through the prediction results of the classification head and the regression head. It comprehensively considers the overlap degree, shape similarity, and prediction accuracy between anchor boxes and target boxes, dynamically quantifies the matching degree between anchor boxes and target boxes, provides a basic matching score, and provides a basis for the dynamic screening of positive and negative samples.
[0057] The dynamic sample screening module is used to screen positive sample anchor boxes according to the matching score, and successively obtain the initial positive sample candidate set and the preferred positive sample set; it screens positive sample anchor boxes according to the matching score, gradually optimizes the positive sample set, and quickly screens out anchor boxes with a higher matching degree with the target box from the initial positive sample candidate set to avoid interference from low-quality samples; the preferred positive sample set further eliminates redundant or inefficient samples to ensure the quality of the final positive sample set; it dynamically adjusts the quantity and distribution of positive samples to adapt to the characteristics of different targets.
[0058] The negative sample generation module is used to generate a negative sample set after removing positive sample anchor boxes from all anchor boxes; it generates a negative sample set after removing positive sample anchor boxes, which is used to train the classification head to ensure that the classification head can effectively distinguish targets from the background; it supports the dynamic sampling of negative samples, selects "hard negative samples", and improves the model's adaptability to complex backgrounds.
[0059] The dynamic feedback optimization module is used to optimize the matching score calculation module and the dynamic sample screening module based on the network prediction results during the training process. According to the network prediction results during the training process, it optimizes the matching score calculation and the positive and negative sample division strategies, realizes the feedback learning mechanism of the model, and dynamically adjusts the algorithm according to historical prediction results and training effects; it improves the allocation efficiency of positive and negative samples, avoids sample distribution imbalance, and the moving average mechanism smooths the sample adjustment process and enhances the stability of training.
[0060] The matching score calculation module includes:
[0061] The Intersection over Union (IoU) calculation unit is used to calculate the overlap degree between the anchor box and the target box; IoU is the most basic matching metric in object detection, which can directly measure whether the anchor box coincides with the target box in position. If the IoU is too small, the anchor box has little relation to the target box and can be directly used as a negative sample to improve the calculation efficiency. The higher the IoU between the anchor box and the target box, the higher the matching score, which becomes an important basis for positive sample screening.
[0062] The shape matching calculation unit is used to calculate the shape matching degree based on the aspect ratio of the anchor box and the target box; based on the aspect ratio of the anchor box and the target box, calculate the shape matching degree between the two, and quantify the adaptability of the anchor box to the geometric characteristics of the target box. Enhance shape sensitivity: The aspect ratio matching degree can reflect the shape characteristics of the target box, such as whether it is slender or square. Solve the problem of inconsistent sizes: Even if the IoU between the anchor box and the target box is high, but the shapes do not match severely (such as a large difference in aspect ratio), it will also affect the prediction accuracy. The shape matching score can effectively screen out the anchor boxes that better conform to the characteristics of the target box. Complement the limitations of IoU: IoU only focuses on the spatial overlap degree and cannot comprehensively describe the geometric relationship between the anchor box and the target box. Shape matching provides a more comprehensive measurement index.
[0063] The contour matching calculation unit is used to extract the coverage degree of the anchor box covering the target box contour information through pseudo-labels; using pseudo-labels (such as the target contour probability map output by the model), extract the matching degree of the anchor box covering the target box contour, and quantify the matching relationship between the anchor box and the true shape of the target. Improve detection accuracy: The more accurate the anchor box covers the contour information of the target box, the closer the prediction result is to the true value. Enhance target adaptability: The target may be occluded, deformed or in a complex background. Contour matching captures this information through pseudo-labels and improves the model's adaptability to complex scenarios. Optimize positive sample assignment: Even if the IoU and shape matching scores are low, if the contour matching degree is high, it means that the anchor box may still be a high-quality positive sample, avoiding missing potential high-quality samples.
[0064] The comprehensive score generation unit is used to generate a matching score by synthesizing the above results according to a weighted formula. The comprehensive score integrates spatial, geometric and contour characteristics into a unified quantitative index, comprehensively describing the matching relationship between the anchor box and the target box. In different scenarios, the influence weights of each score may be different. The comprehensive score can be adapted to a specific scenario by adjusting the weight parameters (such as in the training stage or for different target categories). Guide positive and negative sample screening: The comprehensive score provides a clear basis for subsequent positive sample screening, preferentially selecting the anchor boxes with high scores to ensure the high quality of the positive sample set.
[0065] When generating the optimal positive sample set, the dynamic sample screening module uses the Top-k method to select from the initial positive sample candidate set A number of positive samples are then aggregated to obtain an optimized set of positive samples. The dynamic initial values are optimized by the dynamic feedback optimization module. The dynamic sample screening module uses the Top-k method to select a certain number of positive samples from the initial set of positive sample candidates. These positive samples are then aggregated to generate an optimized set of positive samples. Finally, The value of... is dynamically initialized by the initial value in the dynamic feedback optimization module. It is dynamically adjusted.
[0066] Through the Top-k screening method, it is ensured that the optimal positive samples are selected from the initial set of positive sample candidates. The quality of the positive samples plays a decisive role in the trained classification head and regression head. It avoids irrelevant or redundant anchor boxes from entering the set of positive samples, improving the training efficiency. The dynamic adjustment mechanism of the dynamically adjusted sample quantity enables the number of positive samples to adapt to different image and target characteristics. It avoids the limitations of a fixed sample quantity and performs better in multi-object and complex scenarios. It enhances the robustness and flexibility of the system. The dynamic sample screening module can provide more representative positive samples that are more in line with the current state of the model for training by aggregating to generate an optimized set of positive samples.
[0067] The dynamic feedback optimization module includes a network prediction feedback unit and a moving average adjustment unit. The network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples. The moving average adjustment unit is used to smoothly adjust the value in the Top-k method through historical matching data. The network prediction feedback unit feeds back the current division of positive and negative samples to the network prediction model, adjusts the model parameters, and improves the classification and regression performance.
[0068] The sample screening logic is optimized using the network prediction results to ensure that the system always uses the optimal samples for training. The moving average adjustment unit dynamically adjusts based on historical data to avoid unstable sample allocation caused by fluctuations in single-training data. This smoothing mechanism improves the stability and robustness of the training process. The dynamic adjustment meets the requirements of different training stages. In the initial stage of training, and The initial values may be relatively low to ensure that the model first learns simple targets. As the training progresses, through feedback optimization and moving average adjustment, the number of positive samples gradually increases, and the model gradually adapts to complex scenarios and target characteristics.
[0069] The matching score calculation module uses the following logic:
[0070] Calculate the overlap degree between the anchor box and the target box, that is, the intersection over union (IoU), to quantify the spatial overlap between the anchor box and the target box. The overlap degree is obtained through the following formula:
[0071] ; represents the anchor box, represents the target box, represents the area of the overlapping region between the anchor box and the target box, represents the total coverage area of the anchor box and the target box, represents the overlap degree;
[0072] The shape matching degree is based on the aspect ratio of the anchor box and the target box. Calculate the shape matching degree between the two to quantify the adaptability of the anchor box to the geometric characteristics of the target box. It is obtained through the following formula:
[0073] ; 、 represent the width and height of the anchor box, 、 represent the width and height of the target box, is a preset non-zero shape matching coefficient, represents the shape matching degree;
[0074] Using pseudo-labels (such as the target contour probability map output by the model), extract the matching degree of the anchor box covering the target box contour to quantify the matching relationship between the anchor box and the true shape of the target. The coverage degree is obtained through the following formula:
[0075] ; represents the total number of pixels in the anchor box, represents the probability value of the pseudo-label at the pixels within the anchor box;
[0076] Generate the matching score by synthesizing the above results through the following weighted formula:
[0077] ; 、 、 are all preset non-zero weight coefficients, is the matching score. The larger the matching score, the higher the matching quality. Accurate calculation of the matching score can improve the quality of positive samples, reduce the number of misclassified negative samples, and ultimately improve the training effect of the classification head and the regression head, thereby enhancing the object detection performance of the model.
[0078] The dynamic sample screening module is used to screen positive sample anchor boxes according to the matching score. The initial positive sample candidate set refers to:
[0079] Obtain the matching scores corresponding to each anchor box, and summarize the anchor boxes corresponding to all non-zero matching scores to obtain the initial positive sample candidate set.
[0080] In the Top-k method Through the dynamic feedback optimization module for the dynamic initial The optimized logic is:
[0081] The size, shape, and complexity of the target box will all affect the selection. Usually, larger targets require more anchor boxes to cover, and smaller targets require fewer anchor boxes. Calculate the characteristic influence value of the target box: ; represents the characteristic influence value of the target box, represents the area of the target box, is the preset area ratio coefficient;
[0082] Based on the output of the prediction head, dynamically adjust , targets with higher prediction scores require more anchor box allocations, and targets with lower prediction scores require fewer allocations. Calculate the network prediction result influence value: ; represents the network prediction result influence value, represents the classification prediction score of the i-th anchor box, n represents the total number of anchor boxes, is the preset non-zero prediction adjustment coefficient;
[0083] The matching score distribution between the anchor box and the target box (i.e., the variance and mean of the matching scores) reflects the adaptation of the anchor box to the target box. The more concentrated the distribution, the fewer anchor boxes can cover the target box well, and can be reduced. Calculate the anchor box distribution influence value: ; represents the anchor box distribution influence value, represents the variance of the set of matching scores between the anchor box and the target box, represents the mean of the set of matching scores between the anchor box and the target box, is the preset non-zero distribution adjustment coefficient;
[0084] The formula for the dynamic initial is: ;
[0085] During the training process, as the network is optimized, the number and distribution of matching anchor boxes may change dynamically. By introducing a moving average mechanism, can be adjusted dynamically and smoothly, and finally is obtained to ensure the stability during the training process. The determination formula for in the Top-k method is: ; Indicates the dynamic initial value obtained from the previous training value, is a preset smoothing coefficient, and its value range is [0, 1].
[0086] The data input module provides basic input data (initial information of anchor boxes and target boxes), which is the basis for the predictions of the classification head and the regression head; the prediction results of the classification head and the regression head are dynamically generated during the network training phase, reflecting the current network's understanding and prediction of the input data. The classification head and the regression head are network structure components of the object detection model, and their functions are: the classification head outputs the class prediction probability of each anchor box, reflecting the model's prediction of the target class. The regression head outputs the regression offset value of each anchor box, which is used to predict the specific position and size differences between the anchor box and the target box.
[0087] More specifically, the classification head mainly predicts the probability distribution of each anchor box belonging to a specific target class. For example, for an image containing N anchor boxes, the classification head will output a matrix of size N×C, where C is the number of classes. Result: Each anchor box will have a classification prediction probability value; these probability values will be used to determine whether the anchor box matches the target box (i.e., whether it is a positive sample anchor box).
[0088] The prediction result of the regression head: The regression head predicts the position information between the anchor box and the target box (such as the offset of the center point, the changes in width and height). The output size of the regression head is N×4, where each anchor box corresponds to four regression values, which are: the x offset of the center point; the y offset of the center point; the width scaling ratio; the height scaling ratio. Result: The regression result describes the specific differences in space between the anchor box and the target box, which is used to adjust the position and size of the anchor box to make it closer to the target box.
[0089] The prediction results of the classification head and the regression head correspond to the prediction information of each specific anchor box, and the relationship between the anchor box and the target box is established through the intersection over union and other matching algorithms well-known to those skilled in the art: The result of the classification head: used to determine whether each anchor box is a positive sample, that is, whether it matches a certain target box; The result of the regression head: used to calculate the position information that the anchor box needs to adjust, so as to more accurately fit the target box. Finally, the combined results of classification and regression are used to optimize the object detection model: The classification prediction result of the anchor box determines which anchor boxes are positive samples (associated with the target box). The regression prediction result of the anchor box is used to fine-tune the position of the anchor box to make it closer to the corresponding target box.
[0090] The network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples, which means:
[0091] Obtain the sample set during the current training process:
[0092] Positive sample set: The top anchor boxes with the highest matching scores screened during the current training process;
[0093] Negative sample set: All other anchor boxes that are not selected as positive samples;
[0094] Select hard negative samples from the current negative sample set, that is, the remaining samples in the initial positive sample candidate set that are not selected into the preferred positive sample set;
[0095] Recombine the current hard negative samples and the historical training set used in the previous training according to the following ratio: ; is the recombined training set for optimizing the current network prediction model, is the historical training set used in the previous training, is the set of hard negative samples obtained from the current training, , are both preset recombination ratio coefficients.
[0096] Screen the remaining anchor boxes as negative samples, and at the same time, preferentially select more challenging negative samples through the hard negative sample strategy to enhance the classification ability of the model. The combination of historical data and current samples maintains the diversity and representativeness of the training set by combining with historical training data, improving the robustness and generalization ability of the model. Through the recombined training set , realize the dynamic optimization of samples: introduce the challenging hard negative samples in the current training to strengthen the learning ability for complex scenarios or backgrounds. Retain part of the historical training data to avoid the model overfitting to the current batch of data, enhance the prediction ability for unseen data, and improve the adaptability and detection performance of the model. By dynamically adjusting and combining hard negative samples, ensure that the sample allocation meets the current network training requirements. Through the sliding window-style sample update method, the combination of historical data and current data reduces the instability of training. This mechanism strengthens the discrimination ability of the classification head for difficult negative samples, and at the same time improves the accuracy of the regression head through the dynamic screening of positive samples.
[0097] Significance of the feedback mechanism based on positive and negative sample division:
[0098] Dynamically adjust the sample distribution: The positive and negative samples generated during the current training process reflect the prediction ability of the model at a specific stage. By reallocating the positive and negative sample sets through the feedback mechanism, the sample distribution can be gradually optimized. For example, hard negative samples (negative samples with a higher misclassification probability) can significantly improve the discrimination ability of the classification head.
[0099] Avoiding bias in sample selection: In a single training session, the current data may contain noise or distribution bias. By combining the current samples with historical data, the impact of single-training data on model optimization can be mitigated.
[0100] Significance of the recombination mechanism for integrating historical data:
[0101] Maintaining data diversity: Using only current samples may cause the model to overly focus on local information and be difficult to generalize. The introduction of historical data can make up for the deficiencies of current samples and enhance the diversity of training data.
[0102] Smoothing the transition: The recombination ratio coefficient 𝜗 Controls the combination ratio of historical data and current data, allowing the model to smoothly transition between historical knowledge and new knowledge and avoiding training instability.
[0103] Dynamic trade-off: When the model gradually stabilizes, appropriately increasing the proportion of historical data can prevent the model from forgetting key features learned in the early stage. In the early stage of training, appropriately reducing the weight of historical data helps the model quickly adapt to the current scenario.
[0104] Significance of the preferential selection of hard negative samples:
[0105] Strengthening negative sample training: Hard negative samples are anchor boxes that have a high degree of matching with the target box but do not meet the positive sample conditions. These samples have great optimization value for the classification head. By preferentially selecting hard negative samples, the model's adaptability to complex backgrounds or high-interference scenarios can be improved.
[0106] Reducing the redundancy of negative samples: Negative samples usually have a large quantity and uneven quality. The preferential selection of hard negative samples avoids the introduction of invalid negative samples and improves training efficiency.
[0107] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0108] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0109] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0110] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0111] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. An optimization system for target detection label assignment based on a feedback mechanism, characterized in that It includes a data input module, a matching score calculation module, a dynamic sample screening module, a negative sample generation module, and a dynamic feedback optimization module; The data input module is used to receive image data and initial information of the target box and the anchor box; The matching score calculation module is used to calculate the matching score between the anchor box and the target box based on the data information received by the data input module and in combination with the prediction results of the classification head and the regression head; The dynamic sample screening module is used to screen positive sample anchor boxes according to the matching score, and successively obtain the initial positive sample candidate set and the preferred positive sample set; The negative sample generation module is used to generate a negative sample set after removing positive sample anchor boxes from all anchor boxes; The dynamic feedback optimization module is used to optimize the matching score calculation module and the dynamic sample screening module based on the network prediction results during the training process; When generating the preferred positive sample set, the dynamic sample screening module uses the Top-k method to select positive samples from the initial positive sample candidate set, and then aggregates them to obtain the preferred positive sample set. The dynamic initial is optimized through the dynamic feedback optimization module; The dynamic sample screening module is used to screen positive sample anchor boxes according to the matching score. The initial positive sample candidate set obtained refers to: Obtain the matching score corresponding to each anchor box, and summarize the anchor boxes corresponding to all non-zero matching scores to obtain the initial positive sample candidate set; In the top-k method Through the dynamic feedback optimization module for dynamic initial The optimized logic is as follows: Calculate the characteristic influence value of the target box: ; Represents the characteristic influence value of the target box, Represents the area of the target box, Is a preset area ratio coefficient; Calculate the influence value of the network prediction result: ; represents the influence value of the network prediction result, represents the classification prediction score of the i-th anchor box, n represents the total number of anchor boxes, is a preset non-zero prediction adjustment coefficient; Calculate the influence value of the anchor box distribution: ; denotes the influence value of the anchor box distribution, denotes the variance of the set of matching scores between the anchor box and the target box, denotes the mean of the set of matching scores between the anchor box and the target box, is a preset non-zero distribution adjustment coefficient; Dynamic initialization The formula is as follows: ; In the top-k method The determination formula is as follows: ; represents the dynamic initial value obtained from the previous training is a preset smoothing coefficient, and its value range is [0, 1].
2. The optimized system for target detection label assignment based on a feedback mechanism according to claim 1, characterized in that The matching score calculation module includes: An intersection over union calculation unit, which is used to calculate the overlap degree between the anchor box and the target box; A shape matching calculation unit, which is used to calculate the shape matching degree based on the aspect ratio of the anchor box and the target box; A contour matching calculation unit, which is used to extract the coverage degree of the contour information of the target box covered by the anchor box through pseudo-labels; A comprehensive score generation unit, which is used to generate a matching score by synthesizing the above results according to a weighted formula.
3. The optimized system for target detection label assignment based on a feedback mechanism according to claim 2, wherein The dynamic feedback optimization module includes a network prediction feedback unit and a moving average adjustment unit; The network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples; The moving average adjustment unit is used to smoothly adjust the value in the Top-k method through historical matching data.
4. The target detection label assignment optimization system based on a feedback mechanism according to claim 3, characterized in that The logic used by the matching score calculation module is: The overlap degree is obtained through the following formula: ; represents an anchor box, represents a target box, represents the area of the overlapping region between the anchor box and the target box, represents the total covered area of the anchor box and the target box, represents the degree of overlap; The shape matching degree is obtained through the following formula: ; , represent the width and height of the anchor box, , represent the width and height of the target box, is a preset non - zero shape matching coefficient, represents the shape matching degree; The coverage degree is obtained through the following formula: ; represents the total number of pixel points of the anchor box, represents the probability value of the pseudo-label at the pixel points within the anchor box; The matching score is generated by synthesizing the above results through the following weighted formula: ; , , are all preset non-zero weight coefficients, is the matching score.
5. The optimized system for target detection label assignment based on a feedback mechanism according to claim 4, characterized in that The network prediction feedback unit is used to optimize the currently used network prediction model based on the network prediction results during the training process and the division sets of positive and negative samples. This refers to: Obtain the sample set during the current training process: Positive sample set: The top anchor boxes with the highest matching scores selected during the current training process; Negative sample set: All other anchor boxes that are not selected as positive samples; From the current negative sample set, select hard negative samples, that is, the remaining samples in the initial positive sample candidate set that are not selected into the preferred positive sample set; Recombine the current hard negative samples and the historical training set used in the previous training according to the following ratio: ; is the recombined training combination set for optimizing the current network prediction model being used, is the historical training set used in the previous training, is the set of hard negative samples obtained from the current training, 、 are both preset recombination ratio coefficients.
Citation Information
Patent Citations
Training method and device of garbage detection model, storage medium and equipment
CN114241425A
Construction method and device of target detection model
CN115240052A