Construction of a Lightweight Model for Crop Leaf Diseases and Pests Detection Based on YOLOv11s
-
-
Abstract
The industrialization and large-scale development of modern agriculture have put forward new requirements for the detection of crop leaf diseases and pests. Traditional detection mainly relies on manual identification, which has relatively low identification efficiency and accuracy. To address the above issues, the crop leaf diseases and pests detection model based on YOLOv11s is proposed, and efficient deployment is achieved by combining the attention mechanism with model quantification technology. Taking three common diseases and pests, namely leaf blight, gray spot disease and rust disease, as the research objects, a training dataset containing 13 770 images was constructed by means of random rotation, flipping, etc. Based on YOLOv11s, a multi-scale lightweight EMA attention mechanism is introduced to enhance the key feature expression ability of the model. Under the condition of only increasing the computational load by 8% , the mAP50 of the model is improved to 0.749, which is 0.026 higher than the original model. The model is exported in ONNX format and automatic graph optimization and FP16 half-precision quantization are enabled. INT16 static quantization is performed on the model using ONNX runtime-tools. In the CPU environment, the model volume is compressed by 49% (from 36.1MB to 18.4MB), and the single-fr ame inference time is reduced to 105.6ms, the loss of accuracy is controllable. The experimental results show the lightweight model can significantly reduce resource consumption while maintaining high detection accuracy. It can be effectively deployed on mobile devices based on ARM architecture, meeting the real-time and precise disease identification requirements of agricultural sites, and providing a feasible technical solution for edge computing applications in smart agriculture.
-
-