Lightweight pineapple detection framework for agricultural robots via YOLO-v5sp

Authors

  • Jiehao Li 1. College of Engineering, South China Agricultural University, Guangzhou 510642, China 2. School of Computer Science and Engineering, South China University of Technology, Guangzhou 510641, China
  • Chenglin Li 1. College of Engineering, South China Agricultural University, Guangzhou 510642, China
  • Xiwen Luo 1. College of Engineering, South China Agricultural University, Guangzhou 510642, China
  • C. L. Philip Chen 2. School of Computer Science and Engineering, South China University of Technology, Guangzhou 510641, China
  • Chenguang Yang 3. Department of Computer Science, University of Liverpool, Liverpool L693BX, United Kingdom

DOI:

https://doi.org/10.25165/ijabe.v18i3.8984

Keywords:

deep learning, target detection, lightweight networks, pineapple, YOLOv5s

Abstract

Ensuring the accurate detection of pineapple fruits under the high planting density and serious homogenization represents a current and significant challenge. In this study, an enhanced lightweight detection framework, derived from the improved You Only Look Once version 5s (YOLOv5sp), is investigated in terms of the rapid and precise recognition of pineapple fruit for the agricultural robot. Three Convolutional Block Attention Module (CBAM) attention modules are considered the backbone network responsible for feature extraction, and the SIoU loss function is introduced to replace the CIoU loss function to handle the orientation angle and the penalization index. Eventually, the designed YOLOv5sp detection result of the mAP@0.5 value is 94.5%, which is 6.30% higher than YOLOv4, 1.83% higher than Faster R-CNN, and 6.90% higher than classical YOLOv5s. At the same time, compared with the models SHFP-YOLO and RGDP-YOLOv7-tiny in other pineapple detection literature, the mAP@0.5 of the designed model is 4.54% and 3.5% higher, respectively. Furthermore, when it comes to the agricultural robot operating in diverse natural situations, the YOLOv5sp algorithm can maintain a successful picking rate of 90% with an average time of 15 s, exhibiting the effectiveness of the visual component in engineering scenarios. These research results can accelerate the transition of pineapple harvesting from manual to automated operations. Keywords: deep learning, target detection, lightweight networks, pineapple, YOLOv5s DOI: 10.25165/j.ijabe.20251803.8984 Citation: Li J H, Li C L, Luo X W, Chen J L P, Yang C G. Lightweight pineapple detection framework for agricultural robots via YOLO-v5sp. Int J Agric & Biol Eng, 2025; 18(3): 204–214.

References

Hossain M. World pineapple production: An overview. African Journal of Food, Agriculture, Nutrition and Development, 2016; 16(4): 11443-11456.

Li H F, Li G B, Yang B B, Chen G Q, Lin L, Yu Y Z. Depthwise nonlocal module for fast salient object detection using a single thread. IEEE Transactions on Cybernetics, 2020; 51(12): 6188-6199.

Chen H, Li Y F, Su D. Discriminative cross-modal transfer learning and densely cross-level feedback fusion for RGB-D salient object detection. IEEE Transactions on Cybernetics, 2019; 50(11): 4808-4820.

Zhang L Z, Tang S, Li P, Cui S, Guo H L, Wang F C. Structure design of a semi-automatic pineapple picking machine. IOP Conference Series: Materials Science and Engineering, 2018; 452: 042155.

Lan R S, Sun L, Liu Z B, Lu H M, Pang C, Luo X N. Madnet: A fast and lightweight network for single-image super resolution. IEEE Transactions on Cybernetics, 2021; 51(3): 1443-1453.

Tang M, Liao H C, Herrera-Viedma E, Chen C L P, Pedrycz W. A dynamic adaptive subgroup-to-subgroup compatibility-based conflict detection and resolution model for multicriteria large-scale group decision making. IEEE Transactions on Cybernetics, 2020; 51(10): 4784-4795.

Li J, Qin H, Wang J Z, Li J H. Openstreetmap-based autonomous navigation for the four wheel-legged robot via 3d-lidar and CCD camera. IEEE Transactions on Industrial Electronics, 2022; 69(3): 2708-2717.

Lu Y Z, Young S. A survey of public datasets for computer vision tasks in precision agriculture. Computers and Electronics in Agriculture, 2020; 178: 105760.

Cong Y, Chen R H, Ma B T, Liu H S, Hou D D, Yang C G. A comprehensive study of 3-D vision-based robot manipulation. IEEE Transactions on Cybernetics, 2023; 53(3): 1682-1698.

Anh N P T, Hoang S, Van Tai D, Le B, Quoc C. Developing robotic system for harvesting pineapples. In: 2020 International Conference on Advanced Mechatronic Systems (ICAMechS), Hanoi, Vietnam: IEEE, 2020; pp.39-44.

