An end-to-end target detection method based on quality gating and gradient feedback

CN123033007APending Publication Date: 2026-11-03DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611432247.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing end-to-end object detection methods struggle to effectively reflect the matching quality of each real-labeled target in the one-to-one inference branch during the training phase. This results in a lack of targeted auxiliary supervision, and the fixed loss weights are difficult to adapt to the learning changes of targets at different scales, leading to poor detection performance for dense or occluded targets.

Method used

By constructing an end-to-end object detection model that includes a shared feature extraction network, a one-to-one label assignment branch, and a one-to-many label assignment branch, the model generates loss feedback weights using the historical gradient states of the one-to-one branch and generates quality gating coefficients by combining the matching degree of the real labeled targets. This dynamically adjusts the loss weights of the one-to-many branch, enabling gradient feedback across branches, candidate fallback, quality screening, and conflict repair.

Benefits of technology

It improves the detection accuracy of small and dense targets, reduces missed detections and low-quality assignments, avoids additional inference structures and non-maximum suppression steps, and improves the training efficiency and detection performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033007A_ABST
    Figure CN123033007A_ABST
Patent Text Reader

Abstract

The application belongs to the field of target detection, and specifically relates to an end-to-end target detection method based on quality gating and gradient feedback. The method comprises the following steps: constructing an end-to-end target detection model comprising a shared feature extraction network, a one-to-one label assignment branch and a one-to-many label assignment branch; jointly training the two label assignment branches using training data, generating loss feedback weights through the historical gradient state of the one-to-one label assignment branch, dynamically adjusting the weights using the matching degree of the current batch of targets to generate quality gating coefficients, and finally mapping the adjusted weights to the positive sample prediction of the one-to-many branch; extracting the features of the image to be detected through the shared feature extraction network, and performing target detection on the image to be detected through the one-to-one label assignment branch which has been trained. The application determines the compensation direction based on the historical state of the unit target prediction gradient of different scales and different detection loss components, so that the compensation dynamically changes with the training process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of target detection, specifically an end-to-end target detection method based on quality gating and gradient feedback. Background Technology

[0002] Object detection is used to identify the category and location of objects in an image, and is widely used in scenarios such as drone inspection, traffic monitoring, industrial defect detection, and autonomous driving. Traditional dense object detectors generate multiple overlapping prediction boxes and use non-maximum suppression (NMS) to remove redundant predictions during the inference stage. NMS relies on manually set overlap thresholds and confidence rules, which can easily lead to false suppression of dense objects, mutually occluded objects, and small objects, while also creating additional post-processing steps.

[0003] End-to-end object detection methods use a one-to-one label assignment, ensuring that one real target corresponds primarily to one prediction result, thus directly outputting the detection result during the inference stage. One-to-one label assignment reduces prediction redundancy, but its positive sample supervision is sparse. For small targets, there are few effective candidate locations falling within the bounding box of the real target; when targets are densely packed or adjacent in the image, competition occurs between candidates, resulting in the target not obtaining effective positive samples or only obtaining low-quality positive samples.

[0004] To obtain more effective positive samples during the training phase, existing methods typically employ a one-to-many auxiliary branch. However, this one-to-many auxiliary branch is usually trained alongside the one-to-one branch with pre-defined loss weights, failing to provide targeted compensation for the actual matching quality of each ground truth labeled target based on the one-to-one inference branch. Furthermore, uniformly increasing the loss weight of smaller targets would simultaneously amplify the loss contribution of smaller targets that have already achieved higher-quality matches, potentially leading to unnecessary gradient interference.

[0005] Furthermore, the gradient magnitudes of loss components such as classification, bounding box regression, and distributed bounding box regression differ, and the learning difficulty of targets at different scales also changes dynamically during training. Fixed loss weights are difficult to adapt to these changes. Existing dynamic loss methods typically only adjust the weights for different tasks or network layers within the same prediction branch, lacking a cross-branch closed-loop feedback mechanism. This mechanism obtains the matching quality of each ground truth labeled target from the one-to-one inference branch, statistically analyzes the gradient state of different target scale groups on each loss component, and then uses this information to directionally adjust the one-to-many auxiliary training branch.

[0006] While existing two-branch end-to-end detectors can increase the number of positive samples during the training phase by utilizing one-to-many auxiliary branches, they typically employ fixed loss weights, making it difficult to accurately reflect the matching quality of each ground truth labeled target in the one-to-one inference branch. Furthermore, they struggle to dynamically adjust the relative weights of different scale targets and loss components such as classification, bounding box regression, and distributed bounding box regression in model optimization based on actual changes during training.

