Method and device for identifying multiple diseases on pear leaves based on edge enhancement

By using an edge enhancement-based method in the identification of multiple diseases on pear leaves, combined with a convolutional neural network and an attention mechanism, the problem of fuzzy disease edges and multi-disease identification is solved, and accurate segmentation and model prediction of fuzzy edge diseases are achieved. accuracy improvement.

CN119152376BActive Publication Date: 2025-01-21ANHUI AGRICULTURAL UNIVERSITY

Patent Information

Application Number
CN202411630867.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-21
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

When identifying and segmenting multiple diseases of pear leaves, the prior art faces the problems of fuzzy edges of the disease, high algorithm complexity and low robustness. Especially when multiple diseases coexist, it is difficult to achieve accurate and correct segmentation.

Method used

The recognition method based on edge enhancement is adopted, by performing dimension transformation, convolution, pooling, upsampling and deconvolution operations on the input image, and combining the spatial attention network and channel attention network, and then performs edge feature extraction and Feature fusion enhances the ability to segment blurry edge diseases.

Benefits of technology

It achieves a more accurate segmentation of the edges of blurred edge diseases, improves the accuracy of model prediction and the accuracy of edge blurred diseases, and solves the problems of edge blurring and multi-disease identification in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152376B_ABST
    Figure CN119152376B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for identifying multiple diseases of pear leaves based on edge enhancement, and the method includes: acquiring an input image; performing dimension transformation on the input image to obtain a dimension transformation image; performing multiple convolutions and pooling on the dimension transformation image to obtain a first convolution image; performing multiple upsampling and sub-deconvolutions on the first convolution image to obtain a second convolution image; performing edge feature extraction on the input image to obtain an edge feature map, and performing feature fusion on the edge feature map and the second convolution image; during fusion, important feature parts are enhanced, and further feature extraction is performed on the fused feature map in the later stage, and finally a more accurate segmentation of the edges of diseases with blurred edges is achieved, firstly the original image is extracted to obtain an edge feature map rich in edge features and similar to the prediction of real diseases, and the edge feature map is fused in the last stage of the network, thereby improving the accuracy of model prediction and the precision of diseases with blurred edges.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for identifying multiple diseases of pear leaves based on edge enhancement, a device for identifying multiple diseases of pear leaves based on edge enhancement, a computer device and a computer-readable storage medium. Background Art

[0002] Image segmentation is an important topic in the field of image processing and computer vision. It has a wide range of applications in scene understanding, medical image analysis, robot perception, video surveillance, augmented reality, disease segmentation and other fields. Pear trees occupy an important position in the world's fruit tree species. The development of the pear fruit industry has also brought rich economic benefits and promoted the development of the agricultural economy. However, in recent years, plant pathology has become a major threat to production and supply security around the world. Therefore, achieving accurate segmentation of pear tree diseases can help fruit farmers better manage crops, improve yield and quality, and achieve sustainable development of agricultural production. Therefore, how to accurately and efficiently identify and segment pear tree leaf diseases is an urgent problem to be solved.

[0003] Traditional image algorithms are mainly based on mathematics and computer vision theory. They process and analyze images by preprocessing, extracting features, and classifying them. With the continuous development of artificial intelligence technology, deep learning is increasingly used in the field of image segmentation. Convolutional neural networks (CNNs) have become a trend in the use of images to automatically detect and segment crop diseases. The algorithm architecture of deep learning image processing is automatically learned by neural networks. By automatically learning the features in the data, the features of the image are extracted and classified. Whether it is traditional algorithms or neural networks, when the edges of the disease are fuzzy, the edges cannot be accurately segmented, and the diversity of disease features often leads to misjudgment of the disease. When multiple diseases coexist, accurate and correct segmentation cannot be achieved.

[0004] The existing technology has the following deficiencies and shortcomings: the edges of the disease are relatively fuzzy, and it is difficult to achieve accurate segmentation using traditional segmentation methods; the existing neural network algorithm is highly complex and has low robustness, making it difficult to meet the needs of disease segmentation; the existing network will produce misjudgments when processing multiple diseases at the same time, and the recognition results are not stable enough. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method for identifying multiple diseases on pear leaves based on edge enhancement, a device for identifying multiple diseases on pear leaves based on edge enhancement, a computer device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a method for identifying multiple diseases of pear leaves based on edge enhancement, the method comprising:

[0007] Get the input image;

[0008] Performing dimension transformation on the input image to obtain a dimension transformed image;

[0009] The dimensionally transformed image is subjected to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image;

[0010] Wherein, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, the first feature extraction of the spatial attention network and the channel attention network is performed;

[0011] The first convolution image is subjected to a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution to obtain a second convolution image;

[0012] The input image is subjected to edge feature extraction to obtain an edge feature map, and the edge feature map is subjected to feature fusion with the second convolution image to obtain an output feature map.

[0013] Preferably, the step of subjecting the dimensionally transformed image to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image comprises:

[0014] Performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map;

[0015] Performing a MaxPool maximum pooling operation on the first convolutional feature map to obtain a first pooled feature map;

[0016] Perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolution feature map;

[0017] Performing a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooled feature map;

[0018] Perform a third convolution on the second pooled feature map and process it using a ReLU activation function to obtain a third convolution feature map;

[0019] Performing a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map;

[0020] Performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map;

[0021] Performing a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooled feature map;

[0022] The fourth pooled feature map is convolved for a fifth time to obtain a first convolution image.

[0023] Preferably, the step of performing a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution on the first convolution image to obtain a second convolution image comprises:

[0024] Performing a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map;

[0025] Concatenating the first up-sampled feature map with the fourth convolutional feature map to obtain a first concatenated feature map;

[0026] Performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map;

[0027] Performing a second upsampling on the first deconvolution feature map by bilinear interpolation to obtain a second upsampled feature map;

[0028] Concatenating the second up-sampled feature map with the third convolutional feature map to obtain a second concatenated feature map;

[0029] Performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map;

[0030] Performing a third upsampling on the second deconvolution feature map by bilinear interpolation to obtain a third upsampled feature map;

[0031] Splicing the third up-sampled feature map with the second convolution feature map to obtain a third spliced ​​feature map;

[0032] Performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map;

[0033] Performing a fourth upsampling on the third deconvolution feature map by bilinear interpolation to obtain a fourth upsampling feature map;

[0034] Splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth spliced ​​feature map;

[0035] A convolution operation is performed on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

[0036] Preferably, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, performing the first feature extraction of the spatial attention network and the channel attention network includes:

[0037] Calculate the difference between each pixel of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map and the average value of the pixels, and calculate the ratio of the difference to the variance of all pixel values ​​of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map; determine the ratio as the corresponding new pixel to obtain a first variance feature map;

[0038] Perform weight extraction on the first variance feature map through a Sigomid activation function to obtain a weight coefficient;

[0039] Strengthening the first convolution feature map according to the weight coefficient to obtain a first residual connection feature map;

[0040] Through hole convolutions of different scales, feature extraction is performed on the first residual connection feature map to obtain a hole convolution feature map;

[0041] The atrous convolution feature map is divided into two subspaces with complementary channels, and a convolution operation is performed simultaneously to obtain a first channel feature map and a second channel feature map;

[0042] Performing dual-channel group convolution on the first channel feature map through two different convolution kernels to obtain a first group convolution feature map and a second group convolution feature map;

[0043] Superimposing the first grouped convolutional feature map and the second grouped convolutional feature map to obtain a superimposed feature map;

[0044] Perform a convolution operation on the second channel feature map, and concatenate the result of the convolution operation with the second channel feature map to form a concatenated feature map;

[0045] Extracting the first channel attention distribution coefficient of the superimposed feature map;

[0046] Extracting the second channel attention distribution coefficient of the concatenated feature map;

