Abstract
In wheat breeding, the number of spike grains is a key indicator for evaluating wheat yield, and timely and accurate detection of wheat spike grain is of great practical significance for yield estimation. However, in actual field production, the counting of spike grain still relies on manual counting after threshing, which poses problems such as complex measurement processes, time-consuming and laborious. At present, achieving automated and intelligent detection of wheat spike grain still faces significant challenge. Therefore, the focus of this study is to use the most advanced computer vision technology for fast and automatic detection of wheat spike grain. During the wheat filling stage, a total of 936 wheat spike grain images were collected, and these images were expanded through data augmentation to ultimately obtain 3700 wheat spike grain images. According to the partition ratio of the small scale dataset, 80% of the 3700 images are used for training, 10% for validation, and the remaining 10% for testing. This study selected six state-of-the-art deep learning models: YOLOv8n, YOLOv8s, YOLOv8m, YOLOv8l, YOLOv8x, and Faster R-CNN. In all wheat spike grain test, YOLOv8n showed high precision, recall, mAP50, and mAP50-95, with values of 96.8%, 96.8%, 98.9%, and 58.4%, respectively. The precision of other models was 96.7% for YOLOv8m, 96.5% for YOLOv8s, 96.3% for YOLOv8l, 96.2% for YOLOv8x, and 95.7% for Faster R-CNN. YOLOv8n not only has a lower number of parameters, FLOPs, inference time, model size, and GPU memory usage, as well as higher detection precision in wheat spike grain counting tasks, fully meet the spike grain counting requirements of wheat breeding. The multi-scale feature fusion and lightweight computing of YOLOv8n help improve model performance, and its performance is better compared to other deep learning models. This study designed and implemented a WeChat mini program for wheat spike grain counting, so as to achieve automatic detection and counting of wheat spike grains, which provided valuable reference for grain detection, counting, and yield estimation of other crops.