Biologyarticle2026-08-05

YOLOv8-EMA-P2: An Enhanced Deep Learning Framework for Wheat Grain Detection and Counting from Single-Spike Images

Open access0 citations

Abstract

The number of grains per spike is a critical determinant of wheat yield and plays an important role in phenotyping, breeding evaluation, and yield-related trait analysis. However, conventional grain counting methods rely on manual operation, which is time-consuming, labor-intensive, and prone to subjective bias, making them unsuitable for high-throughput applications. To address these limitations, this study proposes an improved wheat grain detection and counting method based on YOLOv8 integrated with a P2 detection layer and an Efficient Multi-Scale Attention (EMA) mechanism. The P2 detection layer enhances the resolution of shallow feature maps, improving the model’s ability to detect small and densely distributed grains. Meanwhile, the EMA module strengthens multi-scale feature representation and improves training stability and generalization performance, particularly in complex canopy and overlapping grain scenarios. Experimental results demonstrate that the proposed YOLOv8-EMA-P2 model achieves a precision of 96.10%, recall of 95.60%, mAP@0.5 of 96.80%, and mAP@0.5:0.95 of 68.40% on the test set, indicating strong detection performance. For counting performance, the model achieves a coefficient of determination (R2) of 0.8384, with a root mean square error (RMSE) of 1.8517, mean absolute error (MAE) of 1.2628, and mean relative error (MRE) of 5.33%. In addition, the average inference time per image is 6.5 ms, demonstrating its potential for real-time applications. Overall, the proposed method improves the accuracy, robustness, and efficiency of wheat grain detection and counting, providing an effective solution for automated wheat phenotyping and yield estimation.

// Source

View paper (DOI)Open access versionOpenAlexAgriEngineeringPublished 2026-08-05

Authors: Cen Liu, Shuyao Shao, Zongjie Cai, Yue Cao, Chengming Sun

Institutions: Yangzhou University