[0047] Applying the first channel attention distribution coefficient and the second channel attention distribution coefficient to the dilated convolution feature map to obtain a spatial and channel attention network feature map;

[0048] The spatial and channel attention network feature maps are used as the input of the corresponding first pooling, second pooling, third pooling or fourth pooling.

[0049] Preferably, performing edge feature extraction on the input image to obtain an edge feature map, and performing feature fusion on the edge feature map and the second convolution image to obtain an output feature map comprises:

[0050] Performing convolution processing and residual link processing on the input image to obtain an edge enhancement feature map;

[0051] The edge-enhanced feature map is processed by a Conv layer containing a Soble operator to obtain an edge-aware feature map;

[0052] Accumulate all channels of the edge-aware feature map, activate it using the SiLu function and use residual connections to obtain a channel-accumulated feature map;

[0053] Performing a convolution operation on the channel accumulation feature map to obtain an edge feature map;

[0054] Perform global average pooling and global maximum pooling operations on the second convolution image and the edge feature map to obtain a first feature distribution map, a second feature distribution map, a third feature distribution map, and a fourth feature distribution map with four dimensions of C*1*1;

[0055] The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the H dimension to obtain a first dimension spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a first weight distribution;

[0056] The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the W dimension to obtain a second-dimensional spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a second weight distribution;

[0057] Applying the first weight distribution and the second weight distribution to the edge feature map and the second convolution image to obtain a first fused feature map and a second fused feature map respectively;

[0058] Splicing the first fused feature map and the second fused feature map to obtain a spliced ​​fused feature map;

[0059] The spliced ​​fusion feature map is extracted through different convolutions to obtain a first feature extraction map and a second feature extraction map, and the first feature extraction map and the second feature extraction map are added to obtain an output feature map.

[0060] The embodiment of the present invention discloses a device for identifying multiple diseases of pear leaves based on edge enhancement, the device comprising:

[0061] An input image module is used to obtain an input image;

[0062] A dimension transformation image module, used for performing dimension transformation on the input image to obtain a dimension transformation image;

[0063] A first convolution image module, used for subjecting the dimensionally transformed image to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image;

[0064] A first feature extraction module, used for performing first feature extraction of the spatial attention network and the channel attention network after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, and after the fourth convolution and before the fourth pooling;

[0065] a second convolution image acquisition module, configured to perform a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution on the first convolution image to obtain a second convolution image;

[0066] The fusion module is used to extract edge features from the input image to obtain an edge feature map, and perform feature fusion on the edge feature map and the second convolution image to obtain an output feature map.

[0067] Preferably, the first convolution image module comprises:

[0068] A first convolution feature map submodule, used for performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map;

[0069] A first pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the first convolution feature map to obtain a first pooling feature map;

[0070] A second convolutional feature map submodule, used to perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolutional feature map;

[0071] A second pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooling feature map;

[0072] A third convolution feature map submodule, used for performing a third convolution on the second pooled feature map and processing it using a ReLU activation function to obtain a third convolution feature map;

[0073] A third pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map;

[0074] A fourth convolution feature map submodule, used for performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map;

[0075] The fourth pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooling feature map;

[0076] The first convolution image submodule is used to perform a fifth convolution on the fourth pooling feature map to obtain a first convolution image.

[0077] Preferably, the second convolution image acquisition module includes:

[0078] A first upsampling feature map submodule, configured to perform a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map;

[0079] A first splicing feature map submodule, used for splicing the first up-sampled feature map with the fourth convolution feature map to obtain a first splicing feature map;

[0080] A first deconvolution feature map submodule, used for performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map;

[0081] A second upsampling feature map submodule, used for performing a second upsampling on the first deconvolution feature map through bilinear interpolation to obtain a second upsampling feature map;

[0082] A second splicing feature map submodule, used for splicing the second up-sampled feature map with the third convolution feature map to obtain a second splicing feature map;

[0083] A second deconvolution feature map submodule, used for performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map;

[0084] A third up-sampling feature map submodule, used for performing a third up-sampling on the second deconvolution feature map through bilinear interpolation to obtain a third up-sampling feature map;

[0085] A third splicing feature map submodule, used to splice the third up-sampled feature map with the second convolution feature map to obtain a third splicing feature map;

[0086] A third deconvolution feature map submodule, used for performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map;

[0087] A fourth upsampling feature map submodule, used for performing a fourth upsampling on the third deconvolution feature map through bilinear interpolation to obtain a fourth upsampling feature map;

[0088] A fourth splicing feature map submodule, used for splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth splicing feature map;

[0089] The fourth deconvolution feature map submodule is used to perform a convolution operation on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

[0090] The embodiment of the present invention discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for identifying multiple diseases of pear leaves based on edge enhancement when executing the computer program.

[0091] The embodiment of the present invention discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for identifying multiple diseases of pear leaves based on edge enhancement are implemented.

[0092] The embodiments of the present invention include the following advantages:

[0093] In an embodiment of the present invention, the pear leaf multi-disease identification method based on edge enhancement includes: acquiring an input image; performing a dimension transformation on the input image to obtain a dimension transformation image; performing a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling on the dimension transformation image to obtain a first convolution image; wherein, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, performing a first feature extraction of a spatial attention network and a channel attention network; performing a first upsampling, a first deconvolution, a second upsampling, and a third deconvolution on the first convolution image. Upsampling, second deconvolution, third upsampling, third deconvolution, fourth upsampling, fourth deconvolution, to obtain a second convolution image; edge feature extraction is performed on the input image to obtain an edge feature map, and the edge feature map is feature-fused with the second convolution image to obtain an output feature map; important feature parts are enhanced during fusion, and further feature extraction is performed on the fused feature map in the later stage, and finally a more accurate segmentation of the edges of diseases with blurred edges is achieved. The original image is first extracted to obtain an edge feature map rich in edge features and similar to the real disease prediction, and the edge feature map is fused in the last stage of the network, which can supplement the final features, thereby improving the accuracy of model prediction and the accuracy of diseases with blurred edges. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0095] Figure 1 is a schematic diagram of an embodiment of a method for identifying multiple diseases on pear leaves based on edge enhancement according to an embodiment of the present invention;

[0096] Figure 2 is a flow chart of an SCA module according to an embodiment of the present invention;

[0097] Figure 3 is a framework diagram of an RH module according to an embodiment of the present invention;

[0098] Figure 4 is a schematic diagram of an embodiment of a method for identifying multiple diseases on pear leaves based on edge enhancement according to an embodiment of the present invention;

[0099] Figure 5It is a structural block diagram of an embodiment of a device for identifying multiple diseases of pear leaves based on edge enhancement according to an embodiment of the present invention;

[0100] Figure 6 The diagram is a diagram of the internal structure of a computer device according to an embodiment. DETAILED DESCRIPTION

[0101] In order to make the technical problems, technical solutions and beneficial effects solved by the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0102] Reference Figure 1 , shows a schematic diagram of an embodiment of a method for identifying multiple diseases on pear leaves based on edge enhancement according to an embodiment of the present invention, which may specifically include the following steps:

[0103] Step S101, obtaining an input image;

[0104] In an embodiment of the present invention, the pear leaf multi-disease identification method can be applied to a terminal, which can be various computers. The embodiment of the present invention does not limit the specific type of electrical equipment. The operating system of the terminal can include Android, Harmony OS, IOS, Windows Phone, Windows, etc., and the present invention does not impose too many restrictions on this.

