Plant leaf disease image segmentation method based on boundary perception guidance

By employing a boundary-aware guided image segmentation method, which utilizes a multi-scale cross-fusion decoder and a boundary-aware guided unit, the accuracy problem of plant leaf disease image segmentation in complex environments is solved, and efficient identification of diseased areas is achieved.

CN119850648BActive Publication Date: 2025-11-18CHONGQING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411900797.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-11-18
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In existing technologies, plant leaf disease image segmentation algorithms are affected by complex environments, resulting in low segmentation accuracy and increased model size and computational cost, making it difficult to accurately identify disease areas and types.

Method used

A boundary-aware guided image segmentation method is adopted, which combines a multi-scale cross-fusion decoder with multi-size strip convolution kernels and cross-axis attention mechanism, and incorporates a boundary-aware guided unit to extract multi-scale features and enhance boundary information learning, thereby improving the accuracy of disease area segmentation.

Benefits of technology

It effectively improves the segmentation effect of disease areas of different sizes, enhances the ability to identify blurred edges of disease areas, and ensures the accuracy of disease area image segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850648B_ABST
    Figure CN119850648B_ABST
Patent Text Reader

Abstract

The application provides a plant leaf disease image segmentation method based on boundary perception guidance, comprising the following steps: S1. obtaining a plant leaf sample image and a label image; S2. constructing an image segmentation model based on boundary perception guidance, wherein the image segmentation model comprises an encoder, a multi-scale cross fusion decoder and a boundary perception guidance unit; the encoder inputs the sample image and extracts features of different dimensions of the sample image, the output end of the encoder is connected to the multi-scale cross fusion decoder for feature processing, the output features of the multi-scale cross fusion decoder are input into the boundary perception guidance unit, and the boundary perception guidance unit outputs a segmentation result; S3. inputting the sample image and the label image into the image segmentation model to train the image segmentation model; and S4. obtaining a to-be-identified plant leaf image, inputting the to-be-identified plant leaf image into the trained image segmentation model, and obtaining a disease part segmentation result of the to-be-identified plant leaf image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an image segmentation method, and more particularly to a boundary-aware guided image segmentation method for plant leaf diseases. Background Technology

[0002] Plant leaf diseases are one of the key factors affecting plant cultivation, such as grape leaves, tea leaves, etc., especially for some cash crops, which have a significant impact on their yield. Therefore, timely and accurate segmentation of diseased areas and identification of disease types are crucial for assessing the severity of diseases and developing control strategies.

[0003] In current technologies, the assessment of plant leaf diseases mainly relies on subjective judgments based on experience to determine the type and severity of the disease. However, this method is overly dependent on agricultural technicians, is cumbersome and time-consuming, and has low reliability in disease identification. With the development of technology, automatic segmentation algorithms for leaf disease images based on computer vision technology have gradually attracted attention. These algorithms provide higher accuracy and efficiency for disease assessment by accurately segmenting diseased areas. However, complex and uncontrollable environments affect the accuracy of segmentation. For example, complex backgrounds, lighting interference causing blurred boundaries of diseased areas, and differences in the size and shape of diseased areas increase the difficulty of segmentation, leading to low accuracy. Moreover, performance improvements in existing segmentation models are usually accompanied by increases in model size and computational cost.

[0004] Therefore, in order to solve the above-mentioned technical problems, it is urgent to propose a new technical approach. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method for segmenting plant leaf disease images based on boundary awareness guidance. The multi-scale cross-fusion decoder, by combining multi-size strip convolution kernels and cross-axis attention mechanism, can effectively extract multi-scale features and capture global information, thereby improving the segmentation effect on disease regions of different sizes. Moreover, the boundary awareness guidance unit can strengthen the learning of boundary information features and enhance the sensitivity to boundary information, ultimately effectively improving the ability to identify blurred edges of plant leaf diseases and ensuring the accuracy of the final disease region image segmentation.

[0006] This invention provides a boundary-aware guided method for segmenting plant leaf disease images, comprising the following steps:

[0007] S1. Obtain plant leaf sample images and label images;

[0008] S2. Construct an image segmentation model based on boundary awareness guidance, wherein the image segmentation model includes an encoder, a multi-scale cross-fusion decoder, and a boundary awareness guidance unit;

[0009] The encoder inputs a sample image and extracts features from different dimensions of the sample image. The output of the encoder is connected to a multi-scale cross-fusion decoder for feature processing. The output features of the multi-scale cross-fusion decoder are input to the boundary-aware guidance unit, and the boundary-aware guidance unit outputs the segmentation result.

[0010] S3. Input the sample images and label images into the image segmentation model to train the image segmentation model until training is complete;

[0011] S4. Obtain the image of the plant leaf to be identified, and input the image of the plant leaf to be identified into the trained image segmentation model to obtain the segmentation result of the diseased part of the image of the plant leaf to be identified.

[0012] Furthermore, the encoder extracts features from the sample image in four stages, wherein:

[0013] The image feature in the first stage is X1, and its resolution is...

[0014] The image feature in the second stage is X2, and its resolution is...

[0015] The image feature of the third stage is X3, and its resolution is...

[0016] The image feature of the fourth stage is X4, and its resolution is

[0017] Where H is the height of the sample image and W is the width of the sample image.

[0018] Furthermore, the multi-scale cross-fusion decoder includes three multi-scale cross-attention units and three dual-path channel attention units;

[0019] Image features X1, X2, and X3 are input to the first multi-scale cross-attention unit for processing. Image features X2, X3, and X4 are input to the second multi-scale cross-attention unit for processing. Image features X3 and X4 are input to the third multi-scale cross-attention unit for processing. The output features of the third multi-scale cross-attention unit are added element-wise to the output features of the second multi-scale cross-attention unit and then input to the third dual-path channel attention unit for processing. The output features of the third dual-path channel attention unit are added element-wise to the output features of the first multi-scale cross-attention unit and then input to the second dual-path channel attention unit for processing. The output features of the second dual-path channel attention unit are added element-wise to image feature X1 and then input to the first dual-path channel attention unit for processing. The output features of the first, second, and third dual-path channel attention units are input to the boundary perception guidance unit for processing.

[0020] Furthermore, the three multi-scale cross-attention units have the same structure;

[0021] The multi-scale cross-attention unit includes the Concat module, 1×1 convolution module I, multi-scale cross-attention module, local attention module, and 1×1 convolution module II;

[0022] The input of the Concat module is the input of the multi-scale cross-attention unit. The Concat module is used to concatenate and fuse the input features. The output of the Concat module is connected to the input of the 1×1 convolution module I. The output of the 1×1 convolution module I is connected to the input of the multi-scale cross-attention module and the local attention module respectively. The output features of the multi-scale cross-attention module and the local attention module are added element by element and then input into the 1×1 convolution module II. The output of the 1×1 convolution module II is the output of the multi-scale cross-attention unit.

[0023] Furthermore, the local attention module includes a 1×1 convolution module III, a 3×3 lightweight convolution module, and a 1×1 convolution module IV;

[0024] The input of the 1×1 convolutional module III is the input of the local attention module. The output of the 1×1 convolutional module III is connected to the input of the 3×3 lightweight convolutional module. The output features of the 3×3 lightweight convolutional module are added element-wise with the output features of the 1×1 convolutional module II and then input to the 1×1 convolutional module IV. The output features of the 1×1 convolutional module IV are processed by the Sigmoid activation function to generate weight map features. The weight map features are multiplied element-wise with the output features of the 1×1 convolutional module II and then added element-wise with the output features of the 1×1 convolutional module II to obtain the output features of the local attention module.

[0025] Furthermore, the loss function of the image segmentation model is:

[0026] L = L seg +L b ;

[0027] L seg =L Bce (P,B)+L Dice (P,B);

[0028] L b =L Bce (P b B b )+L Dice (P b B b );

[0029] Where: P is the image segmentation model prediction map, B is the label image, and P b B represents the boundary prediction result for the sample image. b L is the boundary segmentation map of the labeled image. Bce L represents the binary cross-entropy loss function. Dice This represents the Dice loss function.

[0030] Furthermore, the boundary-aware guidance unit includes a convolutional feature fusion block and a boundary-guided feature propagation module;

[0031] The input of the convolutional feature fusion module is connected to the output of the multi-scale cross-fusion decoder, and the output of the convolutional feature fusion module is connected to the output of the boundary-guided feature propagation module. The boundary-guided feature propagation module outputs the image segmentation result.

[0032] The beneficial effects of this invention are as follows: Through this invention, the multi-scale cross-fusion decoder, by combining multi-size strip convolution kernels and cross-axis attention mechanisms, can effectively extract multi-scale features and capture global information, thereby improving the segmentation effect of disease areas of different sizes. Moreover, the boundary awareness guidance unit can strengthen the learning of boundary information features and enhance the sensitivity to boundary information, ultimately effectively improving the ability to identify blurred edges of plant leaf diseases and ensuring the accuracy of the final disease area image segmentation. Attached Figure Description

[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0034] Figure 1 This is a schematic diagram of the structure of the present invention.

[0035] Figure 2 This is a schematic diagram of the multi-scale cross-fusion decoder structure of the present invention.

[0036] Figure 3 This is a schematic diagram of the local attention module structure of the present invention.

[0037] Figure 4 This is a schematic diagram of the multi-scale cross-attention unit structure of the present invention.

[0038] Figure 5 This is a schematic diagram of the convolutional feature fusion module structure of the present invention.

[0039] Figure 6 This is a schematic diagram of the boundary guidance feature propagation module structure of the present invention.

[0040] Figure 7 This is a schematic diagram of the multi-scale cross-attention module structure of the present invention.

[0041] Figure 8 This is a schematic diagram of the dual-path channel attention unit structure of the present invention. Detailed Implementation

[0042] The present invention will be further described in detail below:

[0043] This invention provides a boundary-aware guided method for segmenting plant leaf disease images, comprising the following steps:

[0044] S1. Obtain plant leaf sample images and label images;

[0045] S2. Construct an image segmentation model based on boundary awareness guidance, wherein the image segmentation model includes an encoder, a multi-scale cross-fusion decoder, and a boundary awareness guidance unit;

[0046] The encoder takes a sample image as input and extracts features from different dimensions of the sample image. The output of the encoder is connected to a multi-scale cross-fusion decoder for feature processing. The output features of the multi-scale cross-fusion decoder are input to a boundary-aware guidance unit, which outputs the segmentation result. The encoder uses a lightweight backbone network MobileNetV2 based on CNN to extract features. The MobileNetV2 network uses an inverse residual structure and a linear bottleneck layer design to improve the model's information representation ability in low-dimensional space, while using depthwise separable convolutions to reduce the number of parameters and computation.

[0047] S3. Input the sample images and label images into the image segmentation model to train the image segmentation model until training is complete;

[0048] S4. Acquire an image of the plant leaf to be identified, and input the image of the plant leaf to be identified into the trained image segmentation model to obtain the segmentation result of the diseased part of the plant leaf image. Through this invention, the multi-scale cross-fusion decoder, by combining multi-size strip convolution kernels and cross-axis attention mechanism, can effectively extract multi-scale features and capture global information, improving the segmentation effect of diseased regions of different sizes. Moreover, the boundary-aware guidance unit can strengthen the learning of boundary information features, enhance the sensitivity to boundary information, and ultimately effectively improve the ability to identify blurred edges of plant leaf diseases, ensuring the accuracy of the final diseased region image segmentation.

[0049] In this embodiment, the encoder extracts features from the sample image in four stages, wherein:

[0050] The image feature in the first stage is X1, and its resolution is...

[0051] The image feature in the second stage is X2, and its resolution is...

[0052] The image feature of the third stage is X3, and its resolution is...

[0053] The image feature of the fourth stage is X4, and its resolution is

[0054] Where H is the height of the sample image and W is the width of the sample image.

[0055] In this embodiment, as Figure 2 As shown: The multi-scale cross-fusion decoder includes 3 multi-scale cross-attention units and 3 dual-path channel attention units;

[0056] Image features X1, X2, and X3 are input to the first multi-scale cross-attention unit for processing. Image features X2, X3, and X4 are input to the second multi-scale cross-attention unit for processing. Image features X3 and X4 are input to the third multi-scale cross-attention unit for processing. The output features of the third multi-scale cross-attention unit are element-wise added to the output features of the second multi-scale cross-attention unit and then input to the third dual-path channel attention unit for processing. The output features of the third dual-path channel attention unit are element-wise added to the output features of the first multi-scale cross-attention unit and then input to the second dual-path channel attention unit. The first dual-path channel attention unit processes the image features X1. The output features of the second dual-path channel attention unit are element-wise added to the image features X1 and then input into the first dual-path channel attention unit for processing. The output features of the first, second, and third dual-path channel attention units are then input into the boundary-aware guidance unit for processing. Through this structure, three dual-path channel attention units (DBCA) adaptively weight the multi-scale aggregated feature maps to reduce redundant information and enhance effective features, thereby improving the image detail recovery capability. Specifically, the first multi-scale cross-attention unit is abbreviated as MSCM1, the second as MSCM2, and the third as MSCM3; the first dual-path channel attention unit is abbreviated as DBCA1, the second as DBCA2, and the third as DBCA3.

