Binary neural network recognition system for agricultural plant leaf diseases

By introducing deep supervision and self-distillation technology into binary neural networks, dividing the training framework and optimizing parameters, the problem of insufficient accuracy in the identification of leaf diseases of agricultural plants is solved, and the recognition accuracy is significantly improved.

CN119251684AInactive Publication Date: 2025-01-03NINGBO LVHE TIMES TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411738522.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing binary neural networks have the problem of insufficient recognition accuracy in the identification of leaf diseases in agricultural plants, especially when dealing with leaf images in complex backgrounds, it is difficult to meet the needs.

Method used

The training framework of binary neural network is divided into the backbone network and multiple auxiliary classifiers by using the deep supervision module, and the residual feature extraction module, full connection layer, self-distillation module and total loss calculation module are combined with deep supervision technology and self- Distillation technology optimizes the parameters of binary neural networks to improve recognition accuracy.

Benefits of technology

The binary neural network has significantly improved the recognition accuracy of agricultural plant leaf diseases. Through the combination of deep supervision and self-distillation technology, network parameters are optimized and recognition performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251684A_ABST
    Figure CN119251684A_ABST
Patent Text Reader

Abstract

The invention discloses a binary neural network recognition system for agricultural plant leaf diseases, a deep supervision module divides a training framework of a binary neural network into a trunk network and a plurality of auxiliary classifiers, and each auxiliary classifier comprises a residual feature extraction module which extracts intermediate features from the trunk network; the full connection layer converts the intermediate features into predicted values and outputs the predicted values; during the training period of the binary neural network, the deep supervision module calculates the deep supervision loss according to the difference between the predicted value and the real label; the self-distillation module calculates the self-distillation loss according to the auxiliary classifier with the optimal prediction performance and the corresponding prediction value; the total loss calculation module calculates the total training loss according to the depth supervision loss and the self-distillation loss; the network optimization module updates parameters of the binary neural network according to the total training loss to generate an optimized binary neural network. According to the invention, the recognition precision of the binary neural network on agricultural plant leaf diseases is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of neural network recognition, and in particular to a binary neural network recognition system for agricultural plant leaf diseases. Background Art

[0002] Deep neural networks have made significant progress in the fields of computer vision, natural language processing, and multimodal applications. However, some networks require a lot of computing power and storage space, which limits their deployment on resource-constrained platforms such as smartphones and embedded systems. To address this challenge, researchers have proposed various model compression and acceleration algorithms, such as network quantization, network pruning, knowledge distillation, and lightweight architecture design. Among them, network binarization is an extreme form of quantization that compresses the 32-bit floating-point parameters of the neural network into binary form (-1 or +1). It uses logical operations such as XNOR and POPCOUNT to replace traditional convolution calculations, thereby significantly reducing storage requirements and computational complexity. Binarization reduces the model size by 32 times and increases the computational speed by 58 times. In actual use, network binarization often loses accuracy compared to the corresponding full-precision network.

[0003] Agricultural plant leaf diseases refer to various diseases that affect the normal growth and function of plant leaves. These diseases are usually caused by pathogens (such as fungi, bacteria, viruses, and nematodes), and may also be caused by abiotic factors (such as malnutrition, environmental stress, etc.). Leaf diseases have a significant impact on the yield and quality of crops, and in severe cases can even cause plant death. Therefore, early detection of plant leaf diseases is crucial for the healthy growth of crops. Traditional disease recognition methods rely on manual observation and empirical judgment, which is inefficient and prone to errors. With the development of deep learning technology, the use of neural networks for automatic recognition has become a trend. However, existing binary neural networks still have certain limitations when processing leaf images under complex backgrounds, and cannot meet the recognition needs of agricultural plant leaf diseases. Summary of the invention

[0004] In view of the deficiencies in the prior art, the object of the present invention is to provide a binary neural network recognition system for agricultural plant leaf diseases, so as to improve the recognition accuracy of the binary neural network for agricultural plant leaf diseases.

[0005] To achieve the above object, the present invention provides the following technical solution: a binary neural network recognition system for agricultural plant leaf diseases, comprising:

[0006] The deep supervision module is used to divide the training framework of the binary neural network into a main network and multiple auxiliary classifiers, wherein the auxiliary classifiers include:

[0007] A residual feature extraction module, used to extract intermediate features from the backbone network;

[0008] A fully connected layer, connected to the residual feature extraction module, for converting the intermediate features into predicted value outputs;

[0009] The deep supervision module is connected to the fully connected layer, and the deep supervision module is also used to calculate the deep supervision loss according to the difference between the predicted value and the true label during the training of the binary neural network;

[0010] A self-distillation module, connected to the deep supervision module, for calculating the predicted values ​​output by each auxiliary classifier in each training cycle of the binary neural network, and selecting the auxiliary classifier with the best prediction performance as the teacher classifier for self-distillation, and then calculating the self-distillation loss according to the auxiliary classifier with the best prediction performance and the corresponding prediction value;

[0011] A total loss calculation module, connected to the deep supervision module and the self-distillation module respectively, for calculating the total training loss according to the deep supervision loss and the self-distillation loss;

[0012] A network optimization module is connected to the total loss calculation module and is used to update the parameters of the binary neural network according to the total training loss to generate an optimized binary neural network, wherein the optimized binary neural network is used to generate leaf disease recognition results based on input agricultural plant disease pictures.

[0013] Furthermore, the conversion formula of the fully connected layer for converting the intermediate feature into the predicted value is configured as:

[0014] ,

[0015] in, It is used to indicate the number of auxiliary classifiers. It is used to indicate the number of layers of the backbone network. Used to indicate the The predicted value, Used to indicate the The fully connected layers, Used to indicate the The residual feature extraction module, Used to indicate the - 1 of the intermediate features.

[0016] Furthermore, the calculation formula of the deep supervision loss is configured as:

[0017] ,

[0018] in, Used to represent the deep supervision loss, For representing the backbone network Layer and The predicted values ​​between layers, Used to represent the cross entropy loss function.

[0019] Furthermore, the residual feature extraction module includes:

[0020] A deep convolution unit, for capturing multi-scale feature representations in the backbone network using multiple convolutional layers;

[0021] Point-wise convolution unit, used to linearly combine feature channels using 1×1 convolution kernel;

[0022] The residual connection unit is used to add a direct connection between each network layer of the binary neural network so that each network layer learns the residual between the input and the output.

[0023] Furthermore, the calculation formula of the self-distillation loss is configured as:

[0024] ,

[0025] in, is used to represent the self-distillation loss, is used to represent the auxiliary classifier with the best prediction performance, The prediction value corresponding to the auxiliary classifier with the best prediction performance is represented. Used to represent the KL loss function.

[0026] Furthermore, the calculation formula of the total training loss is configured as:

[0027] ,

[0028] in, is used to denote the total training loss, Used to represent the cross entropy loss, The weight parameter used to represent the deep supervision loss, A weight parameter used to represent the self-distillation loss.

[0029] Furthermore, in the training stage and the inference stage of the optimized binary neural network, a classifier calling strategy is configured, and the classifier calling strategy is configured as follows:

[0030] During the training phase, all the auxiliary classifiers are trained using the deep supervision module and the self-distillation module; during the reasoning phase, all the auxiliary classifiers are ignored and only the backbone network is retained for reasoning.

[0031] Furthermore, it also includes:

[0032] A leaf parameter generation module, used to obtain key features of a plurality of agricultural plant disease images in a pre-configured plant leaf disease data set, and generate leaf adjustment parameters of the plant leaf disease data set according to each of the key features;

[0033] A network parameter acquisition module, connected to the leaf parameter generation module, for acquiring the number of network layers, learning rate, batch size, and threshold of the optimized binary neural network during the training process of the optimized binary neural network;

[0034] A weight optimization module is connected to the leaf parameter generation module, the network parameter acquisition module and the network optimization module, and is used to input the number of network layers, the learning rate, the batch size, the threshold and the leaf adjustment parameter into the weight optimization formula, calculate the weight ratio of the weight parameter of the deep supervision loss and the weight parameter of the self-distillation loss, and adjust the calculation formula of the total training loss according to the weight ratio.

[0035] Furthermore, the weight optimization formula is configured as:

[0036] ,