[0105] The edge-enhancement-based pear leaf multi-disease identification method in the embodiment of the present invention can be a recognition process of a neural network; and for the training process of the neural network, the pear leaf disease images and disease results can be divided into a training set and a test set, and the training set is used to train the neural network corresponding to the embodiment of the present invention; the training set containing the pear leaf disease images and disease results is input into the corresponding neural network to train the neural network, and the test set is used to adjust the output results and model weight coefficients of the corresponding neural network, etc. In the embodiment of the present invention, the edge-enhancement-based pear leaf multi-disease identification method can be the actual application process of the corresponding neural network, or it can be a test process, and the embodiment of the present invention does not impose too many restrictions on this.

[0106] That is, the input image in the embodiment of the present invention may be a picture containing a pear leaf image obtained in various ways, and the pear leaf image may be an image of a pear leaf suffering from various diseases.

[0107] Step S102, transforming the dimension of the input image to obtain a dimension-transformed image;

[0108] In a specific application, the input image is first dimensionally transformed to obtain a dimensionally transformed image so as to be better input into the neural network.

[0109] Step S103, subjecting the dimensionally transformed image to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image;

[0110] In actual application to the embodiment of the present invention, the dimensionally transformed image is subjected to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image, including:

[0111] Performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map;

[0112] Performing a MaxPool maximum pooling operation on the first convolutional feature map to obtain a first pooling feature map;

[0113] Perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolution feature map;

[0114] Performing a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooling feature map;

[0115] Perform a third convolution on the second pooled feature map and process it using a ReLU activation function to obtain a third convolution feature map;

[0116] Performing a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map;

[0117] Performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map;

[0118] Performing a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooled feature map;

[0119] The fourth pooled feature map is convolved for a fifth time to obtain a first convolution image.

[0120] In the embodiment of the present invention, the dimensionally transformed image undergoes multiple convolutional pooling operations, mainly to extract and retain the features of the image, and pass the extracted features to the next convolutional layer and the corresponding upsampling part.

[0121] In one architecture of an embodiment of the present invention, the network main body constructed in the embodiment of the present invention is a coding and decoding architecture, and the overall framework diagram is as follows: Figure 2As shown in the figure, it contains 10 layers in total. First, the input image is transformed in dimension. Then there are 4 layers of downsampling layers, including multiple convolutions and pooling. They mainly extract and retain the features of the image, and pass the extracted features to the next convolution layer and the corresponding upsampling part. The next 4 layers are upsampling layers, which are used to combine the features from the previous layer with the features passed by the corresponding downsampling layer to perform feature fusion and restore the image dimension. The last layer is used to predict and restore the number of image channels and output the prediction result. The input image is , feature maps of different spatial scales output by the downsampling layer ;in, Figure 2 Downsample in the example means downsampling; Upsample means upsampling; OutputConv means output convolution; Skip Connections means skip connection; SCA Module means SCA module; RH Module means RH module; Conv + BN + SILU means convolution + Batch Normalization layer + SILU activation function; CustomConv means custom convolution kernel convolution; Sobel Operator + BN + RELU means convolution with Sobel operator + Batch Normalization layer + RELU activation function; Summation means addition; Prediction means prediction result.

[0122] In the embodiment of the present invention, the specific steps of the encoding process involving multiple convolutions and pooling are as follows:

[0123] Step 1.1: First convolution:

[0124] First, the input image f (i.e., the dimension-transformed image) is convolved for the first time, and the feature map after convolution is (i.e. the first convolutional feature map) is expressed as:

[0125]

[0126] Among them, ReLU is the activation function, and the specific formula of this function is , w is the weight of the convolution operation, b is the bias of the convolution operation, this convolution uses a convolution kernel of size 1*1, and the output image is ; x is each value in the input 4-dimensional tensor, that is, the value of each pixel in each channel in the input feature map.

[0127] Step 1.2: First pooling:

[0128] For feature maps (i.e. the first convolution feature map) performs a pooling operation with a pooling kernel size of 2 and a step length of 2. The feature map after pooling (i.e., the first pooled feature map) is expressed as:

[0129]

[0130] Among them, MaxPool is the maximum pooling operation. .

[0131] Step 1.3: Second convolution:

[0132] For feature maps Perform a convolution operation, the feature map after convolution (i.e., the first pooled feature map) is expressed as:

[0133]

[0134] Among them, ReLU is the activation function, and the specific formula of this function is ,

[0135] The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0136] Step 1.4: Second pooling:

[0137] For feature maps Perform a pooling operation with a pooling kernel size of 2 and a step size of 2. The feature map after pooling (i.e., the second pooling feature map) is expressed as:

[0138]

[0139] Among them, MaxPool is the maximum pooling operation. .

[0140] Step 1.5: The third convolution:

[0141] For feature maps Perform a convolution operation, the feature map after convolution (i.e. the third convolutional feature map) is expressed as:

[0142]

[0143] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0144] Step 1.6: Third pooling:

[0145] For feature maps Perform a pooling operation with a pooling kernel size of 2 and a step size of 2. The feature map after pooling (i.e., the third pooling feature map) is expressed as:

[0146]

[0147] Among them, MaxPool is the maximum pooling operation. .

[0148] Step 1.7: Fourth convolution:

[0149] For feature maps Perform a convolution operation, the feature map after convolution (i.e. the fourth convolutional feature map) is expressed as:

[0150]

[0151] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0152] Step 1.8: Fourth pooling:

[0153] For feature maps Perform a pooling operation with a pooling kernel size of 2 and a step size of 2. The feature map after pooling (i.e., the fourth pooling feature map) is expressed as:

[0154]

[0155] Among them, MaxPool is the maximum pooling operation. .

[0156] Step 1.9: Fifth convolution:

[0157] For feature maps Perform a convolution operation, the feature map after convolution (i.e. the first convolution image) is represented as:

[0158]

[0159] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0160] Step S104, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, perform the first feature extraction of the spatial attention network and the channel attention network;

[0161] In the technical solution of the present invention, an SCA module is added, and the SCA module is added before the pooling part of each encoding, with the purpose of strengthening the features in the original image and better capturing the features.

[0162] Specifically applied to the embodiment of the present invention, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, the first feature extraction of the spatial attention network and the channel attention network is performed, including:

[0163] Calculate the difference between each pixel of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map and the average value of the pixels, and calculate the ratio of the difference to the variance of all pixel values ​​of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map; determine the ratio as the corresponding new pixel to obtain a first variance feature map;

[0164] Perform weight extraction on the first variance feature map through a Sigomid activation function to obtain a weight coefficient;

[0165] Strengthening the first convolution feature map according to the weight coefficient to obtain a first residual connection feature map;

[0166] Through hole convolutions of different scales, feature extraction is performed on the first residual connection feature map to obtain a hole convolution feature map;

[0167] The atrous convolution feature map is divided into two subspaces with complementary channels, and a convolution operation is performed simultaneously to obtain a first channel feature map and a second channel feature map;

[0168] Performing dual-channel group convolution on the first channel feature map through two different convolution kernels to obtain a first group convolution feature map and a second group convolution feature map;

[0169] Superimposing the first grouped convolutional feature map and the second grouped convolutional feature map to obtain a superimposed feature map;

[0170] Perform a convolution operation on the second channel feature map, and concatenate the result of the convolution operation with the second channel feature map to form a concatenated feature map;

[0171] Extracting the first channel attention distribution coefficient of the superimposed feature map;

[0172] Extracting the second channel attention distribution coefficient of the concatenated feature map;

[0173] Applying the first channel attention distribution coefficient and the second channel attention distribution coefficient to the dilated convolution feature map to obtain a spatial and channel attention network feature map;

[0174] The spatial and channel attention network feature maps are used as the input of the corresponding first pooling, second pooling, third pooling or fourth pooling.

[0175] In actual application to the embodiment of the present invention, the SCA module includes the following steps:

[0176] Step 1: SA (Spatial Attention Mechanism):

[0177] Step 1.1:

[0178] First, data processing is performed on each pixel in the feature map F (i.e., the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map), and the obtained (First variance feature map) is expressed as:

[0179]

[0180] in, The feature map The value of each pixel in is the value of the pixel in F, Take the average value of all pixel values ​​in the feature map F, is the variance of all pixel values ​​in the feature map F. This method processes each pixel separately, and can evaluate different information of the feature map separately, so that the important parts get larger values ​​and suppress the expression of unimportant features.

[0181] Step 1.2:

[0182] Then the feature map Extract weights and get (Weight coefficient) is expressed as:

[0183]

[0184] in, is the activation function that maps all values ​​to between. is to sum all the values ​​so that Calculate importance.

[0185] Step 1.3:

[0186] Use the extracted The weights strengthen the above feature map F and we get (The first residual connection feature map) is expressed as:

[0187]

[0188] In this step, the present invention uses residual connections to accumulate the input data into the enhanced feature map, retaining the details in the original input data, making information easier to propagate, and avoiding information loss.

[0189] Step 1.4:

[0190] Use different scales of dilated convolution to map the feature map Perform feature extraction to obtain the final feature map (Dilated convolution feature map) is expressed as:

[0191] ;

[0192] ;

[0193] ;

[0194] Among them, in the extraction The convolution kernel size used for feature extraction is 3*3, and the expansion rates are 1, 3, and 5 respectively. The advantage of using dilated convolution is that dilated convolution can increase the receptive field without introducing additional parameters. The pooling kernel size used is 3*3. This step makes up for the defect of the previous step that only the overall features are enhanced, and multiple parallel convolutions are used to simultaneously process and obtain feature maps. The multi-scale features in also retain some information of the original input through residual connections.

[0195] Step 2: CA (Channel Attention Mechanism):

[0196] Step 2.1

[0197] First, the input feature map Divide it into two subspaces with complementary channels and perform convolution operations at the same time to obtain the feature map , (First channel feature map, second channel feature map) is expressed as:

[0198] ;

[0199] ;

[0200] in, Represents the number of channels of the feature map F. The convolution kernel size used is 1*1, and the number of convolution output channels is , The feature map Split into channels , This separation processing method can effectively distinguish and retain the respective feature expressiveness of the two parts at a finer-grained level.

[0201] Step 2.2

[0202] The present invention introduces an independent channel attention module for each subspace, and accurately calculates the channel weight of each part through an adaptive weight allocation mechanism. In this process, the attention module of each subspace can capture the unique information in a specific subspace and closely combine the weight of this information with the importance of the feature.

[0203] Step 2.2.1:

[0204] First, use two convolution pairs with different functions Perform the operation to obtain the feature map , (First group convolution feature map, second group convolution feature map) is expressed as:

[0205] ;

[0206] ;

[0207] in, The convolution kernel size used is 1*1; The convolution kernel size in is 3*3, and a dual-channel group convolution is performed, and both restore the channels to , through the above steps And in this step Make the channel pass The transformation can well extract the deep semantic information in the image.

[0208] Next, the above obtained , Superimpose to obtain the feature map (Superimposed feature map) is expressed as:

[0209] ;

[0210] Through this operation, multimodal features of different dimensions can be accumulated, which greatly enhances the feature performance of each channel so that the channel weight can be better calculated.

[0211] Step 2.2.2:

[0212] Will (second channel feature map) is convolved and the result is combined with Concatenate into feature maps (Concatenated feature map) is represented as:

[0213] ;

[0214] Among them, the splicing occurs in the channel dimension, the size of the convolution kernel is 1*1, and the number of channels convolved can be Complementary , for subsequent operations.

[0215] The attention module of each subspace can capture the unique information in a specific subspace and closely combine the weight of this information with the importance of the feature. In step 2.2.1, relatively high-level information is effectively extracted. In step 2.2.2, simple feature extraction is used to supplement high-level information, effectively reducing information loss. Through this fine-grained processing, not only the performance of the model in different feature subspaces is enhanced, but also the redundancy between channels is effectively reduced, significantly improving the overall expression and discrimination capabilities of the model.

[0216] Step 2.3:

[0217] First, the extracted Extract weights separately and use Activation function to extract channel attention distribution , (First channel attention distribution coefficient, second channel attention distribution coefficient) is expressed as:

[0218] ;

[0219] ;

[0220] Among them, GAP stands for global average pooling, which can perform pooling operations on the entire feature map, thereby reducing its spatial dimension to 1. is the activation function that maps all values ​​to between.

[0221] Next, distribute the channel attention , Apply to And use residual connection to get the final feature map (Spatial and channel attention network feature map) is expressed as:

[0222] ;

[0223] In this way, the output of the SCA module is completed, the features are strengthened and extracted, the important features are given higher weights, and the expression of invalid features is suppressed. The whole process completes the adaptive weight distribution mechanism, and obtains higher perception ability while maintaining a low parameter amount. The SCA module flow chart is as follows Figure 3 As shown; Pixel-point value represents the value of each pixel; Indicates the sum of the values ​​of all pixels; Represents the value of each pixel and the sum of all pixels; Sigomid and Multiplication represents the weights extracted by the Sigomid function and multiplication; Multiplication represents multiplication; summation represents addition; Dilated Conv + BN + ReLU represents dilated convolution + Batch Normalization layer + RELU activation function; Group Conv represents channel-wise convolution; GlobalAverage Pooling + Softmax represents global average pooling and Softmax activation function.

[0224] Step S105, performing a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution on the first convolution image to obtain a second convolution image;

[0225] Further applied to the embodiment of the present invention, the first convolution image is subjected to a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution to obtain a second convolution image, including:

[0226] Performing a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map;

[0227] Concatenating the first up-sampled feature map with the fourth convolutional feature map to obtain a first concatenated feature map;

[0228] Performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map;

[0229] Performing a second upsampling on the first deconvolution feature map by bilinear interpolation to obtain a second upsampled feature map;

[0230] Concatenating the second up-sampled feature map with the third convolutional feature map to obtain a second concatenated feature map;

[0231] Performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map;

[0232] Performing a third upsampling on the second deconvolution feature map by bilinear interpolation to obtain a third upsampled feature map;

[0233] Splicing the third up-sampled feature map with the second convolution feature map to obtain a third spliced ​​feature map;

[0234] Performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map;

[0235] Performing a fourth upsampling on the third deconvolution feature map by bilinear interpolation to obtain a fourth upsampling feature map;

[0236] Splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth spliced ​​feature map;

[0237] A convolution operation is performed on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

[0238] In the embodiment of the present invention, the specific steps of the decoding process involving multiple upsampling and deconvolution are as follows:

[0239] Step 2.1: First upsampling:

[0240] For feature maps (i.e. the first convolution image) is upsampled once, and the feature map after upsampling is (i.e., the first upsampled feature map) is expressed as:

[0241] ;

[0242] Among them, upsampling adopts bilinear interpolation method, and .

[0243] Step 2.2: First deconvolution:

[0244] First, the feature map And the down-sampling passed Splice to get the feature map (i.e., the first concatenated feature map) is expressed as:

[0245] ;

[0246] Among them, splicing occurs in the first dimension, which is the channel dimension. .

[0247] Then Perform a convolution operation, the feature map after convolution (i.e., the first deconvolution feature map) is expressed as:

[0248] ;

[0249] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0250] Step 2.3: Second upsampling:

[0251] For feature maps Perform an upsampling, and the feature map after upsampling is (i.e., the second upsampled feature map) is expressed as:

[0252] ;

[0253] Among them, upsampling adopts bilinear interpolation method, and .

[0254] Step 2.4: Second deconvolution:

[0255] First, the feature map And the downsampling passed Splice to get the feature map (i.e., the second concatenated feature map) is expressed as:

[0256] ;

[0257] Among them, splicing occurs in the first dimension, which is the channel dimension. .

[0258] Then Perform a convolution operation, the feature map after convolution (i.e., the second deconvolution feature map) is expressed as:

[0259] ;

[0260] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0261] Step 2.5: The third upsampling:

[0262] For feature maps Perform an upsampling, and the feature map after upsampling is (i.e., the third upsampled feature map) is expressed as:

[0263] ;

[0264] Among them, upsampling adopts bilinear interpolation method, and .

[0265] Step 2.6: The third deconvolution:

[0266] First, the feature map And the downsampling passed Splice to get the feature map (i.e., the third concatenated feature map) is expressed as:

[0267] ;

[0268] Among them, splicing occurs in the first dimension, which is the channel dimension. .

[0269] Then Perform a convolution operation, the feature map after convolution (i.e., the third deconvolution feature map) is expressed as:

[0270] ;

[0271] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0272] Step 2.7: Fourth upsampling:

[0273] For feature maps Perform an upsampling, and the feature map after upsampling is (i.e., the fourth upsampled feature map) is expressed as:

[0274] ;

[0275] Among them, upsampling adopts bilinear interpolation method, and .

[0276] Step 2.8: Fourth deconvolution:

[0277] First, the feature map And the down-sampling passed Splice to get the feature map (i.e., the fourth concatenated feature map) is expressed as:

[0278] ;

[0279] Among them, splicing occurs in the first dimension, which is the channel dimension. .

[0280] Then Perform a convolution operation, the feature map after convolution (i.e., the fourth deconvolution feature map) is expressed as:

[0281] ;

[0282] Among them, ReLU is the activation function, and the specific formula of this function is , The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 3*3, so the output image is .

[0283] Step S106: extract edge features from the input image to obtain an edge feature map, and perform feature fusion on the edge feature map and the second convolution image to obtain an output feature map.

[0284] In the technical solution of the embodiment of the present invention, an ER module is further added. The ER module is added after decoding and before output convolution. The purpose is to supplement the features lost in upsampling and strengthen the edge features, so as to better segment the diseased images with blurred edges. The core of the ER module is to extract edge features and fuse edge features of the input image to obtain an output feature map; the edge feature extraction and edge feature fusion of the input image to obtain the output feature map includes:

[0285] Performing convolution processing and residual link processing on the input image to obtain an edge enhancement feature map;

[0286] The edge-enhanced feature map is processed by a Conv layer containing a Soble operator to obtain an edge-aware feature map;

[0287] Accumulate all channels of the edge-aware feature map, activate it using the SiLu function and use residual connections to obtain a channel-accumulated feature map;

[0288] Performing a convolution operation on the channel accumulation feature map to obtain an edge feature map;

[0289] Performing global average pooling and global maximum pooling operations on the second convolution image and the edge feature map to obtain four first feature distribution maps, second feature distribution maps, third feature distribution maps, and fourth feature distribution maps of the same dimension;

[0290] The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the H dimension to obtain a first dimension spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a first weight distribution;

[0291] The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the W dimension to obtain a second-dimensional spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a second weight distribution;

[0292] Applying the first weight distribution and the second weight distribution to the edge feature map and the second convolution image to obtain a first fused feature map and a second fused feature map respectively;

[0293] Splicing the first fused feature map and the second fused feature map to obtain a spliced ​​fused feature map;

[0294] The spliced ​​fusion feature map is extracted through different convolutions to obtain a first feature extraction map and a second feature extraction map, and the first feature extraction map and the second feature extraction map are added to obtain an output feature map.

[0295] In the embodiment of the present invention, the specific steps of edge feature extraction and edge feature fusion involving the ER module are as follows:

[0296] Step 1: EQ (edge ​​feature extraction):

[0297] Step 1.1:

[0298] First, for the input image (Dimensional transformation image) is convolved and residual links are used to supplement the information. (Edge Enhancement Feature Map) is expressed as:

[0299] ;

[0300] Among them, the convolution kernel used in the convolution is a self-made convolution kernel with a size of 3*3 and a weight of . It has a smoother curve when it is close to zero, which can capture richer features. The specific function is: ;

[0301] After this processing, the image maintains its own characteristics while strengthening the edge features, which facilitates subsequent processing.

[0302] Step 1.2:

[0303] Since Soble has the advantages of strong noise resistance and high efficiency, the Conv layer containing the Soble operator is used to enhance the edge feature map. Operate and get (Edge-aware feature map) is represented as:

[0304] ;

[0305] BN stands for Batch Normalization, which can greatly accelerate the convergence speed of the network and improve the generalization ability of the network. In this step, the convolution kernel size used is 3*3, and it is a channel-by-channel convolution, so that the edge features of different color channels can be extracted, and multi-dimensional edge perception can be achieved. It can greatly retain the information within the edge when the Sobel operator extracts the edge features.

[0306] Step 1.3:

[0307] For feature maps Accumulate all channels, use SiLu for activation and use residual connection to get the final output feature map (Channel accumulated feature map) is expressed as:

[0308] ;

[0309] ;

[0310] Among them, Sum represents channel-by-channel accumulation, and the obtained .

[0311] The final feature map is similar to the actual prediction result. While ensuring the disease characteristics, it greatly reduces the expression of irrelevant features and strengthens the disease edge.

[0312] Step 2: RH (edge ​​feature fusion):

[0313] Step 2.1:

[0314] First, the input edge feature map (Channel Accumulated Feature Map) performs convolution operation to obtain the same output feature map as the model upsampling The same structure (Edge feature map) is expressed as:

[0315] ;

[0316] Among them, the convolution kernel size is 1*1, and The specific structure of the layer is .

[0317] Next, respectively (Second convolution image, edge feature map) performs global average pooling and global maximum pooling operations to obtain 4 dimensions: Characteristic distribution of size (The first characteristic distribution map, the second characteristic distribution map, the third characteristic distribution map, and the fourth characteristic distribution map) are respectively expressed as:

[0318] ;

[0319] ;

[0320] ;

[0321] ;

[0322] Among them, GAP adds all the pixel values ​​of the feature map and averages them, and the resulting value is used to represent the corresponding feature map. GMP will find the maximum value of all pixels in the feature map and use this value to represent the corresponding feature map.

[0323] Step 2.2:

[0324] First, respectively Perform splicing of different dimensions to obtain F1 and F2 (first dimension splicing feature map, second dimension splicing feature map), and then use the convolution operation on the two features. Function converted to weight distribution (First weight distribution, second weight distribution) is expressed as:

[0325] ;

[0326] ;

[0327] ;

[0328] ;

[0329] in, Represented as concatenation in H dimensions, and The convolution kernel size is ; Represented as concatenation in W dimension, And the convolution kernel size is Then find the weight distribution of , The dimensions are .

[0330] Next, the weight distribution Distribution application On the top, the distribution is added to get the fusion feature map (First fusion feature map, second fusion feature map) is expressed as:

[0331] ;

[0332] ;

[0333] In this way, the characteristics of the other party can be fully integrated while retaining the original image characteristics, so as to achieve the best fusion effect.

[0334] Step 2.3:

[0335] In order to further enhance the fusion and extraction of features, the fusion feature map is first Splice to (Concatenated fusion feature map) is expressed as:

[0336] ;

[0337] Among them, Cat represents splicing in the channel dimension, .

[0338] Next, two types of convolutions are used to fuse the feature maps. Extract and get FR1 and FR2 (first feature extraction map and second feature extraction map), and finally add the extracted feature maps and output the feature map. .

[0339] ;

[0340] ;

[0341] ;

