A Lightweight SOD-YOLOv5n Model-Based Winter Jujube Detection and Counting Method Deployed on Android

Chenhao Yu,Junzhe Feng,Zhouzhou Zheng,Jiapan Guo,Yaohua Hu
DOI: https://doi.org/10.1016/j.compag.2024.108701
IF: 8.3
2024-01-01
Computers and Electronics in Agriculture
Abstract:Accurately detecting and counting winter jujubes during the initial ripening stages are crucial for estimating yields and devising preemptive harvesting strategies. However, it can be challenging to accurately detect and count winter jujubes in orchards due to factors such as complex weather conditions and the potential for mutual obscuring between leaves and jujubes. In this study, we propose a lightweight small object detection YOLOv5n (SOD-YOLOv5n) model based on the YOLOv5n model for detecting and counting winter jujubes. The improvements to the model include using SPD-Conv to replace strided convolution and pooling layers to better detect small targets and low-resolution images. Then the upsampling algorithm of YOLOv5n is optimized using the content-aware reassembly of features (CARAFE) module, which enables adaptive and optimized kernel recombination at different locations, resulting in improved performance. Finally, a lightweight convolution technique, GSConv, is used in the neck to reduce the model size and maintain high accuracy. The experimental results show that the SOD-YOLOv5n model has higher counting accuracy than the YOLOv5n model, with improvements of 2.40 %, 1.80 %, and 3.00 % in precision, recall, and mAP, respectively, and a reduction of 9.11 % and 5.30 % in RMSE and MAPE, respectively. The size of the SOD-YOLOv5n model is 3.64 MB, which is reduced by 16.51 % using float16 quantization. The quantized model is used to build an app named JujubeDetector. We propose a method for counting winter jujubes based on this app, and we obtain a root mean square error (RMSE) of 1.46, coefficient of determination (R2) of 0.97, and detection time of 30 ms-90 ms from experiments in orchards. Our approach can effectively meet the requirements for real-time detecting and counting winter jujubes and provide a reference for detecting and counting other small object fruits.
What problem does this paper attempt to address?