[0057] In this embodiment, as Figure 4 As shown: the three multi-scale cross-attention units have the same structure;

[0058] The multi-scale cross-attention unit includes the Concat module, 1×1 convolution module I, multi-scale cross-attention module, local attention module, and 1×1 convolution module II;

[0059] The input of the Concat module is the input of the multi-scale cross-attention unit. The Concat module is used to concatenate and fuse the input features. The output of the Concat module is connected to the input of 1×1 convolution module I. The output of 1×1 convolution module I is connected to the inputs of the multi-scale cross-attention module and the local attention module, respectively. The output features of the multi-scale cross-attention module and the local attention module are added element-wise and then input into 1×1 convolution module II. The output of 1×1 convolution module II is the output of the multi-scale cross-attention unit. The multi-scale cross-attention unit combines multi-scale strip convolution operation and axial attention mechanism. Axial attention decomposes self-attention into two independent attention operations on the horizontal axis and the vertical axis. The multi-scale cross-attention module is an existing technology, and its structure is as follows: Figure 7 As shown, the processing procedure is as follows:

[0060] For a given feature map F with shape H×W×C, F is encoded by three parallel one-dimensional convolutions, and the outputs are summed and then fed into a 1×1 convolutional layer for further processing, as shown in the following formula:

[0061]

[0062] Among them, Conv1Dx i (·) represents a one-dimensional convolution along the x-axis, Norm() is the layer normalization, and Fx is the output. Following the SegNeXt network settings, the kernel size of the one-dimensional convolution is set to 1×7, 1×11, or 1×21. The output Fy of the y-axis branch can be expressed as:

[0063]

[0064] Secondly, to better utilize the multi-scale convolutional features in two spatial directions, cross-attention is calculated between Fx and Fy in the network. Fx is treated as a key-value matrix, while Fy is treated as a query matrix. The calculation process is as follows:

[0065] F T =C att_x (Fy,Fx,Fx), (3)

[0066] Among them, C att_x This represents multi-head cross-attention along the x-axis. For the branch along the y-axis, a similar method is used to encode the context along the y-axis, and the calculation process is as follows:

[0067] F B =C att_y (Fx,Fy,Fy),(4)

[0068] Among them, C att_y This indicates multi-headed cross attention along the y-axis.

[0069] The dual-path channel attention unit employs existing technology, specifically: such as... Figure 8 As shown:

[0070] First, a 3×3 convolution kernel with a stride of 1 is used to process the input feature map. Perform convolution operations, then batch normalization and ReLU6 activation, and output the result as follows: Then, on both branches respectively Perform SE Attention and SP Attention The operation involves concatenating the output feature maps. Finally, a 3×3 convolution operation is used to further extract features, followed by batch normalization and a ReLU6 activation function to obtain the final output features. Attention The calculation is as follows:

[0071]

[0072] Where, vector z c The length of the feature map The number of channels C is determined by processing the input feature map. The result is obtained by performing global average pooling. and It is a fully connected layer.

[0073] Because some features are difficult to extract and require additional attention, SP has been added to the DBCA module. Attention Branching. Different categories in an image show a significant correlation in channel sparsity. Analyzing channel sparsity reveals that features are common in some channels, while features are relatively scarce in others. SP Attention Image feature distributions can provide meaningful distinguishing information for different categories. For the input feature map... Feature map of the k-th channel Sparsity is calculated as follows:

[0074] Γ k =1-Ω k (7)

[0075]

[0076] Among them, Γ k This represents the sparsity of the k-th channel. To emphasize the importance of channels associated with less common features, the DBCA module redefines the channel weights as follows:

[0077]

[0078] Here, C represents the number of channels in the feature map. δ is a very small non-zero value, set to 0.0001 in the experiments. Next, a fully connected layer is used to weight the coefficients ω. k Further processing is performed to adjust the scale and shape the result to suit channel-by-channel multiplication with the input feature map. Finally, by weighting the input feature map, the representation of important channels is enhanced, while the influence of unimportant channels is suppressed, thereby guiding the network to focus on more salient features.