[0342] Among them, Conv1 is a convolution layer composed of Conv, BN, and SiLu with a convolution kernel of 1*1, and the output dimension is C*H*W. Conv2 consists of three parts, including two Conv1s with a convolution kernel of 1*1 and one Conv1 with a convolution kernel of 3*3, and the dimension changes are The purpose is to better extract deep features. The feature extraction composed of these two channels can well fuse the two feature maps and extract and save rich information. The framework diagram of the RH module is as follows Figure 4 As shown in the figure; Concatenation in the H dimension means concatenation in the H dimension; Concatenation in the W dimension means concatenation in the W dimension; Conv + BN + SILU means convolution + Batch Normalization layer + SILU activation function; Conv + BN + RELU + Sigmoid means convolution + Batch Normalization layer + RELU activation function + Sigmoid function weight extraction; Multiplication means multiplication; Summation means addition.

[0343] In the embodiment of the present invention, the feature map (i.e. output feature map) performs an output convolution and outputs the result (i.e., the output convolution feature map) is expressed as:

[0344] ;

[0345] in, The weight for this convolution operation is is the bias of the convolution operation. This convolution uses a convolution kernel of size 1*1, so the output image is .

[0346] In an embodiment of the present invention, the pear leaf multi-disease identification method based on edge enhancement includes: acquiring an input image; performing a dimension transformation on the input image to obtain a dimension transformation image; performing a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling on the dimension transformation image to obtain a first convolution image; wherein, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, performing a first feature extraction of a spatial attention network and a channel attention network; performing a first upsampling, a first deconvolution, a second upsampling, and a third deconvolution on the first convolution image. Upsampling, second deconvolution, third upsampling, third deconvolution, fourth upsampling, fourth deconvolution, to obtain a second convolution image; edge feature extraction is performed on the input image to obtain an edge feature map, and the edge feature map is feature-fused with the second convolution image to obtain an output feature map; important feature parts are enhanced during fusion, and further feature extraction is performed on the fused feature map in the later stage, and finally a more accurate segmentation of the edges of diseases with blurred edges is achieved. The original image is first extracted to obtain an edge feature map rich in edge features and similar to the real disease prediction, and the edge feature map is fused in the last stage of the network, which can supplement the final features, thereby improving the accuracy of model prediction and the accuracy of diseases with blurred edges.

[0347] The present invention aims to solve the problems of blurred edge diseases that are ignored by most people and the inability to accurately segment the edges of normal diseases. The ER module is creatively designed. The edge feature map extracted by the EQ module in the ER module is used to supplement the feature map output by the network. The RH module used for fusion uses cross fusion to retain the original features of the two while strengthening the important feature parts during fusion, and further extracts features from the fused feature map in the later stage, ultimately achieving a more accurate segmentation of the edges of diseases with blurred edges.

[0348] The SCA module in the embodiment of the present invention uses space and channel attention in a mixed way to form an SA module based on space attention and a CA module based on channel attention, so that both modules have the advantages of space and channel attention, can effectively extract features, strengthen important features while suppressing invalid features, and can achieve accurate identification and segmentation of different diseases. When a leaf contains multiple diseases, the model can accurately identify and segment different diseases.

[0349] For other networks that can achieve this goal, the following indicators are compared in the embodiment of the present invention:

[0350] 1. Miou:

[0351] It can be interpreted as the average intersection over union (IoU), that is, the IoU value is calculated for each category (that is, the number of true samples / (the number of true samples + the number of false negative samples + the number of false positive samples)).

[0352] 2.MPA

[0353] It is a commonly used evaluation indicator in image segmentation, which is used to measure the average classification accuracy of the segmentation model for all pixels in the entire image. The calculation method is: compare the classification of each pixel output by the model with the classification of the real annotation. If they are the same, the classification is considered correct, and finally calculate the proportion of all correctly classified pixels to all pixels.

[0354] 3. Dice

[0355] The Dice coefficient is an evaluation indicator used to measure the similarity between the image segmentation result and the true label. It compares the overlap between the predicted segmentation area and the actual target area, and its value range is between 0 and 1. The closer the value is to 1, the better the segmentation effect.

[0356] 4.Parameters

[0357] It refers to the total number of parameters that need to be trained in the network model, which corresponds to the previous spatial complexity, determines the complexity of the network, and affects the speed of network training.

[0358] The comparison results are shown in Table 1 below. It can be seen that the present invention achieves the best performance in all indicators on the self-built data set, and improves by 2.46% in the most critical indicator Miou over the second-place U2Net, and has a relatively small number of parameters, outperforming various existing models in all aspects:

[0359] Table 1 Results of image segmentation evaluation indicators on self-built datasets;

[0360]

[0361] It should be noted that, for the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that this embodiment is not limited by the order of the actions described, because according to this embodiment, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this embodiment.

[0362] Reference Figure 5 , showing a structural block diagram of an embodiment of a device for identifying multiple diseases of pear leaves based on edge enhancement, which may specifically include the following modules:

[0363] An input image module 301 is used to obtain an input image;

[0364] A dimension transformation image module 302, used for performing dimension transformation on the input image to obtain a dimension transformation image;

[0365] A first convolution image module 303 is used to subject the dimensionally transformed image to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image;

[0366] A first feature extraction module 304 is used to perform first feature extraction of the spatial attention network and the channel attention network after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, and after the fourth convolution and before the fourth pooling;

[0367] A second convolution image acquisition module 305 is used to perform a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution on the first convolution image to obtain a second convolution image;

[0368] The fusion module 306 is used to extract edge features from the input image to obtain an edge feature map, and perform feature fusion on the edge feature map and the second convolution image to obtain an output feature map.

[0369] Preferably, the first convolution image module comprises:

[0370] A first convolution feature map submodule, used for performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map;

[0371] A first pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the first convolution feature map to obtain a first pooling feature map;

[0372] A second convolutional feature map submodule, used to perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolutional feature map;

[0373] A second pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooling feature map;

[0374] A third convolution feature map submodule, used for performing a third convolution on the second pooled feature map and processing it using a ReLU activation function to obtain a third convolution feature map;

[0375] A third pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map;

[0376] A fourth convolution feature map submodule, used for performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map;

[0377] The fourth pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooling feature map;

[0378] The first convolution image submodule is used to perform a fifth convolution on the fourth pooling feature map to obtain a first convolution image.

[0379] Preferably, the second convolution image acquisition module includes:

[0380] A first upsampling feature map submodule, configured to perform a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map;

[0381] A first splicing feature map submodule, used for splicing the first up-sampled feature map with the fourth convolution feature map to obtain a first splicing feature map;

[0382] A first deconvolution feature map submodule, used for performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map;

[0383] A second upsampling feature map submodule, used for performing a second upsampling on the first deconvolution feature map through bilinear interpolation to obtain a second upsampling feature map;

[0384] A second splicing feature map submodule, used for splicing the second up-sampled feature map with the third convolution feature map to obtain a second splicing feature map;

[0385] A second deconvolution feature map submodule, used for performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map;

[0386] A third up-sampling feature map submodule, used for performing a third up-sampling on the second deconvolution feature map through bilinear interpolation to obtain a third up-sampling feature map;

[0387] A third splicing feature map submodule, used to splice the third up-sampled feature map with the second convolution feature map to obtain a third splicing feature map;

[0388] A third deconvolution feature map submodule, used for performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map;

[0389] A fourth upsampling feature map submodule, used for performing a fourth upsampling on the third deconvolution feature map through bilinear interpolation to obtain a fourth upsampling feature map;

[0390] A fourth splicing feature map submodule, used for splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth splicing feature map;

[0391] The fourth deconvolution feature map submodule is used to perform a convolution operation on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

[0392] Preferably, the first feature extraction module includes:

[0393] A calculation submodule, used to calculate the difference between each pixel point of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map and the average value of the pixel points, and calculate the ratio of the difference to the variance of all pixel point values ​​of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map; determine the ratio as the corresponding new pixel point to obtain a first variance feature map;