[0037] in, Used to indicate the weight ratio, Used to indicate the number of network layers, is used to denote the learning rate, is used to represent the batch size, is used to represent the threshold value, is used to represent the blade adjustment parameter, Used to represent the number of nodes in the network, Used to indicate the number of hidden layers, are used to represent the preset first variable, second variable, third variable, fourth variable and fifth variable respectively, Used to represent the preset first constant coefficient, second constant coefficient, third constant coefficient and fourth constant coefficient.

[0038] Furthermore, the key features include leaf microscopic features, leaf spectral features, leaf texture features and leaf color features.

[0039] Beneficial effects of the present invention:

[0040] The present invention uses a deep supervision module to divide the training framework of a binary neural network into a main network and multiple auxiliary classifiers, and divides each auxiliary classifier into a residual feature extraction module and a fully connected layer. The residual feature extraction module is used to extract intermediate features from the main network, and the residual connection in the process is used to achieve improvements in information propagation and gradient updating; the fully connected layer generates a predicted value based on the intermediate features, and the deep supervision module calculates the deep supervision loss according to the difference between the predicted value and the true label during the training of the binary neural network;

[0041] The present invention also uses the self-distillation module to predict the auxiliary classifier with the best performance as the teacher classifier of self-distillation in each training cycle of the binary neural network, and calculates the self-distillation loss according to the auxiliary classifier with the best prediction performance and the corresponding prediction value; then calculates the total training loss according to the deep supervision loss and the self-distillation loss, and uses the total training loss to update the parameters of the binary neural network to generate an optimized binary neural network, thereby achieving deep optimization of the binary neural network;

[0042] Therefore, the present invention optimizes the binary neural network by combining the deep supervision technology and the self-distillation technology, thereby significantly improving the recognition accuracy of the binary neural network for agricultural plant leaf diseases. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the structure of the binary neural network recognition system in the present invention;

[0044] Figure 2 This is the evolution diagram of the accuracy of the auxiliary classifier of the binary ResNet-18 network and the full-precision ResNet-18 network;

[0045] Figure 3 This is a graph showing the position change of the highest accuracy classifier in the binary ResNet-18 network and the full-precision ResNet-18 network.

[0046] Figure numerals: 1. deep supervision module; 2. residual feature extraction module; 21. deep convolution unit; 22. point-by-point convolution unit; 23. residual connection unit; 3. fully connected layer; 4. self-distillation module; 5. total loss calculation module; 6. network optimization module; 7. leaf parameter generation module; 8. network parameter acquisition module; 9. weight optimization module. DETAILED DESCRIPTION

[0047] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0048] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides a binary neural network recognition system for agricultural plant leaf diseases, which can significantly improve the recognition accuracy of the binary neural network for agricultural plant leaf diseases, including:

[0049] The deep supervision module 1 is used to divide the training framework of the binary neural network into a backbone network and multiple auxiliary classifiers. The auxiliary classifiers include:

[0050] Residual feature extraction module 2, used to extract intermediate features from the backbone network;

[0051] Fully connected layer 3, connected to residual feature extraction module 2, is used to convert intermediate features into predicted value output;

[0052] The deep supervision module 1 is connected to the fully connected layer 3. The deep supervision module 1 is also used to calculate the deep supervision loss according to the difference between the predicted value and the true label during the training of the binary neural network;

[0053] The self-distillation module 4 is connected to the deep supervision module 1 and is used to calculate the prediction value output by each auxiliary classifier in each training cycle of the binary neural network, and select the auxiliary classifier with the best prediction performance as the teacher classifier for self-distillation. The self-distillation process involves mutual learning between the middle layers of the network, in which the auxiliary classifier with the best performance is selected as the teacher layer to improve the reliability of knowledge transfer. The self-distillation loss is calculated based on the auxiliary classifier with the best prediction performance and the corresponding prediction value;

[0054] The total loss calculation module 5 is connected to the deep supervision module 1 and the self-distillation module 4 respectively, and is used to calculate the total training loss according to the deep supervision loss and the self-distillation loss;

[0055] The network optimization module 6 is connected to the total loss calculation module 5 and is used to update the parameters of the binary neural network according to the total training loss to generate an optimized binary neural network. The optimized binary neural network is used to generate leaf disease recognition results according to the input agricultural plant disease pictures.

[0056] Working principle of embodiment 1:

[0057] In this embodiment, the training framework of the binary neural network is divided into a backbone network and multiple auxiliary classifiers by using the deep supervision module 1, and each auxiliary classifier is divided into a residual feature extraction module 2 and a fully connected layer 3. The residual feature extraction module 2 is used to extract intermediate features from the backbone network, and the residual connection in the process is used to improve information propagation and gradient update; the fully connected layer 3 generates a prediction value based on the intermediate features, and the deep supervision module 1 calculates the deep supervision loss according to the difference between the prediction value and the true label during the training of the binary neural network;

[0058] This embodiment also uses the self-distillation module 4 to predict the auxiliary classifier with the best performance as the teacher classifier for self-distillation in each training cycle of the binary neural network, and calculates the self-distillation loss according to the auxiliary classifier with the best prediction performance and the corresponding prediction value; then calculates the total training loss according to the deep supervision loss and the self-distillation loss, and uses the total training loss to update the parameters of the binary neural network to generate an optimized binary neural network, thereby achieving deep optimization of the binary neural network;

[0059] Therefore, this embodiment combines deep supervision technology with self-distillation technology to optimize the binary neural network, thereby significantly improving the recognition accuracy of the binary neural network for agricultural plant leaf diseases.

[0060] This example verifies the accuracy of the optimized binary neural network through experiments:

[0061] Stochastic gradient descent was used for training, and the training parameters were configured as follows: momentum coefficient 0.9, weight decay 5e-4, and initial learning rate 0.1. The training time on the CIFAR-10 dataset was 600 cycles (128 samples per cycle), the training time on the ImageNet dataset was 200 cycles (256 samples per cycle), and the training time on the plant pathology dataset was 100 cycles (32 samples per cycle). The optimized binary neural network in this embodiment is also customized as the BNN-RDS algorithm.

[0062] The experimental hardware includes Nvidia RTX 3090 GPU, Intel Xeon Gold 5218R CPU, 24GB memory and 8TB hard disk. The deep supervision module, self-distillation module, total loss calculation module and network optimization module are all pre-configured binary neural network training programs running on the experimental hardware.

[0063] Comparison of the BNN-RDS algorithm with the most advanced methods on the CIFAR-10 dataset:

[0064] The experiments on the CIFAR-10 dataset mainly focus on ResNet-18, ResNet-20 and VGG-Small architectures. The representative algorithms used for comparison mainly include RAD, DSQ, SLB, IR-Net, RBNN, CMIM and ReCU.

[0065] Table 1 is a comparison table of the accuracy of the BNN-RDS algorithm and other advanced algorithms on the CIFAR-10 dataset. The accuracy comparison of the BNN-RDS algorithm and other advanced algorithms on the CIFAR-10 dataset is shown in Table 1:

[0066] Table 1

[0067]

[0068] As can be seen from Table 1, the BNN-RDS algorithm in this embodiment achieves significant classification accuracy of 94.2%, 87.9% and 93.6% on ResNet-18, ResNet-20 and VGG-Small, respectively. The BNN-RDS algorithm performs well among other neural network binarization algorithms, proving its effectiveness and versatility in different network structures. These experimental results also verify the effectiveness of combining multiple auxiliary classifiers and adopting a self-distillation strategy in the BNN-RDS algorithm. The significant performance improvement of the BNN-RDS algorithm on the ResNet-20 network can also be attributed to the inherent advantages of the residual feature extraction modules, which effectively capture the intermediate information in the ResNet-20 structure, thereby improving the overall performance.

[0069] Comparison of the BNN-RDS algorithm with the most advanced methods on the ImageNet dataset:

[0070] Table 2 is a comparison table of the accuracy of the BNN-RDS algorithm and other advanced algorithms on the ImageNet dataset. The accuracy comparison of the BNN-RDS algorithm and other advanced algorithms on the ImageNet dataset is shown in Table 2:

[0071] Table 2

[0072]

[0073] Table 2 shows the comparative experiments conducted on ResNet-18 and ResNet-34, demonstrating the effectiveness of the BNN-RDS algorithm on large-scale datasets and complex tasks. Specifically, compared with ReCU, the BNN-RDS algorithm improves the Top-1 accuracy by 0.4% and the Top-5 accuracy by 0.7% when using ResNet-18. In addition, the BNN-RDS algorithm achieves a Top-1 accuracy of 65.1% when using ResNet-34 and exceeds ReCU by 0.1% in Top-5 accuracy. However, the Top-1 accuracy of the BNN-RDS algorithm is still lower than the current optimal network binarization method RBNN+CMIM. This can be attributed to the quantization of the rotation weights by RBNN, which leads to a reduction in the angular bias in the weights.

