| In recent years,the rapid development of computer hardware has enabled deep learning-based object detection applications to be widely used in real life,such as license plate recognition of illegal vehicles on the road and red blood cell detection in blood.Object detection has achieved remarkable results not only in the field of transportation and medicine,but also in the field of agriculture.For example,the detection and recognition of mature fruits and harmful insects in agricultural crops.The prediction of wheat yield can also be indirectly predicted by detecting and recognizing the number of wheat spikes or straws left after the wheat harvest in the field(the scientific name is straw).After understanding the commonly used wheat datasets and mainstream object detection algorithms,this paper collects images of wheat straws left after the harvest in the field to make a dataset,and uses YOLOv5 Model as the basis.By adjusting and improving the backbone network,feature pyramid,and detection head of the Model,the YOLOM wheat detection Model is designed.The specific improvement results are as follows:(1)To address the problem of the small proportion of straw targets in images and the easily confused features with the background,this paper designs the CTKB residual module by combining spatial attention and channel attention mechanisms.By replacing some structures in the YOLOv5 network with the CTKB residual module,the YOLOM network Model is designed.By re-calculating the preset anchor box ratios of the YOLOv5 network Model through the K-means clustering algorithm,the accuracy of the network in detecting and recognizing the straw and spike targets is improved.The comparison experiment shows that the YOLOM network Model is superior to the SSD,YOLOv3,and Faster R-CNN Models in straw detection.Finally,the validity of each improvement is further confirmed by the ablation experiment.To shorten the time from straw image collection to quantity detection,the application of straw quantity detection on PC side is deployed based on the Pyqt toolkit.(2)In order to enrich the wheat dataset,provide various ways to predict the wheat yield,and improve the accuracy and robustness of the YOLOM network Model in extracting straw features,this paper produces a straw dataset and conducts data augmentation research on the input image based on the sample feature of the dataset.The copy-paste enhancement method and gray world enhancement method are used.Through comparison experiments,the combination of copy-paste enhancement method and Mosaic9 on the homemade straw dataset performs the best.However,the improvement effect of the YOLOM network Model using the gray world enhancement method in straw target recognition is not good.This paper takes the straw left after the harvest in the field as the research object,enriches the agricultural dataset,finds the most suitable data enhancement method for the YOLOM network Model,and provides a way to indirectly predict the wheat yield from different perspectives.This lays a solid foundation for establishing the Model of the relationship between straw quantity and yield in the future. |