A method, system and medium for identifying farmland plots
By using an improved UNet++ architecture for farmland plot identification, and leveraging the ConvNeXt V2 module and CBAM attention mechanism, combined with multi-scale feature aggregation and skip connections, the model addresses the issues of edge detail and class imbalance in farmland plot identification from high-resolution remote sensing images, achieving efficient, accurate, and complete identification and extraction of farmland plots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-04-03
AI Technical Summary
Existing deep learning-based farmland plot identification models suffer from insufficient edge detail and weak plot response when processing high-resolution remote sensing images. They are also susceptible to interference from complex backgrounds. Furthermore, imbalances in farmland pixel categories lead to missed plots, discontinuous identification, and coarse edges, affecting the accuracy and completeness of plot location.
A farmland plot recognition model with an improved UNet++ architecture uses a ConvNeXt V2 module as the encoder and embeds a convolutional attention module (CBAM) at the output of each ConvNeXt V2 module. It combines a multi-scale feature aggregation layer and a redesigned skip connection structure and is trained using a hybrid loss function to improve the model's feature extraction and recognition accuracy.
It significantly improves the completeness and spatial accuracy of farmland plot extraction, and can effectively support large-scale, automated, and highly reliable farmland monitoring and management tasks.
Smart Images

Figure CN121616974B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of remote sensing image processing and deep learning technology, and in particular to a method, system and medium for identifying farmland plots. Background Technology
[0002] Farmland plot identification is a key task in remote sensing agriculture applications, aiming to automatically and accurately extract farmland plot information from satellite or aerial imagery. Accurate farmland plot identification is of great significance for arable land area statistics, land use supervision, agricultural subsidy calculation, and precision agriculture management, and is an important technological foundation for realizing intelligent agricultural management and arable land protection.
[0003] Currently, semantic segmentation models based on deep learning have become the mainstream technical approach in this field, such as U-Net and DeepLab V3+. These methods automatically learn multi-level feature representations through convolutional neural networks and demonstrate strong capabilities in overall farmland identification. However, when processing high-resolution remote sensing images, the following problems still exist: the model is not responsive enough to edge details and weak plots, and is easily affected by complex backgrounds such as roads, buildings, and woodlands. In addition, since farmland pixels account for a small proportion of the overall image, there is a serious class imbalance. Ordinary loss functions tend to cause the model to predict the background class, resulting in frequent occurrences of plot omissions, discontinuous identification, and rough edges, which affect the accuracy and completeness of plot localization. Summary of the Invention
[0004] The purpose of this invention is to provide a method for identifying farmland plots, which improves the accuracy of farmland plot identification and provides technical support for farmland monitoring and management.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a method for identifying farmland plots, comprising the following steps:
[0006] Acquire satellite or aerial remote sensing image data;
[0007] Input satellite or aerial remote sensing image data into a pre-trained farmland plot identification model and output farmland plot identification results;
[0008] The farmland plot recognition model is an improved model based on the UNet++ architecture. The encoder of the farmland plot recognition model adopts ConvNeXt V2 modules, and a convolutional attention module CBAM is embedded at the output of each ConvNeXt V2 module. A multi-scale feature aggregation layer is added after each decoder, and the skip connection structure between the encoder and decoder is redesigned. The skip connection structure ensures that the output features of all intermediate feature nodes in the horizontal hierarchy of each decoder are only passed to the final output node of that level.
[0009] The ConvNeXt V2 module performs multi-level feature extraction on satellite or aerial remote sensing image data to obtain multi-scale feature representations of the image. The convolutional attention module CBAM performs channel attention weighting and spatial attention weighting on the multi-scale feature representations to output feature maps that enhance semantic and spatial information. The decoder receives features from each stage of the encoder through a skip connection structure and gradually restores spatial resolution by combining upsampling operations. The multi-scale feature aggregation layer upsamples the feature maps generated by all output nodes of the decoder and then stitches them together to output farmland plot identification results with clear boundaries and complete structure.
[0010] In some optional embodiments, the farmland plot identification model is trained using a hybrid loss function, specifically as follows:
[0011] The hybrid loss function is a weighted sum of the binary cross-entropy loss function and the Dice loss function, expressed as:
[0012] ;
[0013] In the formula, and These are the weighting coefficients, and ; It is a mixed loss function; It is a binary cross-entropy loss function; This is the Dice loss function.
[0014] In some optional embodiments, the redesigned skip connection structure between the encoder and decoder generates the decoder's node feature map according to the following formula:
[0015] ;
[0016] In the formula, For node feature maps, For convolution operations, For downsampling, For downsampling, This is a feature map stitching operation. i Let be the depth of the node in the skip connection. j The width of the node in the jump connection.
[0017] In some optional embodiments, the ConvNeXt V2 module includes a deep convolutional layer, a first point convolutional layer, an activation function layer, a global response normalization layer, and a second point convolutional layer.
[0018] In some optional embodiments, the convolutional attention module (CBAM) specifically operates as follows:
[0019] The convolutional attention module sequentially performs channel attention weighting and spatial attention weighting on the input feature map. The channel attention weighting is achieved by performing global average pooling and global max pooling on the input feature map, resulting in two pooled features. The two pooled feature vectors are then input into a shared fully connected layer to generate a channel weight map. The channel weight map is then multiplied element-wise with the input feature map to obtain a channel-weighted feature map. The spatial attention weighting is achieved by performing global average pooling and global max pooling on the channel-weighted feature map along the channel dimension, resulting in two two-dimensional feature maps. The two two-dimensional feature maps are concatenated and passed through a convolutional layer to generate a spatial weight map. The spatial weight map is then multiplied element-wise with the channel-weighted feature map to obtain the final weighted feature map.
[0020] In some optional embodiments, the calculation formulas for the channel attention weighting and spatial attention weighting are as follows:
[0021] ;
[0022] ;
[0023] In the formula, This is a channel attention map. This is a spatial attention map. For activation function, For a shared connection layer, AvgPool For global average pooling, MaxPool For global max pooling, F is the channel attention-weighted input feature map. Input feature maps weighted for spatial attention. This is a convolution operation.
[0024] Embodiments of the present invention also provide a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described farmland plot identification method.
[0025] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when run by a processor, is capable of executing the above-described farmland plot identification method.
[0026] The farmland plot identification method provided by this invention has at least the following beneficial effects:
[0027] The farmland plot identification method provided by this invention addresses the practical challenges of scattered, diverse, blurred, and complex backgrounds of farmland plots in high-resolution remote sensing images, proposing a complete deep identification scheme. This scheme achieves efficient extraction of farmland features, deep fusion of multi-scale information, and synergistic optimization of identification accuracy and computational efficiency, thereby significantly improving the completeness and spatial accuracy of farmland plot extraction. It can effectively support large-scale, automated, and highly reliable farmland monitoring and management tasks. Attached Figure Description
[0028] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0029] Figure 1 This is a flowchart of a method for identifying farmland plots according to an embodiment of the present invention;
[0030] Figure 2 This is a data augmentation diagram provided according to an embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of a farmland plot identification model provided according to an embodiment of the present invention;
[0032] Figure 4 This is an example diagram of the ConvNeXt V2 module provided according to an embodiment of the present invention;
[0033] Figure 5 This is a schematic diagram of a Convolutional Block Attention (CBAM) module according to an embodiment of the present invention;
[0034] Figure 6 This is a schematic diagram of the module-by-module ablation results provided according to an embodiment of the present invention;
[0035] Figure 7 This is a schematic diagram of the comparative experimental visualization results provided according to an embodiment of the present invention;
[0036] Figure 8 This is a schematic diagram of farmland plot identification and mapping results provided according to an embodiment of the present invention. Detailed Implementation
[0037] 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 in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0038] One embodiment of the present invention relates to a method for identifying farmland plots. The implementation details of the farmland plot identification method of this embodiment are described in detail below. The following content is only for the convenience of understanding and is not necessary for implementing this solution.
[0039] The specific process of the farmland plot identification method in this embodiment can be described as follows: Figure 1 As shown, it includes:
[0040] Step 101: Acquire satellite or aerial remote sensing image data;
[0041] Taking a county in China as the core research area, the area is flat with concentrated arable land, covering an area of approximately 4153.33 square kilometers. The farmland is mainly dryland farmland such as corn and soybeans, and is characterized by a combination of contiguous plots and scattered shelterbelts and irrigation canals, which is suitable for verifying the model's ability to identify farmland plots in complex backgrounds.
[0042] Experimental data was obtained from Sentinel-2 Level-2A imagery on a specified date (e.g., September 15, 2024) using the Google Earth Engine (GEE) cloud platform. Preprocessing, including radiometric calibration, atmospheric correction, and orthorectification, ensured data quality. Subsequently, farmland areas in the imagery were manually labeled using visual interpretation in ArcGIS software, generating .shp format vector plot files, which were then converted to .tif format binary mask labels. To adapt to the model input, a sliding window cropping method was used to uniformly crop the entire image and its corresponding labels into 256×256 pixel sample blocks, with a window overlap rate set to 0.1 (i.e., 25.6 pixels overlap) to reduce the loss of plot information during the cropping process. Based on this, invalid samples with less than 30% farmland pixel ratio and abnormal samples with cloud shadows or noise were removed according to the initial mask, retaining high-quality valid samples. To further improve the model's generalization ability, data augmentation was performed on the valid samples, such as... Figure 2 As shown, the image includes horizontal flipping, vertical flipping, and diagonal mirroring. Ultimately, a total of 5764 valid sample images were constructed, providing a foundation for the training and evaluation of the farmland plot recognition model.
[0043] Step 102: Input satellite or aerial remote sensing image data into the pre-trained farmland plot recognition model and output farmland plot recognition results; wherein, the farmland plot recognition model is an improved model based on the UNet++ architecture, the encoder of the farmland plot recognition model adopts ConvNeXt V2 modules, and a convolutional attention module CBAM is embedded at the output of each ConvNeXt V2 module, a multi-scale feature aggregation layer is added after each decoder, and the skip connection structure between the encoder and decoder is redesigned; the skip connection structure ensures that the output features of all intermediate feature nodes in the horizontal hierarchy of each decoder are only passed to the final output node of that level;
[0044] The ConvNeXt V2 module performs multi-level feature extraction on satellite or aerial remote sensing image data to obtain multi-scale feature representations of the image. The convolutional attention module CBAM performs channel attention weighting and spatial attention weighting on the multi-scale feature representations to output feature maps that enhance semantic and spatial information. The decoder receives features from each stage of the encoder through a skip connection structure and gradually restores spatial resolution by combining upsampling operations. The multi-scale feature aggregation layer upsamples the feature maps generated by all output nodes of the decoder and then stitches them together to output farmland plot identification results with clear boundaries and complete structure.
[0045] Farmland plot identification model, such as Figure 3 As shown in the figure, the encoder of the farmland plot recognition model uses ConvNeXt V2 modules, and a convolutional attention module CBAM is embedded at the output of each ConvNeXt V2 module. The decoder integrates a multi-scale feature aggregation layer, and the skip connection structure between the encoder and decoder has been redesigned.
[0046] The sample dataset prepared in step 101 is input into a farmland plot identification model (called CSCNet) based on an improved UNet++ architecture for training, and the trained model is then used for farmland plot identification. The core architecture of this improved model is as follows:
[0047] The encoder replaces the original UNet++ encoder entirely with ConvNeXt V2 modules. In a preferred embodiment, the encoder uses a ConvNeXt-Tiny configuration. The ConvNeXt V2 module includes a deep convolutional layer, a first point convolutional layer, an activation function layer, a global response normalization layer, and a second point convolutional layer. This encoder comprises four stages, with the ConvNeXt V2 blocks in each stage stacked in a 3:3:9:3 ratio. The number of channels in the output feature map is 96, 192, 384, and 768, respectively. This design aims to enhance feature representation capabilities through a deep network structure to capture the details and semantic information of farmland plots and their internal regions in satellite imagery. The ConvNeXt V2 module is as follows: Figure 4 As shown in the figure, the input (256×256×3) first goes through convolution and layer normalization to enter stage 1 (64×64×96). Subsequently, it is processed through multiple downsampling + ConvNeXt V2 blocks (including depthwise convolution, GELU, full-layer response normalization layers, etc.) to stage 2 (32×32×192), stage 3 (16×16×384), and stage 4 (8×8×768). Finally, it is output after global average pooling and layer normalization. The whole process is a typical visual encoder process of "downsampling + feature block stacking".
[0048] Attention mechanism: A convolutional attention module (CBAM) is embedded at the output of each ConvNeXt V2 module. The CBAM is as follows: Figure 5 As shown, CBAM sequentially performs channel attention weighting and spatial attention weighting on the input feature map, enabling the model to adaptively focus on feature channels and spatial locations related to farmland plots and regions, thereby effectively suppressing interference from complex backgrounds such as roads and buildings. Channel attention weighting involves performing global average pooling and global max pooling on the input feature map to obtain two pooled feature vectors. These vectors are then fed into a shared fully connected layer to generate a channel weight map, which is then multiplied element-wise with the input feature map to obtain the channel-weighted feature map. Spatial attention weighting further performs global average pooling and global max pooling on the channel-weighted feature map along the channel dimension, resulting in two two-dimensional feature maps. These are concatenated and passed through a convolutional layer to generate a spatial weight map. Finally, this weight map is multiplied element-wise with the channel-weighted feature map to output the weighted feature map. The calculation formulas for channel attention weighting and spatial attention weighting are as follows:
[0049] ;
[0050] ;
[0051] In the formula, This is a channel attention map. This is a spatial attention map. For activation function, For a shared connection layer, AvgPool For global average pooling, MaxPool For global max pooling, F is the channel attention-weighted input feature map. Input feature maps weighted for spatial attention. This is a convolution operation.
[0052] Decoder and Skip Connections: The dense skip connection structure between the encoder and decoder in the original UNet++ model was redesigned. The new connection rule stipulates that in any horizontal layer of the decoder, the output features of all intermediate feature nodes within that layer are only passed to the final output node of that layer. This design simplifies the connection path, reduces computational complexity, and enables effective selection and fusion of key features.
[0053] The formula for generating node feature maps using skip connections is as follows:
[0054] ;
[0055] In the formula, For node feature maps, For convolution operations, For downsampling, For downsampling, This is a feature map stitching operation. i Let be the depth of the node in the skip connection. j The width of the node in the jump connection.
[0056] Multi-scale feature aggregation: At the end of the decoder, a multi-scale feature aggregation layer is integrated. This layer aggregates features from multiple different depths (e.g., corresponding to feature maps) in the decoder. x 0,4 ,x 1,3 ,x 2,2 ,x 3,1 The output feature map of the node is upsampled (e.g., 2x, 4x, and 8x upsampling respectively), and all upsampled feature maps are aggregated (e.g., stitched together) to achieve deep fusion of multi-scale features and improve the ability to identify fragmented and ambiguous plots.
[0057] Loss function: To overcome the class imbalance problem where farmland pixels are far fewer than non-farmland pixels, a hybrid loss function L is used during model training. com The mixed loss function is a weighted sum of the binary cross-entropy loss function and the Dice loss function, expressed as:
[0058] ;
[0059] In the formula, and These are the weighting coefficients, and ; It is a mixed loss function; It is a binary cross-entropy loss function; The Dice loss function is used. Experiments were conducted to verify the appropriate weight coefficients for the farmland extraction task. , The model performs optimally at that time.
[0060] Once the model is trained, it can be used for inference and recognition: input the satellite or aerial remote sensing image data to be identified into this pre-trained farmland plot recognition model, and the model will automatically output the corresponding farmland plot recognition result map (i.e., binary segmentation map).
[0061] A specific example:
[0062] To verify the effectiveness of the farmland plot identification model (referred to as CSCNet) proposed in this invention, a systematic experiment was conducted.
[0063] To evaluate the impact of ConvNeXt V2, the redesigned skip connection structure, CBAM attention, and the hybrid loss function on model performance, the extraction effects of adding these four methods sequentially to the model in this study were tested on a county dataset. The ablation results of individual modules are shown in Table 1. The experimental results show that the model's precision, recall, F1 score, and intersection-over-union (IoU) all improved after each addition.
[0064] Table 1 Ablation results of a single module
[0065]
[0066] The results of module-by-module ablation are as follows Figure 6 As shown in the figure, the first C in CSCNet represents the addition of the ConvNeXt V2 module, S represents the addition of a multi-scale fusion structure with redesigned skip connections and lateral output layers, and the second C represents the boundary optimization structure of CBAM attention and fusion loss function.
[0067] The results show that ConvNeXt V2 is the cornerstone of performance improvement, and the multi-scale fusion and boundary optimization modules further enhance the model's ability to accurately locate farmland plots and capture complex details.
[0068] CSCNet was compared with mainstream models such as PSPNet, SegNet, DeepLab V3+, UNet++, TransUNet, and SeaFormer on the same dataset. The results of the comparison experiment are shown in Table 2.
[0069] Table 2 Comparison of experimental results
[0070]
[0071] CSCNet significantly outperformed other comparative models across four evaluation metrics: precision (95.71%), recall (93.75%), F1 score (94.72%), and intersection-over-union (IoU) (90.17%). Visualization results of the comparative experiments are shown below. Figure 7 As shown in the figure, CSCNet performs best in terms of plot smoothness, small farmland plot identification, and plot adhesion suppression.
[0072] Applying CSCNet to Sentinel-2 imagery covering the entire county yielded the following results for farmland plot identification and mapping: Figure 8 As shown in the figure, the results demonstrate that the model can completely reconstruct large areas of farmland, with smooth plots and clear spatial layout, making it suitable for practical applications such as macro-level land use analysis and arable land monitoring and management.
[0073] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this invention. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, without changing the core design of the algorithm and process, are also within the protection scope of this invention.
[0074] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.
[0075] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor 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.
[0076] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for identifying farmland plots, characterized in that, The method includes: Acquire satellite or aerial remote sensing image data; Input satellite or aerial remote sensing image data into a pre-trained farmland plot identification model and output farmland plot identification results; The farmland plot recognition model is an improved model based on the UNet++ architecture. The encoder of the farmland plot recognition model adopts ConvNeXt V2 modules, and a convolutional attention module CBAM is embedded at the output of each ConvNeXt V2 module. A multi-scale feature aggregation layer is added after each decoder, and the skip connection structure between the encoder and decoder is redesigned. The skip connection structure ensures that the output features of all intermediate feature nodes in the horizontal hierarchy of each decoder are only passed to the final output node of that level. The ConvNeXt V2 module performs multi-level feature extraction on satellite or aerial remote sensing image data to obtain multi-scale feature representations of the image; the convolutional attention module CBAM performs channel attention weighting and spatial attention weighting on the multi-scale feature representations to output feature maps that enhance semantic and spatial information; the decoder receives features from each stage of the encoder through a skip connection structure and gradually restores spatial resolution by combining upsampling operations; the multi-scale feature aggregation layer upsamples the feature maps generated by all output nodes of the decoder and then stitches them together to output farmland plot identification results with clear boundaries and complete structure.
2. The farmland plot identification method as described in claim 1, characterized in that, The farmland plot identification model is trained using a hybrid loss function, and the specific process is as follows: The hybrid loss function is a weighted sum of the binary cross-entropy loss function and the Dice loss function, expressed as: ; In the formula, and These are the weighting coefficients, and ; It is a mixed loss function; It is a binary cross-entropy loss function; This is the Dice loss function.
3. The farmland plot identification method as described in claim 1, characterized in that, The redesigned skip connection structure between the encoder and decoder generates the node feature map of the decoder according to the following formula: ; In the formula, For node feature maps, For convolution operations, For downsampling, For downsampling, This is a feature map stitching operation. i Let be the depth of the node in the skip connection. j The width of the node in the jump connection.
4. The farmland plot identification method as described in claim 1, characterized in that, The ConvNeXt V2 module includes a depthwise convolutional layer, a first pointwise convolutional layer, an activation function layer, a global response normalization layer, and a second pointwise convolutional layer.
5. The farmland plot identification method as described in claim 1, characterized in that, The specific process of the Convolutional Attention Module (CBAM) is as follows: The convolutional attention module sequentially performs channel attention weighting and spatial attention weighting on the input feature map; the channel attention weighting is obtained by performing global average pooling and global max pooling on the input feature map to obtain two pooled features respectively. Two pooling feature vectors are input into a shared fully connected layer to generate a channel weight map; the channel weight map is multiplied element-wise with the input feature map to obtain a channel-weighted feature map; the spatial attention weighting is achieved by performing global average pooling and global max pooling on the channel-weighted feature map in the channel dimension to obtain two two-dimensional feature maps respectively; the two two-dimensional feature maps are concatenated and then passed through a convolutional layer to generate a spatial weight map; the spatial weight map is multiplied element-wise with the channel-weighted feature map to obtain the final weighted feature map.
6. The farmland plot identification method as described in claim 5, characterized in that, The calculation formulas for the channel attention weighting and spatial attention weighting are as follows: ; ; In the formula, This is a channel attention map. This is a spatial attention map. For activation function, For a shared connection layer, AvgPool For global average pooling, MaxPool For global max pooling, F is the channel attention-weighted input feature map. Input feature maps weighted for spatial attention. This is a convolution operation.
7. A computer system, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the farmland plot identification method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, is capable of performing the farmland plot identification method as defined in any one of claims 1 to 6.