[0074] Experimental results on the CIFAR-10 dataset and ImageNet dataset show that the BNN-RDS algorithm reduces feature information loss, enhances the performance of binary neural networks, and improves recognition accuracy.

[0075] Ablation experiments on teacher layer selection for self-distillation:

[0076] like Figure 2 As shown, the evolution of the auxiliary classifier accuracy of the binary ResNet-18 network and the full-precision ResNet-18 network on the CIFAR-10 dataset is intuitively shown within the first 100 training cycles.

[0077] like Figure 3 As shown, the changes in the positions of the highest accuracy classifiers in the binary ResNet-18 network and the full-precision ResNet-18 network are intuitively demonstrated over the entire 600 training cycles.

[0078] observe Figure 2 and Figure 3 , the following conclusions can be drawn. During the training process, there is a big difference in the position of the highest accuracy classifier obtained by the binarized ResNet-18 network and the full-precision ResNet-18 network. For the binarized ResNet-18 network, the shallow classifier rather than the final layer classifier showed the best recognition accuracy in most cycles. In contrast, for the full-precision ResNet-18 network, the final layer classifier did act as the best auxiliary classifier in most cycles. In summary, choosing a suitable self-distillation method for teacher distillation is crucial to improving the performance of binarized and full-precision networks. In the binarized neural network, the self-distillation method based on the optimal auxiliary classifier can achieve higher classification accuracy. This provides important guidance for improving the performance of binary neural network models.

[0079] Plant leaf disease identification experiment:

[0080] In order to verify the feasibility, reliability and generalization ability of the BNN-RD algorithm in the agricultural field, this example conducted an experiment on plant leaf disease recognition on a plant pathology dataset.

[0081] Table 3 is a table of classification accuracy on the plant pathology dataset. The classification accuracy on the plant pathology dataset is shown in Table 3:

[0082] Table 3

[0083] method Number of weights / activations ResNet-18 ResNet-50 BNN 1 / 1 84.2 86.1 BNN+method of the present invention 1 / 1 86.6 87.5 FP 32 / 32 86.8 87.9 FP+method of the present invention 32 / 32 87.5 89.1

[0084] Table 3 shows that the binarized ResNet-18 network trained using the BNN-RDS method in this embodiment achieved 86.6% classification accuracy on the plant pathology dataset, while the full-precision ResNet-18 network trained using the BNN-RDS method in this embodiment achieved 87.5%. Similarly, the binarized ResNet-50 network and the full-precision ResNet-50 network achieved classification accuracy of 87.5% and 89.1%, respectively. The above data highlight the ability of the BNN-RDS method to improve the accuracy of binarized and full-precision networks on plant pathology datasets, demonstrating its effectiveness in identifying plant leaf diseases and pests.

[0085] Preferably, the conversion formula of the fully connected layer 3 to convert the intermediate features into the predicted values ​​is configured as:

[0086] ,

[0087] in, It is used to indicate the number of auxiliary classifiers. It is used to indicate the number of layers of the backbone network. Used to indicate the The predicted value, Used to indicate the The fully connected layers, Used to indicate the The residual feature extraction module, Used to indicate the - 1 of the intermediate features.

[0088] Preferably, the calculation formula of the deep supervision loss is configured as:

[0089] ,

[0090] in, Used to represent the deep supervision loss, For representing the backbone network Layer and The predicted values ​​between layers, Used to represent the cross entropy loss function.

[0091] Among them, in the training stage and inference stage of optimizing the binary neural network, a classifier calling strategy is configured, and the classifier calling strategy is configured as follows:

[0092] In the training phase, all auxiliary classifiers are trained using the deep supervision module 1 and the self-distillation module 4; in the inference phase, all auxiliary classifiers are ignored and only the backbone network is retained for inference, which ensures that the deployed binary neural network does not require any additional parameters or computational overhead. Therefore, in this technical solution, full-precision auxiliary classifiers can be used to ensure the accuracy of the auxiliary classifiers, and then help improve the overall performance of the binary neural network.

[0093] Preferably, the residual feature extraction module 2 includes:

[0094] A deep convolution unit 21, used to capture multi-scale feature representations in the backbone network using multiple convolutional layers;

[0095] A point-by-point convolution unit 22, for linearly combining feature channels using a 1×1 convolution kernel;

[0096] The residual connection unit 23 is used to add direct connections between the network layers of the binary neural network so that each network layer can learn the residual between the input and the output.

[0097] Specifically, in this embodiment, the deep convolution unit 21 uses multiple convolution layers to capture multi-scale feature representations, so that the binary neural network can effectively perceive and extract details and contextual information in the image. At the same time, the point-by-point convolution unit 22 uses a 1×1 convolution kernel to linearly combine channels. This design simplifies and enhances the network architecture. In addition, the residual connection unit 23 also introduces residual connections, which adds direct connections between the network layers of the binary neural network, which helps to learn residual mappings, thereby maintaining information propagation and gradient flow. This method solves the problem of gradient vanishing and information loss during deep network training, ensuring a more efficient training speed.

[0098] Preferably, the calculation formula of the self-distillation loss is configured as:

[0099] ,

[0100] in, is used to represent the self-distillation loss, is used to represent the auxiliary classifier with the best prediction performance, The prediction value corresponding to the auxiliary classifier with the best prediction performance is represented. Used to represent the KL loss function.

[0101] In a traditional full-precision network, the output of the deepest classifier is usually used as the reference label for all shallower classifiers. This is because the deepest classifier usually obtains the most accurate classification results, thereby providing the network with more effective distillation information. However, in a binary neural network, the binarization process causes information loss, making it difficult for the binary neural network to accurately capture image information in the early training stage. Specifically, in this embodiment, in each training cycle, this study calculates the prediction results of the shallow classifier and selects the shallow classifier with the best prediction performance as the teacher classifier for self-distillation. Finally, the self-distillation loss can be calculated by the calculation formula of the self-distillation loss. In order to ensure the stability of the training process, this embodiment replaces the teacher classifier every few cycles.

[0102] Preferably, the calculation formula for the total training loss is configured as:

[0103] ,

[0104] in, is used to denote the total training loss, Used to represent the cross entropy loss, The weight parameter used to represent the deep supervision loss, A weight parameter used to represent the self-distillation loss.

[0105] Specifically, in this embodiment, by adding the traditional cross entropy loss, the product of the deep supervision loss and the corresponding weight parameters, and the self-distillation loss and the product of the corresponding weight parameters, the total training loss can reflect the loss in the binary neural network training process as a whole, and then adjust the parameters of the binary neural network according to the total training loss, so as to achieve a highly optimized binary neural network and significantly improve the recognition accuracy.

[0106] Embodiment 2 is the second embodiment of the present invention. Different from the previous embodiment, this embodiment provides a leaf parameter generation module 7, a network parameter acquisition module 8 and a weight optimization module 9, which can optimize the weight parameters of the deep supervision loss and the weight parameters of the self-distillation loss, and further improve the recognition accuracy of the optimized binary neural network, which includes:

[0107] The leaf parameter generation module 7 is used to obtain key features of multiple agricultural plant disease images in a pre-configured plant leaf disease data set, and generate leaf adjustment parameters of the plant leaf disease data set according to each key feature, wherein the key features include leaf microscopic features, leaf spectral features, leaf texture features and leaf color features;

[0108] The network parameter acquisition module 8 is connected to the leaf parameter generation module 7 and is used to obtain the number of network layers, learning rate, batch size and threshold of the optimized binary neural network during the training process of the optimized binary neural network;

[0109] The weight optimization module 9 connects the leaf parameter generation module 7, the network parameter acquisition module 8 and the network optimization module 6, and is used to input the number of network layers, learning rate, batch size, threshold and leaf adjustment parameters into the weight optimization formula, calculate the weight ratio of the weight parameters of the deep supervision loss and the weight parameters of the self-distillation loss, and adjust the calculation formula of the total training loss according to the weight ratio.

[0110] Working principle of embodiment 2:

