# Study on automatic detection of wheat spike grain number based on deep learning

**Authors:** Hecang Zang, Yanjing Wang, Shengwei Wang, Shuai Ren, Yandong Yang, Jie Zhang, Qing Zhao

PMC · DOI: 10.3389/fpls.2026.1724501 · 2026-02-25

## TL;DR

This study uses deep learning to automatically count wheat spike grains, improving efficiency and accuracy in wheat yield estimation.

## Contribution

The study introduces a WeChat mini program using YOLOv8n for efficient and accurate wheat spike grain counting.

## Key findings

- YOLOv8n achieved 96.8% precision and 98.9% mAP50 in wheat spike grain detection.
- The WeChat mini program enables automatic counting of wheat spike grains in the field.
- YOLOv8n outperformed other models with lower computational requirements and higher accuracy.

## 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.

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12975923/full.md

---
Source: https://tomesphere.com/paper/PMC12975923