Abstract:Aiming to address the issue of insufficient target feature extraction and low recognition accuracy due to the low saliency of individual wheat ears in images, an improved YOLO v8-TRP wheat ear recognition method based on YOLO v8n was proposed. A triple attention fusion (TAF) module before the backbone network was designed, which combined multi-head self-attention (MHSA), pixel attention (PA), and channel attention (CA) to fully enhance the contrast between the wheat ear target and the complex background without destroying the detailed information of the wheat ear. Additionally, the receptive field attention convolution (RFAConv) and CBAM attention mechanism were introduced to improve the convolution module in the backbone network, enabling the model to weight the wheat ear target within the receptive field when extracting features, effectively enhancing the model’s feature extraction ability and recall rate for the wheat ear target. Moreover, a P2 small target layer was added to the neck and head of the model to improve the model’s ability to detect small targets and the precision rate. Experimental results showed that on the Global Wheat Head Detection 2021 (GWHD2021) public dataset, the mean average precision of the improved model reached 92.5%, an increase of 2.9 percentage points compared with that of the original model. The mean average precision of the improved model on the public datasets WEDD, Spike, RGWHD, ACID, and the self-built dataset HBAUW (Hebei Agricultural University Wheat)was on average 4.6 percentage points higher than that of the original model, fully demonstrating that this model can effectively improve the detection accuracy of wheat ears in complex backgrounds.