Detection of weeds in paddy field at the seedling stage based on improved YOLOv8 convolutional neural network
Aiming at the problems of complex background of paddy field,small size of weed image at the seedling stage,inaccurate identification and positioning under field natural environment photography,an improved YOLOv8 convolutional neural network meth-od for weed detection at the seedling stage was proposed.A dedicated dataset based on the PASCAL VOC dataset format was construct-ed.First,DenseNet in the network convolution process was added to better extract weed features and optimize the vanishing gradient problem.Then,CBAM(Convolutional block attention module)attention mechanism was added to improve the model's sensitivity to small sizes.Finally,the WIOU(Weighted intersection over union)loss function was used to optimize the loss function in the original network and improve the positioning ability of the model to the detection target.In the experiment,the performance of the improved al-gorithm was compared with algorithms such as Faster R-CNN,SSD(Single shot multiBox detector)and the original YOLOv8.The re-sults showed that the improved algorithm was significantly superior to other algorithms,achieving an average precision of 97%and a detection speed of 100.3 frames/s on the test set,respectively.This high-precision and rapid detection capability met the demand for rapid and accurate detection in precision agriculture.This algorithm provided important theoretical and technical support for mechani-cal equipment to quickly identify weeds during the seedling stage and accurately spray pesticides.