Lyu S, Chen Y C, Gao P, Liu X Y, Li Z, Chen J Y, et al. Optimization hyperparameters of YOLO using the coati algorithm for detecting and counting unripe citrus fruits. Int J Agric & Biol Eng, 2026; 19(4): 268–281. DOI: 10.25165/j.ijabe.20261904.9599
Citation: Lyu S, Chen Y C, Gao P, Liu X Y, Li Z, Chen J Y, et al. Optimization hyperparameters of YOLO using the coati algorithm for detecting and counting unripe citrus fruits. Int J Agric & Biol Eng, 2026; 19(4): 268–281. DOI: 10.25165/j.ijabe.20261904.9599

Optimization hyperparameters of YOLO using the coati algorithm for detecting and counting unripe citrus fruits

  • Real-time inspection of citrus orchards can provide reliable support for production management processes, such as fruit thinning and setting, sunburn prevention and control, and yield prediction. To address problems such as the difficulty of identifying unripe citrus fruits in a natural environment and the high labor cost of counting, this study proposes an unripe citrus fruit detection, tracking, and counting algorithm based on YOLOv7-tiny-Convolutional Block Attention Module-Wise IoU (YOLO-CW) combined with StrongSORT. First, to improve the feature extraction ability of the model for unripe citrus fruits in small targets and complex backgrounds, this study employed YOLOv7-tiny as the baseline model. The Convolutional Block Attention Module (CBAM) was integrated into the ELAN-T module ahead of the P3 detection head in YOLOv7-tiny and redesigned as the ELAN-TC module. Second, the loss function CIoU in YOLOv7-tiny was replaced with Wise IoUv3 to improve the model’s ability to detect overlapping unripe citrus fruits in complex backgrounds, thereby reducing the impact of harmful gradients produced by low-quality unripe citrus fruit samples. Third, to address the challenge of hyperparameter optimization that relies on experience and manpower, this study employed the Coati Optimization Algorithm (COA) to optimize the hyperparameters of the model, further enhancing detection accuracy. Finally, the YOLO-CW model was ported to an edge computing platform, enabling real-time data collection of unripe citrus fruits using multiple wireless IP cameras. The collected data were tracked and counted using StrongSORT. The experimental results demonstrate that the Precision and mAP@0.5 of the YOLO-CW model optimized by COA were 93.80% and 96.62%, respectively. Compared to the baseline model YOLOv7-tiny, the YOLO-CW model exhibited improvements of 1.68% in Precision and 0.71% in mAP@0.5. The YOLO-CW model’s Computation and Parameters were 13.2 GFlops and 6.01×106, respectively. Compared to the baseline model YOLOv7-tiny is reduced by 5.03% and 3.53%. An edge computing platform and a dual-channel wireless IP camera were used for image acquisition and processing to evaluate the performance of the proposed YOLO-CW model in tracking and counting unripe citrus fruits. The results indicate that the average frame rate was 23 FPS and the overall system power consumption was 17.11 W. Compared to the baseline model YOLOv7-tiny has 10% increase in average frame rate and 7.62% reduction in power consumption. These findings indicate that the proposed model can track and count unripe citrus fruits in real time in natural environments, providing valuable theoretical support for citrus yield assessment.
  • loading

Catalog

    Turn off MathJax
    Article Contents

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return