HUBEI AGRICULTURAL SCIENCES ›› 2026, Vol. 65 ›› Issue (5): 196-204.doi: 10.14088/j.cnki.issn0439-8114.2026.05.030

• Agricultural Engineering • Previous Articles     Next Articles

Research on the whole life cycle target detection of pitaya in natural environment based on improved YOLOv5s

ZOU Wei, LI Li-jie, YUE Yan-bin, HAN Wei, WANG Hu, ZHAO Ze-ying   

  1. Guizhou Agricultural Science and Technology Information Institute,Guiyang 550006,China
  • Received:2026-02-06 Online:2026-05-25 Published:2026-05-26

Abstract: To address the challenges of traditional orchard management that heavily relied on manual labor and the difficulties in rapidly identifying pitaya fruits at different growth stages across large-scale orchards, this study categorized pitaya growth stages into seven distinct phases based on its developmental characteristics. Firstly, the dataset was augmented using a Generative Adversarial Network (WGAN-GP) with conditional discrimination mechanisms to enhance rare sample representation and improve dataset balance. Secondly, building upon the YOLOv5s object detection framework, the core architecture was replaced with the lightweight MobileViT network to maintain detection accuracy while significantly accelerating model inference speed. The experimental results demonstrated that the enhanced model with the optimized dataset and network architecture achieved a precision of 85.7% and a recall rate of 77.6% on the test set, which increased by 2.5 and 0.9 percentage points compared to the original model, respectively. The average detection time of a single image was 18.64 ms, which was 3.87 ms shorter than the YOLOv5s model, and the improved detection network achieved a mAP50 value of 82.5%, a mAP50-95 value of 62.4%, while the model size was 5.87×106. This system could achieve real-time detection of pitaya in natural environments and provide a feasible visual inspection solution for subsequent monitoring of pitaya growth status and automated operations.

Key words: pitaya, whole life cycle, YOLOv5s, WGAN-GP, MobileViT, object detection

CLC Number: