MK-YOLOv11n model-based corn leaf disease detection method and system

By improving the YOLO model to MK-YOLOv11n, combined with lightweight ADPConv, ADown and feature fusion modules, the problem of insufficient detection ability of small and medium-sized lesions for corn leaf disease detection is solved, and efficient and accurate corn leaf disease detection is achieved.

CN120563451APending Publication Date: 2025-08-29HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510673705.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

The existing YOLO model has weak detection ability for small lesions and is average in the multi-scale feature fusion effect in corn leaf disease detection, making it difficult to meet the needs of accurate detection.

Method used

The lightweight ADPConv module is used to replace ordinary convolution, the ADown module is used to replace ordinary downsampling module, and the C2PSA_ACmix attention mechanism and TLFF feature fusion module are added to the MiNDet module to build the MK-YOLOv11n model and iterative training is performed to improve detection accuracy.

Benefits of technology

It improves the accuracy and recall rate of corn leaf disease detection, reduces the amount of model parameters and calculation, and can better detect small target lesions, which is suitable for the rapid deployment of smart agriculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120563451A_ABST
    Figure CN120563451A_ABST
Patent Text Reader

Abstract

The invention discloses a corn leaf disease detection method and system based on an MK-YOLOv11n model, and the method comprises the steps: carrying out the preprocessing and data enhancement processing of a data set of a corn leaf disease image obtained in advance, and segmenting the processed image data set into a training set, a verification set and a test set according to a preset proportion; the method comprises the following steps: improving a YOLOv11n model, and constructing an MK-YOLOv11n model; the improvement comprises the following steps: replacing a common convolution with a lightweight ADPConv module, replacing a common down-sampling module with an ADwn module, and replacing a 20 * 20 detection head with a MiNDet module to be a 20 * 20 feature fusion detection head; inputting the training set into an MK-YOLOv11n model, carrying out iterative training, and adjusting training parameters of the model until an optimal model weight is obtained, so as to obtain a trained MK-YOLOv11n model; using the trained MK-YOLOv11n model to detect a corn leaf disease image to be identified; according to the invention, effective balance of model lightweight, reasoning speed and detection precision can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a corn leaf disease detection method and system, and in particular to a corn leaf disease detection method and system based on an MK-YOLOv11n model, belonging to the technical field of computer vision image processing and crop health status detection. Background Art

[0002] Agriculture is a vital component of all economic systems and a fundamental food source that ensures the continuation of life. To maximize yield and quality, improvements in the agricultural industry are essential, creating an ideal environment for the healthy growth of crops and plants. Plant degradation is often caused by diseases, which severely damage crops and sometimes even completely destroy them. Taking corn as an example, corn leaf diseases (such as common corn rust, gray leaf spot, and leaf blight) are among the major diseases affecting corn growth. Especially in the middle and late stages of corn growth, these diseases significantly reduce photosynthesis efficiency, leading to insufficient grain filling and ultimately significant yield reductions. Early diagnosis of plant diseases is crucial to protecting crop health and ensuring sustained agricultural productivity. However, manual inspections are a major component of traditional systems, making them unreliable, time-consuming, and unsuitable for large-scale agriculture. Due to a lack of experience, farmers often find it difficult to detect infections early, especially since the initial symptoms of corn leaf diseases (such as small spots) are often obscured by leaves, making them difficult to visually identify. This leads to delayed intervention and significant crop losses. Therefore, developing efficient and accurate disease detection technology to detect the disease types of early corn leaf diseases has become an urgent need for the development of modern agriculture.

[0003] In recent years, deep learning models have become the most promising solution to these problems. The application of deep learning in agriculture is rapidly expanding, bringing intelligent, precise, and efficient changes to traditional agriculture. Common target detection models include Faster R-CNN, SSD, YOLO, and DETR. Among them, Faster R-CNN has high detection accuracy but is slow and unsuitable for real-time applications; SSD has a lightweight structure but limited effectiveness in detecting small targets; DETR has global modeling capabilities but requires large computational resources and has high deployment costs. The YOLO series of models is the most widely used in agricultural image recognition due to its fast detection speed, simple structure, and ease of deployment. It is particularly suitable for large-scale field monitoring tasks. However, existing YOLO models still have problems such as weak detection capabilities for small lesions and limited multi-scale feature fusion, making them difficult to meet the actual needs of accurate detection of corn leaf diseases in the middle and late stages. Summary of the Invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a corn leaf disease detection method and system based on the MK-YOLOv11n model that can improve detection accuracy.

[0005] Technical solution: The present invention provides a method for detecting corn leaf diseases based on the MK-YOLOv11n model, comprising:

[0006] (1) Preprocessing and data enhancement processing are performed on the pre-acquired corn leaf disease image dataset, and the processed image dataset is divided into a training set, a validation set, and a test set according to a preset ratio;

[0007] (2) Improve the YOLOv11n model and construct the MK-YOLOv11n model; the improvements include: replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module to the 20×20 feature fusion detection head, and adding the C2PSA_ACmix attention mechanism module and the TLFF feature fusion innovation module to the MiNDet module;

[0008] (3) Input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the training parameters of the model until the optimal model weight is obtained to obtain the trained MK-YOLOv11n model;

[0009] (4) Use the trained MK-YOLOv11n model to detect the corn leaf disease images to be identified.

[0010] Furthermore, the image enhancement processing in step (1) is specifically to perform random horizontal rotation, size cropping and data format conversion on all corn leaf disease images.

[0011] Furthermore, the lightweight ADPConv module in step (2) first introduces an adaptive pooling layer, and then chunks the channel to introduce a dual-branch structure. The first branch passes through the APconv convolution layer, the BachNorm layer, and the ReLU6 activation function. In the APconv convolution, one-quarter of the feature vector channel passes through the 3×3 convolution kernel, the BachNorm layer, and the ReLU6 activation function, and the remaining three-quarters pass through the average pooling layer and the previous one-quarter channel using the Concat operation; the second branch passes through the maximum pooling layer and the 1×1 convolution kernel; then the two branches fuse features by multiplying the feature matrix, and after fusion, pass through the 1×1 convolution kernel again.

[0012] Furthermore, the ADown downsampling module in step (2) first passes through an average pooling layer, then chunks the channel to introduce a dual-branch structure, where the first branch passes through a 3×3 convolution layer; the second branch passes through a maximum pooling layer and a 1×1 convolution kernel; and then the results of the two branches are concat-operated.

[0013] Furthermore, the MiNDet module in step (2) consists of a C2PSA_ACmix attention mechanism module, a downsampling module added to the Neck part, a TLFF feature fusion module and a 20×20 detection head.

[0014] Furthermore, the C2PSA_ACmix attention mechanism module is obtained by improving the C2PSA attention mechanism module on the top of the backbone network, specifically including: using the C2PSA module structure, first expanding the number of channels to twice the input channels through a 1×1 convolution kernel, and then using a residual connection, in which the branch structure introduces the ACmix attention mechanism, and then using the 1×1 convolution kernel again to compress the number of channels to the input channels.

[0015] Furthermore, the TLFF feature fusion module inputs two layers of feature vectors of different sizes. For the smaller feature vector, it is first aligned with the larger feature vector through the upsampling module, and then the two feature vectors are aligned based on the channel corresponding to the larger feature vector. After that, the two feature vectors are each passed through a 1×1 convolution kernel and then a Concat operation is used. Then, two different weights W1 and W2 are obtained through a 1×1 convolution kernel. Then, the two feature vectors are multiplied by the weights W1 and W2 for weighted fusion, and finally passed through a 3×3 convolution kernel.

[0016] Furthermore, the step (3) includes:

[0017] The training set is used as input data for model training. The input data size is 640×640. First, the first feature extraction is performed through the convolution operation with kernel_size=3. Then, the feature vector D11 is obtained through the BachNorm layer and SiLU activation function. The feature map size is 320×320.

[0018] D11 is input into the ADPConv lightweight module, first passing through the AdaptivePooling adaptive pooling layer, and then through the Chunk layer to split in half according to the channel. The first part passes through the first branch and the APConv module. In APConv, Chanel / 4 passes through the ordinary convolution with kernel_size=3 and stride=2, and then passes through the BachNorm layer and ReLU6 activation function for downsampling. Chane3 / 4 passes through the Avgpooling maximum pooling layer for downsampling and uses the Concat operation with another Chanel / 4; the second part passes through the maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then passes through the convolution operation with kernel_size=1; the feature matrices of the two parts are matrix multiplied and passed through the convolution operation with kernel_size=1 again; the obtained feature matrix enters the C3k2 module with C3k=False to obtain the feature vector S11, and the feature map size is 160×160;

[0019] Pass S11 through the ADPConv module and the C3k2 module with C3k set to False to obtain the feature vector S22, with a feature map size of 80×80;

[0020] S22 is passed through the ADPConv module and the C3k2 module with C3k set to True again to obtain the feature vector S33, with a feature map size of 40×40;

[0021] After passing S33 through the ADPConv module, the feature vector S44 is obtained, and the feature map size is 20×20;

[0022] S44 is input to the ADown downsampling module, first passing through the Avgpooling average pooling layer, then the channel is chunked and a dual-branch structure is introduced. The first branch is a normal convolution layer with kernel_size=3 and stride=2; the second branch passes through a maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then a convolution operation with kernel_size=1; the two branches then use the Concat operation to obtain the feature matrix and obtain the feature vector AD1, and the feature map size is 10×10;

[0023] AD1 is input into the SPPF module and then into the C2PSA_ACmix attention mechanism module. First, it undergoes a convolution operation with kernel_size=1 to expand the number of feature map channels to twice the number of input channels. Then, it undergoes a Split operation using residual connections to divide the feature vector channels into two equal parts. One part undergoes the ACmix attention mechanism and the other part uses the Concat operation. After that, it undergoes another convolution operation with kernel_size=1 to compress the number of feature map channels to the number of input channels, obtaining the feature vector CA1.

[0024] After CA1 passes through the Upsample upsampling module, it is concat-operated with the S44 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP1. The feature map size is 20×20.

[0025] After UP1 passes through the Upsample upsampling module again, it is concat-operated with the S33 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP2. The feature map size is 40×40.

[0026] After UP2 passes through the Upsample upsampling module again, it is concat-operated with the S22 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP3. The feature map size is 80×80.

[0027] After UP3 passes through the ADPConv lightweight module, it is concat-operated with UP2 and then passes through the C3k2 module with C3k set to True to obtain the feature vector AC1. The feature map size is 40×40.

[0028] After AC1 passes through the ADPConv lightweight module again, it is concat-operated with UP1 to obtain the feature vector C11, with a feature map size of 20×20;

[0029] Pass C11 through the MiNDet module, first pass C11 through the C3k2 module where C3k is True to obtain the feature vector C22;

[0030] Input C22 into the convolution operation with kernel_size=3, reduce the feature map size to 10×10, use the Concat operation with the CA1 feature matrix, and then pass it through the C3k2 module with C3k set to True to obtain the feature vector MN1. The feature map size is 10×10;

[0031] C22 and MN1 are input into the TLFF feature fusion module. First, MN1 is aligned with the C22 feature vector size through the upsampling module using the nearest neighbor interpolation method. Then, the C22 and MN1 feature vectors are aligned based on the C22 channel. After that, the C22 and MN1 feature vectors are convolved with kernel_size=1, stride=1 and then concat. Then, the convolution operation with kernel_size=1, stride=1 and Channel=2 is performed to obtain two different weights W1 and W2 corresponding to C22 and MN1. C22, MN1 are multiplied with weights W1 and W2 for weighted fusion. Finally, the feature vector TL1 is obtained after feature fusion with a convolution kernel with kernel_size=3 and stride=1.

[0032] In the Head part, UP3, AC1 and TL1 are used as multi-scale detection heads with sizes of 80×80, 40×40 and 20×20 respectively, and finally the detection result Y is output.

[0033] Based on the same inventive concept, the present invention also provides a corn leaf disease detection system based on the MK-YOLOv11n model, comprising:

[0034] A preprocessing module is used to perform preprocessing and data enhancement on the pre-acquired corn leaf disease image dataset, and split the processed image dataset into a training set, a validation set, and a test set according to a preset ratio;

[0035] A model improvement module is used to improve the YOLOv11n model and build the MK-YOLOv11n model. The improvements include replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module, and adding the C2PSA_ACmix module and the TLFF feature fusion innovation module to the MiNDet module.

[0036] The model training module is used to input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the model's training parameters until the optimal model weight is obtained to obtain a trained MK-YOLOv11n model;

[0037] The detection module is used to detect corn leaf disease images using the trained MK-YOLOv11n model.

[0038] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the corn leaf disease detection method based on the MK-YOLOv11n model according to any one of the above items are implemented.

[0039] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: 1. The present invention proposes a lightweight ADPConv convolution module, which greatly reduces the number of parameters and calculations compared with ordinary convolution while ensuring high precision; 2. The present invention proposes a TLFF feature weighted fusion module that fuses feature vectors of different sizes. The module inputs two layers of feature vectors of different sizes, aligns the sizes of the small-size feature vector and the large-size feature vector, and then performs weighted fusion; the module can solve the problem of weighted feature fusion of feature maps of different scales; 3. The present invention proposes a feature fusion detection head MiNDet module that fuses 10×10 small targets. The module introduces the C2PSA_ACmix attention mechanism that improves the C2PSA attention mechanism; adds an upsampling operation and a downsampling operation in the Neck layer to extract the features of the 10×10 small targets; in the TLFF module, the feature vectors of 20×20 and 10×10 sizes are feature-fused. The detection head of this module that fuses small targets can detect more small spot labels on corn leaves, greatly improving the accuracy of small target feature detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0041] Figure 2 Schematic diagram of the MK-YOLOv11n model structure according to an embodiment of the present invention;

[0042] Figure 3 ADPConv module network structure diagram of an embodiment of the present invention;

[0043] Figure 4 ADown module network structure diagram of an embodiment of the present invention;

[0044] Figure 5 This is a schematic diagram of the MiNDet module network structure according to an embodiment of the present invention;

[0045] Figure 6 This is a schematic diagram of the network structure of the C2PSA_ACmix module according to an embodiment of the present invention;

[0046] Figure 7 Schematic diagram of the TLFF module network structure of an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0048] As attached Figure 1 As shown, the corn leaf disease detection method based on the MK-YOLOv11n model of this embodiment includes:

[0049] (1) Preprocessing and data enhancement processing are performed on the pre-acquired corn leaf disease image dataset, and the processed image dataset is divided into a training set, a validation set, and a test set according to a preset ratio;

[0050] (2) Improve the YOLOv11n model and construct the MK-YOLOv11n model; the improvements include: replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module to the 20×20 feature fusion detection head, and adding the C2PSA_ACmix attention mechanism module and the TLFF feature fusion innovation module to the MiNDet module;

[0051] (3) Input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the training parameters of the model until the optimal model weight is obtained to obtain the trained MK-YOLOv11n model;

[0052] (4) Use the trained MK-YOLOv11n model to detect the corn leaf disease images to be identified.

[0053] Specifically, in step (1), the Corn Disease dataset is preprocessed, and then the preprocessed image data is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0054] This dataset includes four common health states of corn during the middle and late stages of growth: healthy leaves, common corn rust, gray leaf spot, and leaf blight. Data augmentation was performed on all images, including random horizontal rotation and scaling, cropping, and data format conversion.

[0055] In step (2), a corn leaf disease detection model based on the MK-YOLOv11n model is constructed, such as Figure 2As shown in the figure, the overall model mainly includes the Backbone feature extraction backbone network, the Neck multi-scale feature extraction network and the Detect detection module; the ordinary convolution is replaced by the lightweight ADPConv module, the ordinary downsampling module is replaced by the ADown module, the 20×20 detection head is replaced by the MiNDet module, and the TLFF feature fusion innovation module is added to the MiNDet module;

[0056] The specific implementation process in step (3) is as follows:

[0057] The training set is used as input data for model training. The input data size is 640×640. First, the first feature extraction is performed through the convolution operation with kernel_size=3. Then, the feature vector D11 is obtained through the BachNorm layer and SiLU activation function. The feature map size is 320×320.

[0058] like Figure 3 As shown, D11 is input into the ADPConv lightweight module, first passing through the AdaptivePooling adaptive pooling layer; then it passes through the Chunk layer and is split in half according to the channel. The first part passes through the first branch and the APConv module. In APConv, Chanel / 4 passes through the ordinary convolution with kernel_size=3 and stride=2, and then passes through the BachNorm layer and the ReLU6 activation function for downsampling. Chane3 / 4 passes through the Avgpooling maximum pooling layer for downsampling and uses the Concat operation with another Chanel / 4; the second part passes through the maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then passes through the convolution operation with kernel_size=1; the feature matrices of the two parts are matrix multiplied and passed through the convolution operation with kernel_size=1 again; the obtained feature matrix enters the C3k2 module with C3k being False to obtain the feature vector S11, and the feature map size is 160×160;

[0059] S11 is passed through the ADPConv module and the C3k2 module with C3k set to False again to obtain the feature vector S22, with a feature map size of 80×80;

[0060] S22 is passed through the ADPConv module and the C3k2 module with C3k set to True again to obtain the feature vector S33, with a feature map size of 40×40;

[0061] After S33 passes through the ADPConv module again, the feature vector S44 is obtained, and the feature map size is 20×20;

[0062] like Figure 4 As shown, S44 is input to the ADown downsampling module, first passing through the Avgpooling average pooling layer; then the channel is chunked and a dual-branch structure is introduced; the first branch is a normal convolution layer with kernel_size=3 and stride=2; the second branch passes through a maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then a convolution operation with kernel_size=1; then the two branches use the Concat operation to obtain the feature matrix to obtain the feature vector AD1, and the feature map size is 10×10;

[0063] like Figure 6 As shown in the figure, AD1 is input into the SPPF module and then into the C2PSA_ACmix attention mechanism module. First, it undergoes a convolution operation with kernel_size=1 to expand the number of feature map channels to twice the number of input channels. Then, it undergoes a Split operation using residual connections to divide the feature vector channels into two equal parts. One part undergoes the ACmix attention mechanism and the other part uses the Concat operation. After that, it undergoes another convolution operation with kernel_size=1 to compress the number of feature map channels to the number of input channels, and obtains the feature vector CA1.

[0064] After CA1 passes through the Upsample upsampling module, it is concat-operated with the S44 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP1. The feature map size is 20×20.

[0065] After UP1 passes through the Upsample upsampling module again, it is concat-operated with the S33 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP2. The feature map size is 40×40.

[0066] After UP2 passes through the Upsample upsampling module again, it is concat-operated with the S22 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature matrix UP3. The feature map size is 80×80.

[0067] After UP3 passes through the ADPConv lightweight module, it is concat-operated with UP2 and then passes through the C3k2 module with C3k set to True to obtain the feature matrix AC1. The feature map size is 40×40.

[0068] After AC1 passes through the ADPConv lightweight module again, it is concat-operated with UP1 to obtain the feature matrix C11, with a feature map size of 20×20;

[0069] like Figure 5 As shown, C11 passes through the MiNDet module, and then passes through the C3k2 module with C3k being True to obtain the feature vector C22; C22 is input into the convolution operation with kernel_size=3, the feature map size is reduced to 10×10, and the CA1 feature matrix is ​​concat-operated, and then passes through the C3k2 module with C3k being True to obtain the feature matrix MN1, and the feature map size is 10×10;

[0070] like Figure 7 As shown, C22 and MN1 are input into the TLFF feature fusion module. First, MN1 is upsampled and the C22 feature vector size is aligned using the nearest neighbor interpolation method; then the two feature vectors C22 and MN1 are channel-aligned based on the C22 channel; after that, the two feature vectors C22 and MN1 are each subjected to a convolution operation with kernel_size=1, stride=1 and then a Concat operation is used. After the convolution operation with kernel_size=1, stride=1, Chnel=2, two different weights W1 and W2 corresponding to C22 and MN1 are obtained. C22 and MN1 are multiplied by the weights W1 and W2 and then weighted fused. Then, the feature vector TL1 is obtained after feature fusion with a convolution kernel with kernel_size=3, stride=1.

[0071] In this step, in the Head part, the feature vectors UP3, AC1 and TL1 obtained in the above steps are used as multi-scale detection heads with sizes of 80×80, 40×40 and 20×20 respectively to detect corn leaf disease. Then, the detection result prior box and the true value are obtained to perform IOU loss. Through continuous iterative forward and backward propagation processes, the model parameters are updated through the momentum gradient descent algorithm to optimize the network parameters until the best weight is obtained.

[0072] In step (4), the pre-trained MK-YOLOv11n model is used to detect the corn leaf image to be identified. The present invention adopts several commonly used performance evaluation indicators: precision, recall, average precision AP (Average Precision), and mean average precision mAP (meanAverage Precision). In order to more intuitively reflect the lightweight effect of the model, the present invention also uses parameters and computational complexity (FLOPS) for evaluation. Parameters are used to describe the size of the model, which is similar to the spatial complexity in the algorithm; and computational complexity (FLOPS) is used to describe the execution efficiency of the model, which is similar to the time complexity in the algorithm, that is, the number of floating-point operations per second. The specific experimental comparison results are shown in Table 1.

[0073] Table 1 Comparison results before and after improvement

[0074] Model Precision(%) Recall (%) mAP0.5(%) Parameters GFLOPS YOLOv11n 93.6 91 95.1 2590620 6.4 MK-YOLOv11n 96.2 93 95.6 1682936 3.7

[0075] From the results in Table 1, we can see that compared with the original YOLOv11n, the precision, recall rate, and mAP0.5 value of MK-YOLOv11n have all been improved. At the same time, the number of parameters and computational complexity of the model have also been reduced, with the number of parameters and floating-point numbers decreasing by 35% and 43% respectively. This makes it possible to quickly and efficiently deploy and apply it in subsequent farmland production in the field of smart agriculture.

[0076] The description of the variables involved in this embodiment is shown in Table 2.

[0077] Table 2 Variable description table

[0078]

[0079]

[0080] Based on the same inventive concept, this embodiment also provides a corn leaf disease detection system based on the MK-YOLOv11n model, including:

[0081] A preprocessing module is used to perform preprocessing and data enhancement on the pre-acquired corn leaf disease image dataset, and split the processed image dataset into a training set, a validation set, and a test set according to a preset ratio;

[0082] A model improvement module is used to improve the YOLOv11n model and build the MK-YOLOv11n model. The improvements include replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module, and adding the C2PSA_ACmix module and the TLFF feature fusion innovation module to the MiNDet module.

[0083] The model training module is used to input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the model's training parameters until the optimal model weight is obtained to obtain a trained MK-YOLOv11n model;

[0084] The detection module is used to detect corn leaf disease images using the trained MK-YOLOv11n model.

[0085] Based on the same inventive concept, this embodiment also provides a computing device, including: one or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the corn leaf disease detection method based on the MK-YOLOv11n model according to any one of the above items are implemented.

[0086] The MK-YOLOv11n model proposed in this paper can monitor the health of corn leaves in the middle and late stages of growth, reducing the number of parameters and computational complexity by 35% and 43%, respectively. It is also more effective in detecting dense spots on leaves, possessing great practical value and promising prospects for crop-level detection.

Claims

1. A corn leaf disease detection method based on the MK-YOLOv11n model, characterized in that: include: (1) Preprocessing and data enhancement processing are performed on the pre-acquired corn leaf disease image dataset, and the processed image dataset is divided into a training set, a validation set, and a test set according to a preset ratio; (2) Improve the YOLOv11n model and construct the MK-YOLOv11n model; the improvements include: replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module to the 20×20 feature fusion detection head, and adding the C2PSA_ACmix attention mechanism module and the TLFF feature fusion innovation module to the MiNDet module; (3) Input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the training parameters of the model until the optimal model weight is obtained to obtain the trained MK-YOLOv11n model; (4) Use the trained MK-YOLOv11n model to detect the corn leaf disease images to be identified.

2. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The image enhancement processing in step (1) specifically involves performing random horizontal rotation, size cropping, and data format conversion on all corn leaf disease images.

3. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The lightweight ADPConv module in step (2) first introduces an adaptive pooling layer, then chunks the channel and introduces a dual-branch structure. The first branch passes through the APconv convolution layer, the BachNorm layer and the ReLU6 activation function. In the APconv convolution, one quarter of the feature vector channel passes through the 3×3 convolution kernel, the BachNorm layer and the ReLU6 activation function, and the remaining three quarters pass through the average pooling layer and the previous quarter channel using the Concat operation; the second branch passes through the maximum pooling layer and the 1×1 convolution kernel; then the two branches fuse features by multiplying the feature matrix, and after fusion, pass through the 1×1 convolution kernel again.

4. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: In step (2), the ADown downsampling module first passes through an average pooling layer, then chunks the channel and introduces a dual-branch structure. The first branch passes through a 3×3 convolution layer; the second branch passes through a maximum pooling layer and a 1×1 convolution kernel; and then the results of the two branches are concat-operated.

5. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The MiNDet module in step (2) consists of a C2PSA_ACmix attention mechanism module, a downsampling module added to the Neck part, a TLFF feature fusion module and a 20×20 detection head.

6. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The C2PSA_ACmix attention mechanism module is obtained by improving the C2PSA attention mechanism module on the top of the backbone network, specifically including: using the C2PSA module structure, first expanding the number of channels to twice the input channels through a 1×1 convolution kernel, and then using a residual connection, in which the branch structure introduces the ACmix attention mechanism, and then using a 1×1 convolution kernel again to compress the number of channels to the input channels.

7. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The TLFF feature fusion module inputs two layers of feature vectors of different sizes. For the smaller feature vector, it is first aligned with the larger feature vector through the upsampling module, and then the two feature vectors are aligned based on the channel corresponding to the larger feature vector. After that, the two feature vectors are each passed through a 1×1 convolution kernel and then a Concat operation is used. Then, two different weights W1 and W2 are obtained through a 1×1 convolution kernel. The two feature vectors are then multiplied by the weights W1 and W2 for weighted fusion, and finally passed through a 3×3 convolution kernel.

8. The corn leaf disease detection method based on the MK-YOLOv11n model according to claim 1, characterized in that: The step (3) comprises: The training set is used as input data for model training. The input data size is 640×640. First, the first feature extraction is performed through the convolution operation with kernel_size=3. Then, the feature vector D11 is obtained through the BachNorm layer and SiLU activation function. The feature map size is 320×320. D11 is input into the ADPConv lightweight module, first passing through the AdaptivePooling adaptive pooling layer, and then through the Chunk layer to split in half according to the channel. The first part passes through the first branch and the APConv module. In APConv, Chanel / 4 passes through the ordinary convolution with kernel_size=3 and stride=2, and then passes through the BachNorm layer and ReLU6 activation function for downsampling. Chane3 / 4 passes through the Avgpooling maximum pooling layer for downsampling and uses the Concat operation with another Chanel / 4; the second part passes through the maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then passes through the convolution operation with kernel_size=1; the feature matrices of the two parts are matrix multiplied and passed through the convolution operation with kernel_size=1 again; the obtained feature matrix enters the C3k2 module with C3k=False to obtain the feature vector S11, and the feature map size is 160×160; Pass S11 through the ADPConv module and the C3k2 module with C3k set to False to obtain the feature vector S22, with a feature map size of 80×80; S22 is passed through the ADPConv module and the C3k2 module with C3k set to True again to obtain the feature vector S33, with a feature map size of 40×40; After passing S33 through the ADPConv module, the feature vector S44 is obtained, and the feature map size is 20×20; S44 is input to the ADown downsampling module, first passing through the Avgpooling average pooling layer, then the channel is chunked and a dual-branch structure is introduced. The first branch is a normal convolution layer with kernel_size=3 and stride=2; the second branch passes through a maximum pooling layer with kernel_size=3, stride=1, and padding=1, and then a convolution operation with kernel_size=1; the two branches then use the Concat operation to obtain the feature matrix and obtain the feature vector AD1, and the feature map size is 10×10; AD1 is input into the SPPF module and then into the C2PSA_ACmix attention mechanism module. First, it undergoes a convolution operation with kernel_size=1 to expand the number of feature map channels to twice the number of input channels. Then, it undergoes a Split operation using residual connections to divide the feature vector channels into two equal parts. One part undergoes the ACmix attention mechanism and the other part uses the Concat operation. After that, it undergoes another convolution operation with kernel_size=1 to compress the number of feature map channels to the number of input channels, obtaining the feature vector CA1. After CA1 passes through the Upsample upsampling module, it is concat-operated with the S44 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP1. The feature map size is 20×20. After UP1 passes through the Upsample upsampling module again, it is concat-operated with the S33 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP2. The feature map size is 40×40. After UP2 passes through the Upsample upsampling module again, it is concat-operated with the S22 feature matrix and then passes through the C3k2 module with C3k set to False to obtain the feature vector UP3. The feature map size is 80×80. After UP3 passes through the ADPConv lightweight module, it is concat-operated with UP2 and then passes through the C3k2 module with C3k set to True to obtain the feature vector AC1. The feature map size is 40×40. After AC1 passes through the ADPConv lightweight module again, it is concat-operated with UP1 to obtain the feature vector C11, with a feature map size of 20×20; Pass C11 through the MiNDet module, first pass C11 through the C3k2 module where C3k is True to obtain the feature vector C22; Input C22 into the convolution operation with kernel_size=3, reduce the feature map size to 10×10, use the Concat operation with the CA1 feature matrix, and then pass it through the C3k2 module with C3k set to True to obtain the feature vector MN1. The feature map size is 10×10; C22 and MN1 are input into the TLFF feature fusion module. First, MN1 is aligned with the C22 feature vector size through the upsampling module using the nearest neighbor interpolation method. Then, the C22 and MN1 feature vectors are aligned based on the C22 channel. After that, the C22 and MN1 feature vectors are convolved with kernel_size=1, stride=1 and then concat. Then, the convolution operation with kernel_size=1, stride=1 and Channel=2 is performed to obtain two different weights W1 and W2 corresponding to C22 and MN1. C22, MN1 are multiplied with weights W1 and W2 for weighted fusion. Finally, the feature vector TL1 is obtained after feature fusion with a convolution kernel with kernel_size=3 and stride=1. In the Head part, UP3, AC1 and TL1 are used as multi-scale detection heads with sizes of 80×80, 40×40 and 20×20 respectively, and finally the detection result Y is output.

9. A corn leaf disease detection system based on the MK-YOLOv11n model, characterized in that: include: A preprocessing module is used to perform preprocessing and data enhancement on the pre-acquired corn leaf disease image dataset, and split the processed image dataset into a training set, a validation set, and a test set according to a preset ratio; A model improvement module is used to improve the YOLOv11n model and build the MK-YOLOv11n model. The improvements include replacing the ordinary convolution with the lightweight ADPConv module, replacing the ordinary downsampling module with the ADown module, replacing the 20×20 detection head with the MiNDet module, and adding the C2PSA_ACmix module and the TLFF feature fusion innovation module to the MiNDet module. The model training module is used to input the training set into the MK-YOLOv11n model, perform iterative training, and adjust the model's training parameters until the optimal model weight is obtained to obtain a trained MK-YOLOv11n model; The detection module is used to detect corn leaf disease images using the trained MK-YOLOv11n model.

10. A computing device, characterized in that include: One or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the corn leaf disease detection method based on the MK-YOLOv11n model according to any one of claims 1 to 8 are implemented.