[0111] The size of the learning rate will affect the training speed and convergence of the binary neural network. A larger learning rate may cause the binary neural network to skip the optimal solution, while a too small learning rate may cause the training time to be too long. Therefore, the choice of learning rate will affect the relative weights of deep supervision and self-distillation; the batch size determines the number of samples used in each iteration. A larger batch can provide a more stable gradient estimate, but may require higher computing resources. The choice of batch size will also affect the effect of deep supervision and self-distillation; in the dynamic reasoning mechanism, the setting of the threshold determines which samples are processed by the shallow classifier and which are processed by the deep classifier. The adjustment of the threshold will affect the application weights of deep supervision and self-distillation at different levels; the microscopic features of the leaves, the spectral features of the leaves, the texture features of the leaves, and the color features of the leaves are extracted by the feature extraction algorithm in the prior art, and then the leaf adjustment parameters are configured according to the characteristics and identification difficulties of different diseases by experts and technicians in the agricultural field. The leaf adjustment parameters will also affect the proportion of the weights of deep supervision and self-distillation in this embodiment.

[0112] In order to select the best weight parameters of deep supervision loss and self-distillation loss in the calculation process of total training loss, so as to avoid the influence of network layers, learning rate, batch size, threshold and leaf adjustment parameters on deep supervision and self-distillation, it is necessary to optimize the weight parameters of deep supervision loss and self-distillation loss through weight optimization formula to make the weight ratio more reasonable, thereby improving the data quality of the calculated total training loss and optimizing the recognition accuracy of binary neural network.

[0113] Among them, the weight optimization formula is configured as:

[0114] ,

[0115] in, Used to indicate the weight ratio, Used to indicate the number of network layers, is used to denote the learning rate, is used to represent the batch size, is used to represent the threshold value, is used to represent the blade adjustment parameter, Used to represent the number of nodes in the network, Used to indicate the number of hidden layers, are used to represent the preset first variable, second variable, third variable, fourth variable and fifth variable respectively, Used to represent the preset first constant coefficient, second constant coefficient, third constant coefficient and fourth constant coefficient, which are used to balance the effects of the number of network layers, learning rate, batch size, threshold and leaf adjustment parameters on deep supervision and self-distillation.

[0116] In this embodiment, the first variable, the second variable, the third variable, the fourth variable and the fifth variable are pre-configured changing parameters in the binary neural network for calculating the weight ratio, and will change with the changes in the number of network layers, learning rate, batch size, threshold and leaf adjustment parameters.

[0117] The weight ratio is a ratio value ranging from 0 to 1, which indicates the relative ratio of deep supervision to self-distillation. The closer the weight ratio is to 1, the greater the weight ratio of deep supervision and the smaller the weight ratio of self-distillation; the closer the weight ratio is to 0, the smaller the weight ratio of deep supervision and the greater the weight ratio of self-distillation.

[0118] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, multiple improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A binary neural network recognition system for agricultural plant leaf diseases, characterized in that: include: The deep supervision module (1) is used to divide the training framework of the binary neural network into a main network and a plurality of auxiliary classifiers, wherein the auxiliary classifiers include: A residual feature extraction module (2), used for extracting intermediate features from the backbone network; A fully connected layer (3), connected to the residual feature extraction module (2), for converting the intermediate features into predicted value outputs; The deep supervision module (1) is connected to the fully connected layer (3), and the deep supervision module (1) is also used to calculate the deep supervision loss according to the difference between the predicted value and the true label during the training of the binary neural network; A self-distillation module (4), connected to the deep supervision module (1), for calculating the predicted values ​​output by each auxiliary classifier in each training cycle of the binary neural network, and selecting the auxiliary classifier with the best prediction performance as the teacher classifier for self-distillation, and then calculating the self-distillation loss according to the auxiliary classifier with the best prediction performance and the corresponding prediction value; A total loss calculation module (5), connected to the deep supervision module (1) and the self-distillation module (4), respectively, for calculating the total training loss according to the deep supervision loss and the self-distillation loss; A network optimization module (6) is connected to the total loss calculation module (5) and is used to update the parameters of the binary neural network according to the total training loss to generate an optimized binary neural network, wherein the optimized binary neural network is used to generate leaf disease recognition results according to input agricultural plant disease images.

