Recognizing crop leaf diseases using reparameterized MobileNetV2
-
-
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.
-
-