A method for dynamic allocation of IoU based on target detection
By combining the intersection-union ratio weighted parameter and the distance penalty term in target detection and dynamically allocating the IoU value, the problems of slow convergence speed and inaccurate localization in the prior art are solved, and higher detection accuracy and precision are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANSJER ELECTRONICS CO LTD
- Filing Date
- 2023-09-18
- Publication Date
- 2026-06-23
AI Technical Summary
Existing IoU-based loss functions have slow convergence speed and inaccurate localization in object detection, and cannot effectively solve the imbalance problem. Furthermore, the existing Focal EIoU only judges the sample quality based on the current IoU, which is insufficient to accurately distinguish between high-quality and low-quality samples.
By combining the cross-union ratio weighting parameter α and the distance penalty term weighting parameter β of the target detection network, the distance loss value Ldis and the height and width loss value Lasp between the predicted box and the target box are calculated. Combined with historical IoU values, the IoU values are dynamically allocated. The loss function LEIoU = 1 - IoUn-1 + Ldis + Lasp is used to iteratively optimize the values of α and β to improve detection accuracy.
It improves the precision and accuracy of target detection by dynamically allocating IoU values and combining current and historical IoU to judge sample quality, thus achieving higher detection precision and accuracy.
Smart Images

Figure CN117437398B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a dynamic allocation method for IoU based on target detection. Background Technology
[0002] In recent years, deep learning-based object detection technology has developed rapidly and has become the mainstream method in the field of object detection technology. Boundary regression (BBR) is a key step in deep learning-based object detection algorithms. The most commonly used localization metric for bounding box regression during detection is the Intersection over Union (IoU). However, IoU-based loss functions cannot effectively describe the targets in BBR, leading to slow convergence and inaccurate regression results. Furthermore, most loss functions ignore the imbalance problem in BBR, where a large number of target boxes with small overlap contribute most to BBR optimization. To mitigate this adverse effect, an effective Efficient Intersection over Union (EIOU) loss has been proposed. This loss explicitly measures the difference in three geometric factors in BBR: overlap area, center point, and side length. A regression version of Focal loss is proposed to focus the regression process on high-quality anchor boxes, resulting in a new loss function, Focal EIOU Loss. Compared with other BBR losses, it achieves significant advantages in convergence speed and localization accuracy. However, existing Focal... While EIoU focuses on high-quality samples and can effectively avoid the problem of low-quality samples contributing too much to the loss, we believe that the problem of low-quality samples cannot be completely judged by the current IoU. This is because the current IoU only represents one indicator of the current sample quality. It is necessary to combine the historical IoU of the sample for dynamic judgment to achieve a more accurate result. Summary of the Invention
[0003] The purpose of this invention is to at least solve one of the technical problems existing in the prior art, and to provide a dynamic IoU allocation method that combines the historical IoU of samples to improve the accuracy of target detection.
[0004] According to an embodiment of the present invention, the dynamic allocation method of IoU based on object detection includes step 1, presetting the cross-union ratio weighting parameter α and the distance penalty term weighting parameter β for the object detection network, and training n times;
[0005] Step 2: Use multiple images of different categories as training images and input them into the object detection network to train it, and obtain the predicted bounding box b of the detected object;
[0006] Step 3: Calculate the bounding box b of the image to be trained. gtThe initial value of the intersection-union ratio (IoU) of the predicted box b. mean ;
[0007] Step 4: Obtain the bounding box b that simultaneously contains the target box. gt The minimum closed frame G of the predicted frame b is a rectangle;
[0008] Step 5: Calculate the predicted bounding box b and the target bounding box b. gt Distance loss value L dis ;
[0009] Step 6: Calculate the predicted bounding box b and the target bounding box b. gt The height and width loss value L asp ;
[0010] Step 7: Calculate the loss function L EIoUn The formula is as follows: L EIoUn =1-IoU n-1 +L dis +L asp ;
[0011] Step 8: Combine historical IoU values with the loss function L EIoU Get the dynamically allocated IoU value: Where A is a variable that tends to a stable value after training iterations;
[0012] Step 9: Keep the training images unchanged and repeat steps 7 to 8 for a total of n-1 times to obtain the detection accuracy of the final object detection network and its corresponding optimal α and β values.
[0013] According to the target detection-based dynamic allocation method of the present invention, the values of α and β range from 0 to 1.
[0014] According to the object detection-based dynamic IoU allocation method of this invention, variable A is initialized to 1 and tends to a stable value γ after training iterations, and the iteration formula is as follows:
[0015] According to the dynamic allocation method of IoU based on target detection according to embodiments of the present invention, the distance loss value Height and width loss values
[0016] The dynamic IoU allocation method according to embodiments of the present invention has at least the following beneficial effects: during the target detection process, the initial value of the intersection-union ratio (IoU) is first obtained. mean Then based on the initial value IoU mean Distance loss value L dis , Height and width loss value L asp Obtain the loss function L EioUnFinally, according to the formula To obtain the dynamically allocated IoU value, that is, to combine the current IoU. n IoU with history n-1 Jointly assessing sample quality leads to higher precision and accuracy.
[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Detailed Implementation
[0018] This section will describe specific embodiments of the present invention in detail. In the description of the present invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. If "first" and "second" are mentioned, they are only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of the indicated technical features.
[0019] The present invention provides a dynamic IoU allocation method, comprising: step 1, pre-setting an intersection-union ratio weighting parameter α and a distance penalty term weighting parameter β for the target detection network, wherein the values of α and β can be in the range of 0 to 1, and the number of training times is n;
[0020] Step 2: Use multiple images of different categories as training images and input them into the object detection network to train it, and obtain the predicted bounding box b of the detected object;
[0021] Step 3: Calculate the bounding box b of the image to be trained. gt The initial value of the intersection-union ratio (IoU) of the predicted box b. mean ;
[0022] Step 4: Obtain the bounding box b that simultaneously contains the target box. gt The minimum closed frame G of the predicted frame b is a rectangle;
[0023] Step 5: Calculate the predicted bounding box b and the target bounding box b. gt Distance loss value L dis ;
[0024] Step 6: Calculate the predicted bounding box b and the target bounding box b. gt The height and width loss value L asp ;
[0025] Step 7: Calculate the loss function L EIoUn The formula is as follows: L EIoUn =1-IoU n-1 +L dis +L asp ;
[0026] Step 8: Combine historical IoU values with the loss function L EIoU Get the dynamically allocated IoU value: Where A is a variable that tends to a stable value after training iterations;
[0027] Step 9: Keep the training images unchanged and repeat steps 7 to 8 for a total of n-1 times to obtain the detection accuracy of the final object detection network and its corresponding optimal α and β values.
[0028] In some embodiments, variable A is initialized to 1 and, through training iterations, tends towards a stable value γ, with the iteration formula being:
[0029] Distance loss value Height and width loss values
[0030] In the target detection process, the initial value of the intersection-union ratio (IoU) is first obtained. mean Then based on the initial value IoU mean Distance loss value L dis , Height and width loss value L asp Obtain the loss function L EioUn Finally, according to the formula To obtain the dynamically allocated IoU value, that is, to combine the current IoU. n IoU with history n-1 Jointly assessing sample quality leads to higher precision and accuracy.
[0031] It will be readily understood by those skilled in the art that the above preferred methods can be freely combined and superimposed without conflict.
[0032] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural transformations made using the contents of the present invention under the inventive concept of the present invention, or direct or indirect applications in other related technical fields, are included within the scope of patent protection of the present invention.
Claims
1. A dynamic IoU allocation method based on object detection, characterized in that, include: Step 1: Preset the intersection-union ratio weighting parameter α and the distance penalty term weighting parameter β for the object detection network, and train it for n times; Step 2: Input the image to be trained into the object detection network to train it and obtain the predicted bounding box b of the detected object; Step 3: Calculate the bounding box b of the image to be trained. gt The initial value of the intersection-union ratio (IoU) of the predicted box b. mean ; Step 4: Obtain the bounding box b that simultaneously contains the target box. gt The minimum closed frame G of the predicted frame b is a rectangle; Step 5: Calculate the predicted bounding box b and the target bounding box b. gt Distance loss value L dis ; Step 6: Calculate the predicted bounding box b and the target bounding box b. gt The height and width loss value L asp ; Step 7: Calculate the loss function L EIoUn The formula is as follows: L EIoUn =1-IoU n-1 +L dis +L asp ; Step 8: Combine historical IoU values with the loss function L EIoUn Get the dynamically allocated IoU value: Where A is a variable that tends to a stable value after training iterations; Step 9: Keep the training images unchanged and repeat steps 7 to 8 for a total of n-1 times to obtain the detection accuracy of the final object detection network and its corresponding optimal α and β values.
2. The dynamic IoU allocation method based on target detection according to claim 1, characterized in that: The values of α and β range from 0 to 1, respectively.
3. The dynamic IoU allocation method based on target detection according to claim 1, characterized in that: Variable A is initialized to 1 and, after training iterations, tends towards a stable value γ. The iteration formula is as follows:
4. The dynamic IoU allocation method based on target detection according to claim 1, characterized in that: Distance loss value Height and width loss values