Skip to main content
Log in

Accurate IoU computation for rotated bounding boxes in \({\mathbb {R}}^2\) and \({\mathbb {R}}^3\)

  • Original Paper
  • Published:
Machine Vision and Applications Aims and scope Submit manuscript

Abstract

In object detection, the Intersection over Union (\({\mathrm{IoU}}\)) is the most popular criterion used to validate the performance of an object detector on the testing object dataset, or to compare the performances of various object detectors on a common object dataset. The calculation of this criterion requires the determination of the overlapping area between two bounding boxes. If these latter are axis-aligned (or horizontal), then the exact calculation of their overlapping area is simple. But if these bounding boxes are rotated (or oriented), then the exact calculation of their overlapping area is laborious. Many rotated objects detectors have been developed using heuristics to approximate \({\mathrm{IoU}}\) between two rotated bounding boxes. We have shown, through counterexamples, that these heuristics are not efficient in the sense that they can lead to false positive or false negative detection, which can bias the performance of comparative studies between object detectors. In this paper, we develop a method to calculate exact value of \({{\mathrm{IoU}}}\) between two rotated bounding boxes. Moreover, we present an \((\epsilon ,\alpha )\)-estimator \(\widehat{{\mathrm{IoU}}}\) of \({{\mathrm{IoU}}}\) that satisfies \({\mathbf {Pr}} (|\widehat{{\mathrm{IoU}}} -{\mathrm{IoU}}| \le {\mathrm{IoU}}\epsilon )\ge 1-\alpha \). We also generalize the exact computing method and the \((\epsilon ,\alpha )\)-estimator of \({{\mathrm{IoU}}}\), to three-dimensional bounding boxes. Finally, we carry out many numerical experiments in \({\mathbb {R}}^2\) and \({\mathbb {R}}^3\), in order to test the exact method of calculating the \({{\mathrm{IoU}}}\), and to compare the efficiency of the \((\epsilon ,\alpha )\)-estimator with respect to heuristic estimates of \({{\mathrm{IoU}}}\). Numerical study shows that the \((\epsilon ,\alpha )\)-estimator is distinguished by both precision and simplicity of implementation, while the exact calculation method is distinguished by both precision and speed.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31
Fig. 32
Fig. 33
Fig. 34
Fig. 35
Fig. 36
Fig. 37
Fig. 38
Fig. 39
Fig. 40
Fig. 41
Fig. 42
Fig. 43
Fig. 44
Fig. 45
Fig. 46

Similar content being viewed by others

