Remote sensing extraction method for pear tree planting areas based on Re-UNet model
The Re-UNet model, which adds residual and attention modules to the UNet model, solves the problems of inaccurate classification and low efficiency in the extraction of pear tree planting areas. It achieves high-precision and low-cost remote sensing image extraction, reduces pixel misclassification and 'salt and pepper effect', and improves the extraction effect of pear tree planting areas.
Patent Information
- Application Number
- CN202311659394.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2026-06-02
- Estimated Expiration
- 2043-12-06
AI Technical Summary
Existing technologies for extracting data in pear-growing areas suffer from inaccurate classification results and low efficiency. In particular, when vegetation types are complex and structures are fragmented, traditional machine learning methods cannot fully utilize feature information, resulting in low classification accuracy and a tendency to exhibit the "salt and pepper phenomenon".
A remote sensing extraction method for pear tree planting areas based on the Re-UNet model was adopted. By adding residual and attention modules to the UNet model, an improved Re-UNet model was constructed. The model was then trained using the Dice-Loss loss function to enhance feature transfer and integration, and reduce pixel misclassification and the 'salt and pepper effect'.
It improved the segmentation accuracy of pear tree planting areas, reduced manual workload, achieved efficient and accurate remote sensing image extraction, reduced the "salt and pepper effect", and improved the classification and extraction effect.
Smart Images