[0007] Existing methods fail to effectively feed back the target matching quality and scale gradient information from the one-to-one inference branch to the one-to-many auxiliary branch, resulting in a lack of targeted auxiliary supervision. If the detection effect is compensated for by adding inference structures or non-maximum suppression post-processing, it will increase the model's computational load and inference latency, and may falsely suppress real targets in dense or highly overlapping scenes. Therefore, this invention dynamically adjusts the candidate allocation and loss weights of the one-to-many auxiliary branch based on the target matching quality and gradient information of different scale groups obtained from the one-to-one inference branch. This mechanism only operates during the training phase; during the inference phase, the detection results are still directly output by the one-to-one branch without adding additional inference structures or performing non-maximum suppression post-processing. Summary of the Invention

[0008] This invention proposes an end-to-end target detection method based on quality gating and gradient feedback. It is applicable to end-to-end target detection models that use one-to-one label assignment and do not require non-maximum suppression processing during the inference stage. It mainly solves the problems of missed assignment and low-quality assignment caused by insufficient effective candidate positions, candidate position competition and sparse positive sample supervision for dense targets, small-sized targets and mutually occluded targets during the training process.

[0009] The technical solution adopted by the present invention to achieve the above objectives is as follows: An end-to-end target detection method based on quality gating and gradient feedback includes the following steps: Construct an end-to-end object detection model that includes a shared feature extraction network, a one-to-one label assignment branch, and a one-to-many label assignment branch; The two label assignment branches are jointly trained using training data in training batches. Loss feedback weights are generated by the historical gradient state of the one-to-one label assignment branches, and quality gating coefficients are generated by the matching degree of each real labeled target. The loss feedback weights are dynamically adjusted, and finally the adjusted weights are mapped to the positive sample predictions associated with the corresponding real labeled targets in the one-to-many branches. The features of the image to be detected are extracted by a shared feature extraction network, and the target is detected by a trained one-to-one label assignment branch.

[0010] The method of using training data to jointly train the two label-assigned branches in training batches includes the following steps: In the one-to-one label assignment branch, target scores are generated based on the classification confidence and overlap of the predicted bounding boxes in the training data, and the matching degree of the target is determined based on the highest target score in the foreground prediction associated with the same ground truth labeled target. The actual labeled targets are divided into corresponding target scale groups based on their dimensions. According to the preset training interval, the unit target prediction gradient of the one-to-one label branch under different target scale groups and different detection loss components is statistically analyzed in batches, and loss feedback weights are generated based on the historical gradient state. The quality gating coefficient is generated by using the matching degree of each real labeled target in the current training batch. The historical loss feedback weight is adjusted by the coefficient. After the label assignment is completed in the one-to-many branch, the adjusted weight is mapped to the corresponding positive sample prediction according to the real labeled target index associated with each positive sample prediction. The detection loss of positive sample prediction in a one-to-many branch is weighted using the mapped weights. A joint loss is constructed by combining this weighted detection loss with the detection loss in a one-to-one branch. The model parameters are then updated using the joint loss.

[0011] The target score The classification confidence of the prediction results towards the true category, and the Intersection over Union (IoU) between the predicted bounding box and the true labeled box, are jointly determined, specifically:

[0012] in, and This indicates the setting parameters.

[0013] The process of dividing the actual labeled target into the corresponding target scale group is as follows: Let the area of ​​the i-th true bounding box be... The area of ​​the training image is Then the area ratio Using the first area ratio threshold Second area ratio threshold Divide the actual annotation boxes into small, medium, and large target groups: when When the actual bounding box belongs to the small target group; when When the actual bounding box belongs to the middle target group; when At that time, the actual labeled box belongs to the large target group.

[0014] The statistical one-to-one label branch provides the unit target prediction gradient under different target scale groups and different detection loss components, specifically as follows: For the scale group s and the detection loss component c, only the true targets belonging to the scale group s and their associated one-to-one foreground predictions are aggregated to obtain the grouped loss. And calculate the state value of the predicted gradient for the unit target. :

[0015]

[0016] in, For one-to-one branch classification prediction tensors, and For the one-to-one branch distribution regression prediction tensor, Let represent the number of valid true targets in the current batch at the medium scale group s, and let box, cls, and dfl represent the bounding box regression loss, classification loss, and distributed bounding box regression loss in the detection loss component set C, respectively.

[0017] The generation of loss feedback weights based on historical gradient states is specifically as follows: Use exponential moving average to update historical status :

