Inter-agricultural weed detection in complex backgrounds based on improved YOLOv7
Intelligent planting of field crops as an important development goal of intelligent agriculture,but also the future direction of agricultural development.The growth cycle of crops is often accompanied by the continuous growth of weeds,which are vigorous and compete with crops for water,sunlight and growth space,seriously affecting the normal growth of crops.The current inter-farm weeding methods include manual weeding,mechanical weeding,her-bicide weeding,etc.,which is not only time-consuming and inefficient,but also residual drugs even cause soil fer-tility decline and environmental pollution.In this paper,we propose an improved YOLOv7 algorithm to achieve inter-farm weed detection in complex backgrounds with high efficiency and accuracy,in order to solve the problems of low accuracy of existing target detection models for identifying weeds and low detection rate of small targets.The method reduces the number of parameters by introducing the lightweight FasterNet structure,which enables the net-work model to have higher accuracy and speed;adds the CA attention mechanism,which pools the attention in differ-ent axes,so that the model learns more accurate features;and replaces the CIoU loss function of the original YOLOv7 with the Focal-EIoU loss function,which reduces the sample imbalance.According to the experimental results,the average accuracy mean mAP of the complex background inter-farm weed detection based on improved YOLOv7 proposed in this paper is 93.7%,which is 4.2%higher than the original YOLOv7 model.