Zhao Z Q, Zheng P, Xu S T, Wu X D. Object detection with deep learning: A review. IEEE Transactions on Neural Networks and Learning Systems, 2019; 30(11): 3212-3232.

Liu Y F, Cheng L. Relentless false data injection attacks against Kalman-filter-based detection in smart grid. IEEE Transactions on Control of Network Systems, 2022; 9(3): 1238-1250.

Li Y, Ma L F, Zhong Z L, Liu F, Chapman M A, Cao D P. Deep learning for lidar point clouds in autonomous driving: A review. IEEE Transactions on Neural Networks and Learning Systems, 2021; 32(8): 3412-3432.

Yang C G, Chen C Z, He W, Cui R X, Li Z J. Robot learning system based on adaptive neural control and dynamic movement primitives. IEEE Transactions on Neural Networks and Learning Systems, 2019; 30(3): 777-787.

Wang X, Chen H, Gan C X, Lin H J, Dou Q, Tsougenis E, Huang Q T, et al. Weakly supervised deep learning for whole slide lung cancer image analysis. IEEE Transactions on Cybernetics, 2020; 50(9): 3950-3962.

Li J H, Dai Y P, Wang J Z, Su X H, Ma R J, Towards broad learning networks on unmanned mobile robot for semantic segmentation. In: 2022 International Conference on Robotics and Automation (ICRA). Philadelphia, PA, USA: IEEE, 2022; pp.9228-9234.

Zhuang J J, Luo S M, Hou C J, Tang Y, He Y, Xue X Y. Detection of orchard citrus fruits using a monocular machine vision-based method for automatic fruit picking applications. Computers and Electronics in Agriculture, 2018; 152: 64-73.

Kim J-y, Vogl M, Kim S-D. A code based fruit recognition method via image convertion using multiple features. In: 2014 International Conference on IT Convergence and Security (ICITCS), Beijing, China: IEEE, 2014; pp.1-4.

Liu T H, Ehsani R, Toudeshki A, Zou X J, Wang H J. Identifying immature and mature pomelo fruits in trees by elliptical model fitting in the Cr-Cb color space. Precision Agriculture, 2019; 20: 138-156.

Li J, Li J H, Zhao X, Su X H, Wu W B. Lightweight detection networks for tea bud on complex agricultural environment via improved YOLO v4. Computers and Electronics in Agriculture, 2023; 211: 107955.

Tang Y C, Qiu J J, Zhang Y Q, Wu D X, Cao Y H, Zhao K X, et al. Optimization strategies of fruit detection to overcome the challenge of unstructured background in field orchard environment: A review. Precision Agriculture, 2023; 24(4): 1183-1219.

Xiao F, Wang H B, Xu Y Q, Zhang R Q. Fruit detection and recognition based on deep learning for automatic harvesting: An overview and review. Agronomy, 2023; 13(6): 1625.

Gupta S, Tripathi A K. Fruit and vegetable disease detection and classification: Recent trends, challenges, and future opportunities. Engineering Applications of Artificial Intelligence, 2024; 133: 108260.

Li J H, Li C L, Zeng S, Luo X W, Chen C P, and Yang C G. A lightweight pineapple detection network based on YOLOv7-tiny for agricultural robot system. Computers and Electronics in Agriculture, 2025; 231: 109944. doi. org/10.1016/j. compag. 2025.109944.

Li, J H, Zhang T, Luo Q F, Zeng S, Luo X W, Chen C P, et al. A lightweight palm fruit detection network for harvesting equipment integrates binocular depth matching. Computers and Electronics in Agriculture, 2025; 233:110061. doi.org/10.1016/j.compag.2025.110061.

Zhu A, Zhang R R, Zhang L H, Yi T C, Wang L W, Zhang D Z, et al. YOLOv5s-CEDB: A robust and efficiency camellia oleifera fruit detection algorithm in complex natural scenes. Computers and Electronics in Agriculture, 2024; 221: 108984.

Li H W, Gu Z N, He D Q, Wang X C, Huang J D, Mo Y M, et al. A lightweight improved YOLOv5s model and its deployment for detecting pitaya fruits in daytime and nighttime light-supplement environments. Computers and Electronics in Agriculture, 2024; 220: 108914.

Wu M C, Yuan K, Shui Y Q, Wang Q, Zhao Z X. A lightweight method for ripeness detection and counting of chinese flowering cabbage in the natural environment. Agronomy, 2024; 14(8): 1835.

Fu L S, Feng Y L, Wu J Z, Liu Z H, Gao F F, Majeed Y, et al. Fast and accurate detection of kiwifruit in orchard using improved yolov3-tiny model. Precision Agriculture, 2021; 22: 754-776.