[0018] in, This represents the decay coefficient of the historical gradient state exponential moving average. For the same detection loss component, the reference gradient is determined based on the geometric mean of the historical states of each scale group. And calculate the original feedback weights. :

[0019]

[0020] in, This indicates the number of target scale groups, i.e., the total number of scale groups involved in the geometric mean calculation. This represents an extremely small positive number that is protected against division by zero or numerical overflow. Indicates the feedback adjustment index; Different loss components are limited separately to obtain Then, timing smoothing is performed, i.e.

[0021]

[0022] in, Indicates the first After the next update, the scale group In detecting the loss component The time-series smoothing loss feedback weight, This represents the time-series smoothing coefficient.

[0023] The process involves generating a quality gating coefficient using the matching degree of each real-labeled target in the current training batch, and then adjusting the historical loss feedback weights using this coefficient. Specifically: For the i-th real target, the quality gating coefficient for:

[0024] in, This indicates whether the target belongs to the preset compensation scale group. Indicates the quality threshold. Indicates the gating curve exponent; The effective weight of the i-th real target in the detection loss component c for:

[0025] in, Indicates the first The scale group to which the real target belongs In detecting the loss component Historical loss feedback weights.

[0026] The process of mapping the adjusted weights to positive sample predictions associated with the corresponding ground truth labeled targets in a one-to-many branch is as follows: After label assignment is completed in a one-to-many branch, the associated true target index is predicted based on each positive sample. Mapping to the corresponding positive sample prediction, and weighting the classification loss, bounding box regression loss, and distributed bounding box regression loss based on this weight, then renormalizing each weighted loss using the corresponding weighted objective score. The current batch uses a snapshot of the historical feedback weights saved before entering the batch, and the newly observed predicted gradient state values ​​of the current batch. For subsequent batches only.

[0027] The joint loss for:

[0028]

[0029] in, For the original detection loss of one-to-one branch, The loss is a one-to-many branch weighted by target-level quality gating and scale-loss component feedback. , and These are weighted CIoU loss, weighted binary cross-entropy loss, and weighted distributed regression loss, respectively. , as well as These are the hyperparameters corresponding to different losses. This represents the number of images in the current training batch.

[0030] When assigning labels to one-to-one branches and calculating the corresponding detection loss, it is also necessary to perform candidate fallback, quality screening, and conflict resolution on the real labeled targets, specifically as follows: First, determine the original candidate positions that fall inside the bounding boxes of each real labeled target. For the i-th real labeled target, the number of candidates refers to the number of candidate positions that fall inside its real labeled box. When the number of candidate positions is lower than the preset lower limit of the corresponding branch, use the half-width and half-height of the real labeled box to normalize the horizontal and vertical distances of the remaining candidate positions relative to the center of the real labeled box, and fill in the candidate positions in order of increasing normalized distance. Calculate the classification, localization, and alignment metrics for the supplementary candidates. Only retain those that meet the requirements. Among the candidates, Indicates relative mass ratio. This represents the set of classification positioning alignment metrics corresponding to candidate positions in the candidate pool. If there are no candidates for valid real targets after filtering, the candidate with the highest alignment metric in the candidate pool is retained and added to the candidate pool. If a real target with no assigned candidate appears after candidate conflict resolution, prioritize the target with fewer original candidates and smaller area, and select an effective candidate that is not occupied and has the largest alignment metric, so that each candidate position is associated with at most one real target.

[0031] The present invention has the following beneficial effects and advantages: 1. Based on the actual matching degree of each real labeled target in the one-to-one inference branch, identify difficult targets that require additional supervision, and avoid uniformly increasing the loss weight for all small targets; 2. Determine the compensation direction by using the historical state of the unit target prediction gradient at different scales and with different detection loss components, so that the compensation changes dynamically with the training process; 3. Apply compensation to the one-to-many auxiliary branch, and use its richer positive sample supervision to improve the target that has not yet been learned well in the one-to-one branch; 4. Utilize historical weighted snapshots and current target quality to form stable cross-batch feedback, avoiding immediate circular dependencies within the same batch; 5. By using candidate fallback, relative quality screening, and conflict resolution, the probability of scarce real targets completely losing supervision after label assignment is reduced; 6. All new mechanisms are implemented during the training phase. During the inference phase, only one-to-one branches are used, and no non-maximum suppression steps are added. Attached Figure Description

