基于重参数化MobileNetV2的农作物叶片病害识别模型

    Recognizing crop leaf diseases using reparameterized MobileNetV2

    • 摘要: 针对基于卷积神经网络识别农作物叶片病害存在参数众多,计算量大且实时性差的问题,提出一种轻量级农作物叶片病害识别模型RLDNet(reparameterized leaf diseases identification network)。首先,基于MobileNetV2利用重参数化倒残差模块提升推理速度,并设计浅而窄的网络结构增强对浅层特征的提取,降低模型参数量。其次,使用轻量级ULSAM(ultra-lightweight subspace attention module)注意力机制,结合叶片病害特征,强化模型对病害区域的关注能力。最后,利用DepthShrinker剪枝方法对模型进行剪枝进一步减小空间占用。RLDNet在PlantVillage数据集上识别准确率达99.53%,参数量为0.65 M,对单张叶片病害图像的推理时间为2.51 ms。在自建叶片病害数据集上获得了98.49%识别准确率,比MobileNetV3、ShuffleNetV2等轻量级模型识别准确率更高,更为轻量。

       

      Abstract: Various types of crop diseases have posed a serious threat to the high-quality development of crops in agricultural production. A timely identification of disease types can greatly contribute to the prevention and control of crop diseases. However, the convolutional neural networks (CNN) recognition of crop leaf diseases cannot fully meet the large-scale production in recent years, due to the numerous parameters, high computational complexity, and poor real-time performance. There is a high demand to improve the accuracy of lightweight CNN models under the relatively complex background of crop leaf images in natural environments. In this study, a lightweight re parameterized leaf diseases identification network (RLDNet) was proposed to identify crop leaf diseases. Firstly, reparameterization was introduced into the MobileNetV2. The inverted residual blocks were reparameterized to construct the reparameterized inverse residual (RIR) block for the high inference speed. A multi-branch architecture was adopted during the training phase. The diversity of the feature space was enriched to improve the representation learning of the network. The reparameterization was used to equivalently convert the multi-branch architecture into a single path structure for the inference after training. The output of the transformed inference model was the same as the original multi-branch. The parameter identity transformation was achieved to improve the inference speed of the model with high recognition accuracy. There was a decrease in the number of output channels and the stacking times of core modules. A shallow and narrow network structure was obtained to enhance the extraction of shallow features, such as the disease colors and textures, indicating the reduced number of model parameters. Secondly, a lightweight ultra lightweight subspace attention module attention mechanism (ULSAM) was added to the last two RIR blocks of the model. Leaf disease characteristics were combined to more effectively distinguish between backgrounds and prospects for better target classification. The interference was reduced in the disease areas from the complex backgrounds. Finally, the DepthShrinker pruning was utilized to learn the importance of the activation function in the model. The redundant parameters were removed to further reduce the space occupation. The lossless lightweight and high accuracy of the model were achieved using knowledge distillation. The recognition accuracy of 99.53% was achieved in the RLDNet on the PlantVillage dataset, whereas 98.49% on the self-built leaf disease dataset with a parameter size of 0.65 M. The inference time for a single-leaf disease image was 2.51 ms. RLDNet shared a performance similar to the Transformer-based models (such as MobileVit-S) and CNN-based models (such as ResNet18) on both datasets, with a significant reduction in parameter, respectively, compared with MobileVit-S and ResNet18. The higher recognition accuracy and lighter weight were obtained in the RLDNet, compared with the lightweight models, such as MobileNetV3 and ShuffleNetV2. The improved model can be expected to effectively identify the leaf diseases in the complex backgrounds, with less parameter memory and faster inference speed. The findings can also be applied in the practical production and application of smart agriculture.

       

    /

    返回文章
    返回