2. The binary neural network recognition system for agricultural plant leaf diseases according to claim 1, characterized in that: The conversion formula of the fully connected layer (3) for converting the intermediate feature into the predicted value is configured as: , in, It is used to indicate the number of auxiliary classifiers. It is used to indicate the number of layers of the backbone network. Used to indicate the The predicted value, Used to indicate the The fully connected layers, Used to indicate the The residual feature extraction module, Used to indicate the - 1 of the intermediate features.

3. The binary neural network recognition system for agricultural plant leaf diseases according to claim 2, characterized in that: The calculation formula of the deep supervision loss is configured as: , in, Used to represent the deep supervision loss, For representing the backbone network Layer and The predicted values ​​between layers, Used to represent the cross entropy loss function.

4. The binary neural network recognition system for agricultural plant leaf diseases according to claim 1, characterized in that: The residual feature extraction module (2) comprises: A deep convolution unit (21), used to capture multi-scale feature representations in the backbone network using multiple convolutional layers; A point-wise convolution unit (22), for linearly combining feature channels using a 1×1 convolution kernel; The residual connection unit (23) is used to add a direct connection between each network layer of the binary neural network so that each network layer learns the residual between the input and the output.

5. The binary neural network recognition system for agricultural plant leaf diseases according to claim 3, characterized in that: The calculation formula of the self-distillation loss is configured as: , in, is used to represent the self-distillation loss, is used to represent the auxiliary classifier with the best prediction performance, The prediction value corresponding to the auxiliary classifier with the best prediction performance is represented. Used to represent the KL loss function.

6. The binary neural network recognition system for agricultural plant leaf diseases according to claim 5, characterized in that: The calculation formula of the total training loss is configured as: , in, is used to denote the total training loss, Used to represent the cross entropy loss, The weight parameter used to represent the deep supervision loss, A weight parameter used to represent the self-distillation loss.

7. The binary neural network recognition system for agricultural plant leaf diseases according to claim 1, characterized in that: In the training stage and the inference stage of the optimized binary neural network, a classifier calling strategy is configured, and the classifier calling strategy is configured as follows: During the training phase, all the auxiliary classifiers are trained using the deep supervision module and the self-distillation module; during the reasoning phase, all the auxiliary classifiers are ignored and only the backbone network is retained for reasoning.

8. The binary neural network recognition system for agricultural plant leaf diseases according to claim 6, characterized in that: Also includes: A leaf parameter generation module (7), used for acquiring key features of a plurality of agricultural plant disease images in a pre-configured plant leaf disease data set, and generating leaf adjustment parameters of the plant leaf disease data set according to each of the key features; A network parameter acquisition module (8), connected to the leaf parameter generation module (7), for acquiring the number of network layers, learning rate, batch size, and threshold of the optimized binary neural network during the training process of the optimized binary neural network; A weight optimization module (9) is connected to the leaf parameter generation module (7), the network parameter acquisition module (8) and the network optimization module (6), and is used to input the number of network layers, the learning rate, the batch size, the threshold and the leaf adjustment parameter into a weight optimization formula, calculate the weight ratio of the weight parameter of the deep supervision loss and the weight parameter of the self-distillation loss, and adjust the calculation formula of the total training loss according to the weight ratio.

9. The binary neural network recognition system for agricultural plant leaf diseases according to claim 8, characterized in that: The weight optimization formula is configured as: , in, Used to indicate the weight ratio, Used to indicate the number of network layers, is used to denote the learning rate, is used to represent the batch size, is used to represent the threshold value, is used to represent the blade adjustment parameter, Used to represent the number of nodes in the network, Used to indicate the number of hidden layers, are used to represent the preset first variable, second variable, third variable, fourth variable and fifth variable respectively, Used to represent the preset first constant coefficient, second constant coefficient, third constant coefficient and fourth constant coefficient.

10. The binary neural network recognition system for agricultural plant leaf diseases according to claim 8, characterized in that: The key features include leaf microscopic features, leaf spectral features, leaf texture features and leaf color features.

Citation Information

Patent Citations

  • Self-distillation training method and scalable dynamic prediction method of convolutional neural network

    CN110472730A

  • Task-towed feature distillation deep neural network learning training method and system, and readable storage medium

    CN112132268A

  • Knowledge distillation method and device, storage medium and terminal

    CN113159073A

  • Agricultural pest detection method and device based on YOLO v5

    CN115546187A

  • VGG11 (BN)-based neural network distillation training scheme

    CN118966286A