[0079] To further enhance feature representation capabilities, feature maps of different resolutions are fused using local attention blocks. This preserves local detail information while strengthening the interaction between global and local features. Its structure is as follows: Figure 3 As shown:

[0080] The local attention module includes a 1×1 convolution module III, a 3×3 lightweight convolution module, and a 1×1 convolution module IV;

[0081] The input of the 1×1 convolutional module III is the input of the local attention module. The output of the 1×1 convolutional module III is connected to the input of the 3×3 lightweight convolutional module. The output features of the 3×3 lightweight convolutional module are added element-wise with the output features of the 1×1 convolutional module II and then input to the 1×1 convolutional module IV. The output features of the 1×1 convolutional module IV are processed by the Sigmoid activation function to generate weight map features. The weight map features are multiplied element-wise with the output features of the 1×1 convolutional module II and then added element-wise with the output features of the 1×1 convolutional module II to obtain the output features of the local attention module.

[0082] In this embodiment, the loss function of the image segmentation model is:

[0083] L = L seg +L b ;

[0084] L seg =L Bce (P,B)+L Dice (P,B);

[0085] L b =L Bce (P b B b )+L Dice (P b B b );

[0086] Where: P is the image segmentation model prediction map, B is the label image, and P b B represents the boundary prediction result for the sample image. b L is the boundary segmentation map of the labeled image. BceL represents the binary cross-entropy loss function. Dice Let represent the Dice loss function, where both the binary cross-entropy loss function and the Dice loss function use existing function expressions.

[0087] In this embodiment, the boundary-aware guidance unit includes a convolutional feature fusion block and a boundary-guided feature propagation module;

[0088] The input of the convolutional feature fusion module (represented by its abbreviation CFFB in the attached figure, its full name is Convolution Feature Fusion Block) is connected to the output of the multi-scale cross-fusion decoder, and the output of the convolutional feature fusion module is connected to the output of the boundary-guided feature propagation module (represented by its abbreviation BFPB in the attached figure, its full name is Boundary-guided Feature Propagation Block). The boundary-guided feature propagation module outputs the image segmentation result. Figure 5 and Figure 6 As shown, the specific structures of the two modules of the boundary-aware guidance unit are implemented using existing technologies, specifically:

[0089] The convolutional feature fusion block first upsamples the outputs d1, d2, d3, and d4 from each stage of the decoder to the original image size, concatenates them, and then passes the concatenated feature map to a 3×3 convolutional layer for processing. To further enhance the fused feature representation, the module uses global average pooling, a 1×1 convolutional layer, and the ReLU activation function to generate a feature weight vector. Then, the weight vector is multiplied by the output features of the convolutional sequence to obtain the output result X.

[0090] Subsequently, the boundary-guided feature propagation block combines the feature map X with the binary boundary feature map FB to generate a boundary-aware feature map. The boundary feature map FB is obtained by passing d1 through the Laplacian operator. In this process, FB guides feature propagation. The feature propagation directions are horizontal and vertical. In the horizontal direction, feature propagation is performed from left to right and from right to left respectively, generating two feature maps. and In the vertical direction, feature propagation is also performed from top to bottom and from bottom to top, generating two feature maps. and Specifically, in the horizontal direction, each row is scanned line by line to find the pixel index range belonging to the same segment. Then, the average pixel value within that range is calculated, and feature propagation is performed sequentially. In the vertical direction, propagation is done column by column. Similarly, the pixel index range within the same segment is found, and the feature is updated based on the average pixel value within that range. The specific formula is as follows:

[0091]

[0092] Finally, propagation feature maps in four directions. and The results are summed and averaged. The feature map X output by this module is... out Defined as:

[0093] By employing the above method, each pixel can receive information from different directions within the same segment, thereby improving the similarity and consistency of features while maintaining the distinguishability between different objects. This boundary-aware multi-directional information propagation mechanism can effectively enhance the boundary awareness capability of objects in segmentation tasks while improving the accuracy of feature representation.

