Abstract

A method for counting the number of citrus fruits based on the improved YOLOv5s algorithm combined with the DeepSort tracking algorithm is proposed to address the problem of the low accuracy of counting citrus fruits due to shading and lighting factors in videos taken in orchards. In order to improve the recognition of citrus fruits, the attention module CBAM is fused with the backbone part of the YOLOv5s network, and the Contextual Transformer self-attention module is incorporated into the backbone network; meanwhile, SIoU is used as the new loss function instead of GIoU to further improve the accuracy of detection and to better keep the model in real time. Then, it is combined with the DeepSort algorithm to realize the counting of citrus fruits. The experimental results demonstrated that the average recognition accuracy of the improved YOLOv5s algorithm for citrus fruits improved by 3.51% compared with the original algorithm, and the average multi-target tracking accuracy for citrus fruits combined with the DeepSort algorithm was 90.83%, indicating that the improved algorithm has a higher recognition accuracy and counting precision in a complex environment, and has a better real-time performance, which can effectively achieve the real-time detection and tracking counting of citrus fruits. However, the improved algorithm has a reduced real-time performance and has difficulty in distinguishing whether or not the fruit is ripe.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call