基于改进YOLOv5s的自然场景下生姜叶片病虫害识别

    Identifying diseases and pests in ginger leaf under natural scenes using improved YOLOv5s

    • 摘要: 为提高自然环境下生姜叶片病虫害的识别精确率,提出一种基于改进YOLOv5s的生姜叶片病虫害识别模型。建立了田间不同自然环境条件下的生姜叶片病虫害数据集,为保证模型在田间移动设备上流畅运行,实现网络模型的轻量化,在YOLOv5s中引入GhostNet网络中的Ghost模块和Ghost BottleNeck结构。同时,为避免生姜叶片病虫害图像小目标特征丢失的情况,增强图像特征提取,加入CA注意力机制模块,提升生姜叶片病虫害的识别准确率和定位精确度。改进后的模型参数量、计算量和权重文件大小分别为YOLOv5s模型的52.0%、50.6%和55.2%,对生姜叶片病虫害识别平均精度均值达到了83.8%。与Faster-RCNN、SSD、YOLOv4、YOLOv5s、Tea-YOLOv5s等算法相比,平均精度均值分别提高37.6、39.1、22.5、1.5、0.7个百分点,将改进后的目标检测模型部署在Jetson Orin NX开发板上,并使用TensorRT、Int8量化和CUDA等方法对检测模型加速,加速后的模型检测速度为74.3帧/s,满足实时检测的要求,测试结果显示,改进后的模型减少了漏检、误检的情况,并且对目标定位更加精准,适用于自然环境下生姜叶片病虫害的精准识别,为后续生姜机械自动化施药作业提供技术理论支持。

       

      Abstract: Ginger diseases and pests have posed a serious threat to the yield in recent years. However, the artificial and mechanical application cannot fully meet the large-scale production at present, due to the slow overall progress and the low degree low of intelligence. This study aims to develop the intelligent application equipment of ginger for the high efficiency and accuracy of the intelligent vehicle. A lightweight model was proposed to realize the high-performance deployment of the ginger leaf disease and pest detection on mobile terminals using improved YOLOv5s. Ghost module of GhostNet was selected to replace the convolutional layers in the original YOLOv5s neural network, except the first layer. Ghost BottleNeck was used to replace the Resunit residual component in the original C3 concentrate-comprehensive convolution block. The lightweight of the network model was obtained to reduce the number of parameters and the amount of calculation. At the same time, the memory consumption was reduced in the model weight file. CA attention mechanism module was added after the C3 block in the feature fusion network, in order to improve the recognition and positioning accuracy. The reason was that the lightweight of the model caused the feature loss, when the neural network was used to extract the features of the image. The experimental results show that the number of parameters of the improved YOLOv5s model was 3.76×106M, which was 52.0% of the original. The computational complexity was 8.4G, which was 50.6% of the original. The size of the weight file was 7.79MB, which was 55.2% of the original. The average precision and average precision reached 80.5% and 83.8%, respectively, which were 1.3 and 1.5 percentage points higher than those of the original model. The improved model was greatly reduced the number of parameters, calculation amount and weight file size for the high detection accuracy, compared with Fast-RCNN, SSD, YOLOv4, YOLOv5s and Tea-YOLOv5s target detection models. The missed and false detection of image targets were also reduced, compared with the YOLOv5s model. And the improved network model was required less hardware conditions. The performance of the improved model was verified on mobile terminals. The Ginger-YOLOv5s model was deployed on the Jetson Orin NX development board, where the detection code was rewritten in C++. The model was accelerated using TensorRT high-performance operator, Int8 quantization processing, CUDA rewriting preprocessing and multi-thread processing. The final frames per second reached 74.3, which was fully met the requirements of operation efficiency in the application machinery for the real-time detection of ginger leaf diseases and pests. The finding can provide the technical support for the migration and deployment of the model on the ginger application vehicle.

       

    /

    返回文章
    返回