Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Plant Sci.

Sec. Technical Advances in Plant Science

This article is part of the Research TopicAdvances in Fruit-Growing Systems as a Key Factor of Successful Production: Volume IIView all 5 articles

Maturity detection and counting of blueberries in real orchards using a 1novel STF-YOLO model integrated with ByteTrack algorithm

Provisionally accepted
  • 1Zhejiang University of Science and Technology, Hangzhou, China
  • 2Zhejiang Hospital, Hangzhou, China
  • 3Hatanpään valtatie 34 C 33100 Tampere Finland, Tampere, Finland
  • 4Samara Federal Research Scientific Center of Russian Academy of Sciences, Samara, Russia

The final, formatted version of the article will be published soon.

Blueberries are highly prized for their nutritional value and economic importance. However, their small size, dense clustering and brief ripening period make them difficult to harvest efficiently. Manual picking is costly and error-prone, so there is an urgent need for automated, high-precision solutions in real orchards. We proposed an integrated framework that combined the STF-YOLO model with the ByteTrack algorithm to detect blueberry maturity and perform counting. Together with ByteTrack, it provided consistent fruit counts in video streams. STF-YOLO replaced the YOLOv8 C2f block with a Detail Situational Awareness Attention (DSAA) module to enable more precise discrimination of maturity. It also incorporated an Adaptive Edge Fusion (AEF) neck to enhance edge cues under leaf occlusion and a Multi-scale Neck Structure (MNS) to aggregate richer context. Additionally, it adopted a Shared Differential Convolution Head (SDCH) to reduce parameters while preserving accuracy. On our orchard dataset, the model achieved an mAP50 of 79.7%, representing a 3.5% improvement over YOLOv8. When combined with ByteTrack, it attained an average counting accuracy of 72.49% across blue, purple, and green maturity classes in video sequences. Cross-dataset tests further confirmed its robustness. On the MegaFruit benchmark (close-range images), STF-YOLO achieved the highest mAP50 for peaches (91.6%), strawberries (70.5%) and blueberries (90.6%). On the heterogeneous PASCAL VOC2007 dataset, it achieved 66.3% mAP50, outperforming all lightweight YOLO variants across 20 everyday object categories. Overall, these results suggest that the STF-YOLO integrated with ByteTrack framework can accurately detect and count blueberries in orchards. This lays a solid foundation for the future development of automated blueberry harvesting machinery and improvements in harvest efficiency.

Keywords: Fruit detection, Fruit counting, target detection, YOLO, Blueberry

Received: 08 Aug 2025; Accepted: 06 Nov 2025.

Copyright: © 2025 Wu, Wu, Wang, Zhao, Xu, Wang, Mi and Skobelev. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence:
Yun Zhao, yunzhao@zust.edu.cn
Xing Xu, xuxing@zust.edu.cn

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.