[0032] Figure 1A comparison diagram of the training architecture of this invention with the basic dual-branch end-to-end detector; Figure 2 Flowchart for target-level quality gating and cross-branch feedback; Figure 3 Here is a flowchart of the scale-loss component gradient feedback controller; Figure 4 Flowchart for candidate backup, quality screening, and conflict resolution; Figure 5 This is a comparison chart of the overall indicators between the control scheme and the embodiments of the present invention; Figure 6 Grouping difficult targets by mAP50-95 variation graph; Figure 7 This is a comparison chart of typical small target detection results. Detailed Implementation

[0033] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0034] like Figure 2 As shown, an end-to-end target detection method based on quality gating and gradient feedback is specifically as follows: The end-to-end object detection model includes a shared feature extraction network, a one-to-one label assignment branch, and a one-to-many label assignment branch. During training, training images are input into the shared feature extraction network, and prediction results are obtained for the one-to-one branch and the one-to-many branch, respectively.

[0035] Both branches output predictions including: classification prediction score (for predicting the target category), distribution regression prediction (for predicting the distribution parameters of the bounding box), and predicted bounding box (for calculating IoU and regression loss). In the one-to-one label assignment branch, Top-k is set to 1, and each ground truth matches only one best prediction, directly outputting the detection result without the need for NMS. In the one-to-many label assignment branch, Top-k>1, each ground truth matches multiple predictions, resulting in a denser positive sample density, but these positive samples do not participate in the inference process and are only used for training.

[0036] like Figure 3 As shown, label assignment is performed on a one-to-one branch, and the corresponding detection loss is calculated. The label assigner generates a target score based on the classification confidence of the foreground prediction and the degree of overlap between the predicted bounding box and the ground truth bounding box; for the same ground truth target, the highest target score in the associated foreground prediction is taken as the matching degree of that target. Based on the size of the ground truth target, it is divided into the corresponding target scale group. The labels include: ground truth, positive sample mask, matching index, regression label, and weighted classification label.

[0037] According to the preset training interval, the unit target prediction gradient of the one-to-one branch under different target scale groups and different detection loss components is statistically analyzed, and corresponding loss feedback weights are generated based on the historical gradient states. A quality gating coefficient is generated by combining the matching degree of each ground truth labeled target in the current batch. The historical loss feedback weights are adjusted using the quality gating coefficients, and then the adjusted weights are mapped to the positive sample predictions associated with the corresponding ground truth labeled targets in the one-to-many branch.

[0038] The weighted detection loss for the one-to-many branch is calculated based on the mapped weights and used together with the detection loss for the one-to-one branch for model parameter updates. During the inference phase, the loss calculation and feedback adjustment mechanism for the one-to-many branch are disabled, and the target detection results are directly output by the one-to-one branch.

[0039] The matching degree calculation for each real-world labeled target includes the following steps: After completing the one-to-one label assignment, the label assigner records the index of the associated ground truth labeled target and the corresponding target score for each foreground prediction. This target score is determined by the classification confidence of the prediction result against the ground truth category, and the intersection-union ratio (IUU) between the predicted bounding box and the ground truth labeled box. For the i-th ground truth labeled target, its matching degree is expressed as:

[0040]

[0041] in, Represents the set of foreground predictions associated with the i-th real target in a one-to-one branch; when When empty, The preset minimum quality value is set. The label assigner first reads the classification confidence of the foreground prediction to the ground truth category, calculates the intersection-union ratio (IU) between the predicted bounding box and the ground truth labeled box, and then generates a target score based on the joint metric of classification confidence and IU. In this embodiment, the target scores output by the label assigner are summed along the category dimension, and then, based on the index of each ground truth labeled target, the maximum value among the prediction results associated with that target is selected as the matching degree of that ground truth labeled target. Here, IU measures the degree of overlap between the predicted bounding box and the ground truth labeled box; the area ratio used for target scale grouping described later measures the size of the ground truth labeled box relative to the entire image, and the two have different meanings.

[0042] The process of grouping targets by scale is as follows: Let the area of ​​the bounding box of the i-th real target be... The area of ​​the training image is Then the area ratio Using the first area ratio threshold Second area ratio threshold Divide the target into small, medium, and large groups: when When it belongs to the small target group; when When it belongs to the target group; when It belongs to the large target group. One embodiment uses... , .

[0043] The calculation process for the gradient state of the unit target prediction is as follows: The detection loss component set C includes `box`, `cls`, and `dfl`, representing the bounding box regression loss, classification loss, and distributed bounding box regression loss, respectively. For a scale group `s` and the loss component `c`, only the ground truth targets belonging to scale group `s` and their associated one-to-one foreground predictions are aggregated to obtain the grouped loss. And calculate the state value of the predicted gradient for the unit target:

[0044]