[0394] A weight extraction submodule, used for performing weight extraction on the first variance feature map through a Sigomid activation function to obtain a weight coefficient;

[0395] A first residual connection feature map submodule, used for strengthening the first convolution feature map according to the weight coefficient to obtain a first residual connection feature map;

[0396] A feature extraction submodule, used for extracting features from the first residual connection feature map through dilated convolutions of different scales to obtain a dilated convolution feature map;

[0397] A segmentation submodule, used for dividing the hole convolution feature map into two subspaces with complementary channels, and performing convolution operations simultaneously to obtain a first channel feature map and a second channel feature map;

[0398] The grouped convolution submodule is used to perform dual-channel grouped convolution on the first channel feature map through two different convolution kernels to obtain a first grouped convolution feature map and a second grouped convolution feature map;

[0399] A superposition submodule, used for superimposing the first grouped convolution feature map and the second grouped convolution feature map to obtain a superimposed feature map;

[0400] A convolution operation submodule, used for performing a convolution operation on the second channel feature map, and concatenating the result of the convolution operation with the second channel feature map into a concatenated feature map;

[0401] A first extraction submodule, used to extract a first channel attention distribution coefficient of the superimposed feature map;

[0402] A second extraction submodule is used to extract the second channel attention distribution coefficient of the spliced ​​feature map;

[0403] An application submodule, configured to apply the first channel attention distribution coefficient and the second channel attention distribution coefficient to the dilated convolution feature map to obtain a spatial and channel attention network feature map;

[0404] Determine the submodule for using the spatial and channel attention network feature maps as input to the corresponding first pooling, second pooling, third pooling, or fourth pooling.

[0405] Preferably, the fusion module includes:

[0406] The edge enhancement feature map submodule is used to perform convolution processing and residual link processing on the input image to obtain an edge enhancement feature map;

[0407] The edge-aware feature map submodule is used to process the edge-enhanced feature map through a Conv layer containing a Soble operator to obtain an edge-aware feature map;

[0408] The accumulation submodule is used to accumulate all channels of the edge-aware feature map, activate it using the SiLu function and use the residual link to obtain the channel accumulation feature map;

[0409] An edge feature map submodule, used for performing a convolution operation on the channel accumulation feature map to obtain an edge feature map;

[0410] A pooling operation submodule, used to perform global average pooling and global maximum pooling operations on the second convolution image and the edge feature map to obtain a first feature distribution map, a second feature distribution map, a third feature distribution map, and a fourth feature distribution map with four dimensions of C*1*1;

[0411] A first weight distribution submodule is used to splice the first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map in the H dimension to obtain a first-dimensional spliced ​​feature map, and extract weights through a Sigomid function after performing a convolution operation of the same size to obtain a first weight distribution;

[0412] A second weight distribution submodule is used to splice the first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map in the W dimension to obtain a second-dimensional spliced ​​feature map, and extract weights through a Sigomid function after performing a convolution operation of the same size to obtain a second weight distribution;

[0413] A fusion feature map submodule, used for applying the first weight distribution and the second weight distribution to the edge feature map and the second convolution image to obtain a first fusion feature map and a second fusion feature map respectively;

[0414] A splicing fusion feature map submodule, used for splicing the first fusion feature map and the second fusion feature map to obtain a splicing fusion feature map;

[0415] The addition submodule is used to extract the spliced ​​fusion feature map through different convolutions to obtain a first feature extraction map and a second feature extraction map, and add the first feature extraction map and the second feature extraction map to obtain an output feature map.

[0416] Each module in the above-mentioned pear leaf multi-disease identification device based on edge enhancement can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0417] The device for identifying multiple diseases on pear leaves based on edge enhancement provided above can be used to execute the method for identifying multiple diseases on pear leaves based on edge enhancement provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0418] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, and a charging interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a method for identifying multiple diseases of pear leaves based on edge enhancement is implemented.

[0419] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0420] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and the processor implements the steps of the above embodiment when executing the computer program.

[0421] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above embodiment are implemented.

[0422] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0423] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0424] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0425] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0426] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0427] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0428] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0429] The above is a detailed introduction to a method for identifying multiple diseases on pear leaves based on edge enhancement, a device for identifying multiple diseases on pear leaves based on edge enhancement, a computer device and a computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for identifying multiple diseases of pear leaves based on edge enhancement, characterized in that: The method comprises: Get the input image; Performing dimension transformation on the input image to obtain a dimension transformed image; The dimensionally transformed image is subjected to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image; Performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map; Performing a MaxPool maximum pooling operation on the first convolutional feature map to obtain a first pooled feature map; Perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolution feature map; Performing a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooling feature map; Perform a third convolution on the second pooled feature map and process it using a ReLU activation function to obtain a third convolution feature map; Performing a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map; Performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map; Performing a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooled feature map; Performing a fifth convolution on the fourth pooled feature map to obtain a first convolution image; Wherein, after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, after the fourth convolution and before the fourth pooling, the first feature extraction of the spatial attention network and the channel attention network is performed; Calculate the difference between each pixel of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map and the average value of the pixels, and calculate the ratio of the difference to the variance of all pixel values ​​of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map; determine the ratio as the corresponding new pixel to obtain a first variance feature map; Perform weight extraction on the first variance feature map through a Sigomid activation function to obtain a weight coefficient; Strengthening the first convolution feature map according to the weight coefficient to obtain a first residual connection feature map; Through hole convolutions of different scales, feature extraction is performed on the first residual connection feature map to obtain a hole convolution feature map; The atrous convolution feature map is divided into two subspaces with complementary channels, and a convolution operation is performed simultaneously to obtain a first channel feature map and a second channel feature map; Performing dual-channel group convolution on the first channel feature map through two different convolution kernels to obtain a first group convolution feature map and a second group convolution feature map; Superimposing the first grouped convolutional feature map and the second grouped convolutional feature map to obtain a superimposed feature map; Perform a convolution operation on the second channel feature map, and concatenate the result of the convolution operation with the second channel feature map to form a concatenated feature map; Extracting the first channel attention distribution coefficient of the superimposed feature map; Extracting the second channel attention distribution coefficient of the concatenated feature map; Applying the first channel attention distribution coefficient and the second channel attention distribution coefficient to the dilated convolution feature map to obtain a spatial and channel attention network feature map; The spatial and channel attention network feature maps are used as the input of the corresponding first pooling, second pooling, third pooling or fourth pooling; The first convolution image is subjected to a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution to obtain a second convolution image; The input image is subjected to edge feature extraction to obtain an edge feature map, and the edge feature map is subjected to feature fusion with the second convolution image to obtain an output feature map.

2. The pear leaf multi-disease identification method based on edge enhancement according to claim 1 is characterized in that: The first convolution image is subjected to a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution to obtain a second convolution image, comprising: Performing a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map; Concatenating the first up-sampled feature map with the fourth convolutional feature map to obtain a first concatenated feature map; Performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map; Performing a second upsampling on the first deconvolution feature map by bilinear interpolation to obtain a second upsampled feature map; Concatenating the second up-sampled feature map with the third convolutional feature map to obtain a second concatenated feature map; Performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map; Performing a third upsampling on the second deconvolution feature map by bilinear interpolation to obtain a third upsampled feature map; Splicing the third up-sampled feature map with the second convolution feature map to obtain a third spliced ​​feature map; Performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map; Performing a fourth upsampling on the third deconvolution feature map by bilinear interpolation to obtain a fourth upsampling feature map; Splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth spliced ​​feature map; A convolution operation is performed on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

