A farmland extraction method and system for a complex landform region
Patent Information
- Application Number
- CN202610358027.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2046-03-23
AI Technical Summary
[0005]本发明提供一种复杂地貌区域农田提取方法及系统,用以解决现有农田提取模型容易出现小地块遗漏或大地块边界模糊的问题,实现复杂地貌区域农田边界的准确提取
[0015]第四方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述的复杂地貌区域农田提取方法。
Smart Images

Figure CN122313264B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing and application technology, and in particular to a method and system for extracting farmland in complex terrain areas. Background Technology
[0002] In precision agriculture and agricultural resource management, plot-level farmland, as the basic spatial unit for agricultural production activities such as sowing, management, and harvesting, is the core carrier for achieving accurate crop area statistics and yield forecasting. However, current global or regional-scale farmland remote sensing mapping products are limited by insufficient spatial resolution and low overall accuracy in local areas. This makes it difficult to accurately depict the distribution of small-scale farmland with complex terrain, fragmented planting structures, and blurred boundaries, severely restricting their effective application in regions with diverse landforms and highly heterogeneous agricultural landscapes. Therefore, developing fine-scale farmland extraction technologies is of great significance for optimizing land resource allocation, strengthening crop dynamic monitoring and yield forecasting, and improving agricultural management efficiency and sustainable development.
[0003] In recent years, deep learning-based remote sensing image analysis methods have shown significant potential in high-resolution satellite imagery for detailed farmland mapping due to their ability to automatically learn multi-level features from data. Existing methods largely follow traditional remote sensing image segmentation frameworks, focusing on building global dependencies through contextual modeling and optimizing pixel classification accuracy through single-task or multi-task learning. While these methods have proven their feasibility in farmland identification, they still have significant limitations: First, most methods focus only on semantic classification at the pixel level within plots, neglecting the spatial relationships and morphological patterns between plots; second, in complex terrain areas, due to the combined effects of diverse land use patterns, the intermingling of farmland and surrounding features, differences in crop types and growth periods, fragmented management scales, and hilly and mountainous terrain, farmland boundaries often exhibit high levels of ambiguity, fragmentation, and irregularity. This makes it difficult for traditional deep learning models to accurately capture plot outlines and spatial continuity, thus limiting the complete and accurate extraction of plot-level farmland information.
[0004] Therefore, there is an urgent need to develop a farmland extraction method that can take into account the spatial correlation and morphological constraints between plots and adapt to complex terrain conditions, so as to improve the identification accuracy and spatial integrity of fragmented agricultural area boundaries. Summary of the Invention
[0005] This invention provides a method and system for extracting farmland in complex terrain areas, which solves the problem that existing farmland extraction models are prone to missing small plots or having blurred boundaries of large plots, and achieves accurate extraction of farmland boundaries in complex terrain areas.
[0006] In a first aspect, the present invention provides a method for extracting farmland in complex terrain areas, comprising: Multi-level features are extracted from remote sensing images of the target area using a pre-trained neural network model; The multi-scale spatial features are obtained by extracting the preliminary spatial features and deep discriminative features of the multi-level features through a multi-scale spatial branching network and then fusing the features. The multi-level features are extracted and fused by an edge Gaussian thinning branch network to obtain the thinned edge features; The multi-scale spatial features and the refined edge features are fused to generate the farmland extraction result of the target area.
[0007] According to a method for extracting farmland in complex terrain areas provided by the present invention, the multi-scale spatial branching network includes a first feature extraction module, a second feature extraction module, and a first feature fusion module; The first feature extraction module is used to extract the refined features corresponding to the multi-level features through multi-scale convolution operations and residual connection operations respectively, to obtain multiple refined features, and to fuse the multiple refined features through the first head layer to obtain preliminary spatial features; The second feature extraction module is used to apply a channel attention mechanism to multiple deep features in the multi-level features to obtain multiple weighted features, and to perform feature mapping and fusion on the multiple weighted features to obtain deep discriminative features; wherein, the multiple deep features are the last m layers of the multi-level features; The first feature fusion module is used to perform feature mapping on the deep discriminative features and then fuse them with the preliminary spatial features to obtain a first fused feature. The first fused feature is then optimized by feature weighting through a channel attention mechanism to obtain multi-scale spatial features.
[0008] According to the present invention, a method for extracting farmland in complex terrain areas is provided. The first feature extraction module includes multiple parallel first convolutional layers and a second convolutional layer, a first activation layer, a third convolutional layer, a second activation layer, a residual connection layer, a batch normalization layer, a regularization layer, and a first head layer connected in sequence. The residual connection layer is used to perform residual connection on the output results of the second activation layer and the output results of the second convolutional layer.
[0009] According to the present invention, a method for extracting farmland in complex terrain areas is provided, wherein the edge Gaussian thinning branch network includes a shallow feature extraction module, a deep feature extraction module, and a second feature fusion module; The shallow feature extraction module is used to extract the main features and the first edge features of the first layer feature F1 in the multi-level features; The deep feature extraction module is used to perform feature mapping on the last layer feature F4 in the multi-level features and then fuse it with the first edge feature to obtain a second fused feature; perform edge extraction and Gaussian modeling on the second fused feature to obtain a second edge feature and a Gaussian feature; and perform feature fusion on the second edge feature, the Gaussian feature and the second fused feature to obtain a third edge feature. The second feature fusion module is used to perform feature fusion on the third edge feature, the main feature, and the output feature of the pyramid pooling layer to obtain refined edge features.
[0010] According to the method for extracting farmland in complex terrain areas provided by the present invention, the shallow feature extraction module includes: The pyramid pooling layer is used to enhance the field of view of the first layer of features in the multi-level features to obtain pyramid features. The flow field guiding layer is used to perform convolution downsampling and bilinear interpolation operations on the pyramid features to generate an optical flow field, and calculate the main feature by multiplying the pyramid features and the optical flow field, and calculate the first edge feature by the difference between the pyramid features and the main feature.
[0011] According to a method for extracting farmland in complex terrain areas provided by the present invention, in the deep feature extraction module, the step of performing edge extraction and Gaussian modeling on the second fused feature to obtain the second edge feature and Gaussian feature includes: The second edge feature is obtained by performing a Gaussian smooth convolution operation on the second fused feature using a Gaussian kernel function; The second edge feature is batch normalized and activated to obtain Gaussian features.
[0012] According to a method for extracting farmland in complex terrain areas provided by the present invention, the deep feature extraction module includes fusing the second edge feature, the Gaussian feature, and the second fusion feature to obtain a third edge feature, comprising: The second edge feature, the Gaussian feature, and the second fusion feature are concatenated and convolved to obtain the third fusion feature. The refined edge features of the third fusion feature are extracted using a convolution module; The refined edge features are fused with the second fused features to obtain the third edge features.
[0013] Secondly, the present invention also provides a farmland extraction system for complex terrain areas, comprising: A multi-level feature extraction module is used to extract multi-level features from remote sensing images of the target area using a pre-trained neural network model. The spatial feature extraction module is used to extract the preliminary spatial features and deep discriminative features of the multi-level features through a multi-scale spatial branching network and perform feature fusion to obtain multi-scale spatial features; The edge feature extraction module performs multi-level edge feature extraction and feature fusion on the multi-level features through an edge Gaussian thinning branch network to obtain thinned edge features. The farmland extraction module is used to fuse the multi-scale spatial features with the refined edge features to generate farmland extraction results for the target area.
[0014] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for extracting farmland in complex terrain areas as described above.
[0015] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for extracting farmland in complex terrain areas as described above.
[0016] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for extracting farmland in complex terrain areas as described above.
[0017] The beneficial effects of the technical solutions provided by some embodiments of the present invention include at least the following: This invention provides a method and system for extracting farmland in complex terrain areas. It constructs a dual-branch network comprising a multi-scale spatial branch and an edge Gaussian refinement branch. The multi-scale spatial branch extracts multi-scale features of fields in remote sensing images caused by differences in topography and land use intensity. Through cross-layer feature fusion and deep feature mining, it establishes a connection between local details and global semantics, thereby mitigating the uncertainty caused by land cover diversity and improving the model's robustness and discriminative power in different regions and scenarios. The edge Gaussian refinement branch extracts edge information of farmland and improves the continuity and integrity of farmland boundaries through complementary fusion of shallow and deep features and explicit boundary modeling using Gaussian modeling. Finally, the features extracted by the dual-branch network are fused to achieve accurate extraction of farmland boundaries in complex terrain areas. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating a method for extracting farmland in complex terrain areas provided by the present invention; Figure 2 This is a schematic diagram of the structure of the multi-scale spatial branching network provided by the present invention; Figure 3 This is a schematic diagram of the edge Gaussian thinning branch network provided by the present invention; Figure 4 This is a schematic diagram of the complete farmland extraction model for complex terrain areas provided by the present invention; Figure 5 This invention provides extraction results and comparisons of different methods used in farmland in plain areas. Figure 6 This invention provides extraction results and comparisons of different methods used in hilly farmland. Figure 7 This invention provides extraction results and comparisons of different methods used in mountainous farmland. Figure 8 This is a schematic diagram of the structure of a farmland extraction system for complex terrain areas provided by the present invention; Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] Please see Figure 1 , Figure 1 This invention provides a flowchart illustrating a method for extracting farmland in complex terrain areas. S101. Extract multi-level features from remote sensing images of the target area using a pre-trained neural network model; S102. Extract preliminary spatial features and deep discriminative features of multi-level features through a multi-scale spatial branching network and perform feature fusion to obtain multi-scale spatial features; S103. Multi-level edge feature extraction and feature fusion are performed on multi-level features through the edge Gaussian thinning branch network to obtain thinned edge features; S104. Multi-scale spatial features and refined edge features are fused to obtain farmland extraction results for the target area.
[0022] This invention provides a method and system for extracting farmland in complex terrain areas. Addressing the problem that existing farmland extraction models often miss small plots or have blurred boundaries for large plots, this invention constructs a dual-branch network comprising a multi-scale spatial branch and an edge Gaussian refinement branch. The multi-scale spatial branch extracts multi-scale features of farmland plots from remote sensing images, resulting from differences in topography and land use intensity. Through cross-layer feature fusion and deep feature mining, it establishes a connection between local details and global semantics, thereby mitigating the uncertainty caused by land cover diversity and improving the model's robustness and discriminative power across different regions and scenarios. The edge Gaussian refinement branch extracts farmland edge information and improves the continuity and integrity of farmland boundaries through complementary fusion of shallow and deep features and explicit boundary modeling using Gaussian modeling. Finally, the features extracted by the dual-branch network are fused to achieve accurate extraction of farmland boundaries in complex terrain areas.
[0023] In step S101 of this embodiment, multi-level features are extracted from the remote sensing image of the target area using a pre-trained neural network model for subsequent multi-scale feature processing.
[0024] For example, a pre-trained ResNet-50 network model can be used to extract multi-level features F1, F2, F3, and F4 from remote sensing images of the target area, where F1 to F4 represent information from shallow to deep layers, respectively.
[0025] It is understood that the number of levels of the multi-level features extracted in this invention is not limited and can be extracted according to specific needs. Moreover, these multi-level features should have rich edge and semantic features to meet the needs of farmland extraction in complex terrain areas.
[0026] In step S102 of this embodiment, the multi-level features obtained in step S101 are input into a multi-scale spatial branch network for refinement to obtain multi-scale spatial features.
[0027] For example, multi-level features can be input into a multi-scale spatial branching network, and preliminary spatial features and deep discriminative features can be extracted through the multi-scale spatial branching network. Then, feature fusion is performed on the preliminary spatial features and deep discriminative features to obtain multi-scale spatial features.
[0028] In some possible embodiments, the multi-scale spatial branching network includes a first feature extraction module, a second feature extraction module, and a first feature fusion module; The first feature extraction module is used to extract the refined features corresponding to the multi-level features through multi-scale convolution operations and residual connection operations, to obtain multiple refined features, and then fuse the multiple refined features through the first head layer to obtain preliminary spatial features; The second feature extraction module is used to apply channel attention mechanism to multiple deep features in the multi-level features to obtain multiple weighted features, and to perform feature mapping and fusion on the multiple weighted features to obtain deep discriminative features; wherein, the multiple deep features are the last m layers of the multi-level features; The first feature fusion module is used to perform feature mapping on the deep discriminative features and fuse them with the preliminary spatial features to obtain the first fused features. The first fused features are then optimized by feature weighting through a channel attention mechanism to obtain multi-scale spatial features.
[0029] Specifically, taking the multi-level features F1, F2, F3, and F4 extracted in step S101 as an example, after inputting the multi-level features F1, F2, F3, and F4 into the multi-scale spatial branch, the first feature extraction module performs multi-scale convolution operations and residual connection operations on F1, F2, F3, and F4 respectively to generate refined features. Then, the refined features are fused through the first Head layer to obtain preliminary spatial features. Then, the second feature extraction module applies channel attention mechanisms to the deep features F3 and F4 respectively, and weights and fuses them to obtain deep discriminative features. Finally, the first feature fusion module is used to analyze the preliminary spatial features and the deep discriminative features. Feature fusion is performed to obtain multi-scale spatial features.
[0030] Please see Figure 2 , Figure 2 The diagram shown is a schematic diagram of the structure of a multi-scale spatial branching network provided in an embodiment of the present invention.
[0031] like Figure 2 As shown, in some possible embodiments, the first feature extraction module includes multiple parallel first convolutional layers followed by a second convolutional layer, a first activation layer, a third convolutional layer, a second activation layer, a residual connection layer, a batch normalization (BN) layer, a fourth convolutional layer, a dropout regularization layer, and a first head layer. The residual connection layer is used to perform residual connections between the outputs of the second activation layer and the second convolutional layer. The first convolutional layer is a 1×1 kernel layer used to unify the number of channels for each feature, obtaining initial features.
[0032] Specifically, according to Figure 2As shown, after inputting F1 to F4 into the multi-scale spatial branching network, the initial features are obtained by passing them through a 1×1 convolutional layer with a uniform number of channels in the first feature extraction module. Subsequently, the features are processed sequentially through a combination of two convolutional layers and GELU activation layers, a BN layer, a 3×3 convolutional layer, and a Dropout layer, combined with residual connection processing to generate refined features. ,Right now:
[0033] in, , These represent convolutional layers with kernel sizes of 1×1 and 3×3, respectively. , For the refined features of feature Fi, BN( ) represents batch normalization operation.
[0034] Based on this, the aforementioned refined features are further integrated through the first Head layer. To obtain preliminary spatial features :
[0035] in, To represent the addition operation, Head( ) represents the function of the first Head layer, which includes a convolutional layer, a BN layer and a ReLU activation layer connected in sequence.
[0036] like Figure 2 As shown, the second feature extraction module includes two channel attention branches. The first channel attention module and the second channel attention module respectively perform channel attention calculation on the deep features F3 and F4. After each channel attention, spatial details are reconstructed through upsampling to obtain multiple weighted features. , Furthermore, the deep discriminative features are obtained by feature mapping and fusion of multiple weighted features through the second head layer. .
[0037] The expressions involved in the second feature extraction module are:
[0038]
[0039] in, , These are the weighted features corresponding to deep features F3 and F4, respectively. The functions for the first and second channel attention modules can be the same, both using CA( )express.
[0040] like Figure 2 As shown, the first feature fusion module integrates deep discriminative features through the third Head layer. Preliminary spatial characteristics Integration yields the first fusion feature. And the first fused feature is processed through the third channel attention module. Feature weighting optimization is performed to obtain multi-scale spatial features. .
[0041] The expressions involved in the first feature fusion module are:
[0042]
[0043] Wherein, CA( ) represents the function of the third channel attention module.
[0044] This multi-scale spatial feature This is the output of the multi-scale spatial branching network.
[0045] This invention extracts multi-scale features of fields in remote sensing images caused by differences in topography and land use intensity through a multi-scale spatial branching network. Unlike existing technologies, the multi-scale spatial branching network designed in this invention establishes a connection between local details and global semantics through cross-layer feature fusion and deep feature mining, thereby alleviating the uncertainty caused by the diversity of land features and improving the robustness and discriminative power of the model in different regions and scenarios.
[0046] In step S103 of this embodiment, multi-level edge feature extraction and feature fusion are performed on the multi-level features obtained in step S101 through the edge Gaussian thinning branch network to obtain thinned edge features.
[0047] For example, taking the multi-level features F1 to F4 as an example, the shallow feature F1 and the deep feature F4 represent features at different depths and contain edge features of different granularities. Therefore, the shallow features and deep features can be combined to complement and fuse features and extract refined edge features.
[0048] In some possible embodiments, the edge Gaussian thinning branch network includes a shallow feature extraction module, a deep feature extraction module, and a second feature fusion module; The shallow feature extraction module is used to extract the main features and the first edge features of the first layer F1 in the multi-level feature extraction module. The deep feature extraction module is used to perform feature mapping on the last layer feature F4 in the multi-level feature and then fuse it with the first edge feature to obtain the second fused feature; perform edge extraction and Gaussian modeling on the second fused feature to obtain the second edge feature and Gaussian feature; and perform feature fusion on the second edge feature, Gaussian feature and second fused feature to obtain the third edge feature. The second feature fusion module is used to fuse the third edge feature, the main feature, and the output features of the pyramid pooling layer to obtain refined edge features.
[0049] Specifically, such as Figure 3 The diagram shows a schematic of the edge Gaussian thinning branch network provided in an embodiment of the present invention. This edge Gaussian thinning branch network includes a shallow feature extraction module, a deep feature extraction module, and a second feature fusion module. The shallow feature extraction module takes shallow feature F1 as input and extracts the main body feature and the first edge feature from it. The deep feature extraction module takes deep feature F4 as input and extracts the third edge feature from it. The second feature fusion module fuses the input results from the shallow feature extraction module and the deep feature extraction module to obtain the thinned edge features.
[0050] In some possible embodiments, the shallow feature extraction module includes: The pyramid pooling layer is used to enhance the field of view of the first layer of features, F1, in a multi-level feature set, resulting in pyramid features. ; Flow field guiding layer, used for pyramid features Perform convolutional downsampling and bilinear interpolation operations to generate the optical flow field. The main features are calculated by multiplying the pyramid features with the optical flow field. The first edge feature is calculated by the difference between the pyramid feature and the main feature. .
[0051] Specifically, such as Figure 3 As shown, the shallow feature extraction module includes a pyramid pooling layer and a flow field guiding layer. The flow field guiding layer comprises a downsampling layer, an optical flow field calculation layer, and a bilinear interpolation layer connected in sequence. The shallow feature extraction module takes the shallow feature F1 as input and first passes it through the pyramid pooling layer (PSP) to obtain pyramid features that enhance the receptive field. The optical flow field is generated in the optical flow field calculation layer using two 3×3 convolution downsampling operations and one bilinear interpolation operation. :
[0052] in, This represents a convolution operation with a 3×3 kernel. This represents an upsampling operation, also known as bilinear interpolation.
[0053] Furthermore, in the bilinear interpolation layer, based on the optical flow field and pyramid features Calculate the main features With edge features The expression is:
[0054]
[0055] in, Representing the characteristics of the pyramids Upper k Pixel position p k The neighborhood of p, where p is the neighborhood any point within, This represents element-wise multiplication. This indicates a bilinear weighted interpolation operation.
[0056] like Figure 3 As shown, the deep feature extraction module includes a fifth convolutional layer, an edge extraction layer, a Gaussian modeling layer, a sixth convolutional layer, a convolutional module, and a seventh convolutional layer connected in sequence. The deep feature extraction module maps the input deep features F4 through a 1×1 fifth convolutional layer to features with the same number of channels as the shallow edge features. and with the first edge feature splicing to form a second fusion feature Then, in the edge extraction layer and Gaussian modeling layer, a Gaussian kernel is used to process the second fused feature. Edge extraction and probabilistic modeling are performed, and the features are concatenated with the second edge feature and the second fusion feature. A 1×1 sixth convolutional layer is then used to calculate the third fusion feature. Finally, refined edge features of the third fusion feature are extracted based on the convolutional module; these are then fused with the second fusion feature, and processed through a 3×3 seventh convolutional layer to obtain the third edge feature. The convolution module includes multiple convolutional layers, activation layers, and batch normalization (BN) operations. For example, the convolution module may include a combination of two convolutional layers connected in sequence with a batch normalization (BN) layer, as well as a ReLU activation layer and a batch normalization (BN) layer.
[0057] In some possible embodiments, the deep feature extraction module performs edge extraction and Gaussian modeling on the second fused features to obtain second edge features and Gaussian features, including: The second edge feature is obtained by performing a Gaussian smooth convolution operation on the second fusion feature using a Gaussian kernel function; The second edge features are batch normalized and activated to obtain Gaussian features.
[0058] Specifically, in the edge extraction layer, the second fusion feature is... Edge feature extraction is performed to obtain the second edge feature. In the Gaussian modeling layer, for low confidence intervals... Perform Gaussian modeling to generate Gaussian features. The expressions involved in this edge extraction and Gaussian modeling process are as follows:
[0059]
[0060] in, Represents the Gaussian kernel function , For scale parameters, Represents the convolution operation. For convolution operations Local coordinates inside the convolution kernel; Represents the second fusion characteristic, Represents the second edge feature. Represents Gaussian characteristics; BN( ) represents the batch normalization layer, ReLU( ) represents the activation function.
[0061] In some possible embodiments, the deep feature extraction module performs feature fusion on the second edge feature, Gaussian feature, and second fused feature to obtain the third edge feature, including: For the second edge features Gaussian characteristics With the second fusion feature The third fused feature is obtained by performing feature concatenation and convolution operations. ; The third fusion feature is extracted using the convolution module. Refined edge features ; Refine edge features With the second fusion feature Feature fusion is performed to obtain the third edge feature. .
[0062] Specifically, the expressions for the above three steps are:
[0063]
[0064]
[0065] in, This represents a splicing operation. This represents element-wise multiplication. This represents the sigmoid function.
[0066] Finally, the third edge feature is integrated through the second fusion module. With the main features After being fused and processed through the eighth convolutional layer, and combined with pyramid features Combined, refined edge features are generated. Its expression is:
[0067] This refines the edge features This is the output of the edge Gaussian refinement branch network.
[0068] The edge Gaussian thinning branch network designed in this invention focuses on strengthening boundary information. By complementing and fusing shallow and deep features and combining them with a Gaussian modeling module for explicit boundary modeling, it highlights the boundary features of farmland and improves the continuity and integrity of the boundaries, which is beneficial to improving the clarity of farmland boundaries.
[0069] In step S104 of this embodiment, the multi-scale spatial features output by the multi-scale spatial branch network are... Refined edge features from the Gaussian thinning branch network output The data is then combined to obtain the final farmland extraction results.
[0070] For example, multi-scale spatial features can be directly... With refined edge features Feature splicing is performed to obtain the final farmland extraction result.
[0071] For example, attention mechanisms can also be used to analyze multi-scale spatial features. With refined edge features Weights are assigned to obtain the final farmland extraction results.
[0072] For example, multi-scale spatial features can also be processed through a fourth Head layer. With refined edge features Feature fusion is performed to obtain the final farmland extraction result.
[0073] To obtain multi-scale spatial features through the fourth head layer With refined edge features Taking feature fusion as an example, such as Figure 4As shown, a dual-branch network can be formed by combining the above multi-scale spatial branch network and edge Gaussian refinement branch network, and combined with the ResNet50 model and the fourth head layer to form a complete farmland extraction model for complex terrain areas, which can be used for farmland extraction in complex terrain areas.
[0074] In this embodiment, a farmland dataset with multiple landform types can be constructed to train a farmland extraction model for complex landform areas, generating farmland extraction results for multiple landform types. During the training phase, the farmland extraction model for complex landform areas can use a binary cross-entropy loss function (BCE) to supervise the consistency between the network's predicted probability map and the true labels. Defined as:
[0075] in, j =1,2,…, N , The total number of pixels in the remote sensing image. This represents the predicted probability that the lowest j pixels in a remotely sensed image belong to farmland. This is a real label.
[0076] By using the binary cross-entropy loss function to supervise pixel-level prediction, the stability and accuracy of model training are ensured, which can effectively improve the pixel-level segmentation performance of farmland extraction.
[0077] In summary, compared to existing methods, this invention significantly improves the model's ability to identify farmland plots at different scales by designing multi-scale spatial branches, fusing shallow detail features with deep semantic features, and utilizing cross-scale fusion of multi-level features and channel attention mechanisms. This avoids the problems of missing small plots or blurring the boundaries of large plots in traditional methods. The introduction of an edge Gaussian refinement branch, combining shallow edge information and deep semantic features, explicitly refines farmland boundaries through flow field guidance and Gaussian probability modeling, effectively reducing the blurring and fragmentation of farmland boundaries with adjacent objects, and enhancing the integrity and continuity of boundaries. The multi-level feature processing framework employing residual connections, GELU activation, and channel attention mechanisms enables the network to stably extract rich spatial and semantic information in complex terrain areas, improving the model's adaptability and recognition accuracy in complex environments. This invention's method considers both details and overall structure, is applicable to complex terrain and diverse farmland types, and provides an efficient and accurate technical means for regional farmland monitoring and management.
[0078] The effectiveness of the method of the present invention will be verified below with specific experimental data.
[0079] The experiment used the publicly available farmland dataset FHAPD, selecting 90 remote sensing images for the test set, each image being 256×256 pixels in size.
[0080] This experiment selected multiple comparison methods, each using a different neural network model, such as SegNet (A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation), BiSeNetV2 (Bilateral Segmentation Network V2), UNet, resUnet (ResidualU-Net), DeepLabV3+ (Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation), CBRNet (CNN-BiLSTM-Residual Network), BuildFormer (Automatic building extraction with vision transformer), UNetFormer (A UNet-like transformer for efficient semantic segmentation of remote sensing urban scene imagery), and DBBANet (Dual-Branch Boundary-Aware Network for segmentation).
[0081] The method of the present invention is compared with these comparative methods, and experimental data is provided to demonstrate the effectiveness of the present invention. The evaluation metrics for the comparative experimental results include the intersection-over-union ratio (IOU) of the predicted farmland area and the actual farmland area, the F1 score, precision, and recall, as shown in Table 1 below. Table 1. Experimental comparison results of the method of the present invention with other farmland extraction methods.
[0082] The experimental results of the above methods under different landform types, for example... Figures 5 to 7 As shown, Figures 5-7 In the diagram, Image represents the original image to be extracted, Label represents the ground truth label, Ours represents the method of this invention, and the red-framed area represents the complex farmland area of focus. Figure 5 Table 1 shows the extraction results and comparison of different methods in farmland in the plain area; Figure 6 Table 1 shows the extraction results and comparison of different methods in farmland in hilly areas; Figure 7Table 1 shows the extraction results and comparison of different methods in mountainous farmland.
[0083] From Table 1 above and Figures 5 to 7 The experimental results show that the method of the present invention achieves higher performance indicators and better farmland extraction effect compared with the comparative method, that is, the method of the present invention is superior to the comparative method.
[0084] In summary, the proposed method and system for farmland extraction in complex terrain areas based on a multi-scale Gaussian edge refinement dual-branch network first employs ResNet-50 as the backbone network to extract multi-level features. By introducing a multi-scale spatial branch network to extract multi-scale contextual information related to farmland plots, it alleviates the problem of missing fragmented small plots or blurring the boundaries of large plots caused by differences in plot scale. Furthermore, by designing an edge Gaussian refinement branch network to mine explicit spatial farmland boundary features, it further improves the continuity and integrity of farmland boundaries. The network proposed in this invention outperforms other farmland extraction methods in both qualitative and quantitative evaluations, and can produce farmland mapping results with higher accuracy and a wider coverage.
[0085] Please see Figure 8 , Figure 8 A schematic diagram of a farmland extraction system in complex terrain areas provided as an embodiment of the present invention, the system comprising: The multi-level feature extraction module 810 is used to extract multi-level features from remote sensing images of the target area using a pre-trained neural network model. The spatial feature extraction module 820 is used to extract preliminary spatial features and deep discriminative features of multi-level features through a multi-scale spatial branch network and perform feature fusion to obtain multi-scale spatial features; The edge feature extraction module 830 performs multi-level edge feature extraction and feature fusion on multi-level features through an edge Gaussian thinning branch network to obtain thinned edge features; The farmland extraction module 840 is used to fuse multi-scale spatial features with refined edge features to generate farmland extraction results for the target area.
[0086] The farmland extraction system and method for complex terrain areas described above can be used as a reference for each other.
[0087] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute a method for extracting farmland in complex terrain areas.
[0088] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the farmland extraction method for complex terrain areas provided by the above methods.
[0090] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the farmland extraction method for complex terrain areas provided by the methods described above.
[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting farmland in complex terrain areas, characterized in that, include: Multi-level features are extracted from remote sensing images of the target area using a pre-trained neural network model; The multi-scale spatial features are obtained by extracting the preliminary spatial features and deep discriminative features of the multi-level features through a multi-scale spatial branching network and then fusing the features. The multi-level features are extracted and fused by an edge Gaussian thinning branch network to obtain the thinned edge features; The multi-scale spatial features and the refined edge features are fused to generate farmland extraction results for the target region. The multi-scale spatial branching network includes a first feature extraction module, a second feature extraction module, and a first feature fusion module; The first feature extraction module is used to extract the refined features corresponding to the multi-level features through multi-scale convolution operations and residual connection operations respectively, to obtain multiple refined features, and to fuse the multiple refined features through the first head layer to obtain preliminary spatial features; The second feature extraction module is used to apply a channel attention mechanism to multiple deep features in the multi-level features to obtain multiple weighted features, and to perform feature mapping and fusion on the multiple weighted features to obtain deep discriminative features; wherein, the multiple deep features are the last m layers of the multi-level features; The first feature fusion module is used to perform feature mapping on the deep discriminative features and then fuse them with the preliminary spatial features to obtain a first fused feature. The first fused feature is then optimized by feature weighting through a channel attention mechanism to obtain multi-scale spatial features. The edge Gaussian thinning branch network includes a shallow feature extraction module, a deep feature extraction module, and a second feature fusion module; The shallow feature extraction module is used to extract the pyramid feature, main feature and first edge feature of the first layer of features in the multi-level features; The deep feature extraction module is used to perform feature mapping on the last layer of the multi-level features and then fuse it with the first edge feature to obtain a second fused feature; and to perform edge extraction and Gaussian modeling on the second fused feature to obtain a second edge feature and a Gaussian feature. The second edge feature, the Gaussian feature, and the second fusion feature are fused to obtain the third edge feature; The second feature fusion module is used to perform feature fusion on the third edge feature, the main feature, and the pyramid feature to obtain refined edge features.
2. The method for extracting farmland in complex terrain areas according to claim 1, characterized in that, The first feature extraction module includes multiple parallel first convolutional layers and sequentially connected second convolutional layers, first activation layers, third convolutional layers, second activation layers, residual connection layers, batch normalization layers, regularization layers, and first head layers; wherein, the residual connection layer is used to perform residual connection on the output results of the second activation layer and the output results of the second convolutional layer.
3. The method for extracting farmland in complex terrain areas according to claim 1, characterized in that, The shallow feature extraction module includes: The pyramid pooling layer is used to enhance the field of view of the first layer of features in the multi-level features to obtain pyramid features. The flow field guiding layer is used to perform convolution downsampling and bilinear interpolation operations on the pyramid features to generate an optical flow field, and calculate the main feature by multiplying the pyramid features and the optical flow field, and calculate the first edge feature by the difference between the pyramid features and the main feature.
4. The method for extracting farmland in complex terrain areas according to claim 1, characterized in that, In the deep feature extraction module, the step of performing edge extraction and Gaussian modeling on the second fused feature to obtain the second edge feature and Gaussian feature includes: The second edge feature is obtained by performing a Gaussian smooth convolution operation on the second fused feature using a Gaussian kernel function; The second edge feature is batch normalized and activated to obtain Gaussian features.
5. The method for extracting farmland in complex terrain areas according to claim 1, characterized in that, In the deep feature extraction module, the feature fusion of the second edge feature, the Gaussian feature, and the second fusion feature to obtain the third edge feature includes: The second edge feature, the Gaussian feature, and the second fusion feature are concatenated and convolved to obtain the third fusion feature. The refined edge features of the third fusion feature are extracted using a convolution module; The refined edge features are fused with the second fused features to obtain the third edge features.
6. A system for extracting farmland in complex terrain areas, characterized in that, include: A multi-level feature extraction module is used to extract multi-level features from remote sensing images of the target area using a pre-trained neural network model. The spatial feature extraction module is used to extract the preliminary spatial features and deep discriminative features of the multi-level features through a multi-scale spatial branching network and perform feature fusion to obtain multi-scale spatial features; The edge feature extraction module performs multi-level edge feature extraction and feature fusion on the multi-level features through an edge Gaussian thinning branch network to obtain thinned edge features. The farmland extraction module is used to fuse the multi-scale spatial features with the refined edge features to generate farmland extraction results for the target area. The multi-scale spatial branching network includes a first feature extraction module, a second feature extraction module, and a first feature fusion module; The first feature extraction module is used to extract the refined features corresponding to the multi-level features through multi-scale convolution operations and residual connection operations respectively, to obtain multiple refined features, and to fuse the multiple refined features through the first head layer to obtain preliminary spatial features; The second feature extraction module is used to apply a channel attention mechanism to multiple deep features in the multi-level features to obtain multiple weighted features, and to perform feature mapping and fusion on the multiple weighted features to obtain deep discriminative features; wherein, the multiple deep features are the last m layers of the multi-level features; The first feature fusion module is used to perform feature mapping on the deep discriminative features and then fuse them with the preliminary spatial features to obtain a first fused feature. The first fused feature is then optimized by feature weighting through a channel attention mechanism to obtain multi-scale spatial features. The edge Gaussian thinning branch network includes a shallow feature extraction module, a deep feature extraction module, and a second feature fusion module; The shallow feature extraction module is used to extract the pyramid feature, main feature and first edge feature of the first layer of features in the multi-level features; The deep feature extraction module is used to perform feature mapping on the last layer feature F4 in the multi-level features and then fuse it with the first edge feature to obtain a second fused feature; and to perform edge extraction and Gaussian modeling on the second fused feature to obtain a second edge feature and a Gaussian feature. The second edge feature, the Gaussian feature, and the second fusion feature are fused to obtain the third edge feature; The second feature fusion module is used to perform feature fusion on the third edge feature, the main feature, and the pyramid feature to obtain refined edge features.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for extracting farmland in complex terrain areas as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for extracting farmland in complex terrain areas as described in any one of claims 1 to 5.