[0045] in, For one-to-one branch classification prediction tensors, and For the one-to-one branch distribution regression prediction tensor, This represents the number of valid true targets in the current batch's scale group s. The gradient of this state is calculated with respect to the corresponding prediction tensor, not with respect to the shared network parameters; the gradient L2 norm divided by the number of targets is used to characterize the unit target training response of this scale group on the corresponding loss component. When a scale group has no valid targets or the corresponding loss does not produce a valid gradient, the current observation is skipped, and historical states are not overwritten with zero values.

[0046] The historical gradient feedback controller performs the following steps: Historical status is updated using exponential moving average:

[0047] in, The decay coefficient of the exponential moving average of the historical gradient state represents the proportion of the historical state retained at the previous moment. ρ The larger the value, the more historical states are preserved, and the smoother the updates. ρ The smaller the value, the greater the impact on current observations.

[0048] For the same loss component, the reference gradient is determined based on the geometric mean of the historical states for each scale group. And calculate the original feedback weights:

[0049]

[0050]

[0051] in, This indicates the number of target scale groups, i.e., the total number of scale groups involved in the geometric mean calculation. This represents an extremely small positive number that prevents division by zero or numerical overflow, and is used for numerical stability. This represents the feedback adjustment index, used to control the adjustment strength of the original feedback weights; Different loss components are limited separately to obtain Then perform timing smoothing:

[0052] middle, Indicates the first After the next update, the scale group In detecting the loss component The time-series smoothing loss feedback weight, This represents the time-series smoothing coefficient, also known as the weighted smoothing coefficient or momentum coefficient, used to control the smoothing weights of the previous smoothing iteration. The retention rate in the current update.

[0053] The controller has a preheating cycle and an update batch interval. During the preheating phase or when the historical state is not yet complete, each feedback weight maintains a baseline value. In one embodiment, both the baseline value and the lower limit of the weights are 1, so that the controller only compensates for the scale-loss component where the gradient is relatively insufficient.

[0054] The calculation process for target-level quality gating and cross-branch directional weights is as follows: For the i-th real target, the quality gating coefficient is:

[0055] in, This indicates whether the target belongs to the preset compensation scale group. For quality threshold, This represents the gating curve exponent. One embodiment compensates only for small targets. , When the quality of a one-to-one match for a small target is greater than or equal to a threshold, The lower the matching quality, The closer it is to 1.

[0056] The effective weight of the i-th real target on the loss component c is:

[0057] After label assignment is completed in a one-to-many branch, the associated true target index is predicted based on each positive sample. The data is mapped to the corresponding positive sample predictions, and weighted for classification, bounding box regression, and distributed bounding box regression losses, respectively. Each weighted loss is renormalized using the corresponding weighted objective score. The current batch uses a snapshot of the historical feedback weights saved before entering the batch, and new observations in the current batch are only used in subsequent batches to avoid creating immediate circular dependencies from the same loss calculation.

[0058] like Figure 4 As shown, it also includes the processes of candidate fallback, quality screening, and conflict resolution, specifically: First, determine the original candidate positions that fall within the bounding boxes of each ground truth labeled target. For the i-th ground truth labeled target, the candidate number refers to the number of candidate positions falling within its ground truth labeled box; this number is a position count value, not a comprehensive indicator calculated from classification confidence or localization quality. When the number of candidate positions is lower than the preset lower limit of the corresponding branch, the horizontal and vertical distances of the remaining candidate positions relative to the center of the ground truth labeled box are normalized using the half-width and half-height of the ground truth labeled box, and candidate positions are added in order of increasing normalized distance. In one embodiment, the lower limit of the number of candidate positions for a one-to-many branch is 3, and the lower limit of the number of candidate positions for a one-to-one branch is 1.

[0059] Calculate the classification, localization, and alignment metrics for the supplementary candidates. Only retain those that meet the requirements. Among the candidates, In one embodiment, the relative mass ratio is used. If no candidates are available for valid real targets after filtering, the candidate with the highest alignment metric in the candidate pool is retained to be added. If real targets with unassigned candidates appear after candidate conflict resolution, targets with fewer original candidates and smaller areas are processed first, and an unoccupied valid candidate with the best alignment metric is selected for them, ensuring that each candidate position is associated with at most one real target.

[0060] Joint loss and inference are specifically as follows:

[0061] in, For the original detection loss of one-to-one branch, It is a one-to-many branch loss weighted by target-level quality gating and scale-loss component feedback. During the inference phase, gradient states are not calculated, feedback controllers are not run, quality gating is not generated, and one-to-many branch loss is not used; detection results are generated only by one-to-one branches, without increasing the number of parameters in the inference phase, the detection head calculation path, or non-maximum suppression post-processing.

