FlexIoU: Modularity and Flexibility IoU for Bounding Box Regression in Agricultural Disease Detection
Main Article Content
Abstract
Accurate bounding-box regression plays a crucial role in object detection, particularly in agricultural disease detection, where target objects are often small, irregular, and weakly bounded. Although Intersection over Union (IoU)-based losses such as CIoU and EIoU have improved localization performance, their fixed geometric penalty formulations limit adaptability to domain-specific object characteristics. In this work, we propose FlexIoU, a flexible and lightweight IoU-based regression loss that introduces tunable geometric penalties to enhance localization robustness. FlexIoU provides explicit control over center-distance, width, and height penalties, enabling more adaptive regression behavior for irregular lesion shapes commonly observed in agricultural imagery. The proposed loss integrates seamlessly into the YOLO training pipeline as a drop-in replacement for conventional IoU-based losses, without modifying classification or distribution focal loss components, thereby preserving inference efficiency. We evaluate FlexIoU within a YOLOv11 detection framework on a tomato leaf disease dataset under identical experimental settings and across three random seeds to ensure statistical reliability. Experimental results demonstrate that FlexIoU consistently outperforms the default YOLOv11 regression objective as well as CIoU and EIoU in terms of mAP@0.5:0.95 and overall detection balance, while maintaining stable inference speed comparable to baseline losses. These findings indicate that FlexIoU provides an effective and practical solution for improving bounding-box regression in agricultural disease detection. While the results demonstrate promising robustness across two tomato disease datasets, further validation on additional agricultural and general object detection datasets is required.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
Nagababu, P.; Nageena, S.; Dharani, V.; Naveen, D. Plant Disease Detection and Diagnosis. In Proceedings of the 2024 5th International Conference for Emerging Technology (INCET); Belgaum, India, 2024; pp 1–6. https://doi.org/10.1109/INCET61516.2024.10593371
Lokhande, N.; Thool, V.; Vikhe, P. Comparative Analysis of Different Plant Leaf Disease Classification and Detection Using CNN. In Proceedings of the 2024 International Conference on Recent Innovation in Smart and Sustainable Technology (ICRISST); Bengaluru, India, 2024; pp 1–4. https://doi.org/10.1109/ICRISST59181.2024.10921975
Kusuma, S.; Jothi, K. R. Early Betel Leaf Disease Detection Using Vision Transformer and Deep Learning Algorithms. Int. J. Inf. Technol. 2024, 16(1), 169–180. https://doi.org/10.1007/s41870-023-01647-3
Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR); Las Vegas, NV, USA, 2016; pp 779–788. https://doi.org/10.1109/CVPR.2016.91
Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y. M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934.
Jocher, G. Ultralytics YOLOv5, Version 7.0; Ultralytics, 2020. https://github.com/ultralytics/yolov5 (accessed 2025-12-13). https://doi.org/10.5281/zenodo.3908559
Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y. M. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); IEEE, 2023; pp 7464–7475. https://doi.org/10.1109/CVPR52729.2023.00721
Varghese, R.; Sambath, M. YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness. In Proceedings of the 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS); Chennai, India, 2024; pp 1–6. https://doi.org/10.1109/ADICS58448.2024.10533619
Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J. YOLOv10: Real-Time End-to-End Object Detection. Adv. Neural Inf. Process. Syst. 2024, 37, 107984–108011
Jocher, G.; Qiu, J. Ultralytics YOLO11, Version 11.0.0; Ultralytics, 2024. https://github.com/ultralytics/ultralytics (accessed 2025-12-13).
Ramesh, M.; Sherin, S. D.; Deepak A, V.; Dhanin, G.; Kodeeswari, K.; Nathiya, T. Tomato Plant Disease Classification with Pesticide Suggestion Using YOLOv8 Algorithm. In Proceedings of the 2025 3rd International Conference on Advancements in Electrical, Electronics, Communication, Computing and Automation (ICAECA); Coimbatore, India, 2025; pp 1–6. https://doi.org/10.1109/ICAECA63854.2025.11012147
Wei, Y.; Pan, X. Improvement Algorithm Analysis and Implementation of Plant Disease and Pest Recognition Based on YOLO. In Proceedings of the 5th International Conference on Computer Vision, Image and Deep Learning (CVIDL 2024); Zhuhai, China, 2024; pp 442–446. https://doi.org/10.1109/CVIDL62147.2024.10603557
Pathan, F.; Sakalle, V.; Munir, S. An Efficient Machine Learning Technique for Agricultural Plant Leaf Disease Prediction Using Image Processing. In Proceedings of the 2025 International Conference on Engineering Innovations and Technologies (ICoEIT); Bhopal, India, 2025; pp 612–617. https://doi.org/10.1109/ICoEIT63558.2025.11211659
David, F.; Mukunthan, M. A. Betel Leaf Diseases Classification Using Machine Learning Algorithm: A Feasible Approach. J. Adv. Res. Appl. Sci. Eng. Technol. 2024, 40(1), 74–86. https://doi.org/10.37934/araset.40.1.7486
Mamart, S.; Sangamuang, S.; Sugunnasil, P. Deep Learning-Based Classification of Apple Leaf Diseases under Field Conditions. ASEAN J. Sci. Technol. Rep. 2026, 29(3), e261221. https://doi.org/10.55164/ajstr.v29i3.261221
Yu, J.; Jiang, Y.; Wang, Z.; Cao, Z.; Huang, T. UnitBox: An Advanced Object Detection Network. In Proceedings of the 24th ACM International Conference on Multimedia; ACM: New York, NY, 2016; pp 516–520. https://doi.org/10.1145/2964284.2967274
Rezatofighi, H.; Tsoi, N.; Gwak, J. Y.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized Intersection over Union: A Metric and a Loss for Bounding Box Regression. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR); Long Beach, CA, USA, 2019; pp 658–666. https://doi.org/10.1109/CVPR.2019.00075
Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R.; Ren, D. Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression. Proc. AAAI Conf. Artif. Intell. 2020, 34(7), 12993–13000. https://doi.org/10.1609/aaai.v34i07.6999
Zheng, Z.; Wang, P.; Ren, D.; Liu, W.; Ye, R.; Hu, Q.; Zuo, W. Enhancing Geometric Factors in Model Learning and Inference for Object Detection and Instance Segmentation. IEEE Trans. Cybern. 2022, 52(8), 8574–8586. https://doi.org/10.48550/arXiv.2005.03572
Yang, Z.; Wang, X.; Li, J. EIoU: An Improved Vehicle Detection Algorithm Based on VehicleNet Neural Network. J. Phys.: Conf. Ser. 2021, 1924 (1), 012001. https://doi.org/10.1088/1742-6596/1924/1/012001.
Sun, Y.; Wang, J.; Wang, H.; Zhang, S.; You, Y.; Yu, Z.; Peng, Y. Fused-IoU Loss: Efficient Learning for Accurate Bounding Box Regression. IEEE Access 2024, 12, 37363–37377. https://doi.org/10.1109/ACCESS.2024.3359433
Xiao, Z.; Zhao, H.; Guo, J.; Yu, H.; Li, J. CRIoU: A Complete and Relevant Bounding Box Regression Method. In Proceedings of the 2022 International Symposium on Advances in Informatics, Electronics and Education (ISAIEE); IEEE: Piscataway, NJ, 2022; pp 511–518. https://doi.org/10.1109/ISAIEE57420.2022.00111
Gevorgyan, Z. SIoU Loss: More Powerful Learning for Bounding Box Regression. arXiv 2022, arXiv:2205.12740.
Ma, S.; Xu, Y. MPDIoU: A Loss for Efficient and Accurate Bounding Box Regression. arXiv 2023, arXiv:2307.07662.
Zheng, Y.; Zhang, D.; Xie, S.; Lu, J.; Zhou, J. Rotation-Robust Intersection over Union for 3D Object Detection. In Computer Vision – ECCV 2020; Springer: Cham, Switzerland, 2020; pp 464–480. https://doi.org/10.1007/978-3-030-58565-5_28
Ma, S.; Xu, Y. FPDIoU Loss: A Loss Function for Efficient Bounding Box Regression of Rotated Object Detection. Image Vis. Comput. 2025, 154, 105381. https://doi.org/10.1016/j.imavis.2024.105381.
Li, W.; Shang, R.; Ju, Z.; Feng, J.; Xu, S.; Zhang, W. Ellipse IoU Loss: Better Learning for Rotated Bounding Box Regression. IEEE Geosci. Remote Sens. Lett. 2024, 21, 1–5. https://doi.org/10.1109/LGRS.2023.334588