Peanut is an important cash crop and food crop in China,and has a very high position in China’s oil production.Weed control is an important part of the peanut planting process,and reasonable treatment of weeds in peanut fields can lead to high and stable yields of peanuts.The existing weed treatment methods are mostly covered by farmers spraying chemical herbicides,which is not only labor-intensive,but also causes irreversible pollution of farmland due to the waste of pesticides.Currently,weed management in peanut fields suffers from inefficiency and massive waste of pesticides.Therefore,this study takes a variety of weeds in peanut fields as the research object and carries out the research of weed identification and localization based on machine vision in order to achieve rapid and accurate detection of a variety of weeds in peanut fields.The main research contents are as follows:(1)A dataset suitable for weed detection in peanut fields was constructed.First,survey analysis and data collection in several peanut fields established six major weeds as research objects.Second,the dataset was expanded using data enhancement methods such as image brightness transformation,flip,and addition of random noise to avoid model overfitting problems caused by too small a dataset.Finally,under the guidance of experts in related fields,the dataset is divided and labeled to obtain the peanut field weed detection dataset.(2)A peanut field weed identification model based on optimized YOLOv4-Tiny network is proposed.First,a new feature recognition layer is added to the YOLOv4-Tiny network to improve the detection of small targets by using the detailed information of shallow features.Second,an ECA attention module is embedded in the feature enhancement network layer to suppress the background weights of the features.During the training process,the CIo U loss is used instead of the original Io U loss so that the network can reach the convergence state faster.Finally,the Soft-NMS algorithm is used for the screening of prediction frames to avoid weed miss detection due to overlapping anchor frames.The experimental results show that the optimized YOLOv4-Tiny network has an average recognition accuracy of 94.54% for multiple weeds,which is 6.83% better than the base network,and the average detection time is 10.4ms/sheet,and the smaller size makes it easy to deploy in embedded devices.(3)A peanut field weed localization method based on Real Sense D435 i camera is proposed.First,the peanut field weed identification and localization platform is built based on the Real Sense D435 i camera,and the internal participation distortion coefficient of the camera is obtained by the Zhang Zhengyou calibration method.Secondly,the depth map smoothed by the median filter algorithm is aligned with the color map,so that the pixel points between them correspond to each other.Finally,the two-dimensional coordinates of the weeds obtained by combining the optimized YOLOv4-Tiny recognition are outputted to the threedimensional spatial location of the weeds by coordinate conversion.The positioning experiments show that the average absolute error of weed recognition and positioning is18.5mm and the average relative error is 1.4%,which provides positioning guidance for the subsequent development of intelligent weeding equipment. |