[0062] For a given anchor point, its final weighting coefficient is:

[0063] It is a quality gate. These are the basic weights for gradient feedback; Weighted score Multiply the original soft label by the effective weight, i.e.:

[0064] Weighted Binary Cross-Entropy (BCE):

[0065] Weighted CIoU loss:

[0066] Weighted Distributed Regression Loss :

[0067] Multiply the three components by their respective hyperparameters, and then multiply by the batch size:

[0068] , ,

[0069] Example 1. General Implementation Method like Figure 1 As shown, this invention is applicable to end-to-end object detection models that simultaneously have one-to-one label assignment paths and one-to-many label assignment paths during the training phase. The base model can be a convolutional neural network, a visual Transformer, or a combination of both to form a shared feature extraction network, with one-to-one prediction branches and one-to-many auxiliary training branches respectively set.

[0070] The training data includes the images to be detected, along with the corresponding target categories and bounding box annotations. During training, the matching degree of each ground truth labeled target is first obtained through a one-to-one branch, and the target scale groups are divided according to the ratio of the target box area to the image area. Then, the unit target prediction gradients for different target scale groups on loss components such as classification, bounding box regression, and distributed bounding box regression are calculated, and loss feedback weights are generated based on historical gradient states. Next, quality gating coefficients are generated by combining the matching degree of each ground truth labeled target, and the adjusted feedback weights are mapped to the positive sample predictions of the one-to-many auxiliary branches. Finally, the model parameters are updated by combining the one-to-one branch loss and the one-to-many branch weighted loss.

[0071] This invention does not rely on specific object detection models, training datasets, image resolutions, or development frameworks, and can be implemented in deep learning training environments with tensor operations and automatic differentiation capabilities. During the inference phase, the loss calculation and feedback adjustment mechanism of one-to-many auxiliary branches are disabled, and the detection result is directly output only by the one-to-one branch.

[0072] 2. Parameter configuration methods and examples The lower limit of the number of candidate positions for one-to-one and one-to-many branches can be determined based on the target density, feature map resolution, and positive sample allocation method; the target scale threshold can be determined based on the proportion of the target box area to the image area; the quality gating threshold can be determined based on the target matching degree distribution of the one-to-one branch output; the historical gradient decay coefficient, feedback adjustment index, weight smoothing coefficient, number of warm-up rounds, and feedback update interval can be determined based on the training convergence of the model.

[0073] In one exemplary embodiment, the lower limit for the number of candidate positions in a one-to-many branch is set to 3, the lower limit for the number of candidate positions in a one-to-one branch is set to 1, the relative quality ratio of supplementary candidates is set to 0.2, the small target quality gating threshold is set to 0.50, the gating curve exponent is set to 1.00, the historical gradient exponential moving average decay coefficient is set to 0.95, the feedback adjustment exponent is set to 0.50, the weight smoothing coefficient is set to 0.80, the number of feedback warm-up rounds is set to 3, and the feedback update interval is set to 20 training batches. The upper limits for the feedback weights of bounding box regression, classification, and distributed bounding box regression losses are set to 1.25, 1.40, and 1.10, respectively, and the lower limit for the feedback weights is set to 1 for all of them.

[0074] The above parameters are used to illustrate one feasible configuration of the present invention and do not constitute a limitation on the model structure, dataset, training environment, or parameter value range.

[0075] 3. Exemplary training and independent validation results To verify the feasibility of the technical solution of this invention, a small end-to-end object detector with a shared feature extraction structure, a one-to-many auxiliary training branch, and a one-to-one inference branch was selected as the base model, and exemplary training and validation were performed on the VisDrone dataset. The training input size was 640×640, the number of training rounds was 100, and the batch size was 8; the validation set contained 548 images and 38,759 ground truth labeled objects.

[0076] A scheme containing the same candidate fallback and conflict resolution mechanisms, but lacking target-level quality gating and scale-aware gradient feedback mechanisms, was used as a control scheme. Subsequent experimental metrics, difficult target group diagnostic results, and controller states are used to illustrate the technical effects of this invention in this exemplary embodiment, and do not imply that this invention can only be applied to the above-mentioned basic model, dataset, or training environment.