Zhang X, Gao Q M, Pan D, Cao P C, Huang D H. Research on spatial positioning system of fruits to be picked in field based on binocular vision and SSD model. Journal of Physics: Conference Series, 2021; 1748: 042011.

Liu T H, Nie X N, Wu J M, Zhang D, Liu W, Cheng Y F, et al. Pineapple (Ananas comosus) fruit detection and localization in natural environment based on binocular stereo vision and improved YOLOv3 model. Precision Agriculture, 2023; 24: 139-160.

Zhu X Y, Chen F J, Zheng Y L, Chen C, Peng X D. Detection of Camellia oleifera fruit maturity in orchards based on modified lightweight YOLO. Computers and Electronics in Agriculture, 2024; 226: 109471.

Li H L, Li J, Wei H B, Liu Z, Zhan Z F, Ren Q L. Slim-neck by GSConv: A lightweight-design for real-time detector architectures. Journal of Real-Time Image Processing, 2024; 21(3): 62.

Yang H Y, Yang L, Wu T, Yuan Y J, Li J C, Li P. MFD-YOLO: A fast and lightweight model for strawberry growth state detection. Computers and Electronics in Agriculture, 2025; 234: 110177.

Wang Y, Yan G, Meng Q L, Yao T, Han J F, Zhang B. DSE-YOLO: detail semantics enhancement YOLO for multi-stage strawberry detection. Computers and Electronics in Agriculture, 2022; 198: 107057.

Bai Y F, Yu J Z, Yang S Q, Ning J F. An improved YOLO algorithm for detecting flowers and fruits on strawberry seedlings. Biosystems Engineering, 2024; 237: 1-12.

Ma B L, Hua Z X, Wen Y C, Deng H X, Zhao Y J, Pu L R, et al. Using an improved lightweight YOLOv8 model for real-time detection of multi-stage apple fruit in complex orchard environments. Artificial Intelligence in Agriculture, 2024; 11: 70-82.

Bailly A, Blanc C, Francis É, Guillotin T, Jamal F, Wakim B, et al. Effects of dataset size and interactions on the prediction performance of logistic regression and deep learning models. Computer Methods and Programs in Biomedicine, 2022; 213: 106504.

Bargoti S, Underwood J P. Image segmentation for fruit detection and yield estimation in apple orchards. Journal of Field Robotics, 2017; 34(6): 1039-1060.

Singh G, Mittal A. Various image enhancement techniques- A critical review. International Journal of Innovation and Scientific Research, 2014; 10: 267-274.

Jocher G, Nishimura K, Mineeva T, Vilari R. no. yolov5. Code repository, 2020. Available: https://github.com/ultralytics/yolov5. Accessed on [2024-03-20].

Wang C Y, Liao H M, Wu Y H, Chen P Y, Hsieh J-W, et al. CSPNet: A new backbone that can enhance learning capability of CNN. In: 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Seattle, WA, USA: IEEE, 2020; pp.390-391.

Gevorgyan Z. SIoU loss: More powerful learning for bounding box regression. arXiv: 2205.12740, 2022; in Press. doi: 10.48550/arXiv.2205.12740.

Yu G, Tao W, Guo G Q, Liu H C. SFHG-YOLO: A simple real-time small-object-detection method for estimating pineapple yield from unmanned aerial vehicles. Sensors, 2023; 23(22): 9242.

Li J H, Liu Y W, Li C L, Luo Q F, Lu J H. Pineapple detection with YOLOV7-tiny network model improved via pruning and a lightweight backbone sub-network. Remote Sensing, 2024; 16(15): 2805.

Peng G Z, Chen C L P, Yang C G. Robust admittance control of optimized robot-environment interaction using reference adaptation. IEEE Transactions on Neural Networks and Learning Systems, 2022; 34(9): 5804-5815.

Dong S L, Chen C L P, Fang M, Wu Z G. Dissipativity-based asynchronous fuzzy sliding mode control for T-S fuzzy hidden markov jump systems. IEEE Transactions on Cybernetics, 2020; 50(9): 4020-4030.

Li J H, Zeng D Z, Luo Q F, Luo X W, Chen C P, and Yang C G. Feature Assessment and Enhanced Vertical Constraint Lidar Odometry and Mapping on Quadruped Robot. IEEE Transactions on Instrumentation and Measurement, 2025; 74: 3533649.

Downloads

Published

2025-06-30

How to Cite

Li, J., Li, C., Luo, X., Chen, C. L. P., & Yang, C. (2025). Lightweight pineapple detection framework for agricultural robots via YOLO-v5sp. International Journal of Agricultural and Biological Engineering, 18(3), 204–214. https://doi.org/10.25165/ijabe.v18i3.8984

Issue

Section

Information Technology, Sensors and Control Systems