3. The pear leaf multi-disease identification method based on edge enhancement according to claim 1 is characterized in that: The step of extracting edge features from the input image to obtain an edge feature map, and performing feature fusion on the edge feature map and the second convolution image to obtain an output feature map comprises: Performing convolution processing and residual link processing on the input image to obtain an edge enhancement feature map; The edge-enhanced feature map is processed by a Conv layer containing a Soble operator to obtain an edge-aware feature map; Accumulate all channels of the edge-aware feature map, activate it using the SiLu function and use residual connections to obtain a channel-accumulated feature map; Performing a convolution operation on the channel accumulation feature map to obtain an edge feature map; Perform global average pooling and global maximum pooling operations on the second convolution image and the edge feature map to obtain a first feature distribution map, a second feature distribution map, a third feature distribution map, and a fourth feature distribution map with four dimensions of C*1*1; The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the H dimension to obtain a first dimension spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a first weight distribution; The first feature distribution map, the second feature distribution map, the third feature distribution map, and the fourth feature distribution map are spliced ​​in the W dimension to obtain a second-dimensional spliced ​​feature map, and weights are extracted by a Sigomid function after performing a convolution operation of the same size to obtain a second weight distribution; Applying the first weight distribution and the second weight distribution to the edge feature map and the second convolution image to obtain a first fused feature map and a second fused feature map respectively; Splicing the first fused feature map and the second fused feature map to obtain a spliced ​​fused feature map; The spliced ​​fusion feature map is extracted through different convolutions to obtain a first feature extraction map and a second feature extraction map, and the first feature extraction map and the second feature extraction map are added to obtain an output feature map.

4. A device for identifying multiple diseases of pear leaves based on edge enhancement, characterized in that: The device comprises: An input image module is used to obtain an input image; A dimension transformation image module, used for performing dimension transformation on the input image to obtain a dimension transformation image; A first convolution image module, used for subjecting the dimensionally transformed image to a first convolution, a first pooling, a second convolution, a second pooling, a third convolution, a third pooling, a fourth convolution, and a fourth pooling to obtain a first convolution image; The first convolution image comprises: A first convolution feature map submodule, used for performing a first convolution on the dimensionally transformed image and processing it using a ReLU activation function to obtain a first convolution feature map; A first pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the first convolution feature map to obtain a first pooling feature map; A second convolutional feature map submodule, used to perform a second convolution on the first pooled feature map and process it using a ReLU activation function to obtain a second convolutional feature map; A second pooling feature map submodule, used to perform a MaxPool maximum pooling operation on the second convolutional feature map to obtain a second pooling feature map; A third convolution feature map submodule, used for performing a third convolution on the second pooled feature map and processing it using a ReLU activation function to obtain a third convolution feature map; A third pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the third convolutional feature map to obtain a third pooling feature map; A fourth convolution feature map submodule, used for performing a fourth convolution on the third pooled feature map and processing it using a ReLU activation function to obtain a fourth convolution feature map; The fourth pooling feature map submodule is used to perform a MaxPool maximum pooling operation on the fourth convolutional feature map to obtain a fourth pooling feature map; A first convolution image submodule, used for performing a fifth convolution on the fourth pooling feature map to obtain a first convolution image; A first feature extraction module, used for performing first feature extraction of the spatial attention network and the channel attention network after the first convolution and before the first pooling, after the second convolution and before the second pooling, after the third convolution and before the third pooling, and after the fourth convolution and before the fourth pooling; The first feature extraction module comprises: A calculation submodule, used to calculate the difference between each pixel point of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map and the average value of the pixel points, and calculate the ratio of the difference to the variance of all pixel point values ​​of the first convolution feature map, the second convolution feature map, the third convolution feature map, or the fourth convolution feature map; determine the ratio as the corresponding new pixel point to obtain a first variance feature map; A weight extraction submodule, used for performing weight extraction on the first variance feature map through a Sigomid activation function to obtain a weight coefficient; A first residual connection feature map submodule, used for strengthening the first convolution feature map according to the weight coefficient to obtain a first residual connection feature map; A feature extraction submodule, used for extracting features from the first residual connection feature map through dilated convolutions of different scales to obtain a dilated convolution feature map; A segmentation submodule, used for dividing the hole convolution feature map into two subspaces with complementary channels, and performing convolution operations simultaneously to obtain a first channel feature map and a second channel feature map; The grouped convolution submodule is used to perform dual-channel grouped convolution on the first channel feature map through two different convolution kernels to obtain a first grouped convolution feature map and a second grouped convolution feature map; A superposition submodule, used for superimposing the first grouped convolution feature map and the second grouped convolution feature map to obtain a superimposed feature map; A convolution operation submodule, used for performing a convolution operation on the second channel feature map, and concatenating the result of the convolution operation with the second channel feature map into a concatenated feature map; A first extraction submodule, used to extract a first channel attention distribution coefficient of the superimposed feature map; A second extraction submodule is used to extract the second channel attention distribution coefficient of the spliced ​​feature map; An application submodule, configured to apply the first channel attention distribution coefficient and the second channel attention distribution coefficient to the dilated convolution feature map to obtain a spatial and channel attention network feature map; Determine a submodule for using the spatial and channel attention network feature maps as inputs to the corresponding first pooling, second pooling, third pooling, or fourth pooling; a second convolution image acquisition module, configured to perform a first upsampling, a first deconvolution, a second upsampling, a second deconvolution, a third upsampling, a third deconvolution, a fourth upsampling, and a fourth deconvolution on the first convolution image to obtain a second convolution image; The fusion module is used to extract edge features from the input image to obtain an edge feature map, and perform feature fusion on the edge feature map and the second convolution image to obtain an output feature map.

5. The device for identifying multiple diseases of pear leaves based on edge enhancement according to claim 4 is characterized in that: The second convolution image acquisition module comprises: A first upsampling feature map submodule, configured to perform a first upsampling on the first convolution image by bilinear interpolation to obtain a first upsampling feature map; A first splicing feature map submodule, used for splicing the first up-sampled feature map with the fourth convolution feature map to obtain a first splicing feature map; A first deconvolution feature map submodule, used for performing a convolution operation on the first concatenated feature map to obtain a first deconvolution feature map; A second upsampling feature map submodule, used for performing a second upsampling on the first deconvolution feature map through bilinear interpolation to obtain a second upsampling feature map; A second splicing feature map submodule, used for splicing the second up-sampled feature map with the third convolution feature map to obtain a second splicing feature map; A second deconvolution feature map submodule, used for performing a convolution operation on the second concatenated feature map to obtain a second deconvolution feature map; A third up-sampling feature map submodule, used for performing a third up-sampling on the second deconvolution feature map through bilinear interpolation to obtain a third up-sampling feature map; A third splicing feature map submodule, used to splice the third up-sampled feature map with the second convolution feature map to obtain a third splicing feature map; A third deconvolution feature map submodule, used for performing a convolution operation on the third concatenated feature map to obtain a third deconvolution feature map; A fourth upsampling feature map submodule, used for performing a fourth upsampling on the third deconvolution feature map through bilinear interpolation to obtain a fourth upsampling feature map; A fourth splicing feature map submodule, used for splicing the fourth up-sampled feature map with the first convolution feature map to obtain a fourth splicing feature map; The fourth deconvolution feature map submodule is used to perform a convolution operation on the fourth concatenated feature map to obtain a fourth deconvolution feature map.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method for identifying multiple diseases on pear leaves based on edge enhancement according to any one of claims 1 to 3 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying multiple diseases on pear leaves based on edge enhancement according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Disease recognition method of winter jujube based on deep convolutional neural network and disease image

    AU2020102885A4

  • Corn disease image processing method based on attention mechanism

    CN111626969A

Cited By

  • Crop disease degree diagnosis method based on edge enhancement and saliency attention

    CN122695468A