[0077] The experimental results are shown in the figure below. Figure 5-7 As shown, to visually demonstrate the differences between the embodiments of the present invention and the comparative scheme, Figure 5 Provide an overall comparison of indicators. Figure 6 The mAP50-95 variation calculated using a unified grouping diagnostic procedure is given. Figure 7 Provide a real detection comparison using the same verification image and the same confidence threshold. Figure 7 The white boxes in the diagram represent the locations of the same ground truth target, while the thick black boxes represent predicted boxes that match the ground truth target. The samples shown are intended to illustrate that this method can improve the detection of some small targets and does not represent an improvement for all images or all difficult targets.

[0078] 4. Controller Status At the end of 100 rounds of training, the feedback weights for Box, Classification, and DFL for small targets were 1.0588, 1.1292, and 1.1000, respectively; for medium targets, they were 1.1796, 1.0365, and 1.0113; and for large targets, they were all 1.0000. The quality gating rate for small targets was approximately 44.15%, and the average gating strength was approximately 0.2615, indicating that not all small targets received the same compensation, and the controller was able to generate differentiated feedback according to the target scale and loss components.

[0079] 5. Alternative implementation methods The base model is not limited to a specific open-source model, as long as it has one-to-one and one-to-many prediction or label assignment paths during the training phase. Target scales can be divided by bounding box area, shorter side, feature level, or a combination thereof; the matching degree of each ground truth labeled target can be determined by classification confidence, intersection-over-union prediction, classification-localization joint score, or a combination of indicators; gradient states can be represented by L2, L1, root mean square, or other normalized statistics; historical states can be represented by exponential moving average, sliding window average, or other time-series filtering; reference gradients can be represented by geometric mean, arithmetic mean, median, or a preset target value; quality gating can be represented by linear, power function, piecewise function, or differentiable sigmoid function; the scale group to be compensated can include a small target group or further include a medium target group; detection loss components can include IoU class loss, L1 class loss, classification loss, target existence loss, or distribution regression loss; update interval, warm-up time, and weight range can be adaptively determined according to the training state.

[0080] 6. Current verification boundary This embodiment has completed the program implementation of the training method, and verified the feasibility and effectiveness of the technical solution of the present invention through baseline equivalence verification, complete training comparison, independent verification of model weights, difficult target group diagnosis, and feedback controller state analysis. Existing experimental results show that the method can improve the overall detection performance of the target detection model and has a positive effect on the detection effect of some dense scenes and small targets.

[0081] Multi-random seed statistics, cross-dataset reproduction, low-bit quantization, embedded processor deployment, and generalization testing in complex environments such as nighttime and backlight are extension verification contents that can be further carried out, but do not constitute necessary conditions for the implementation of the technical solution of this invention or for achieving the basic technical effect.

Claims

1. An end-to-end target detection method based on quality gating and gradient feedback, characterized in that, Includes the following steps: Construct an end-to-end object detection model that includes a shared feature extraction network, a one-to-one label assignment branch, and a one-to-many label assignment branch; The two label assignment branches are jointly trained using training data in training batches. Loss feedback weights are generated by the historical gradient state of the one-to-one label assignment branches, and quality gating coefficients are generated by the matching degree of each real labeled target. The loss feedback weights are dynamically adjusted, and finally the adjusted weights are mapped to the positive sample predictions associated with the corresponding real labeled targets in the one-to-many branches. The features of the image to be detected are extracted by a shared feature extraction network, and the target is detected by a trained one-to-one label assignment branch.

2. The end-to-end target detection method based on quality gating and gradient feedback according to claim 1, characterized in that, The method of using training data to jointly train the two label-assigned branches in training batches includes the following steps: In the one-to-one label assignment branch, target scores are generated based on the classification confidence and overlap of the predicted bounding boxes in the training data, and the matching degree of the target is determined based on the highest target score in the foreground prediction associated with the same ground truth labeled target. The actual labeled targets are divided into corresponding target scale groups based on their dimensions. According to the preset training interval, the unit target prediction gradient of the one-to-one label branch under different target scale groups and different detection loss components is statistically analyzed in batches, and loss feedback weights are generated based on the historical gradient state. The quality gating coefficient is generated by using the matching degree of each real labeled target in the current training batch. The historical loss feedback weight is adjusted by the coefficient. After the label assignment is completed in the one-to-many branch, the adjusted weight is mapped to the corresponding positive sample prediction according to the real labeled target index associated with each positive sample prediction. The detection loss of positive sample prediction in a one-to-many branch is weighted using the mapped weights. A joint loss is constructed by combining this weighted detection loss with the detection loss in a one-to-one branch. The model parameters are then updated using the joint loss.

3. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The target score The classification confidence of the prediction results towards the true category, and the Intersection over Union (IoU) between the predicted bounding box and the true labeled box, are jointly determined, specifically as follows: in, and This indicates the setting parameters.

4. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The process of classifying the actual labeled targets into corresponding target scale groups based on their dimensions is as follows: Let the area of ​​the i-th true bounding box be... The area of ​​the training image is Then the area ratio Using the first area ratio threshold Second area ratio threshold Divide the actual annotation boxes into small, medium, and large target groups: when When the actual bounding box belongs to the small target group; when When the actual bounding box belongs to the middle target group; when At that time, the actual labeled box belongs to the large target group.

5. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The statistical one-to-one label branch provides the unit target prediction gradient under different target scale groups and different detection loss components, specifically as follows: For the scale group s and the detection loss component c, only the true targets belonging to the scale group s and their associated one-to-one foreground predictions are aggregated to obtain the grouped loss. And calculate the state value of the predicted gradient for the unit target. : in, For one-to-one branch classification prediction tensors, and For the one-to-one branch distribution regression prediction tensor, Let represent the number of valid true targets in the current batch at the medium scale group s, and let box, cls, and dfl represent the bounding box regression loss, classification loss, and distributed bounding box regression loss in the detection loss component set C, respectively.

6. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The generation of loss feedback weights based on historical gradient states is specifically as follows: Use exponential moving average to update historical status : in, This represents the decay coefficient of the historical gradient state exponential moving average. For the same detection loss component, the reference gradient is determined based on the geometric mean of the historical states of each scale group. And calculate the original feedback weights. : in, This indicates the number of target scale groups, i.e., the total number of scale groups involved in the geometric mean calculation. This represents an extremely small positive number that is protected against division by zero or numerical overflow. Indicates the feedback adjustment index; Different loss components are limited separately to obtain Then, timing smoothing is performed, i.e. in, Indicates the first After the next update, the scale group In detecting the loss component The time-series smoothing loss feedback weight, This represents the time-series smoothing coefficient.

7. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The process involves generating a quality gating coefficient using the matching degree of each real-labeled target in the current training batch, and then adjusting the historical loss feedback weights using this coefficient. Specifically: For the i-th real target, the quality gating coefficient for: in, This indicates whether the target belongs to the preset compensation scale group. Indicates the quality threshold. Indicates the gating curve exponent; The effective weight of the i-th real target in the detection loss component c for: in, Indicates the first The scale group to which the real target belongs In detecting the loss component Historical loss feedback weights.

8. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The process of mapping the adjusted weights to positive sample predictions associated with the corresponding ground truth labeled targets in a one-to-many branch is as follows: After label assignment is completed in a one-to-many branch, the associated true target index is predicted based on each positive sample. Mapping to the corresponding positive sample prediction, and weighting the classification loss, bounding box regression loss, and distributed bounding box regression loss based on this weight, then renormalizing each weighted loss using the corresponding weighted objective score. The current batch uses a snapshot of the historical feedback weights saved before entering the batch, and the newly observed predicted gradient state values ​​of the current batch. For subsequent batches only.

9. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, The joint loss for: in, For the original detection loss of one-to-one branch, The loss is a one-to-many branch weighted by target-level quality gating and scale-loss component feedback. , and These are weighted CIoU loss, weighted binary cross-entropy loss, and weighted distributed regression loss, respectively. , as well as These are the hyperparameters corresponding to different losses. This represents the number of images in the current training batch.

10. The end-to-end target detection method based on quality gating and gradient feedback according to claim 2, characterized in that, When assigning labels to one-to-one branches and calculating the corresponding detection loss, it is also necessary to perform candidate fallback, quality screening, and conflict resolution on the real labeled targets, specifically as follows: First, determine the original candidate positions that fall inside the bounding boxes of each real labeled target. For the i-th real labeled target, the number of candidates refers to the number of candidate positions that fall inside its real labeled box. When the number of candidate positions is lower than the preset lower limit of the corresponding branch, use the half-width and half-height of the real labeled box to normalize the horizontal and vertical distances of the remaining candidate positions relative to the center of the real labeled box, and fill in the candidate positions in order of increasing normalized distance. Calculate the classification, localization, and alignment metrics for the supplementary candidates. Only retain those that meet the requirements. Among the candidates, Indicates relative mass ratio. This represents the set of classification positioning alignment metrics corresponding to candidate positions in the candidate pool. If there are no candidates for valid real targets after filtering, the candidate with the highest alignment metric in the candidate pool is retained and added to the candidate pool. If a real target with no assigned candidate appears after candidate conflict resolution, prioritize the target with fewer original candidates and smaller area, and select an effective candidate that is not occupied and has the largest alignment metric, so that each candidate position is associated with at most one real target.