Skip to main content
Log in

A passion fruit counting method based on the lightweight YOLOv5s and improved DeepSORT

  • Published:
Precision Agriculture Aims and scope Submit manuscript

Abstract

Accurate yield estimation of passion fruits is essential for planning acreage and harvest timing. However, due to the complexity of the natural environment and tracking instability, the existing yield estimation methods suffer from excessively large models that are difficult to deploy or repetitive counting of fruit. Therefore, an improved approach for efficient passion fruit yield estimation was proposed using the lightweight YOLOv5s and improved DeepSORT. First, the video is fed into the proposed lightweight YOLOv5s called YOLOv5s-little to obtain coordinates and confidence information about the fruits within each frame. Then, the information obtained from the detection model is input into improved DeepSORT for continuous frame tracking of passion fruit. Considering the frequent error IDs (ID switching), two improvements based on DeepSORT are proposed: delaying the creation of tracks and adding a second round of IoU matching. Finally, to overcome the problem of repetitive counting, a specific tracking counting method based on the track information and state is used for accurate passion fruit counting. Our method achieved a competitive result in tests. YOLOv5s-little detector achieved precision of 98.9%, 98.3% recall, 99.5% mAP, and only 0.9MB model size. The improved DeepSORT algorithm achieved higher order tracking accuracy (HOTA) of 79.6%, multi-object tracking accuracy (MOTA) of 92.58%, identification F1 (IDF1) of 95.02%, and ID switch (IDSW) of 11 respectively. Compared with DeepSORT, it improved by 4.66%, 1.8%, and 9.16% in HOTA, MOTA and IDF1, respectively, and IDSW improved the most with 85%. Compared with FairMOT and TransTrack, the HOTA of YOLOv5s-little + improved DeepSORT achieved improvements of 11.56% and 25.24%, respectively. The statistical average counting accuracy of our proposed counting method reaches 95.1%, which is a 7.09% improvement over the maximum ID value counting method. The counting results from test videos are highly correlated with the manual counting results (\({\text{R}}^{2}\) = 0.96), indicating that the counting method has high accuracy and effectiveness. These results show that YOLOv5s-little + improved DeepSORT can meet the practical needs of passion fruit yield estimation in real scenarios.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

Download references

Funding

Funding was provided by National Natural Science Foundation of China (Grant Nos. 61772209, 31600591), Science and Technology Planning Project of Guangdong Province (Grant No. 2019A050510034), National College Students Innovation and Entrepreneurship Training Program (Grant No. 202110564025), Key Research and Development Program of Guangzhou (No. 2024B03J1358).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yun Liang.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Tu, S., Huang, Y., Liang, Y. et al. A passion fruit counting method based on the lightweight YOLOv5s and improved DeepSORT. Precision Agric (2024). https://doi.org/10.1007/s11119-024-10132-1

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11119-024-10132-1

Keywords

Navigation