[0094] In the attached diagram, ⊕ represents element-wise addition, and ⊙ represents element-wise multiplication. Indicates the sparsity of the feature map. This represents matrix multiplication.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for segmenting plant leaf disease images based on boundary awareness guidance, characterized in that: Includes the following steps: S1. Obtain plant leaf sample images and label images; S2. Construct an image segmentation model based on boundary awareness guidance, wherein the image segmentation model includes an encoder, a multi-scale cross-fusion decoder, and a boundary awareness guidance unit; The encoder inputs a sample image and extracts features from different dimensions of the sample image. The output of the encoder is connected to a multi-scale cross-fusion decoder for feature processing. The output features of the multi-scale cross-fusion decoder are input to the boundary-aware guidance unit, and the boundary-aware guidance unit outputs the segmentation result. The multi-scale cross-fusion decoder includes three multi-scale cross-attention units and three dual-path channel attention units; The boundary-aware guidance unit includes a convolutional feature fusion module and a boundary-guided feature propagation module; The input of the convolutional feature fusion module is connected to the output of the multi-scale cross-fusion decoder, and the output of the convolutional feature fusion module is connected to the output of the boundary-guided feature propagation module. The boundary-guided feature propagation module outputs the image segmentation result. S3. Input the sample images and label images into the image segmentation model to train the image segmentation model until training is complete; S4. Obtain the image of the plant leaf to be identified, and input the image of the plant leaf to be identified into the trained image segmentation model to obtain the segmentation result of the diseased part of the image of the plant leaf to be identified.

2. The method for segmenting plant leaf disease images based on boundary awareness as described in claim 1, characterized in that: The encoder extracts features from the sample image in four stages: The image feature in the first stage is X1, and its resolution is... The image feature in the second stage is X2, and its resolution is... The image feature of the third stage is X3, and its resolution is... The image feature of the fourth stage is X4, and its resolution is Where H is the height of the sample image and W is the width of the sample image.

3. The method for segmenting plant leaf disease images based on boundary awareness as described in claim 2, characterized in that: Image features X1, X2, and X3 are input to the first multi-scale cross-attention unit for processing. Image features X2, X3, and X4 are input to the second multi-scale cross-attention unit for processing. Image features X3 and X4 are input to the third multi-scale cross-attention unit for processing. The output features of the third multi-scale cross-attention unit are added element-wise to the output features of the second multi-scale cross-attention unit and then input to the third dual-path channel attention unit for processing. The output features of the third dual-path channel attention unit are added element-wise to the output features of the first multi-scale cross-attention unit and then input to the second dual-path channel attention unit for processing. The output features of the second dual-path channel attention unit are added element-wise to image feature X1 and then input to the first dual-path channel attention unit for processing. The output features of the first, second, and third dual-path channel attention units are input to the boundary perception guidance unit for processing.

4. The method for segmenting plant leaf disease images based on boundary awareness as described in claim 3, characterized in that: The three multi-scale cross-attention units have the same structure; The multi-scale cross-attention unit includes the Concat module, 1×1 convolution module I, multi-scale cross-attention module, local attention module, and 1×1 convolution module II; The input of the Concat module is the input of the multi-scale cross-attention unit. The Concat module is used to concatenate and fuse the input features. The output of the Concat module is connected to the input of the 1×1 convolution module I. The output of the 1×1 convolution module I is connected to the input of the multi-scale cross-attention module and the local attention module respectively. The output features of the multi-scale cross-attention module and the local attention module are added element by element and then input into the 1×1 convolution module II. The output of the 1×1 convolution module II is the output of the multi-scale cross-attention unit.

5. The method for segmenting plant leaf disease images based on boundary awareness as described in claim 4, characterized in that: The local attention module includes a 1×1 convolution module III, a 3×3 lightweight convolution module, and a 1×1 convolution module IV; The input of the 1×1 convolutional module III is the input of the local attention module. The output of the 1×1 convolutional module III is connected to the input of the 3×3 lightweight convolutional module. The output features of the 3×3 lightweight convolutional module are added element-wise with the output features of the 1×1 convolutional module II and then input to the 1×1 convolutional module IV. The output features of the 1×1 convolutional module IV are processed by the Sigmoid activation function to generate weight map features. The weight map features are multiplied element-wise with the output features of the 1×1 convolutional module II and then added element-wise with the output features of the 1×1 convolutional module II to obtain the output features of the local attention module.

6. The method for segmenting plant leaf disease images based on boundary awareness as described in claim 1, characterized in that: The loss function of the image segmentation model is: L=L seg +L b ; L seg =L Bce (P,B)+L Dice (P,B); L b =L Bce (P b ,B b )+L Dice (P b ,B b ); Where: P is the image segmentation model prediction map, B is the label image, and P b B represents the boundary prediction result for the sample image. b L is the boundary segmentation map of the labeled image. Bce L represents the binary cross-entropy loss function. Dice This represents the Dice loss function.