References

  1. Endres, A., et al.: The benefits and challenges of collecting richer object annotations. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 1–8 (2010)

  2. Su, K., Geng, X.: Soft facial landmark detection by label distribution learning. Proc. AAAI Conf. Artif. Intell. 33(01), 5008–5015 (2019)

    Google Scholar 

  3. Zou, Z., et al.: Object detection in 20 years: a survey (2019). arXiv:1905.05055

  4. Ren, S., et al.: Faster R-CNN: towards realtime object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 39, 1137–1149 (2017)

    Article  Google Scholar 

  5. Cai, Z., Vasconcelos, N.: Cascade r-cnn: delving into high quality object detection. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 6154–6162 (2018)

  6. Redmon, J., Farhadi, A.: Yolov3: an incremental improvement. arXiv:1804.02767 (2018)

  7. Liu, W., et al.: SSD: single shot multibox detector. In: European Conference on Computer Vision, pp. 21–37 (2016)

  8. Qian, W., et al.: Learning modulated loss for rotated object detection. arXiv:1911.08299 (2019)

  9. Zhu, H., et al.: Orientation robust object detection in aerial images using deep convolutional neural network. IEEE Int. Conf. Image Process. 13, 3735–3739 (2015)

    Google Scholar 

  10. Liu, Z., et al.: Ship rotated bounding box space for ship extraction from high-resolution optical satellite images with complex backgrounds. IEEE Geosci. Remote Sens. Lett. 13, 1074–1078 (2016)

    Article  Google Scholar 

  11. Xia, G., et al.: Dota: a large-scale dataset for object detection in aerial images. In: The IEEE Conference on Computer Vision and Pattern Recognition (2018)

  12. Azimi, S., et al.: Towards multi-class object detection in unconstrained remote sensing imagery. In: Asian Conference on Computer Vision, pp. 150–165 (2018)

  13. Ding, J., et al.: Learning ROI transformer for oriented object detection in aerial images. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2844–2853 (2019)

  14. Yang, X., et al.: Towards more robust detection for small, cluttered and rotated objects. IEEE International Conference on Computer Vision, pp. 8232–8241 (2019)

  15. Zahou, X., et al.: East: an efficient and accurate scene text detector. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 5551–5560 (2017)

  16. Yang, X., et al.: R3det: refined single-stage detector with feature refinement for rotating object. arXiv:1908.05612 (2019)

  17. Vahab, A., et al.: Applications of object detection system. Int. Res. J. Eng. Technol. 06(04), 4186–4192 (2019)

    Google Scholar 

  18. Everingham, M., et al.: The pascal visual object classes challenge: a retrospective. Int. J. Comput. Vis. 111, 98–136 (2015)

    Article  Google Scholar 

  19. Lin, T., et al.: Microsoft coco: common objects in context. In: European Conference on Computer Vision (2014)

  20. Russakovsky, O., et al.: Imagenet large scale visual recognition challenge. Int. J. Comput. Vis. 115, 211–252 (2015)

    Article  MathSciNet  Google Scholar 

  21. Adhikari, B., et al.: Faster bounding box annotation for object detection in indoor scenes. In: European Workshop on Visual Information Processing, pp. 1–6 (2018)

  22. Rezatofighi, H., et al.: Generalized intersection over union: a metric and a loss for bounding box regression. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 658–666 (2019)

  23. Liu, L., Pan, Z., Lei, B.: Learning a rotation invariant detector with rotatable bounding box. arXiv:1711.09405 (2017)

  24. Yao, C., et al.: Detecting texts of arbitrary orientations in natural images. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 1083–1090 (2012)

  25. Lo, D.: Finite Element Mesh Generation, 1st edn. CRC Press, Boca Raton (2014)

    Book  Google Scholar 

  26. Kabat, M.: Design and Analysis of Algorithms. PHI Learning (2013)

  27. Ramirez, A., Cox, C.: Improving on the range rule of thumb. Rose Hulman Undergrad. Math. J. 13(2), 1 (2012)

    MathSciNet  MATH  Google Scholar 

  28. Jacod, J., Protter, P.: Probablity Essentials. Springer, Berlin (2004)

    Book  Google Scholar 

  29. Sunday, D.: Fast polygon area and Newell normal computation. J. Graph. Tools 7(2), 9–13 (2002)

    Article  Google Scholar 

  30. Dagum, P., et al.: An optimal algorithm for Monte Carlo estimation. SIAM J. Comput. 29(5), 1484–1496 (2000)

  31. Huber, M.: An optimal \((\epsilon,\delta )\)-randomized approximation scheme for the mean of random variables with bounded relative variance. Random Struct. Algorithms 55(2), 356–370 (2019)

    Article  MathSciNet  Google Scholar 

  32. Bochinski, E., Eiselein, V., Sikora, T.: High-speed tracking by detection without using image information. In: IEEE International Conference on Advanced Video and Signals-based Surveillance (2017)

  33. Arvo, J.: Graphics Gems II. Academic Press, Cambridge (1991)

    MATH  Google Scholar 

  34. Yi, J., et al.: Oriented object detection in aerial images with box boundary-aware vectors. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 2150–2159 (2021)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Abdelhamid Zaïdi.

Ethics declarations

Conflict of interest

The author declares that there is no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zaïdi, A. Accurate IoU computation for rotated bounding boxes in \({\mathbb {R}}^2\) and \({\mathbb {R}}^3\). Machine Vision and Applications 32, 114 (2021). https://doi.org/10.1007/s00138-021-01238-x

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00138-021-01238-x

Keywords

Navigation