Figure CN117636170B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing technology, specifically to a remote sensing extraction method for pear tree planting areas based on the Re-UNet model. Background Technology
[0002] Against the backdrop of rapid development in specialty agriculture, the use of modern remote sensing technology to quickly and accurately obtain fruit tree planting information and realize agricultural digitalization saves a lot of manpower, material resources and time costs compared with traditional manual survey methods.
[0003] Currently, China's domestically developed Gaofen series satellites are rapidly developing. Gaofen remote sensing images possess the advantages of high spatial and temporal resolution and rich texture features, providing strong data support for accurately extracting spatial distribution information of crops. Wang Lijun et al., based on GF-6 wide-swath data, used the random forest algorithm to classify and extract spring crops such as winter wheat, garlic, and rapeseed under four different red-edge band schemes; Xie Guoxue et al., based on GF-1 and ZY-3 remote sensing images, used a support vector machine classifier to iteratively identify citrus fruit information; Luo Zhenbao et al., using GF-1 and GF-2 remote sensing images, compared the extraction of tobacco planting areas using pixel-based maximum likelihood, neural network, and support vector machine algorithms. However, most existing studies use machine learning classification methods, extracting crop planting areas based on texture and color features. This fails to fully utilize the complex structural information within the features, easily leading to the "salt and pepper phenomenon" and resulting in unsatisfactory classification results. The growth state of pear trees is variable and the planting environment is complex; traditional machine learning methods cannot provide accurate results, leading to problems such as overestimating area estimates.
[0004] In recent years, with the development of deep learning, many scholars have applied semantic segmentation models to the field of remote sensing image processing. Among them, the UNet network is widely used due to its small size, simple structure, and suitability for training on small sample sets. Dong Xiuchun et al. extracted citrus orchards by training UNet and DeepLab v3+ semantic segmentation models, achieving overall classification accuracies of 88.30% and 86.79%, respectively. The UNet model performed slightly better than the DeepLab v3+ model. However, the original UNet network requires multiple downsampling and upsampling operations, which can lead to missing edge information. Zhao Jinling et al. proposed an improved UNet model, SE-UNet, to extract winter wheat planting areas. The results show that adding the attention module SE to the UNet network helps solve the problem of missing edge information in wheat planting areas under complex environments and improves edge segmentation performance.
[0005] In practical applications, it has been found that the main difficulty in extracting pear tree planting areas lies in the complex vegetation types in some areas. The planting structure of pear trees is relatively fragmented, and they are often intercropped with other vegetation and crops, leading to misclassification during segmentation and extraction—other vegetation may be mistakenly identified as pear trees. In summary, current challenges in extracting pear tree planting areas include: first, learning classification features more fully from high-resolution remote sensing imagery; second, reducing the "salt and pepper effect" and improving classification and extraction accuracy; and third, reducing manual workload and extracting information more quickly. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of inaccurate classification results and low efficiency in the extraction of pear tree planting areas from remote sensing images in the existing technology, and to provide a remote sensing extraction method for pear tree planting areas based on the Re-UNet model to solve the above problems.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows:
[0008] The remote sensing extraction method for pear tree planting areas based on the Re-UNet model includes the following steps:
[0009] 11) Acquisition of remote sensing image dataset: Acquire 0.75m resolution Jilin-1 remote sensing images and preprocess them to create a remote sensing image dataset;
[0010] 12) Construction of Re-UNet, a pear tree planting area extraction model: Using the UNet semantic segmentation model as the base model, residual modules are added to its encoding and decoding paths, and attention modules are embedded in its connection paths to construct an improved UNet model as the pear tree planting area extraction model Re-UNet;
[0011] 13) Training of the pear tree planting area extraction model Re-UNet: The preprocessed remote sensing image dataset is input into the improved UNet model for training, and the trained pear tree planting area extraction model Re-UNet is obtained;
[0012] 14) Acquire remote sensing images of the pear tree planting area to be segmented and perform preprocessing;
[0013] 15) Obtaining remote sensing extraction results of pear tree planting area: Input the preprocessed remote sensing image of pear tree planting area to be segmented into the trained pear tree planting area extraction model Re-UNet to obtain the remote sensing extraction results of pear tree planting area.
[0014] The construction of the Re-UNet model for extracting data from pear orchards includes the following steps:
[0015] 21) The Re-UNet model for extracting pear planting areas based on remote sensing images is divided into three parts: the first part is the encoding path, the second part is the decoding path, and the third part is the attention module;
[0016] 22) Set the encoding path, and input a 4-channel image of 1280×1280 pixels:
[0017] 221) Construct the residual module and the downsampling module.
[0018] The residual module is used to prevent network degradation as the number of network layers increases. The residual module has two branches. The first branch goes through a 3×3 convolution and then performs batch normalization to speed up the convergence of network training. To prevent overfitting, it goes through the ReLU activation function, then through another 3×3 convolution and performs batch normalization again. Finally, it goes through the ReLU activation function to further refine the features. During this process, the feature map size remains unchanged.
[0019] The second branch is a residual connection path, which directly adds the input features to the corresponding element values of the feature map processed by the first branch;
[0020] The downsampling module, also known as max pooling, is set up. Specifically, the feature map is divided into multiple 2×2 regions. The maximum pixel value is taken from each region. Only the taken pixel value is kept, and the untaken pixel values are discarded. After max pooling, the feature map size becomes half of the original size.
[0021] 222) The input image passes through the residual module, and the number of channels becomes 64. Then, it passes through a 3×3 standard convolution kernel to extract features. The number of channels and the size of the feature map remain unchanged, resulting in feature map P1.
[0022] After the feature map P1 is processed by the downsampling module, its size is reduced to half of its original size, becoming 640×640;
[0023] 223) The 640×640 feature map obtained in step 222) is processed by the residual module, and the number of channels becomes 128. Then, it is processed by a 3×3 standard convolution kernel to extract features, resulting in feature map P2. After the feature map P2 is processed by the downsampling module, its size is reduced to half of the original size, becoming 320×320.
[0024] 224) The 320×320 feature map obtained in step 223) is passed through the residual module, and the number of channels becomes 256. Then it is passed through a 5×5 convolution kernel to extract features and improve the receptive field of the model, resulting in feature map P3. After passing through the downsampling module, the size of feature map P3 is reduced to half of its original size, becoming 160×160.
[0025] 225) Repeat the steps in step 224) except for the downsampling module to obtain the 160×160 feature map obtained in step 224) to obtain feature map P4. After passing through the downsampling module, the size of feature map P4 becomes 80×80.
[0026] 226) The 80×80 feature map obtained in step 225) is first passed through the residual module, the number of channels becomes 1024, and then passed through the Sigmoid activation function to obtain the result feature map P5 of the encoding path;
[0027] 23) Set the decoding path and use the feature map P5 resulting from the encoding path as the input image;
[0028] 231) Construct an upsampling module,
[0029] The upsampling module uses nearest neighbor interpolation to make the gray value of the transformed pixel equal to the gray value of the nearest input pixel. The feature map processed by nearest neighbor interpolation becomes twice the size of the original.
[0030] 232) The input result feature map P5 first passes through the residual module to obtain a 1024×80×80 feature map. After passing through the upsampling module, the feature map size becomes 160×160. Then, it passes through a 3×3 standard convolution kernel to extract features and compress the number of channels to obtain a 512×160×160 feature map S4. The feature map P4 in the encoding path is concatenated with the feature map S4 by channel dimension to obtain a 1024×160×160 feature map.
[0031] 233) The 1024×160×160 feature map obtained in step 232) is passed through the residual module, which reduces the number of channels to half of the original while keeping the size unchanged, resulting in a 512×160×160 feature map. Then, it is passed through a 5×5 large convolution kernel to increase the receptive field of the model. After passing through the upsampling module, the feature map size is expanded to 320×320. Then, it is passed through a 3×3 standard convolution kernel to extract features and compress the number of channels, resulting in a 256×320×320 feature map S3. The feature map P3 in the encoding path is passed through the attention module and then concatenated with the feature map S3 by channel dimension to obtain a 512×320×320 feature map.
[0032] 234) The 512×320×320 feature map obtained in step 233) is passed through the residual module, and the number of channels becomes 256. Then it is passed through a 5×5 large convolution kernel to increase the receptive field of the model. The feature map size remains unchanged. Then it is passed through the upsampling module and the feature map size is expanded to 640×640. Then it is passed through a 3×3 standard convolution kernel to extract features again and compress the number of channels, resulting in a 128×640×640 feature map S2. The feature map P2 in the encoding path is passed through the attention module and then concatenated with the feature map S2 by channel dimension to obtain a 256×640×640 feature map.
[0033] 235) The 256×640×640 feature map obtained in step 234) is passed through the residual module to obtain a 128×640×640 feature map. After further feature extraction by a 3×3 standard convolution kernel, the feature map size is enlarged to 1280×1280 after passing through the upsampling module. Then, after further feature extraction by a 3×3 standard convolution kernel and channel compression, a 64×1280×1280 feature map S1 is obtained. P1 in the encoding path is passed through the attention module and then concatenated with the feature map S1 by channel dimension to obtain a 128×1280×1280 feature map.
[0034] 236) The 128×1280×1280 feature map obtained in step 235) is passed through the residual module to obtain a 64×1280×1280 feature map. The feature map is further extracted by a 3×3 standard convolution kernel while keeping the number of channels unchanged. The feature map is then restored by two more 3×3 standard convolutions, and the number of channels becomes 2 and 1 respectively. Finally, the final mask result is output after passing through the Sigmoid activation function.
[0035] 24) Set up attention modules, including spatial attention and channel attention.
[0036] 241) Constructing spatial attention: The input feature maps P1, P2 or P3 are first concatenated by channel-wise global average pooling and global max pooling, then passed through a 5×5 convolution, and a weight map with 1 channel is obtained by using the Sigmoid activation function. Finally, the weight map and the input feature map are multiplied accordingly to output a feature map of the same size as the input feature map.
[0037] 242) Construct channel attention,
[0038] The output feature map of the spatial attention module is used as the input feature map of the channel attention module. First, two feature weight sequences are obtained by global average pooling and global max pooling. Then, these two weight sequences are added together after being convolved twice by 1×1. The Hard sigmoid activation function is used to obtain a weight sequence. Finally, the weight sequence is multiplied with the output of the spatial attention module to output a feature map of the same size as the output feature map of the spatial attention module.
[0039] The training of the Re-UNet model for extracting data from pear orchard areas includes the following steps:
[0040] 31) Set the deep learning framework to use PyTorch, determine the hyperparameters during training, set the batch size to 16, set the initial learning rate to 0.001, use Dice-Loss as the loss function, set the maximum number of training iterations to 300, and halve the learning rate if the loss value on the validation set does not decrease for 10 consecutive rounds during training.
[0041] 32) Load the pre-trained weights of the pear tree planting area extraction model Re-UNet, and input the images and label files in the remote sensing image dataset as training data into the pear tree planting area extraction model Re-UNet;
[0042] 33) Start training. In each training round, perform forward propagation on the input image to obtain the model's prediction results. Based on the actual label values and the prediction results, update the network weights using backpropagation according to the loss function.
[0043] 34) Complete the training to obtain the Re-UNet model for extracting pear tree planting areas.
[0044] Beneficial effects
[0045] The remote sensing extraction method for pear orchard areas based on the Re-UNet model of this invention, compared with existing technologies, addresses the overfitting problem that easily occurs in small datasets by using the UNet semantic segmentation model. Furthermore, it incorporates spatial and channel attention mechanisms and a residual module to further enhance the feature transfer and cumulative integration characteristics of pear orchard areas in high-resolution remote sensing images, effectively reducing pixel misclassification, minimizing the "salt and pepper" effect, and improving overall segmentation accuracy. Simultaneously, it reduces manual workload and saves training time, enabling accurate and efficient extraction of pear orchard areas from high-resolution remote sensing images. Attached Figure Description
[0046] Figure 1 This is a sequence diagram of the method of the present invention;
[0047] Figure 2This is a structural diagram of the Re-UNet model, a semantic segmentation network for pear orchards involved in this invention.
[0048] Figure 3 This is a structural diagram of the residual module in the Re-UNet model involved in this invention;
[0049] Figure 4 This is a diagram of the spatial attention structure in the attention module of the Re-UNet model involved in this invention;
[0050] Figure 5 This is a diagram of the channel attention structure in the attention module of the Re-UNet model involved in this invention;
[0051] Figure 6 The images show the remote sensing extraction results of pear tree planting areas using the Re-UNet model and different models involved in this invention. Detailed Implementation
[0052] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:
[0053] like Figure 1 As shown, the remote sensing extraction method for pear tree planting areas based on the Re-UNet model described in this invention includes the following steps:
[0054] The first step is to acquire the remote sensing image dataset: acquire 0.75m resolution Jilin-1 remote sensing images and preprocess them to create a remote sensing image dataset.
[0055] (1) Using ENVI software, the Normalized Difference Vegetation Index (NDVI) of the remote sensing image was calculated as a separate channel for the image. The NDVI index describes the growth status of vegetation and is positively correlated with the coverage rate, thus eliminating to some extent the influence of factors such as solar elevation angle, topography, cloud cover, satellite observation angle, and atmospheric conditions. The formula for the Normalized Difference Vegetation Index (NDVI) is shown below:
[0056]
[0057] In the formula, NIR is the near-infrared reflectance value, and R is the visible light red wave reflectance value. NDVI is obtained by nonlinearly normalizing RVI, and its range is between [-1, 1].
[0058] (2) Open the above remote sensing image using ArcGIS software. Based on the GPS coordinate information of pear trees recorded in the field survey, accurately determine the location of pear trees in the entire remote sensing image and draw the vector of the pear tree planting area. During this process, the image can be converted into a standard false color image to highlight the vegetation information and facilitate accurate labeling. Finally, the entire remote sensing image is cropped into multiple small images of size 640×640. Each image has only one label, namely pear tree, to obtain the remote sensing image dataset of the pear tree planting area.
[0059] (3) Divide the 566 labeled images into a training image set and a test image set in a 9:1 ratio, and perform data augmentation operations on the images and their labels in the training image set:
[0060] A1) Mirror the training image set separately;
[0061] A2) Adjust the brightness, contrast, and saturation of the training images;
[0062] A3) Add noise to the training images.
[0063] The second step is the construction of the pear tree planting area extraction model Re-UNet: using the UNet semantic segmentation model as the base model, residual modules are added to its encoding and decoding paths, and attention modules are embedded in its connection paths to construct an improved UNet model as the pear tree planting area extraction model Re-UNet.
[0064] like Figure 2 As shown, the Re-UNet model for extracting pear orchard areas based on remote sensing imagery consists of three parts: an encoding path, a decoding path, and an attention module. First, the image is processed by a residual module and convolutional kernels, and then downsampled to obtain the next layer's feature map. Simultaneously, the feature map output from each layer is processed by the attention module and concatenated with the corresponding layer's feature map of the same size in the decoder along the channel dimension. Then, in the decoding path, the concatenated feature map is processed by the residual module and convolutional kernels, upsampled to increase its size, and then extracted again through convolutional operations. During model training, the Dice loss function is used to optimize the model parameters. Finally, the segmentation result of the pear orchard area is output at the end of the decoding path.
[0065] (1) The pear tree planting area extraction model Re-UNet based on remote sensing images is divided into three parts: the first part is the encoding path, the second part is the decoding path, and the third part is the attention module.
[0066] (2) Set the encoding path, and input a 4-channel image of 1280×1280 pixels:
[0067] A1) Construct the residual module and the downsampling module.
[0068] The residual module is used to prevent network degradation as the number of layers increases, and to solve the gradient explosion or vanishing gradient problems that occur during network training. For example... Figure 3 As shown, the residual module has two branches. The first branch undergoes a 3×3 convolution followed by batch normalization to accelerate the convergence of network training. To prevent overfitting, it then passes through the ReLU activation function, followed by another 3×3 convolution and batch normalization. Finally, it passes through the ReLU activation function to further refine the features. During this process, the feature map size remains unchanged.
[0069] The second branch is a residual connection path, which directly adds the input features to the corresponding element values of the feature map processed by the first branch;
[0070] The downsampling module, also known as max pooling, is set up. Specifically, the feature map is divided into multiple 2×2 regions. The maximum pixel value is taken from each region. Only the taken pixel value is kept, and the untaken pixel values are discarded. After max pooling, the feature map size becomes half of the original size.
[0071] A2) The input image passes through the residual module, and the number of channels becomes 64. Then, it is processed by a 3×3 standard convolution kernel to extract features. The number of channels and the size of the feature map remain unchanged, resulting in feature map P1.
[0072] After the feature map P1 is processed by the downsampling module, its size is reduced to half of its original size, becoming 640×640;
[0073] A3) The 640×640 feature map obtained in step A2) is processed by the residual module, and the number of channels becomes 128. Then, it is processed by a 3×3 standard convolution kernel to extract features, resulting in feature map P2. After the feature map P2 is processed by the downsampling module, its size is reduced to half of the original size, becoming 320×320.
[0074] A4) The 320×320 feature map obtained in step A3) is passed through the residual module, and the number of channels becomes 256. Then it is passed through a 5×5 convolution kernel to extract features and improve the receptive field of the model, resulting in feature map P3. After passing through the downsampling module, the size of feature map P3 is reduced to half of its original size, becoming 160×160.
[0075] A5) Repeat the steps in step A24) except for the downsampling module to obtain feature map P4. After passing through the downsampling module, feature map P4 becomes 80×80.
[0076] A6) The 80×80 feature map obtained in step A5) is first passed through the residual module, the number of channels becomes 1024, and then passed through the Sigmoid activation function to obtain the result feature map P5 of the encoding path.
[0077] (3) Set the decoding path and use the feature map P5 of the encoding path as the input image;
[0078] B1) Construct an upsampling module,
[0079] The upsampling module uses nearest neighbor interpolation to make the gray value of the transformed pixel equal to the gray value of the nearest input pixel. The feature map processed by nearest neighbor interpolation will be twice the size of the original.
[0080] B2) The input result feature map P5 first passes through the residual module to obtain a 1024×80×80 feature map. After passing through the upsampling module, the feature map size becomes 160×160. Then, it passes through a 3×3 standard convolution kernel to extract features and compress the number of channels to obtain a 512×160×160 feature map S4. The feature map P4 in the encoding path is concatenated with the feature map S4 by channel dimension to obtain a 1024×160×160 feature map.
[0081] B3) The 1024×160×160 feature map obtained in step B2) is passed through the residual module, which reduces the number of channels to half of the original while keeping the size unchanged, resulting in a 512×160×160 feature map. Then, it is passed through a 5×5 large convolution kernel to increase the model's receptive field. After passing through the upsampling module, the feature map size is expanded to 320×320. Then, it is passed through a 3×3 standard convolution kernel to extract features and compress the number of channels, resulting in a 256×320×320 feature map S3. The feature map P3 in the encoding path is passed through the attention module and then concatenated with the feature map S3 by channel dimension to obtain a 512×320×320 feature map.
[0082] B4) The 512×320×320 feature map obtained in step B3) is passed through the residual module, and the number of channels becomes 256. Then it is passed through a 5×5 large convolution kernel to increase the receptive field of the model. The feature map size remains unchanged. Then it is passed through the upsampling module and the feature map size is expanded to 640×640. Then it is passed through a 3×3 standard convolution kernel to extract features again and compress the number of channels, resulting in a 128×640×640 feature map S2. The feature map P2 in the encoding path is passed through the attention module and then concatenated with the feature map S2 by channel dimension to obtain a 256×640×640 feature map.
[0083] B5) The 256×640×640 feature map obtained in step B4) is passed through the residual module to obtain a 128×640×640 feature map. After further feature extraction by a 3×3 standard convolution kernel, the feature map size is enlarged to 1280×1280 after passing through the upsampling module. Then, after further feature extraction by a 3×3 standard convolution kernel and channel compression, a 64×1280×1280 feature map S1 is obtained. P1 in the encoding path is passed through the attention module and then concatenated with the feature map S1 by channel dimension to obtain a 128×1280×1280 feature map.
[0084] B6) The 128×1280×1280 feature map obtained in step B5) is passed through the residual module to obtain a 64×1280×1280 feature map. The feature map is further extracted by a 3×3 standard convolution kernel while keeping the number of channels unchanged. The feature map is then restored by two more 3×3 standard convolutions, and the number of channels becomes 2 and 1 respectively. Finally, the final mask result is output after passing through the Sigmoid activation function.
[0085] (4) An attention module is set up to address the problem in the Re-UNet model where skip connections simultaneously transmit useless information or noise to the decoding layer while passing key detailed features. The main idea is to use weight maps extracted from deep convolutions to supervise shallow convolutions, restricting activation to the region to be segmented and reducing the activation value of the background to optimize the segmentation effect. Specifically, weight processing is applied to the feature maps output by each layer of the encoding path. The attention module includes spatial attention and channel attention.
[0086] C1) Constructing spatial attention,
[0087] like Figure 4 As shown, the input feature maps P1, P2 or P3 are first concatenated by channel-wise global average pooling and global max pooling, then passed through a 5×5 convolution, and a weight map with 1 channel is obtained by using the Sigmoid activation function. Finally, the weight map and the input feature map are multiplied accordingly to output a feature map of the same size as the input feature map.
[0088] C2) Construct channel attention,
[0089] like Figure 5 As shown, the output feature map of the spatial attention module is used as the input feature map of the channel attention module. First, two feature weight sequences are obtained by global average pooling and global max pooling. Then, these two weight sequences are added together after being subjected to two 1×1 convolutions respectively, and a weight sequence is obtained by using the Hard_sigmoid activation function. Finally, the weight sequence is multiplied with the output of the spatial attention module to output a feature map of the same size as the output feature map of the spatial attention module.
[0090] The third step is the training of the pear orchard area extraction model, Re-UNet: The preprocessed remote sensing image dataset is input into the improved UNet model for training, resulting in the trained pear orchard area extraction model, Re-UNet. The experimental hardware and software environment consisted of an Intel(R) Xeon(R) CPU with a clock speed of 2.30GHz and an NVIDIA Tesla P-100 graphics card; the operating system was Ubuntu 18.04; the programming language was Python 3.8; and the deep learning framework used was PyTorch.
[0091] (1) Determine the hyperparameters in the training process. Set the batch size to 16, the initial learning rate to 0.001, use Dice-Loss as the loss function, and the maximum number of training iterations is 300. During the training process, if the loss value on the validation set does not decrease for 10 consecutive rounds, the learning rate is halved.
[0092] (2) Load the pre-trained weights of the pear tree planting area extraction model Re-UNet, and input the images and label files in the remote sensing image dataset as training data into the pear tree planting area extraction model Re-UNet.
[0093] (3) Start training. In each training round, perform forward propagation on the input image to obtain the model's prediction results. Based on the actual label values and the prediction results, update the network weights using backpropagation according to the loss function.
[0094] (4) Complete the training and obtain the Re-UNet model for extracting pear tree planting areas.
[0095] The fourth step is to acquire remote sensing images of the pear tree planting area to be segmented and perform preprocessing.
[0096] Step 5: Obtaining remote sensing extraction results for pear tree planting areas: Input the preprocessed remote sensing images of pear tree planting areas to be segmented into the trained pear tree planting area extraction model Re-UNet to obtain the remote sensing extraction results for pear tree planting areas.
[0097] The effectiveness of this invention will be further illustrated below with simulation experiments:
[0098] To verify the method of this invention, clustering, random forest, and UNet were selected as comparison models. All three comparison models and Re-UNet used the same remote sensing image dataset, and the accuracy of the models was evaluated by pixel accuracy (PA) and class pixel accuracy (CPA).
[0099] Figure 6 This document presents the pear tree planting area extraction results of the Re-UNet model of this invention and three other models. The first column shows the original remote sensing image, the second column shows the ground truth labels, and the last four columns show the pear tree planting area extraction results of clustering, random forest, UNet, and the Re-UNet model of this invention, respectively. First, clustering is an unsupervised learning model based on pixel values. The results show that some scattered trees and farmland are misclassified as pear trees, resulting in poor extraction performance. Random forest is a machine learning model based on decision trees. However, it cannot guarantee that all extracted features are useful, leading to poor extraction performance. While it improves upon clustering by reducing noise, it still suffers from misclassification. The UNet model, as a deep learning method, better integrates semantic information, allowing the network to learn the necessary features. Its overall extraction performance is good, reducing the "salt and pepper" effect, but some edge information loss remains. The Re-UNet model, building upon the UNet model, incorporates an attention mechanism, focusing more on learning pear tree features during training, resulting in more detailed extraction results. In terms of model accuracy evaluation, pixel accuracy (PA) refers to the percentage of correctly predicted pixels out of all pixels, including correct predictions of pear trees and the background. Class pixel accuracy (CPA) refers to the percentage of pixels correctly predicted as pear trees out of all pixels predicted as pear trees. As shown in Table 1, these two metrics show a gradual increasing trend across the four models, with Re-UNet achieving the highest PA and CPA of 0.797 and 0.824 respectively, indicating the effectiveness of the Re-UNet model in the pear tree planting area extraction task.
[0100] Table 1: Comparison of Accuracy Evaluation of Four Models
[0101]
[0102]
[0103] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A remote sensing extraction method for pear tree planting areas based on the Re-UNet model, characterized in that, Includes the following steps: 11) Acquisition of remote sensing image dataset: Acquire 0.75m resolution Jilin-1 remote sensing images and preprocess them to create a remote sensing image dataset; 12) Construction of Re-UNet, a pear tree planting area extraction model: Using the UNet semantic segmentation model as the base model, residual modules are added to its encoding and decoding paths, and attention modules are embedded in its connection paths to construct an improved UNet model as the pear tree planting area extraction model Re-UNet; The construction of the Re-UNet model for extracting data from pear orchards includes the following steps: The encoding path is defined. The input image is processed by a residual module and a convolutional kernel to obtain feature map P1. Feature map P1 is then processed by a downsampling module, and then by a residual module and a convolutional kernel to obtain feature map P2. Feature map P2 is then processed by a downsampling module, and then by a residual module and a convolutional kernel to obtain feature map P3. Feature map P3 is then processed by a downsampling module, and then by a residual module and a convolutional kernel to obtain feature map P4. Feature map P4 is then processed by a downsampling module, and then by a residual module and a sigmoid activation function to obtain the final feature map P5 of the encoding path. The decoding path is defined, and the feature map P5 resulting from the encoding path is used as the input image. It is first processed by the residual module, then by the upsampling module and convolutional kernel to obtain feature map S4. Feature map P4 in the encoding path is concatenated with feature map S4 along the channel dimension. The resulting feature map is processed by the residual module and convolutional kernel, then by the upsampling module and convolutional kernel to obtain feature map S3. Feature map P3 in the encoding path is concatenated with feature map S3 along the channel dimension after passing through the attention module. The resulting feature map is processed by the residual module and convolutional kernel, then by the upsampling module and convolutional kernel to obtain feature map S2. Feature map P2 in the encoding path is concatenated with feature map S2 along the channel dimension after passing through the attention module. The resulting feature map is processed by the residual module and convolutional kernel, then by the upsampling module and convolutional kernel to obtain feature map S1. Feature map P1 in the encoding path is concatenated with feature map S1 along the channel dimension after passing through the attention module. The resulting feature map is processed by the residual module and convolutional kernel, then by the Sigmoid activation function to output the final mask result. 13) Training of the pear tree planting area extraction model Re-UNet: The preprocessed remote sensing image dataset is input into the improved UNet model for training, and the trained pear tree planting area extraction model Re-UNet is obtained; 14) Acquire remote sensing images of the pear tree planting area to be segmented and perform preprocessing; 15) Obtaining remote sensing extraction results of pear tree planting area: Input the preprocessed remote sensing image of pear tree planting area to be segmented into the trained pear tree planting area extraction model Re-UNet to obtain the remote sensing extraction results of pear tree planting area.
2. The remote sensing extraction method for pear tree planting areas based on the Re-UNet model according to claim 1, characterized in that, The construction of the Re-UNet model for extracting data from pear orchards includes the following steps: 21) The Re-UNet model for extracting pear planting areas based on remote sensing images is divided into three parts: the first part is the encoding path, the second part is the decoding path, and the third part is the attention module; 22) Set the encoding path, and input a 4-channel image of 1280×1280 pixels: 221) Construct the residual module and the downsampling module, The residual module is used to prevent network degradation as the number of network layers increases. The residual module has two branches. The first branch goes through a 3×3 convolution and then performs batch normalization to speed up the convergence of network training. To prevent overfitting, it goes through the ReLU activation function, then through another 3×3 convolution and performs batch normalization again. Finally, it goes through the ReLU activation function to further refine the features. During the process, the feature map size remains unchanged. The second branch is a residual connection path, which directly adds the input features to the corresponding element values of the feature map processed by the first branch; The downsampling module, also known as max pooling, is set up. Specifically, the feature map is divided into multiple 2×2 regions. The maximum pixel value is taken from each region. Only the taken pixel value is kept, and the untaken pixel values are discarded. After max pooling, the feature map size becomes half of the original size. 222) The input image passes through the residual module, and the number of channels becomes 64. Then, it passes through a 3×3 standard convolution kernel to extract features. The number of channels and the size of the feature map remain unchanged, resulting in feature map P1. After the feature map P1 is processed by the downsampling module, its size is reduced to half of its original size, becoming 640×640; 223) The 640×640 feature map obtained in step 222) is processed by the residual module, and the number of channels becomes 128. Then, it is processed by a 3×3 standard convolution kernel to extract features, resulting in feature map P2. After the feature map P2 is processed by the downsampling module, its size is reduced to half of the original size, becoming 320×320. 224) The 320×320 feature map obtained in step 223) is passed through the residual module, the number of channels becomes 256, and then passed through a 5×5 convolution kernel to extract features and improve the receptive field of the model, resulting in feature map P3. After passing through the downsampling module, the size of feature map P3 is reduced to half of its original size, becoming 160×160. 225) Repeat the steps in step 224) except for the downsampling module to obtain feature map P4. After passing through the downsampling module, feature map P4 becomes 80×80 in size. 226) The 80×80 feature map obtained in step 225) is first passed through the residual module, the number of channels becomes 1024, and then passed through the Sigmoid activation function to obtain the result feature map P5 of the encoding path; 23) Set the decoding path and use the feature map P5 resulting from the encoding path as the input image; 231) Construct an upsampling module, The upsampling module uses nearest neighbor interpolation to make the gray value of the transformed pixel equal to the gray value of the nearest input pixel. The feature map processed by nearest neighbor interpolation becomes twice the size of the original. 232) The input result feature map P5 first passes through the residual module to obtain a 1024×80×80 feature map. After passing through the upsampling module, the feature map size becomes 160×160. Then, it passes through a 3×3 standard convolution kernel to extract features and compress the number of channels to obtain a 512×160×160 feature map S4. The feature map P4 in the encoding path is concatenated with the feature map S4 by channel dimension to obtain a 1024×160×160 feature map. 233) The 1024×160×160 feature map obtained in step 232) is passed through the residual module, which reduces the number of channels to half of the original while keeping the size unchanged, resulting in a 512×160×160 feature map. Then, it is passed through a 5×5 large convolution kernel to increase the receptive field of the model. After passing through the upsampling module, the feature map size is expanded to 320×320. Then, it is passed through a 3×3 standard convolution kernel to extract features and compress the number of channels, resulting in a 256×320×320 feature map S3. The feature map P3 in the encoding path is passed through the attention module and then concatenated with the feature map S3 by channel dimension to obtain a 512×320×320 feature map. 234) The 512×320×320 feature map obtained in step 233) is passed through the residual module, and the number of channels becomes 256. Then it is passed through a 5×5 large convolution kernel to increase the receptive field of the model. The feature map size remains unchanged. Then it is passed through the upsampling module and the feature map size is expanded to 640×640. Then it is passed through a 3×3 standard convolution kernel to extract features again and compress the number of channels, resulting in a 128×640×640 feature map S2. The feature map P2 in the encoding path is passed through the attention module and then concatenated with the feature map S2 by channel dimension to obtain a 256×640×640 feature map. 235) The 256×640×640 feature map obtained in step 234) is passed through the residual module to obtain a 128×640×640 feature map. After further feature extraction by a 3×3 standard convolution kernel, the feature map size is enlarged to 1280×1280 after passing through the upsampling module. Then, after further feature extraction by a 3×3 standard convolution kernel and channel compression, a 64×1280×1280 feature map S1 is obtained. P1 in the encoding path is passed through the attention module and then concatenated with the feature map S1 by channel dimension to obtain a 128×1280×1280 feature map. 236) The 128×1280×1280 feature map obtained in step 235) is passed through the residual module to obtain a 64×1280×1280 feature map. The feature map is further extracted by a 3×3 standard convolution kernel while keeping the number of channels unchanged. The feature map is then restored by two more 3×3 standard convolutions, and the number of channels becomes 2 and 1 respectively. Finally, the final mask result is output after passing through the Sigmoid activation function. 24) Set up attention modules, including spatial attention and channel attention. 241) Constructing spatial attention: The input feature maps P1, P2 or P3 are first concatenated by channel-wise global average pooling and global max pooling, then passed through a 5×5 convolution, and a weight map with 1 channel is obtained by using the Sigmoid activation function. Finally, the weight map and the input feature map are multiplied accordingly to output a feature map of the same size as the input feature map. 242) Construct channel attention, The output feature map of the spatial attention module is used as the input feature map of the channel attention module. First, two feature weight sequences are obtained by global average pooling and global max pooling. Then, these two weight sequences are added together after being convolved twice by 1×1. The Hard sigmoid activation function is used to obtain a weight sequence. Finally, the weight sequence is multiplied with the output of the spatial attention module to output a feature map of the same size as the output feature map of the spatial attention module.
3. The remote sensing extraction method for pear tree planting areas based on the Re-UNet model according to claim 1, characterized in that, The training of the Re-UNet model for extracting data from pear orchard areas includes the following steps: 31) Set the deep learning framework to use PyTorch, determine the hyperparameters during training, set the batch size to 16, set the initial learning rate to 0.001, use Dice-Loss as the loss function, set the maximum number of training iterations to 300, and halve the learning rate if the loss value on the validation set does not decrease for 10 consecutive rounds during training. 32) Load the pre-trained weights of the pear tree planting area extraction model Re-UNet, and input the images and label files in the remote sensing image dataset as training data into the pear tree planting area extraction model Re-UNet; 33) Start training. In each training round, perform forward propagation on the input image to obtain the model's prediction results. Based on the actual label values and the prediction results, update the network weights using backpropagation according to the loss function. 34) Complete the training to obtain the Re-UNet model for extracting pear tree planting areas.
