# Wheat Ear Detection Algorithm Based on Improved YOLOv4
###### Abstract
trained region-based CNN to detect and count spike regions in each plot, outputting spike density and classification probability [18]. [PERSON] et al. utilized an object detector based on Faster-RCNN to estimate wheat ear density [19]. Two-stage detectors once took the lead in accuracy but are usually slower because of the complicated pipeline. One-stage detectors are more efficient and elegant with satisfactory accuracy. One-stage detectors often leverage the help of anchors and grid boxes to localize the region and constrain the shapes of the objects, to predict bounding boxes in a single step. There are various network architectures in this category; EfficientDet is a popular one [20]. [PERSON] et al. used an improved EfficientDet-D0 object detection model to identify and count wheat ears [16]. YOLO (You Only Look Once) [21] is another prominent object detection algorithm, which transforms the detection problem into a regression problem. Over time, the network evolved to form a YOLO family, including YOLOv2 [22], YOLOv3 [23], YOLOv4 [24], and other variants. The YOLO family detectors and their improvements are also used for wheat ear detection studies. YOLOv3 was very popular once it was proposed. [PERSON] et al. utilized YOLOv3 to detect wheat ears and used the characteristics of the bounding boxes to reconstruct the trajectories of wheat ears in videos [25]. [PERSON] et al. used YOLOv3 as the baseline architecture for wheat ear detection, and designed a lightweight network [26]. The backbone was replaced with CSPDarknet53 [27] in YOLOv4, and some features were added [24]. YOLOv4 was declared faster and more accurate. [PERSON] et al. added a convolutional block attention module to YOLOv4 to detect and count wheat ears in the field [28]. YOLOv5 is one of the state-of-the-art object detectors. [PERSON] et al. added a microscale detection layer and used adapting confidence loss function to make the network achieve better detection accuracy for wheat spike detection [29]. [PERSON] et al. used an implementation of YOLOv5 architecture to develop a semi-self-supervised learning approach for wheat head detection [30]. It can be concluded that object detectors are playing an increasingly important role in wheat ear detection. Although the methods mentioned above achieved the detection of wheat ears, there are still two types of challenges in wheat ear detection [26]. The first challenge comes from the environment in field conditions, including illuminating conditions leading to disturbing shadows and bright surfaces, wind conditions leading to blurring images, and observational conditions leading to object overlap and shape variation [31]. The second type is wheat inherent challenge, including different shapes and colors because of different genotypes, different tilting directions, and different growth stages. Therefore, even more research on wheat ear detection still needs to be carried out. The main goal of this work is to improve wheat ear detection performance in images taken under natural field conditions. The main contribution is to introduce three SPP blocks to the Neck of YOLOv4 to extract multi-scale features, thus improving the object detection performance. The improved model performs well compared with state-of-the-art results. The remainder of this paper is organized as follows. Section 2 briefly introduced the materials and the proposed improved method for wheat ear detection. Section 3 provides results and a discussion. Finally, in Section 4, we summarize the research work.