Complex & Intelligent Systems (Oct 2023)

A-pruning: a lightweight pineapple flower counting network based on filter pruning

  • Guoyan Yu,
  • Ruilin Cai,
  • Yingtong Luo,
  • Mingxin Hou,
  • Ruoling Deng

DOI
https://doi.org/10.1007/s40747-023-01261-7
Journal volume & issue
Vol. 10, no. 2
pp. 2047 – 2066

Abstract

Read online

Abstract During pineapple cultivation, detecting and counting the number of pineapple flowers in real time and estimating the yield are essential. Deep learning methods are more efficient in real-time performance than traditional manual detection. However, existing deep learning models are characterized by low detection speeds and cannot be applied in real time on mobile devices. This paper presents a lightweight model in which filter pruning compresses the YOLOv5 network. An adaptive batch normalization layer evaluation mechanism is introduced to the pruning process to evaluate the performance of the subnetwork. With this approach, the network with the best performance can be found quickly after pruning. Then, an efficient channel attention mechanism is added for the pruned network to constitute a new YOLOv5_E network. Our findings demonstrate that the proposed YOLOv5_E network attains an accuracy of 71.7% with a mere 1.7 M parameters, a model size of 3.8 MB, and an impressive running speed of 178 frames per second. Compared to the original YOLOv5, YOLOv5_E shows a 0.9% marginal decrease in accuracy; while, the number of parameters and the model size are reduced by 75.8% and 73.8%, respectively. Moreover, the running speed of YOLOv5_E is nearly twice that of the original. Among the ten networks evaluated, YOLOv5_E boasts the fastest detection speed and ranks second in detection accuracy. Furthermore, YOLOv5_E can be integrated with StrongSORT for real-time detection and counting on mobile devices. We validated this on the NVIDIA Jetson Xavier NX development board, where it achieved an average detection speed of 24 frames per second. The proposed YOLOv5_E network can be effectively used on agricultural equipment such as unmanned aerial vehicles, providing technical support for the detection and counting of crops on mobile devices.

Keywords