Identification method for quickly extracting boundary of mango planting area, electronic equipment and storage medium
By using the multi-scale channel attention mechanism module and feature extraction module in the identification of mango planting area, the SLMCnet model is constructed, which solves the problems of unsatisfactory accuracy and high computational overhead in traditional methods, and realizes efficient and accurate mango planting area boundary extraction, improving the efficiency of agricultural insurance claims.
Patent Information
- Application Number
- CN202411902405.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The traditional mango planting area identification method has problems such as unsatisfactory accuracy and high computational overhead, which is difficult to meet the practical application needs.
The multi-scale channel attention mechanism module MSFE, feature extraction module SMBU and downsampling module SMDU are used to construct the mango planting area edge recognition model SLMCnet, and improve the training efficiency and accuracy of the model through multi-dimensional and multi-scale feature information extraction and attention mechanism.
Efficient and accurate mango planting area boundary extraction has been achieved, the efficiency of agricultural insurance claims has been improved, and the economic losses caused to fruit farmers due to disasters have been reduced.
Smart Images

Figure CN119832240A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of mango planting area recognition, and in particular to a method for quickly extracting and identifying a boundary of a mango planting area, an electronic device and a storage medium. Background Art
[0002] In the process of agricultural insurance and claims settlement, traditional mangoes involve data such as the number of insured crops. The number of mango trees is usually estimated through agricultural insurance. Due to strong subjectivity, the area of mango planting is inaccurate, resulting in inaccurate number of insured trees. At the same time, in remote sensing monitoring of mango planting areas, multi-frequency massive remote sensing images produce displacement and dislocation problems, which cannot provide real-time and accurate remote sensing monitoring results, and it is difficult to implement tasks such as refined claims settlement. With the development of computer vision technology, mango planting area recognition has higher accuracy and efficiency than traditional manual recognition methods, but since manual feature selection consumes a lot of time and money, the accuracy of traditional machine learning is not ideal. Deep learning technology can automatically extract features, and the trained model has better recognition accuracy and robustness. However, the current mango planting area recognition methods based on deep learning are mainly concentrated in traditional convolutional neural networks such as Unet and DeeplabV3+. These networks have high computational overhead and are difficult to meet the needs of actual applications. Summary of the invention
[0003] In order to solve the problem of rapid and accurate identification of mango planting areas, the present invention proposes a method for rapid extraction and identification of mango planting area boundaries, an electronic device and a storage medium.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for quickly extracting and identifying the boundaries of mango planting areas comprises the following steps:
[0006] S1. Collect remote sensing image data of mango planting areas, obtain images of mango planting areas, and establish a sample data set;
[0007] S2. The data in the sample data set obtained in step S1 are cropped in sequence according to the pixel arrangement order, and the mango planting area image obtained in step S1 is expanded by flipping, color enhancement, and rotation, and the expanded image samples are added to the sample data set;
[0008] S3. Divide the sample data set obtained in step S2 into a training set and a test set;
[0009] S4. Construct a multi-scale channel attention mechanism module MSFE;
[0010] S5. Construct a feature extraction module SMBU and a downsampling module SMDU based on the multi-scale channel attention mechanism module MSFE obtained in step S4;
[0011] S6. Based on the feature extraction module SMBU and the downsampling module SMDU in step S5, a mango planting area edge recognition model SLMCnet is constructed;
[0012] S7. input the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training, obtain the model weight after the training, and then use the test set obtained in step S3 to evaluate and optimize the trained mango planting area edge recognition model SLMCnet to obtain the optimal mango planting area boundary extraction and segmentation model;
[0013] S8. Using the optimal mango planting area boundary extraction and segmentation model obtained in step S7, segment the mango planting area in the target area.
[0014] Furthermore, in step S1, the acquired mango planting area image is used to generate mango planting area mask sample data through ArcGIS software to construct a sample data set.
[0015] Furthermore, in step S3, the data division ratio of the training set and the test set is 8:2.
[0016] Furthermore, the specific implementation method of step S4 includes the following steps:
[0017] S4.1. Construct a multi-scale attention mechanism MSCA through three strip convolution blocks of different sizes. The calculation formula is as follows:
[0018] M=Dw_Conv 5×5 (input) (1)
[0019] M 7 =Dw_Conv 1×7 (Dw_Conv 7×1 (M)) (2)
[0020] M 11 =Dw_Conv 1×11 (Dw_Conv 11×1 (M)) (3)
[0021] M 21 =Dw_Conv 1×21 (Dw_Conv 21×1 (M)) (4)
[0022] Att MSCA =Conv 1×1(Concat(M 7 ,M 11 ,M 21 ) (5)
[0023] Among them, M represents the features extracted by the 5×5 deep convolution kernel, M 7 、M 11 、M 21 They represent the features extracted by the strip depth convolution kernels of size 7, 11, and 21, respectively. Dw_Conv represents the depth convolution kernel, Conv represents the convolution kernel, Concat represents the matrix connection, Att MSCA Represents the feature output of the multi-scale attention mechanism MSCA;
[0024] S4.2. Construct the channel attention mechanism SE through global average pooling, fully connected layer and Sigmod function. The calculation formula is as follows:
[0025]
[0026] z′ c =FC 1 (z c )=W 1 z c +b 1 (7)
[0027] a c =SwishReLu(z' c ) (8)
[0028]
[0029] Att SE =Sigmod(FC 2 (SwishReLu(FC 1 (z c (c))))) (12)
[0030] Among them, x c,i,j is the value of the i-th row and j-th column of the input feature map on channel c, H and W are the height and width of the feature map respectively, z c is the feature map after global average pooling;
[0031] z′ c Indicates that through the first fully connected layer FC 1 z c The output of dimension compression, W 1 is the first weight matrix, b 1 is the first bias term;
[0032] a c Represents z′c The output feature after the SwishReLu activation function, z′ c The output eigenvalue of is used as the input value of x in SwishReLu;
[0033] s c Indicates that through the second fully connected layer FC 2 A c The output restored to the original dimension, W 2 is the second weight matrix, b 2 is the first bias term;
[0034] Att SE represents the feature output of the channel attention mechanism SE; represents s c Output weight value through Sigmod activation function;
[0035] S4.3. The multi-scale channel attention mechanism module MSFE is constructed by multiplying MSCA and SE, and restored by 1×1 convolution. The calculation formula is as follows:
[0036]
[0037] in, Represents matrix dot product, and input represents the input matrix.
[0038] Furthermore, the specific implementation method of step S5 includes the following steps:
[0039] S5.1. Construct the feature extraction module SMBU, which consists of channel split, Channel shuffle operation, 2 1×1 convolution kernels, 1 3×3 depth convolution kernel, 1 MSFE module, 2 batch normalization BN and 2 SwishReLU activation functions. The calculation formula is as follows:
[0040] C, C'=channel split(input) (14)
[0041] S 1_1 =Conv 1×1 (SR(BN(Dw_Conv 3×3 (BN(MSFE(SR(BN(Conv 1×1 (C))))))) (15)
[0042] S SMBU =Channel shuffle(Concat(C',S 1_1 )) (16)
[0043] Among them, channel split represents the channel separation operation, which divides the input feature channel into channels C, C', S 1_1 represents the feature map output by channel C after feature extraction, SR is the SwishReLU activation function, BN is the batch normalization operation, Channel shuffle is the channel shuffle operation, which is used to enhance the information interaction capability, S SMBU It represents the feature map output after the feature maps on channels C and C' are connected and shuffled;
[0044] S5.2. Construct the downsampling module SMDU, which consists of a Channel shuffle operation, a 1×1 convolution kernel, a 3×3 depth convolution kernel with a step size of 2, an MSFE module, a batch normalization BN, and a SwishReLU activation function. The calculation formula is as follows:
[0045] S 2_1 =Conv 1×1 (SR(BN(DwConv 3×3,2 (BN(MSFE(SR(BN(Conv 1×1 (input))))))))) (17)
[0046] S 2_2 =MSFE(BN(Dw_Conv 3×3,2 (BN(Conv 1×1 (input))))) (18)
[0047] S SMDU =Channel shuffle(Concat(S 2_1 ,S 2_1 )) (19)
[0048] Among them, S 2_1 represents the feature map extracted by the right branch of the downsampling module, S 2_2 represents the feature map extracted by the left branch, S SMDU It represents the output of the left and right branch output features after connection and channel shuffling of the downsampling module SMDU.
[0049] Furthermore, step S6 constructs a mango planting area edge recognition model SLMCnet, which is composed of an input, a 1×1 convolution kernel, a maximum pooling, four feature extraction modules Stage and an output layer, wherein the first feature extraction module Stage1 is composed of one SMBU; the second feature extraction module Stage2 is composed of one SMDU and one SMBU; the third feature extraction module Stage3 is composed of one SMDU and two SMBU; the fourth feature extraction module Stage4 is composed of one SMDU and one SMBU and then connected to a 5×5 convolution kernel, and then the outputs of Stage1, Stage2, Stage3, and Stage4 are Concat-operated, the outputs after Concat are connected to the global average pooling, and the outputs of the global average pooling are connected to the multi-layer perceptron MLP to output the segmentation result.
[0050] Furthermore, step S7 inputs the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training. After the training, the model weight is obtained. The model training parameters are as follows: the training batch size is 6, the number of training times is 200, the optimizer is Adam, the initial learning rate is 0.0005, the learning rate adopts the cosine annealing function, the activation function is SwishReLU, and the loss function is Dice Loss; the obtained model parameters are loaded into the SLMCnet network model, and the test set in step S3 is used to evaluate the accuracy and efficiency of the model segmentation using the average intersection-over-union ratio mIoU, accuracy Precision, recall rate Recall, F1 score, and each training time min / epoch.
[0051] An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a method for quickly extracting and identifying boundaries of a mango planting area when executing the computer program.
[0052] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for quickly extracting and identifying the boundaries of a mango planting area is implemented.
[0053] Beneficial effects of the present invention:
[0054] The invention discloses a method for quickly extracting and identifying the boundary of a mango planting area. The method designs a multi-scale channel attention mechanism module MSFE, realizes the extraction of multi-dimensional and multi-scale feature information, and more effectively relates the feature information to the target information. The method designs a feature extraction module SMBU and a downsampling module SMDU, divides the channel equally through a channel split operation, effectively reduces the parameter amount of a 1×1 convolution, and adds an MSFE attention mechanism module to improve the training efficiency and precision of the model. The method designs a mango planting area edge recognition model SLMCnet, and improves the segmentation capability and training efficiency of the model for features of different sizes and shapes by adjusting the number of layers of the feature extraction module SMBU and the downsampling module SMDU and the splicing between different sizes. The method can efficiently and accurately realize the extraction of mango planting areas in multi-frequency massive remote sensing images, improve the efficiency of agricultural insurance claims for cash crops, and provide technical support for reducing the economic losses caused to fruit farmers by disasters. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of a method for quickly extracting and identifying boundaries of mango planting areas according to the present invention;
[0056] Figure 2 It is the network structure diagram of SLMCnet model;
[0057] Figure 3 This is a schematic diagram of the MSFE attention mechanism structure used in the present invention;
[0058] Figure 4 An improved SMBU module according to the present invention;
[0059] Figure 5 This is an improved SMDU module of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and specific 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, that is, the specific embodiments described are only part of the embodiments of the present invention, rather than all of the specific embodiments. The components of the specific embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations, and the present invention can also have other embodiments.
[0061] Therefore, the following detailed description of the specific embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected specific embodiments of the present invention. Based on the specific embodiments of the present invention, all other specific embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0062] In order to further understand the content, features and effects of the present invention, the following specific implementation methods are given as examples, and the attached Figure 1 -Attached Figure 5 The detailed instructions are as follows:
[0063] Embodiment 1:
[0064] A method for quickly extracting and identifying the boundaries of mango planting areas comprises the following steps:
[0065] S1. Collect remote sensing image data of mango planting areas, obtain images of mango planting areas, and establish a sample data set;
[0066] Furthermore, in step S1, the acquired mango planting area image is used to generate mask sample data of the mango planting area through ArcGIS software to construct a sample data set;
[0067] S2. The data in the sample data set obtained in step S1 are cropped in sequence according to the pixel arrangement order, and the mango planting area image obtained in step S1 is expanded by flipping, color enhancement, and rotation, and the expanded image samples are added to the sample data set;
[0068] Furthermore, the sample data set obtained in step S2 is cropped into a size of 512×512 according to the pixel arrangement order;
[0069] S3. Divide the sample data set obtained in step S2 into a training set and a test set;
[0070] Furthermore, in step S3, the data division ratio of the training set and the test set is 8:2;
[0071] S4. Construct a multi-scale channel attention mechanism module MSFE;
[0072] Furthermore, the specific implementation method of step S4 includes the following steps:
[0073] S4.1. Construct a multi-scale attention mechanism MSCA through three strip convolution blocks of different sizes. The calculation formula is as follows:
[0074] M=Dw_Conv 5×5 (input) (1)
[0075] M7 =Dw_Conv 1×7 (Dw_Conv 7×1 (M)) (2)
[0076] M 11 =Dw_Conv 1×11 (Dw_Conv 11×1 (M)) (3)
[0077] M 21 =Dw_Conv 1×21 (Dw_Conv 21×1 (M)) (4)
[0078] Att MSCA =Conv 1×1 (Concat(M 7 ,M 11 ,M 21 ) (5)
[0079] Among them, M represents the features extracted by the 5×5 deep convolution kernel, M 7 、M 11 、M 21 They represent the features extracted by the strip depth convolution kernels of size 7, 11, and 21, respectively. Dw_Conv represents the depth convolution kernel, Conv represents the convolution kernel, Concat represents the matrix connection, Att MSCA Represents the feature output of the multi-scale attention mechanism MSCA;
[0080] S4.2. Construct the channel attention mechanism SE through global average pooling, fully connected layer and Sigmod function. The calculation formula is as follows:
[0081]
[0082] z′ c =FC 1 (z c )=W 1 z c +b 1 (7)
[0083] a c =SwishReLu(z' c ) (8)
[0084]
[0085] s c =FC 2 (a c )=W 2 a c +b2 (10)
[0086]
[0087] Att SE =Sigmod(FC 2 (SwishReLu(FC 1 (z c (c))))) (12)
[0088] Among them, x c,i,j is the value of the i-th row and j-th column of the input feature map on channel c, H and w are the height and width of the feature map respectively, z c is the feature map after global average pooling;
[0089] z′ c Indicates that through the first fully connected layer FC 1 z c The output of dimension compression, W 1 is the first weight matrix, b 1 is the first bias term;
[0090] a c Represents z′ c The output feature after the SwishReLu activation function, z′ c The output eigenvalue of is used as the input value of x in SwishReLu;
[0091] s c Indicates that through the second fully connected layer FC 2 A c The output restored to the original dimension, W 2 is the second weight matrix, b 2 is the first bias term;
[0092] Att SE represents the feature output of the channel attention mechanism SE; represents s c Output weight value through Sigmod activation function;
[0093] S4.3. The multi-scale channel attention mechanism module MSFE is constructed by multiplying MSCA and SE, and restored by 1×1 convolution. The calculation formula is as follows:
[0094]
[0095] in, Represents matrix dot product, and input represents the input matrix.
[0096] S5. Construct a feature extraction module SMBU and a downsampling module SMDU based on the multi-scale channel attention mechanism module MSFE obtained in step S4;
[0097] Furthermore, the specific implementation method of step S5 includes the following steps:
[0098] S5.1. Construct the feature extraction module SMBU, which consists of channel split, Channel shuffle operation, 2 1×1 convolution kernels, 1 3×3 depth convolution kernel, 1 MSFE module, 2 batch normalization BN and 2 SwishReLU activation functions. The calculation formula is as follows:
[0099] C, C'=channel split(input) (14)
[0100] S 1_1 =Conv 1×1 (SR(BN(Dw_Conv 3×3 (BN(MSFE(SR(BN(Conv 1×1 (C))))))) (15)
[0101] S SMBU =Channel shuffle(Concat(C',S 1_1 )) (16)
[0102] Among them, channel split represents the channel separation operation, which divides the input feature channel into channels C, C', S 1_1 represents the feature map output by channel C after feature extraction, SR is the SwishReLU activation function, BN is the batch normalization operation, Channel shuffle is the channel shuffle operation, which is used to enhance the information interaction capability, S SMBU It represents the feature map output after the feature maps on channels C and C' are connected and shuffled;
[0103] S5.2. Construct the downsampling module SMDU, which consists of a Channel shuffle operation, a 1×1 convolution kernel, a 3×3 depth convolution kernel with a step size of 2, an MSFE module, a batch normalization BN, and a SwishReLU activation function. The calculation formula is as follows:
[0104] S 2_1 =Conv 1×1 (SR(BN(DwConv 3×3,2 (BN(MSFE(SR(BN(Conv 1×1 (input))))))))) (17)
[0105] S 2_2 =MSFE(BN(Dw_Conv 3×3,2 (BN(Conv 1×1 (input))))) (18)
[0106] S SMDU =Channel shuffle(Concat(S 2_1 ,S 2_1 )) (19)
[0107] Among them, S 2_1 represents the feature map extracted by the right branch of the downsampling module, S 2_2 represents the feature map extracted by the left branch, S SMDU It represents the output of the left and right branch output features after connection and channel shuffling of the downsampling module SMDU.
[0108] S6. Based on the feature extraction module SMBU and the downsampling module SMDU in step S5, a mango planting area edge recognition model SLMCnet is constructed;
[0109] Furthermore, step S6 constructs a mango planting area edge recognition model SLMCnet, which is composed of an input, a 1×1 convolution kernel, a maximum pooling, four feature extraction modules Stage and an output layer, wherein the first feature extraction module Stage1 is composed of one SMBU; the second feature extraction module Stage2 is composed of one SMDU and one SMBU; the third feature extraction module Stage3 is composed of one SMDU and two SMBU; the fourth feature extraction module Stage4 is composed of one SMDU and one SMBU and then connected to a 5×5 convolution kernel, and then the outputs of Stage1, Stage2, Stage3, and Stage4 are Concat-operated, the outputs after Concat are connected to the global average pooling, and the outputs of the global average pooling are connected to the multi-layer perceptron MLP to output the segmentation result.
[0110] S7. input the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training, obtain the model weight after the training, and then use the test set obtained in step S3 to evaluate and optimize the trained mango planting area edge recognition model SLMCnet to obtain the optimal mango planting area boundary extraction and segmentation model;
[0111] Furthermore, step S7 inputs the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training. After the training, the model weight is obtained. The model training parameters are as follows: the training batch size is 6, the number of training times is 200, the optimizer is Adam, the initial learning rate is 0.0005, the learning rate adopts the cosine annealing function, the activation function is SwishReLU, and the loss function is Dice Loss; the obtained model parameters are loaded into the SLMCnet network model, and the test set in step S3 is used to evaluate the accuracy and efficiency of the model segmentation using the average intersection-over-union ratio mIoU, accuracy Precision, recall rate Recall, F1 score, and each training time min / epoch.
[0112] Furthermore, the specific calculation formula is as follows:
[0113]
[0114] Among them, k represents the number of categories, p ij Indicates that i is predicted as j, which is a false negative FN; p ji Indicates that j is predicted to be i, which is a false positive FP; p ii It means that i is predicted to be i, which is the true TP;
[0115]
[0116] Among them, TP represents the positive samples that are predicted to be correctly classified, i.e. true positives, and FP represents the negative samples that are predicted to be incorrectly classified, i.e. false positives;
[0117]
[0118] Among them, TP represents the positive samples that are predicted to be correctly classified, that is, true positive samples, and FN represents the positive samples that are predicted to be incorrectly classified, that is, false negative;
[0119]
[0120] Among them, Precision represents the accuracy and Recall represents the recall rate.
[0121] S8. Using the optimal mango planting area boundary extraction and segmentation model obtained in step S7, segment the mango planting area in the target area.
[0122] To facilitate understanding of the technical effects of the present invention, the comparative effects of the method of the present invention and the prior art are shown in the following table:
[0123] Table 1 Comparison of the effects of the methods of the embodiments of the invention and the prior art
[0124]
[0125] It can be seen from Table 1 that compared with other disclosed methods, the model accuracy of the method proposed in the present invention has been greatly improved, and all evaluation indicators are optimal. The average intersection over union (mIoU) of the mango planting area boundary segmentation reached 91.3%, and the precision of the mango planting area boundary monomerization reached 93.2%; the efficiency of mango planting area boundary segmentation reached 5.07min / epoch.
[0126] In summary: this embodiment makes full use of the multi-scale channel attention mechanism module MSFE to realize multi-dimensional and multi-scale feature information extraction and more effective correlation between feature information and target information; the feature extraction module SMBU and the downsampling module SMDU are designed, and the channels are evenly divided through the channel split operation, which effectively reduces the number of parameters of the 1×1 convolution. At the same time, the MSFE attention mechanism module is added to improve the training efficiency and accuracy of the model; the mango planting area edge recognition model SLMCnet is designed, and the number of layers of the feature extraction module SMBU and the downsampling module SMDU and the splicing between different sizes are adjusted to improve the model's segmentation ability and training efficiency for features of different sizes and shapes.
[0127] Embodiment 2:
[0128] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a method for quickly extracting and identifying boundaries of a mango planting area described in Example 1 when executing the computer program.
[0129] The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit, etc. Moreover, the processor is used to implement the steps of the above-mentioned method for quickly extracting the boundary of a mango planting area when executing the computer program stored in the memory.
[0130] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0131] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0132] Embodiment 3:
[0133] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for quickly extracting and identifying boundaries of mango planting areas as described in Example 1.
[0134] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by a processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. The computer-readable storage medium stores a computer program. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned method for quickly extracting the boundary of a mango planting area can be implemented.
[0135] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0136] It should be noted that relational terms such as "first" and "second" are used only 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 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 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 device including the elements.
[0137] Although the present application has been described above with reference to specific embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for quickly extracting mango planting area boundaries and identifying them, characterized in that: The steps include: S1. Collect remote sensing image data of mango planting areas, obtain images of mango planting areas, and establish a sample data set; S2. The data in the sample data set obtained in step S1 are cropped in sequence according to the pixel arrangement order, and the mango planting area image obtained in step S1 is expanded by flipping, color enhancement, and rotation, and the expanded image samples are added to the sample data set; S3. Divide the sample data set obtained in step S2 into a training set and a test set; S4. Construct a multi-scale channel attention mechanism module MSFE; S5. Construct a feature extraction module SMBU and a downsampling module SMDU based on the multi-scale channel attention mechanism module MSFE obtained in step S4; S6. Based on the feature extraction module SMBU and the downsampling module SMDU in step S5, a mango planting area edge recognition model SLMCnet is constructed; S7. input the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training, obtain the model weight after the training, and then use the test set obtained in step S3 to evaluate and optimize the trained mango planting area edge recognition model SLMCnet to obtain the optimal mango planting area boundary extraction and segmentation model; S8. Using the optimal mango planting area boundary extraction and segmentation model obtained in step S7, segment the mango planting area in the target area.
2. A method for quickly extracting mango planting area boundaries according to claim 1, characterized in that, Step S1: The acquired mango planting area image is used to generate mango planting area mask sample data through ArcGIS software to construct a sample data set.
3. A method for quickly extracting mango planting area boundary recognition according to claim 2, characterized in that, The data division ratio of the training set and the test set in step S3 is 8:
2.
4. A method for quickly extracting mango planting area boundary recognition according to claim 3, characterized in that, The specific implementation method of step S4 includes the following steps: S4.
1. Construct a multi-scale attention mechanism MSCA through three strip convolution blocks of different sizes. The calculation formula is as follows: M=Dw_Conv 5×5 (input) (1) M7=Dw_Conv 1×7 (Dw_Conv 7×1 (M)) (2) M 11 =Dw_Conv 1×11 (Dw_Conv 11×1 (M)) (3) M 21 =Dw_Conv 1×21 (Dw_Conv 21×1 (M)) (4) Att MSCA =Conv 1×1 (Concat(M7,M 11 ,M 21 ) (5) Among them, M represents the features extracted by the 5×5 deep convolution kernel, M7, M 11 、M 21 They represent the features extracted by the strip depth convolution kernels of size 7, 11, and 21, respectively. Dw_Conv represents the depth convolution kernel, Conv represents the convolution kernel, Concat represents the matrix connection, Att MSCA Represents the feature output of the multi-scale attention mechanism MSCA; S4.
2. Construct the channel attention mechanism SE through global average pooling, fully connected layer and Sigmod function. The calculation formula is as follows: With' c =FC1(from c )=W1z c +b1 (7) and c =SwishReLu(z' c ) (8) s c =FC2(a c )=W2a c +b2 (10) To SE =Sigmod(FC2(SwishReLu(FC1(z c (c))))) (12) Among them, x c,i,j is the value of the i-th row and j-th column of the input feature map on channel c, H and W are the height and width of the feature map respectively, z c is the feature map after global average pooling; z′ c It means that z is connected through the first fully connected layer FC1. c The output of dimension compression, W1 is the first weight matrix, b1 is the first bias term; a c Represents z′ c The output feature after the SwishReLu activation function, z′ c The output eigenvalue of is used as the input value of x in SwishReLu; s c It means that a is connected through the second fully connected layer FC2. c Restore the output to the original dimension, W2 is the second weight matrix, b2 is the first bias term; Att SE represents the feature output of the channel attention mechanism SE; represents s c Output weight value through Sigmod activation function; S4.
3. The multi-scale channel attention mechanism module MSFE is constructed by multiplying MSCA and SE, and restored by 1×1 convolution. The calculation formula is as follows: in, Represents matrix dot product, and input represents the input matrix.
5. A method for quickly extracting mango planting area boundary recognition according to claim 4, characterized in that, The specific implementation method of step S5 includes the following steps: S5.
1. Construct the feature extraction module SMBU, which consists of channel split, Channel shuffle operation, 2 1×1 convolution kernels, 1 3×3 depth convolution kernel, 1 MSFE module, 2 batch normalization BN and 2 SwishReLU activation functions. The calculation formula is as follows: C, C'=channel split(input) (14) S 1_1 =Conv 1×1 (SR(BN(Dw_Conv 3×3 (BN(MSFE(SR(BN(Conv 1×1 (C))))))) (15) S SMBU =Channel shuffle(Concat(C',S 1_1 )) (16) Among them, channel split represents the channel separation operation, which divides the input feature channel into channels C, C', S 1_1 represents the feature map output by channel C after feature extraction, SR is the SwishReLU activation function, BN is the batch normalization operation, Channel Shuffle is the channel shuffle operation, which is used to enhance the information interaction capability, S SMBU It represents the feature map output after the feature maps on channels C and C' are connected and shuffled; S5.
2. Construct the downsampling module SMDU, which consists of a Channel shuffle operation, a 1×1 convolution kernel, a 3×3 depth convolution kernel with a step size of 2, an MSFE module, a batch normalization BN, and a SwishReLU activation function. The calculation formula is as follows: S 2_1 =Conv 1×1 (SR(BN(DwConv 3×3,2 (BN(MSFE(SR(BN(Conv 1×1 (input))))))))) (17) S 2_2 =MSFE(BN(Dw_Conv 3×3,2 (BN(Conv 1×1 (input))))) (18) S SMDU =Channel shuffle(Concat(S 2_1 ,S 2_1 )) (19) Among them, S 2_1 represents the feature map extracted by the right branch of the downsampling module, S 2_2 represents the feature map extracted by the left branch, S SMDU It represents the output of the left and right branch output features after connection and channel shuffling of the downsampling module SMDU.
6. A method for quickly extracting mango planting area boundaries and identifying the same according to claim 5, characterized in that: Step S6 constructs a mango planting area edge recognition model SLMCnet, which is composed of an input, a 1×1 convolution kernel, a maximum pooling, four feature extraction modules Stage and an output layer, wherein the first feature extraction module Stage1 is composed of 1 SMBU; the second feature extraction module Stage2 is composed of 1 SMDU and 1 SMBU; the third feature extraction module Stage3 is composed of 1 SMDU and 2 SMBU; the fourth feature extraction module Stage4 is composed of 1 SMDU and 1 SMBU and then connected to a 5×5 convolution kernel, and then the outputs of Stage1, Stage2, Stage3, and Stage4 are Concat operated, the output after Concat is connected to the global average pooling, and the output of the global average pooling is connected to the multi-layer perceptron MLP output segmentation result.
7. A method for quickly extracting mango planting area boundaries and identifying the same according to claim 6, characterized in that: Step S7 inputs the training set obtained in step S3 into the mango planting area edge recognition model SLMCnet obtained in step S6 for training. After the training, the model weight is obtained. The model training parameters are as follows: the training batch size is 6, the number of training times is 200, the optimizer is Adam, the initial learning rate is 0.0005, the learning rate adopts the cosine annealing function, the activation function is SwishReLU, and the loss function is DiceLoss; the obtained model parameters are loaded into the SLMCnet network model, and the accuracy and efficiency of the model segmentation are evaluated by the test set in step S3 using the average intersection-over-union ratio mIoU, accuracy Precision, recall rate Recall, F1 score, and each training time min / epoch.
8. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a method for quickly extracting and identifying boundaries of a mango planting area as described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for quickly extracting and identifying the boundaries of mango planting areas as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Convolutional neural network and Transform fused remote sensing image building extraction method
CN116071650A
Method for extracting cultivated land boundary of remote sensing satellite image
CN117455939A
Identity recognition method and system based on image semantic segmentation and classification
CN117523208A
Pear tree planting area remote sensing extraction method based on Re-UNet model
CN117636170A
Building and road monomer segmentation method, electronic equipment and storage medium
CN119091303A