Agricultural land newly added photovoltaic detection deep learning method and device
The PV-ChangeNet model solves the problems of time consumption and accuracy in detecting photovoltaic power stations in farmland through multi-scale feature extraction and boundary awareness enhancement modules, and achieves efficient and accurate detection of photovoltaic power station expansion areas.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies for detecting photovoltaic power stations in farmland suffer from problems such as long processing time, labor intensity, incomplete or inaccurate test results, especially in complex terrain and situations where similar features are mixed up, making it difficult to accurately detect the expansion area of photovoltaic power stations.
The PV-ChangeNet model is adopted, which uses a Siamese neural network with weight-sharing ResNet architecture for multi-scale feature extraction. Combined with a multi-scale context fusion attention module, a change detection center block, and a boundary-aware stepwise difference amplification module, the model's detection completeness and accuracy for photovoltaic power plants are improved.
It significantly improves the positioning accuracy and discrimination capability of farmland photovoltaic change detection, can accurately depict the boundary details of newly added photovoltaic areas in complex backgrounds, reduce missed detections and voids, and is suitable for remote sensing change detection in various agricultural scenarios.
Smart Images

Figure CN121505464B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image change detection technology, specifically relating to a deep learning method for detecting newly added photovoltaic power on agricultural land, and also relating to a computer device. Background Technology
[0002] As a key alternative to global energy transition and climate mitigation strategies, photovoltaic (PV) power plants have witnessed rapid development in the PV industry, with global installed capacity increasing exponentially. However, PV construction requires significant land use, potentially conflicting with agricultural development and food security. The installation of PV systems on farmland, in particular, has drawn scholarly attention regarding the abandonment of arable land for PV projects. Effective monitoring of the construction and expansion of PV power plants in farmland is crucial for farmland protection policies, optimizing the layout of new energy sources, and promoting precise regulation.
[0003] Remote sensing technology has the advantages of timely, large-scale monitoring and low cost. As an important means of obtaining information on the distribution of photovoltaic power plants and monitoring their dynamic changes, remote sensing imagery has been widely used in many fields such as land cover mapping and building change detection. In recent years, many scholars have accelerated the automation process of detecting the spatial distribution of photovoltaic power plants from remote sensing imagery through methods such as machine learning and deep learning. However, traditional methods usually rely on manual analysis or manual feature design, which has problems such as long processing time and labor intensity. It is difficult to efficiently process large-scale data and is prone to incomplete or inaccurate detection results.
[0004] Convolutional neural networks (CNNs), as a type of deep learning, can automatically learn multi-level features from remote sensing images and are widely used in automated monitoring of ground features. Photovoltaic areas in farmland typically consist of solar panels, internal roads, and auxiliary facilities. The spectral characteristics of photovoltaic power stations are often similar to those of surrounding objects (such as rooftops, greenhouses, rural buildings, and black plastic). This similarity may introduce background noise, leading to misidentification in the detection of photovoltaic power stations. However, conventional CNN change detection methods are still insufficient in handling boundary blurring and suppressing temporal background disturbances in farmland scenes. In this case, by adding a boundary-aware difference enhancement module to the CNN, the model's ability to perceive dual-temporal difference information can be improved, thereby enhancing the accuracy of farmland photovoltaic change detection.
[0005] While remote sensing imagery provides rich color and texture features for farmland photovoltaic (PV) installations, and the model demonstrates some effectiveness in detecting PV expansion areas, the complexity of the terrain means that PV installations vary significantly in shape and size. This can affect the complete delineation of PV power plants of varying sizes and shapes, posing a challenge to the accurate detection of irregularly shaped PV installations. Multi-scale feature modeling preserves detailed spatial details and high-level semantic information from both low-level and high-level feature layers. Therefore, by adding a multi-scale contextual feature enhancement module to the convolutional neural network, the model's ability to capture features of PV power plant expansion areas of varying shapes and sizes can be improved. This enhances the completeness of PV power plant detection across different terrains, thereby improving the accuracy of farmland PV change detection and effectively reducing voids caused by non-power generation areas (such as gaps, internal roads, and auxiliary equipment). Summary of the Invention
[0006] The purpose of this invention is to address the aforementioned problems in the existing technology by providing a deep learning method for detecting newly added photovoltaic (PV) areas in agricultural land, and also providing computer equipment. This method solves the problem of how to fully utilize the rich features of Sentinel-2 imagery to resolve the issue of similar features being confused during detection. Even under different terrain conditions, it can still accurately detect the expansion area of PV in farmland, demonstrating superior performance in the task of detecting changes in PV in farmland.
[0007] The above-mentioned objectives of the present invention are achieved by the following technical means:
[0008] A deep learning method for detecting newly added photovoltaic power on agricultural land includes the following steps:
[0009] Step 1: Acquire multispectral remote sensing image data from two years and perform preprocessing;
[0010] Step 2: Construct a dual-temporal multispectral remote sensing image from the preprocessed multispectral remote sensing data of the corresponding time periods in the two years and register them. Construct a black-and-white binary image corresponding to the newly added photovoltaic area in the registered dual-temporal multispectral remote sensing image. Construct the registered dual-temporal multispectral remote sensing image and the black-and-white binary image as the input sample and the true label in the sample data, respectively. Obtain the sample set and expand it. Divide the expanded sample set into training set, test set and validation set.
[0011] Step 3: Construct the PV-ChangeNet model and its loss function;
[0012] Step 4: Train the PV-ChangeNet model using the training set, and save the model parameters after training is complete;
[0013] Step 5: Obtain multispectral remote sensing image data for the corresponding time period of the multispectral remote sensing image data of the known year and the year to be detected, and process it in steps 1 and 2 in sequence. Finally, input it into the trained PV-ChangeNet model to obtain the predicted image including the newly added photovoltaic area.
[0014] As described above, the preprocessing includes sequentially performing cloud cover thresholding and boundary filtering, cloud removal, and band extraction on the multispectral remote sensing image data to obtain preprocessed multispectral remote sensing image data.
[0015] The dual-temporal multispectral remote sensing image in step 2 is constructed through the following process: Based on the same vector boundary region, preprocessed multispectral remote sensing image data of corresponding time periods in two years are selected to construct a dual-temporal multispectral remote sensing image, and the dual-temporal multispectral remote sensing image is subjected to unified spatial projection and pixel grid alignment to obtain a registered dual-temporal multispectral remote sensing image.
[0016] The real labels are constructed in the following way:
[0017] First, the registered dual-temporal multispectral remote sensing images are manually interpreted: using the pixel-level change detection model for annotation, the outer boundary of the target area is manually drawn using polygon vector tools. The newly added photovoltaic areas are marked in the multispectral remote sensing images that include the newly added photovoltaic areas. The annotation range includes the photovoltaic cell panels and the photovoltaic land ancillary facilities area. Non-photovoltaic areas are not marked, thus forming vector label data of the newly added photovoltaic areas.
[0018] Secondly, binary image extraction was performed on the vector label dataset: the vector label data was converted into a black and white binary image using the vector to raster tool, the pixel value of the newly added photovoltaic area was set to 1, and the pixel value of the background area was set to 0, thus obtaining the black and white binary image corresponding to the registered dual-temporal multispectral remote sensing image.
[0019] The sample data is constructed in the following way: the registered dual-temporal multispectral remote sensing images and the corresponding black-and-white binary images are cropped to the same size, the registered dual-temporal multispectral remote sensing images are constructed as input samples, the black-and-white binary images are constructed as ground truth labels, and the input samples and the corresponding ground truth labels are constructed as sample data.
[0020] As described above, the PV-ChangeNet model includes an encoder and a decoder. The encoder of the PV-ChangeNet model includes the encoder part of a Siamese neural network with two identical weight-sharing ResNet architectures, a multi-scale context fusion attention module (MCFAM), and a change detection center block (CD). The decoder of the PV-ChangeNet model includes the decoder part of a Siamese neural network with two identical weight-sharing ResNet architectures.
[0021] The Siamese neural network extracts multi-scale spatial and semantic features from registered dual-temporal multispectral remote sensing images. The Siamese neural network includes two ResNet modules. The registered dual-temporal multispectral remote sensing images are input into the two ResNet modules respectively, and the encoder portion of the ResNet module outputs feature maps. The decoder part of the ResNet module outputs feature maps. ,in, and These are the indexes of the feature maps output by the ResNet module. , , This is the sequence number of the ResNet module. , The feature map size is halved sequentially. The dimensions increase by a factor of two in succession;
[0022] The multi-scale context fusion attention module enhances the semantic consistency between shallow and deep feature maps through a spatial and channel dual-path attention mechanism. At that time, the input to the multi-scale context fusion attention module is the feature map. Feature map and feature maps , among which, when At this time, the input to the multi-scale context fusion attention module is only the feature map. and feature maps ,when At this time, the input to the multi-scale context fusion attention module is only the feature map. and feature maps The output of the multi-scale context fusion attention module is a feature map. ;
[0023] The Change Detection Center Block (CD) is used to enhance the PV-ChangeNet model's global contextual awareness of newly added photovoltaic regions at different scales, and its feature maps. and feature map The feature map is input to the change detection center block CD. and feature map The difference results are passed sequentially through A series of cascaded dilated convolutional units, each with the same input and output channels and the same kernel size, but with progressively increasing dilation rates, are used to generate an enhanced feature map. The final difference is summed element-wise with the outputs of all dilated convolutional units. Change detection center block CD output enhanced feature map .
[0024] As mentioned above, the decoder of the PV-ChangeNet model also includes a semantic decoding branch combined with a semantic constraint module (SCM), a boundary-aware progressive difference amplification module (BDAM), and a change decoder module.
[0025] The semantic decoding branch, combined with the semantic constraint module (SCM), is used to indicate newly added photovoltaic areas. The decoder part of the PV-ChangeNet model includes... The semantic decoding branch combines with the semantic constraint module (SCM), the first... Each semantic decoding branch, combined with the input of the semantic constraint module (SCM), serves as a feature map. and feature map The semantic decoding branch, combined with the output of the semantic constraint module (SCM), forms a feature map. ;
[0026] The boundary-aware progressive difference amplification (BDAM) module is used to improve the completeness and accuracy of changing boundary information. The decoder part of the PV-ChangeNet model also includes... The boundary-aware, step-by-step difference amplification module (BDAM) is the first... The input to the boundary-aware step-by-step difference amplification module (BDAM) consists of two parts, when At that time, the first part of the feature map is a feature map. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map Among them, when At that time, the first part of the feature map is the enhanced feature map. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map ;No. The boundary-aware step-by-step difference amplification module BDAM outputs a feature map. ;
[0027] Feature map The feature map is obtained in the following way: With feature map The feature map is obtained after element-wise multiplication. ;
[0028] The change decoder module progressively magnifies the input feature map to its original resolution, while fusing change features from different levels to gradually construct a change feature map with strong discriminative power and clear boundaries. The change decoder module includes... One upsampling layer; when At that time, the first change decoder module The input to each upsampling layer is the enhanced feature map. ;when At that time, the first change decoder module The input to each upsampling layer is a feature map. The first change decoder module The feature maps output by each upsampling layer are the predicted images of the PV-ChangeNet model.
[0029] As described above, the multi-scale context fusion attention module specifically includes the following processing steps for the input feature map:
[0030] Step 3.2.1: The multi-scale context enhancement module will enhance the feature map. Align them to a uniform spatial resolution and channel dimension, and then perform a stacking operation to obtain multi-scale feature maps;
[0031] Step 3.2.2: Use skip connections to connect the feature maps. The fused feature map is obtained by adding it element-wise to the multi-scale feature map. ,in, For the number of channels, and These are the height and width of the feature map, respectively.
[0032] Step 3.2.3: Process the feature map Perform a dual-path aggregation operation, which includes spatial feature aggregation and channel feature aggregation.
[0033] Step 3.2.4: Perform element-wise multiplication between the spatial attention-enhanced feature map and the channel attention map, and then combine them with the feature map. By combining these elements through element-wise addition, the final multi-scale context-enhanced feature map is generated. ;
[0034] The spatial feature aggregation operation includes the following steps:
[0035] First, feature map By performing channel compression in a 1×1 manner, the number of feature channels is reduced to 1 / 4 of the original number;
[0036] Secondly, the feature map after channel compression The input is fed into parallel convolutional branches of sizes 3×3, 5×5, and 7×7.
[0037] Next, the outputs of multiple convolutional branches are summed element-wise to obtain a fused spatial feature map;
[0038] Finally, the pooling operation is used to compress the channel dimension, perform a 7×7 convolution, and apply the sigmoid activation function to the fused spatial feature map to obtain the spatial attention feature map. The spatial attention feature map is then multiplied element-wise with the fused spatial feature map. Finally, the feature map after the element-wise multiplication operation is passed through a 1×1 convolution to obtain the spatial attention enhancement feature map.
[0039] The channel feature aggregation operation includes the following process: First, the feature map is aggregated using global average pooling. The vector is compressed into a channel dimension vector C×1×1, and then channel attention maps are generated sequentially through 1×1 dimension reduction convolution, ReLU activation function, and 1×1 dimension increase convolution.
[0040] No. The semantic decoding branch, combined with the semantic constraint module (SCM), specifically includes the following processing steps for the input feature map:
[0041] Step 3.4.1: Process the feature map and feature map The semantic difference feature map of semantic decoding is obtained by using element-wise subtraction.
[0042] Step 3.4.2: Combine the semantic difference feature map with the feature map. Channel-dimensional concatenation is performed, followed by 1×1 convolution for channel compression and feature fusion;
[0043] Step 3.4.3: Extract semantic edge feature maps from the feature maps after channel compression and feature fusion using 3×3 convolution, and apply activation functions to generate feature maps. .
[0044] No. The boundary-aware step-by-step difference amplification module (BDAM) specifically processes the input features through the following steps:
[0045] Step 3.5.1: The first part of the feature map is scaled using a CBR module with a convolution kernel size of 3×3 to make it consistent with the size of the current layer feature map;
[0046] Step 3.5.2, Feature Map and feature map Perform addition and subtraction operations respectively;
[0047] Step 3.5.3: Merge the feature map obtained by addition and the feature map obtained by subtraction using a Concat operation, and then merge the merged feature map with the original feature map. The result of element-wise multiplication is then compared with the feature map. The feature map is obtained by performing an addition operation. The fused feature map and the feature map The result of element-wise multiplication is then compared with the feature map. The feature map is obtained by performing an addition operation. Finally, for the feature map and feature map Perform the boundary awareness enhancement operations in steps 3.5.4 to 3.5.6 respectively to obtain biphasic boundary awareness enhancement features;
[0048] Step 3.5.4: Process the feature map Applying a 3D attention mechanism, the specific process of which includes the following steps: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] First, calculate its mean in the spatial dimension, and construct a sum of squared deviations based on the deviations of each position from the mean. Then, apply a non-linear activation function to map the sum of squared deviations to generate attention weight values for the importance of each position. Finally, the feature map is... The weighted feature map is obtained by multiplying the attention weight values at each position element by element.
[0049] Step 3.5.5: Perform boundary-guided enhancement on the weighted feature map. Boundary-guided enhancement specifically includes the following process: First, perform average pooling on the weighted feature map, then subtract the average pooling result from the original weighted feature map element-wise; finally, pass the result of the element-wise subtraction operation through a CBR module with a 1×1 convolution kernel to obtain the enhanced boundary feature map. ;
[0050] Step 3.5.6: Enhance the boundary feature map First, perform a multiplication operation with the weighted features, and then add the feature obtained from the multiplication operation back to the weighted features to obtain the boundary awareness enhanced feature map;
[0051] Step 3.5.7: Pass the biphasic boundary awareness enhancement features through a 3D attention mechanism, then perform element-wise subtraction. Finally, compare the feature maps after element-wise subtraction with the feature maps... The addition operation is performed, and finally, the feature map after the addition operation is passed through a 3D attention mechanism again to obtain the final feature map. .
[0052] loss function Based on the following formula:
[0053] ;
[0054] In the formula, and These are the predicted image height and width, respectively; The location in the predicted image is The actual label of a pixel, if its position changes, then =1, otherwise =0; The model predicts the location. The probability of change.
[0055] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the deep learning method for detecting newly added photovoltaic power on agricultural land as described above.
[0056] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the deep learning method for detecting newly added photovoltaic power on agricultural land as described above.
[0057] Compared with the prior art, the present invention has the following advantages:
[0058] (1) The PV-ChangeNet model proposed in this invention uses a weight-sharing ResNet architecture twin neural network to extract features from registered dual-temporal multispectral remote sensing images in multiple stages, which can effectively capture the spatial and semantic features of farmland photovoltaic power stations at different scales.
[0059] (2) In order to further improve the model’s ability to express photovoltaic expansion regions, the PV-ChangeNet model proposed in this invention introduces a multi-scale context fusion attention module. Through spatial and channel dual-path attention mechanism, it enhances the semantic consistency and fine-grained detail information in shallow and deep feature maps, and reduces the missed detection and hole phenomenon of irregular photovoltaic targets.
[0060] (3) The PV-ChangeNet model proposed in this invention further enhances the model’s global context perception capability for newly added photovoltaic areas at different scales by introducing a change detection center block and expanding the feature receptive field through a spatial feature pyramid module.
[0061] (4) The decoder of the PV-ChangeNet model proposed in this invention introduces a boundary-aware step-by-step difference amplification module to enhance the differences and refine the boundaries of the dual-temporal features layer by layer, making the maximum use of the features at each stage and improving the integrity and accuracy of the change boundary information.
[0062] In summary, the PV-ChangeNet model and its loss function proposed in this invention effectively solve the problems of incomplete detection, blurred boundaries, and misidentification caused by complex farmland backgrounds, diverse shapes of photovoltaic power stations, and significant scale differences. The method of this invention can not only accurately depict the boundary details of newly added photovoltaic areas, but also achieve dynamic adaptation in multi-level feature fusion and difference enhancement, significantly improving the positioning accuracy and discrimination ability of change detection. It has good adaptability and robustness and is suitable for remote sensing change detection needs in various agricultural scenarios. Attached Figure Description
[0063] Figure 1 This is a schematic diagram of the structure of the PV-ChangeNet model of the present invention;
[0064] Figure 2 This is a schematic diagram of the structure of the multi-scale context fusion attention module of the present invention;
[0065] Figure 3 This is a schematic diagram of the boundary sensing step-by-step difference amplification module of the present invention;
[0066] Figure 4 This is a schematic diagram of the 3D attention mechanism in the boundary perception progressive difference amplification module of the present invention (wherein, Generation is weight generation, 3D-weights are the generated 3D attention weight values (i.e., the attention weight values in step 3.5.4), Expansion is dimensional expansion, and Fusion is weight fusion (i.e., element-wise multiplication in step 3.5.4)).
[0067] Figure 5 This is a schematic diagram of the semantic decoding branch combined with the semantic constraint module of the present invention;
[0068] Figure 6 This is the T1 remote sensing image in the first example of dual-temporal multispectral remote sensing imagery;
[0069] Figure 7 This is the first example of a T2 remote sensing image in a dual-temporal multispectral remote sensing image;
[0070] Figure 8 This is a prediction map of the early fusion mode output of the fully convolutional model;
[0071] Figure 9 The predicted image output by the fully convolutional twin difference model;
[0072] Figure 10 The predicted image output by the fully convolutional twin difference model;
[0073] Figure 11 This is the prediction graph output by the dual-temporal convolutional difference and symmetric convolutional network model;
[0074] Figure 12 The predicted graph output by the nested connected twin network model;
[0075] Figure 13 This is the predicted output of the dual-temporal image converter;
[0076] Figure 14 The prediction graph of the output for the change detection converter;
[0077] Figure 15 The predicted graph output by the hierarchical attention network model;
[0078] Figure 16 The predicted graph output by the bilateral branch constraint network model;
[0079] Figure 17 The predicted graph output by the bilateral branch constraint network model;
[0080] Figure 18 The predicted graph output by the PV-ChangeNet model;
[0081] Figure 19 This is the T1 remote sensing image in the second example of dual-temporal multispectral remote sensing imagery;
[0082] Figure 20 This is the T2 remote sensing image in the second example of dual-temporal multispectral remote sensing imagery;
[0083] Figure 21 The predicted graph output when the PV-ChangeNet model uses a generalized self-attention block GT;
[0084] Figure 22 The prediction graph output when using DM for the PV-ChangeNet model;
[0085] Figure 23 The predicted graph output when LSA is applied to the PV-ChangeNet model;
[0086] Figure 24 The predicted graph output when BA is applied to the PV-ChangeNet model;
[0087] Figure 25 The predicted graph output when BDAM is applied to the PV-ChangeNet model;
[0088] Figure 26 A scene of farmland adjacent to rural settlements;
[0089] Figure 27 This is a picture of terraced fields.
[0090] Figure 28The PV-ChangeNet model's prediction map for a farmland scene adjacent to rural settlements;
[0091] Figure 29 This is a prediction map of the terraced landscape using the PV-ChangeNet model. Detailed Implementation
[0092] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. The embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0093] Example 1:
[0094] A deep learning method for detecting newly added photovoltaic power on agricultural land includes the following steps:
[0095] Step 1: Acquire multispectral remote sensing image data of the study area from two years. The acquisition and preprocessing of the study area images includes the following steps:
[0096] Step 1.1: Obtain Sentinel-2 multispectral remote sensing image data from the Google Earth Engine platform. Sentinel-2 multispectral remote sensing images can be obtained from the surface reflectance (SR) product jointly released by the European Space Agency and the U.S. Geological Survey after atmospheric and topographic correction.
[0097] Step 1.2: Preprocess the Sentinel-2 multispectral remote sensing image data, specifically including the following steps:
[0098] Step 1.2.1: First, the Sentinel-2 multispectral remote sensing image data is filtered based on the cloud cover threshold of less than 10% and the administrative boundaries of each prefecture-level city.
[0099] Step 1.2.2: Next, apply the cloud removal function to remove cloud cover from the filtered Sentinel-2 multispectral remote sensing image data to obtain a set of cloudless Sentinel-2 multispectral remote sensing image data covering the study area.
[0100] Step 1.2.3: Finally, cloudless Sentinel-2 multispectral remote sensing image data from 2016 and 2022 for nine prefecture-level cities in China were selected to construct a deep learning recognition method for photovoltaic expansion areas applicable to farmland scenarios. Data from the red, green, and blue bands of the cloudless Sentinel-2 multispectral remote sensing image data were extracted for subsequent analysis, resulting in a preprocessed Sentinel-2 multispectral remote sensing image dataset. Each preprocessed Sentinel-2 multispectral remote sensing image data includes data from the red, green, and blue bands.
[0101] Step 2: Construct dual-temporal Sentinel-2 multispectral remote sensing images from the corresponding time periods of 2016 and 2022, and register them. Then, construct black-and-white binary images corresponding to newly added photovoltaic areas in the registered dual-temporal Sentinel-2 multispectral remote sensing images. Use the registered dual-temporal Sentinel-2 multispectral remote sensing images and black-and-white binary images as the input samples and ground truth labels in the sample data, respectively, to obtain the sample set. Expand the sample set and divide it into training, testing, and validation sets. The specific steps include:
[0102] Step 2.1: Construct and register dual-temporal Sentinel-2 multispectral remote sensing images: Based on the same vector boundary region, cropped Sentinel-2 multispectral remote sensing images from corresponding time periods in 2016 and 2022 are selected on the Google Earth Engine platform to construct dual-temporal Sentinel-2 multispectral remote sensing images. The images are exported under the same spatial reference system and the same spatial resolution. During the export process, the Google Earth Engine platform performs unified spatial projection and pixel grid alignment on the dual-temporal Sentinel-2 multispectral remote sensing images, so that the pixel positions of the dual-temporal images correspond one-to-one, resulting in registered dual-temporal Sentinel-2 multispectral remote sensing images.
[0103] Step 2.2: Perform manual visual interpretation of the registered dual-temporal Sentinel-2 multispectral remote sensing images: Using the pixel-level change detection model for annotation, the outer boundary of the target area is manually drawn using polygon vector tools. The newly added photovoltaic areas are marked in the Sentinel-2 multispectral remote sensing images that include the newly added photovoltaic areas. The annotation range includes the photovoltaic cell panels and the photovoltaic land ancillary facilities area. Non-photovoltaic areas are not marked, forming vector label data of the newly added photovoltaic areas.
[0104] Step 2.3: Extract binary images from the vector label dataset: Use the vector to raster tool to convert the vector label data into black and white binary images. Set the pixel value of the newly added photovoltaic area to 1 and the pixel value of the background area to 0 to obtain the black and white binary images corresponding to the registered dual-temporal Sentinel-2 multispectral remote sensing images.
[0105] Step 2.4: The registered dual-temporal Sentinel-2 multispectral remote sensing images and their corresponding black-and-white binary images are cropped to a size of 256×256 pixels to obtain 690 registered dual-temporal Sentinel-2 multispectral remote sensing images and their corresponding black-and-white binary images.
[0106] Step 2.5: Construct the registered dual-temporal Sentinel-2 multispectral remote sensing images as input samples, construct the corresponding black and white binary images as ground truth labels, construct the input samples and corresponding ground truth labels as sample data, construct all sample data into a sample set, and divide it into training set, validation set and test set in a 6:2:2 ratio;
[0107] Step 2.6: In order to enhance the generalization ability of the model and avoid overfitting, data augmentation operations are performed based on the training set using 90°, 180°, 270° rotations, as well as horizontal and vertical flips, to expand the amount of sample data.
[0108] The data enhancements described above, simulating different observation angles and scene changes, significantly enriched the diversity of the training set and effectively improved the model's accuracy in identifying newly added photovoltaic areas under different conditions and its adaptability to complex environments.
[0109] Step 3: Construct the PV-ChangeNet model, which includes the following steps:
[0110] like Figure 1As shown, this invention employs a PV-ChangeNet model encoder-decoder structure. First, in the encoder, a weight-sharing ResNet architecture-based Siamese neural network is used to perform multi-stage feature extraction on registered dual-temporal Sentinel-2 multispectral remote sensing images (denoted as T1 and T2 images, respectively), effectively capturing the spatial and semantic features of farmland photovoltaic power stations at different scales. Simultaneously, to further enhance the model's ability to represent photovoltaic expansion areas, a multi-scale contextual feature aggregation module (MCFAM) is introduced. Through a dual-path attention mechanism of spatial and channel data, the semantic consistency and fine-grained detail information in shallow and deep feature maps are enhanced, reducing missed detections and voids in irregular photovoltaic targets. Subsequently, a change detection center (CD) is added, expanding the feature perception field through a spatial feature pyramid module, further strengthening the model's global contextual perception capability for newly added photovoltaic areas at different scales.
[0111] In the decoder, a boundary-aware difference amplification module (BDAM) is introduced to enhance the differences and refine the boundaries of the dual-temporal features layer by layer, maximizing the utilization of features at each stage and improving the completeness and accuracy of the changing boundary information. A dual-path decoding structure is adopted, in which the semantic decoding branch, combined with the semantic constraint module (SCM), guides the alignment and communication of information between the dual-temporal features and suppresses background noise. Through loss function design, the accuracy of change detection in the expansion area of photovoltaic power stations in farmland scenarios and the robustness of the model are effectively improved.
[0112] Step 3.1: Construct a Siamese neural network based on a weight-sharing ResNet architecture. Two ResNet networks are used to encode and decode the bi-temporal Sentinel-2 multispectral remote sensing images, respectively. Specifically:
[0113] The PV-ChangeNet model consists of two identical weight-sharing ResNet-based Siamese neural networks, denoted as the first ResNet module and the second ResNet module. The input to the first ResNet module is the T1 remote sensing image from the bi-temporal Sentinel-2 remote sensing imagery. The encoder part of the first ResNet module includes... The first ResNet module's encoder part is a downsampling layer. The feature maps output by each downsampling layer are denoted as follows: ,in, The feature map sizes are halved sequentially, and the decoder part of the first ResNet module includes... The first upsampling layer, the decoder part of the first ResNet module. The feature maps output by each upsampling layer are denoted as follows: ,in, The dimensions increase by a factor of two in succession;
[0114] The input to the second ResNet module is the T2 remote sensing image from the dual-temporal Sentinel-2 remote sensing imagery. The encoder part of the second ResNet module includes... The first downsampling layer, the encoder part of the second ResNet module. The feature maps output by each downsampling layer are denoted as follows: ,in, ~ The feature map sizes are halved sequentially, and the decoder part of the second ResNet module includes... The first upsampling layer, the decoder part of the second ResNet module. The feature maps output by each upsampling layer are denoted as follows: ,in, The size increases by double sequentially; among them, the encoder part of the ResNet module... The first downsampling layer and the decoder part Each upsampling layer is connected through a segmentation center (seg). The remaining downsampling layers in the encoder part of the ResNet module are skipped to the corresponding upsampling layers in the decoder part.
[0115] Record No. The encoder part of the ResNet module The feature maps output by each downsampling layer are , No. The decoder part of the ResNet module The feature maps output by each upsampling layer are ,in, This is the sequence number of the ResNet module. , and These are the indexes of the feature maps output by the ResNet module. , Feature map With feature map The dimensions are consistent.
[0116] In this embodiment, The ResNet module consists of 4 downsampling layers and 4 upsampling layers.
[0117] Step 3.2: The encoder part of the PV-ChangeNet model also includes a multi-scale context fusion attention module (MCFAM) (such as...). Figure 2 As shown), the input to the multi-scale context fusion attention module is the feature map. Feature map and feature maps , among which, when At this time, the input to the multi-scale context fusion attention module is only the feature map. and feature maps ,when At this time, the input to the multi-scale context fusion attention module is only the feature map. and feature maps The output of the multi-scale context fusion attention module is a feature map. The encoder part of the PV-ChangeNet model of the present invention includes a first multi-scale context fusion attention module and a second multi-scale context fusion attention module. The first multi-scale context fusion attention module focuses on the feature map. The feature maps are obtained by processing them separately. The second multi-scale context fusion attention module applies attention to the feature map. The feature maps are obtained by processing them separately. The multi-scale context fusion attention module enhances the encoding capability of semantic information and fine-grained detail information in the deep and shallow feature maps of the target photovoltaic through a spatial and channel dual-path attention mechanism. The input feature map of the multi-scale context fusion attention module specifically includes the following processing steps:
[0118] Step 3.2.1: The multi-scale context enhancement module will... The features of the three stages are aligned to a unified spatial resolution and channel dimension, specifically as follows:
[0119] feature map Max pooling is used for spatial downsampling to adjust the spatial resolution of the feature map. Consistent, the channel dimension is then expanded through a 3×3 convolution operation with channel adjustment to obtain the feature map. ;
[0120] feature map Bilinear interpolation is used for upsampling to adjust the spatial resolution for consistency, and 3×3 convolution is used for channel compression to obtain the feature map. ;
[0121] feature map The feature maps are obtained by performing channel mapping through 3×3 convolution. ;
[0122] Finally, the feature map is then processed. Feature map and feature maps By performing a stacking operation, feature layers are fused to obtain multi-scale feature maps, thereby integrating feature information from different levels.
[0123] Step 3.2.2: Use skip connections to connect the feature maps. The fused feature map is obtained by adding it element-wise to the multi-scale feature map. ,in, For the number of channels, and These are the height and width of the feature map, respectively.
[0124] Step 3.2.3: Process the feature map Perform a dual-path aggregation operation, which includes spatial feature aggregation and channel feature aggregation.
[0125] Spatial feature aggregation operations include the following processes:
[0126] First, feature map By performing channel compression in a 1×1 manner, the number of feature channels is reduced to 1 / 4 of the original number;
[0127] Secondly, the feature map after channel compression The input is fed into parallel convolutional branches of sizes 3×3, 5×5, and 7×7 to capture spatial features under different receptive fields.
[0128] Next, the outputs of multiple convolutional branches are summed element-wise to obtain a fused spatial feature map;
[0129] Finally, the fused spatial feature map is sequentially compressed using the pooling operation, followed by a 7×7 convolution and a sigmoid activation function to obtain a spatial attention feature map. The spatial attention feature map is then multiplied element-wise with the fused spatial feature map to enhance the changing regions and suppress the unchanged background. Finally, the feature map after the element-wise multiplication operation is passed through a 1×1 convolution to obtain the spatial attention enhanced feature map, which is the output feature map of the spatial feature aggregation operation.
[0130] The channel feature aggregation operation specifically includes the following process: First, the feature map is aggregated using global average pooling. The channel dimension vector is compressed into a C×1×1 vector, and then a channel attention map is generated by sequentially passing it through a 1×1 dimension reduction convolution, a ReLU activation function, and a 1×1 dimension increase convolution. This is the output feature map of the channel feature aggregation operation.
[0131] Step 3.2.4: Perform element-wise multiplication between the spatial attention-enhanced feature map and the channel attention map to enhance channel information, and then combine it with the feature map. By combining these elements through element-wise addition, the final multi-scale context-enhanced feature map is generated. Multi-scale context-enhanced feature maps Used for identifying subsequent regions of change.
[0132] Step 3.3: The encoder part of the PV-ChangeNet model of the present invention also includes a change detection center block CD and a feature map. and feature map Input into the change detection center block CD. and The difference results are sequentially passed through four cascaded dilated convolutional units. Each dilated convolutional unit has the same input and output channels and the same kernel size, but the dilation rate increases sequentially. Finally, the difference results are summed element-wise with the outputs of all dilated convolutional units to generate an enhanced feature map. .
[0133] Step 3.4, as follows Figure 5 As shown, the semantic decoding branch, combined with the semantic constraint module (SCM), is used to indicate newly added photovoltaic areas. The decoder part of the PV-ChangeNet model also includes... The semantic decoding branch combines with the semantic constraint module (SCM), the first... Each semantic decoding branch, combined with the input of the semantic constraint module (SCM), serves as a feature map. and feature map The semantic decoding branch, combined with the output of the semantic constraint module (SCM), forms a feature map. , No. The semantic decoding branch, combined with the semantic constraint module (SCM), specifically includes the following processing steps for the input feature map:
[0134] Step 3.4.1: Process the feature map and feature map The semantic difference feature map of semantic decoding is obtained by using element-wise subtraction.
[0135] Step 3.4.2: Combine the semantic difference feature map with the feature map. Channel-dimensional concatenation is performed, followed by 1×1 convolution for channel compression and feature fusion;
[0136] Step 3.4.3: Extract semantic edge feature maps from the feature maps after channel compression and feature fusion using 3×3 convolution, and apply activation functions to generate high-level semantic feature maps with channel attention. , used to indicate the prominent areas of newly added photovoltaic areas.
[0137] Step 3.5, as follows Figure 3 and Figure 4 As shown, the decoder part of the PV-ChangeNet model of the present invention also includes The boundary-aware, step-by-step difference amplification module (BDAM) is the first... The input to the boundary-aware step-by-step difference amplification module (BDAM) consists of two parts, when At that time, the first part of the feature map is a feature map. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map Among them, when At that time, the first part of the feature map is the enhanced feature map output by the change detection center block. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map ;No. The boundary-aware step-by-step difference amplification module BDAM outputs a feature map. , No. The boundary-aware step-by-step difference amplification module (BDAM) specifically processes the input features through the following steps:
[0138] Feature map The feature map is obtained in the following way: With feature map The feature map is obtained after element-wise multiplication. .
[0139] Step 3.5.1: The first part of the feature map is scaled by a CBR (convolution-batch normalization-activation) module with a convolution kernel size of 3×3 to make it consistent with the size of the current layer feature map;
[0140] Step 3.5.2, Feature Map and feature map Perform addition and subtraction operations separately to highlight the spatial consistency of the invariant region and the spatial differences of the variable region;
[0141] Step 3.5.3: Merge the feature map obtained by addition and the feature map obtained by subtraction using a Concat operation, and then merge the merged feature map with the original feature map. The result of element-wise multiplication is then compared with the feature map. The feature map is obtained by performing an addition operation. The fused feature map and the feature map The result of element-wise multiplication is then compared with the feature map. The feature map is obtained by performing an addition operation. This is used to enhance representation capabilities. Finally, the feature maps are... and feature map Perform the boundary awareness enhancement operations in steps 3.5.4 to 3.5.6 respectively to obtain biphasic boundary awareness enhancement features;
[0142] Step 3.5.4: Process the feature map Applying a 3D attention mechanism, the specific process of which includes the following steps: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] First, the mean of the feature map in the spatial dimension is calculated. Then, a sum of squared deviations is constructed based on the deviations of each location from the mean to evaluate the saliency of each location. Next, a non-linear activation function is applied to map the sum of squared deviations to generate attention weight values for the importance of each location. Finally, the feature map is processed... The weighted feature map is obtained by multiplying the attention weight values at each location element by element. This is the output feature map of the 3D attention mechanism, which suppresses background noise and enhances the response in changing regions.
[0143] Step 3.5.5: Perform boundary-guided enhancement on the weighted feature map. Boundary-guided enhancement specifically includes the following process: First, perform average pooling (AvgPool) on the weighted feature map. Then, subtract the AvgPool result from the original weighted feature map element-wise to highlight potential boundary information in the image. Finally, pass the result of the element-wise subtraction operation through a CBR module with a 1×1 convolution kernel to obtain the enhanced boundary feature map. ;
[0144] Step 3.5.6: Enhance the boundary feature map Perform multiplication and addition operations with the weighted feature map (i.e., perform boundary enhancement feature map) The boundary perception enhancement operation is completed by first multiplying the weighted features and then adding the resulting features back to the weighted features to obtain the biphasic boundary perception enhancement features.
[0145] Step 3.5.7: Pass the biphasic boundary awareness enhancement features through a 3D attention mechanism, then perform element-wise subtraction. Finally, compare the feature maps after element-wise subtraction with the feature maps... The addition operation is performed, and finally, the feature map after the addition operation is passed through a 3D attention mechanism again to obtain the final feature map. .
[0146] Step 3.6: The decoder part of the PV-ChangeNet model of the present invention further includes a change decoder module, which includes... One upsampling layer; when At that time, the first change decoder module The input to each upsampling layer is the feature map output by the change detection center block CD. ;when At that time, the first change decoder module The input to each upsampling layer is a feature map. The first change decoder module The feature map output by each upsampling layer is the predicted image of the PV-ChangeNet model of this invention. The change decoder module amplifies the input feature map layer by layer to the original resolution, and at the same time fuses the change features of different levels to gradually construct a change map with strong discriminativeness and clear boundaries, so as to achieve fine detection of newly added photovoltaic areas.
[0147] Step 3.7: Construct the loss function for the PV-ChangeNet model. loss function By calculating the error between the predicted image and the true label from PV-ChangeNet, the model is gradually guided to learn discriminative features of newly added photovoltaic regions. This process is implemented using a cross-entropy loss function, with the loss function based on the following formula:
[0148] (1);
[0149] In the formula, and These are the predicted image height and width, respectively; The location in the predicted image is The actual label of the pixel; if the position changes, then... =1, otherwise =0; The model predicts the location. The probability of change; the summation here applies to all pixels in the image. It was carried out.
[0150] Step 4: Detect and evaluate changes in newly added photovoltaic areas: Train the PV-ChangeNet model based on the training set obtained in Step 2, obtain the model training weight parameters, and finally input the test dataset into the trained PV-ChangeNet model to detect changes in newly added photovoltaic areas in farmland and evaluate the results. This includes the following steps:
[0151] Step 4.1: The initial learning rate of the PV-ChangeNet model is set to 0.0001; the learning rate decay method is Poly strategy with a decay coefficient of 0.9; the model training batch size is set to 4, and the model iterations are set to 300.
[0152] Step 4.2: Input the training set into the PV-ChangeNet model, obtain the optimal weight parameters through iterative optimization, and use the model weights after the last iteration as the final prediction weights;
[0153] Step 4.3: Based on the final model weights obtained in Step 4.2, perform change detection and prediction on the test dataset, and output the predicted image of the newly added photovoltaic area;
[0154] Step 4.4: Based on the predicted image from Step 4.3, calculate the difference between the predicted image and the corresponding ground truth label, count the number of true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN) in the newly added photovoltaic area detection results, calculate precision, recall, F1 score, intersection-over-union ratio (IoU), and overall accuracy (OA), and comprehensively evaluate the model performance based on the following indicators.
[0155] Precision, recall, F1 score, IoU, mIoU, and overall precision are calculated based on the following formulas:
[0156] (2);
[0157] (3);
[0158] (4);
[0159] (5);
[0160] (6);
[0161] Among them, true positive (TP) represents the number of image phase elements correctly predicted as photovoltaic power station installations; true negative (TN) represents the number of elements correctly predicted as background; false positive (FP) represents the number of elements incorrectly predicted as photovoltaic power station expansions; and false negative (FN) represents the number of elements incorrectly predicted as background.
[0162] Example 2:
[0163] This embodiment uses multiple Sentinel-2 multispectral remote sensing image data to construct a change detection model suitable for automatic identification of photovoltaic power station expansion areas in medium-resolution (10m) farmland scenes. The study area of this invention covers Sentinel-2 multispectral remote sensing image data from 2016 and 2022 in 9 regions. The Sentinel-2 multispectral remote sensing image data used comes from the Google Earth Engine platform and is provided by the European Space Agency and the United States Geological Survey. The surface reflectance (SR) product is used after atmospheric and topographic correction.
[0164] Step 1 of Example 1 was performed on Sentinel-2 multispectral remote sensing image data: cloud cover was less than 10% and the data was located within the administrative boundaries of prefecture-level cities. Finally, after processing with a cloud removal function, an image data set covering the study area was obtained, and only the red, green and blue bands were extracted for model input.
[0165] Step 2 of Example 1 was performed on the Sentinel-2 multispectral remote sensing image data: Sentinel-2 multispectral remote sensing image data from corresponding time periods in 2016 and 2022 were constructed into dual-temporal Sentinel-2 multispectral remote sensing images and registered. A pixel-level change detection model was used, and based on manual polygon vector annotation, the outer boundary of the target area was finely depicted. Manual correction was then performed to ensure that the annotation range included the photovoltaic panel and ancillary facilities areas. The photovoltaic area annotation rule was to assign a value of 1 to newly added photovoltaic areas and a value of 0 to background areas. Subsequently, the acquired images and corresponding label data were cropped to a size of 256×256 pixels, ultimately resulting in 690 registered dual-temporal Sentinel-2 multispectral remote sensing images and corresponding black-and-white binary images, which were then divided into training, validation, and test sets in a 6:2:2 ratio.
[0166] To improve the model's generalization ability, data augmentation operations were performed on the training dataset using rotations of 90°, 180°, and 270°, as well as horizontal and vertical flips. This effectively expanded the number of samples, enriched the observation conditions, and improved the model's accuracy in identifying photovoltaic expansion areas in different farmland scenarios and its adaptability to complex environments.
[0167] Steps 3 and 4 of Example 1 are performed as follows: This invention is tested under the Ubuntu 18.04 operating system environment, based on the PyTorch 1.10 deep learning framework, using two Nvidia GeForce RTX 3060 graphics cards (total VRAM 24GB). During model training, the initial learning rate is set to 0.0001, the Adam optimizer is used for parameter updates, the batch size is set to 4, the number of iterations is 300, and the learning rate decay method adopts a Poly strategy with a decay coefficient of 0.9. The PV-ChangeNet model is trained using the aforementioned training dataset to obtain the optimal training weight parameters. Subsequently, the test dataset is input into the trained PV-ChangeNet model for prediction, outputting the change detection results of newly added photovoltaic power station expansion areas in farmland. Based on the comparison between the prediction results and the actual label data, the accuracy and robustness of the model in detecting photovoltaic expansion areas in farmland scenarios are analyzed and evaluated.
[0168] To verify the superiority of this invention in detecting changes in the expansion area of farmland photovoltaic power stations, nine typical deep learning models were selected as comparison methods: Fully Convolutional Early Fusion Model (FC-EF), Fully Convolutional Siam-Diff Model (FC-Siam-Diff), Fully Convolutional Siam-Conc Model (FC-Siam-Conc), Dual Temporal Convolutional Difference and Symmetric Convolutional Network Model (DTCDSCN), Nested Connected Siamese Network Model (SNUNet), Dual Temporal Image Transformer (BiT), Change Detection Transformer (ChangeFormer), Hierarchical Attention Network Model (HANet), and Bilateral Branch Constraint Network Model (B2CNett). Comparative experiments were conducted with the PV-ChangeNet model proposed in this invention. All comparison models used the same training, validation, and test datasets, and were trained and tested under the same experimental parameters to ensure the fairness and validity of the comparison results.
[0169] To further verify the practical role of the boundary-aware step-by-step difference amplification module model proposed in this invention, comparative experiments were designed to verify different difference enhancement methods. Different difference enhancement modules were designed based on the PV-ChangeNet model, and the impact of different module combinations on the detection results of changes in the expanded area of photovoltaic power plants was discussed. All comparative experiments were conducted while maintaining consistency in the dataset and experimental parameters, and the contributions of each key module to the model's detection accuracy and fine-grained boundary performance were comprehensively analyzed.
[0170] Accuracy evaluation and analysis of experimental results:
[0171] To verify the accuracy of the PV-ChangeNet model in detecting changes in the expansion area of photovoltaic power plants in farmland scenarios, the proposed PV-ChangeNet model was trained on a constructed training set. After obtaining the model training weight parameters, these weights were used to predict changes on the test dataset. The prediction results were then qualitatively and quantitatively compared with manually labeled samples of newly added photovoltaic areas in the corresponding regions. Through comparative analysis, the system evaluates the model's detection performance and accuracy in identifying the expansion area of photovoltaic power plants in farmland.
[0172] Qualitative comparison of experimental results:
[0173] Figures 6-18 This is the first example of a dual-temporal multispectral remote sensing image in the comparative experiment of nine models, along with the prediction maps output by each model, which helps to compare the detection results of each model. Figures 19-25 This is a heatmap of model attention to the second dual-temporal multispectral remote sensing image by the PV-ChangeNet boundary-aware progressive difference amplification module and other difference enhancement methods. The color in the image gradually changes from blue to red, indicating that the model's attention to the area increases from weak to strong, which can more intuitively show the effect of the module in the model. Figures 26-29 This is a prediction map of the newly added photovoltaic expansion area under different agricultural landscapes using the PV-ChangeNet model of the present invention.
[0174] from Figures 6-18 As can be seen, most methods suffer from some false negatives, as shown in the blue highlighted area, while the method of this invention exhibits relatively fewer false negatives. Furthermore, when dealing with interference from similar features such as buildings, FC-EF, FC-Siam-diff, and FC-Siam-conc show numerous false positives, treating changed buildings as newly added photovoltaic power stations. SNUNet, BIT, ChangeFormer, HANet, DTCDSCN, and B2CNet, on the other hand, show more false negatives when handling the task of identifying newly added photovoltaic areas in the farmland scene shown in the figure. In the task of detecting newly added photovoltaic areas on agricultural land, PV-ChangeNet demonstrates better performance in boundary handling compared to other methods.
[0175] from Figures 19-25As can be seen, the simple difference method (DM) performs well in detecting large photovoltaic power plant areas, but its attention to small photovoltaic power plant areas is weak, resulting in a large number of missed detections. The local similarity attention method (LSA) prioritizes processing changing areas, but its performance in identifying the boundaries of these areas is limited. The boundary-aware difference amplification module (BDAM) shows some ability in perceiving the boundaries of changing areas, but it still has the problem of missed detections. The method proposed in this invention has a strong ability to perceive boundary areas and achieves excellent accuracy in identifying changing areas. It can effectively focus on changing areas, especially in noisy environments, while minimizing false alarms and missed detections.
[0176] from Figures 26-29 It can be seen that the results generated by the PV-ChangeNet model proposed in this invention are highly consistent with the actual data, and it shows reliable performance in various scenarios such as roof disturbance and crop phenological changes. Figure 26 It showcases farmland scenes adjacent to rural settlements. Figure 28 The PV-ChangeNet model demonstrates its ability to accurately distinguish between rooftops and photovoltaic areas with similar spectral characteristics. Figure 27 Showcasing terraced landscapes, Figure 29 The results of the inspection in the terraced landscape are shown, in which the photovoltaic power station is distributed in a block pattern; the PV-ChangeNet model maintains accurate boundary extraction in both scenarios, demonstrating its ability to handle narrow and fragmented structures; the PV-ChangeNet model shows robust performance in diverse agricultural environments and can effectively identify expansion areas with different shapes, sizes and background complexities.
[0177] Quantitative comparison of experimental results:
[0178] Table 1 shows the accuracy of the farmland photovoltaic change detection results for each model.
[0179]
[0180] The quantitative evaluation of the experimental results of each model is shown in Table 1. The indicators in the table are, in order, precision, recall, F1 score, mean intersection-over-union ratio (mIoU), intersection-over-union ratio (IoU), and overall accuracy (OA). As can be seen from Table 1, the PV-ChangeNet model proposed in this invention has the highest accuracy among all indicators for detecting changes in newly added photovoltaic areas in farmland. This indicates that PV-ChangeNet is more adaptable to complex boundaries and irregular targets in extracting photovoltaic expansion areas in farmland.
[0181] The PV-ChangeNet model outperforms the comparative model in the task of detecting changes in farmland photovoltaic power stations. While maintaining high overall accuracy, it has significant advantages, especially in terms of recall, F1 score and mIoU, which fully verifies the effectiveness and practicality of the method of this invention in the task of detecting newly added photovoltaic areas in farmland.
[0182] Table 2 shows the accuracy of the comparative experimental results for different difference enhancement methods.
[0183]
[0184] To further verify the effectiveness of the Boundary Aware Progressive Difference Amplification Module (BDAM) in the PV-ChangeNet model proposed in this study, we conducted comparative experiments on the difference feature enhancement methods in the change decoding branch and set up four difference enhancement methods, specifically: DM: directly performing difference operation on the encoded biphase feature maps and taking the absolute value as the change feature; LSA: calculating local similarity attention based on the biphase feature maps, multiplying the attention weights with the feature maps, and then performing difference operation to obtain the change feature; BA: introducing a boundary feature perception mechanism into the difference feature to enhance the model's attention to the change region by capturing boundary information; BDAM: based on BA, combining difference amplification and boundary awareness mechanisms, fusing multi-stage features layer by layer to strengthen fine-grained and boundary information. The quantitative evaluation metrics for the four methods include Precision, Recall, F1, IoU, and OA. Specific data are shown in Table 2. It can be seen that the BDAM method proposed in this invention outperforms other methods in all metrics. This indicates that the BDAM module not only improves the model's accuracy in identifying changing regions but also effectively reduces false detections and false negatives, thereby improving the overall detection performance and stability of the model.
[0185] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0186] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0187] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0188] It should be noted that the embodiments described in this invention are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. An agricultural land addition photovoltaic detection deep learning method, characterized in that, The method comprises the following steps: Step 1, obtaining multispectral remote sensing image data of two years and preprocessing; Step 2, constructing the preprocessed multispectral remote sensing image data of the corresponding period in the two years into dual-time multispectral remote sensing images and registering, and constructing a black-and-white binary graph corresponding to the newly added photovoltaic area in the registered dual-time multispectral remote sensing images, constructing the registered dual-time multispectral remote sensing images and the black-and-white binary graph into input samples and true labels in sample data respectively, obtaining a sample set and expanding, and dividing the expanded sample set into a training set, a test set and a validation set; Step 3, constructing a PV-ChangeNet model and a loss function; Step 4, training the PV-ChangeNet model through the training set, saving the model parameters after training is completed; Step 5, obtaining multispectral remote sensing image data of the corresponding period of multispectral remote sensing image data of known years and years to be detected, and sequentially processing steps 1 and 2, and finally inputting into the trained PV-ChangeNet model to obtain a predicted image including a newly added photovoltaic area, The PV-ChangeNet model comprises an encoder and a decoder, the encoder of the PV-ChangeNet model comprises two identical weight-shared encoder parts of a twin neural network of a ResNet architecture, a multi-scale context fusion attention module MCFAM and a change detection center block CD, and the decoder of the PV-ChangeNet model comprises two identical weight-shared decoder parts of a twin neural network of a ResNet architecture; The Siamese neural network includes two ResNet modules. Registered dual-temporal multispectral remote sensing images are input into the two ResNet modules respectively. The encoder portion of the ResNet module outputs feature maps. The decoder part of the ResNet module outputs feature maps. ,in, and These are the indexes of the feature maps output by the ResNet module. , , This is the sequence number of the ResNet module. , The feature map size is halved sequentially. The size increases by a factor of 1 in each iteration; among them, the encoder part of the ResNet module... The first downsampling layer and the decoder part Each upsampling layer is connected through a segmentation center. The remaining downsampling layers in the encoder part of the ResNet module are skipped to the corresponding upsampling layers in the decoder part. The multi-scale context fusion attention module enhances the semantic consistency in the shallow and deep feature maps through a spatial and channel dual-path attention mechanism, and when , the input of the multi-scale context fusion attention module is the feature map , the feature map , and the feature map , wherein, when , the input of the multi-scale context fusion attention module is only the feature map , and the feature map , when , the input of the multi-scale context fusion attention module is only the feature map , and the feature map ; the output of the multi-scale context fusion attention module is the feature map ; feature map and feature map input to the change detection center block CD, the feature map and feature map difference result is sequentially passed through a plurality of cascaded dilated convolution units, each dilated convolution unit has the same input and output channels, the same convolution kernel size, but the expansion rate increases sequentially, and finally the difference result is element-wise summed with the outputs of all dilated convolution units to generate an enhanced feature map , and the change detection center block CD outputs the enhanced feature map .
2. The deep learning method for detecting newly added photovoltaic power on agricultural land according to claim 1, characterized in that, The preprocessing comprises sequentially performing cloud amount threshold and boundary screening, cloud removal and band extraction on the multispectral remote sensing image data to obtain preprocessed multispectral remote sensing image data; The dual-time multispectral remote sensing images of step 2 are constructed through the following process: based on the same vector boundary area, the preprocessed multispectral remote sensing image data of the corresponding period in the two years are selected to construct dual-time multispectral remote sensing images, and the dual-time multispectral remote sensing images are subjected to unified spatial projection and pixel grid alignment to obtain registered dual-time multispectral remote sensing images; The true label is constructed by the following method: Firstly, the registered dual-time multispectral remote sensing images are subjected to artificial visual interpretation: adopting a labeling mode of a pixel-level change detection model, a target area outer boundary is artificially drawn by using a polygon vector tool, a newly added photovoltaic area is labeled in the multispectral remote sensing image including the newly added photovoltaic area, the labeling range includes a photovoltaic cell panel and a photovoltaic land auxiliary facility area, a non-photovoltaic area is not labeled, and a vector label data of the newly added photovoltaic area is formed; Secondly, the vector label data set is subjected to binary graph extraction: the vector label data is converted into a black-and-white binary graph by using a vector-to-raster tool, a pixel value of the newly added photovoltaic area is set to 1, and a pixel value of a background area is set to 0, and a black-and-white binary graph corresponding to the registered dual-time multispectral remote sensing images is obtained. The sample data is constructed by the following method: the registered dual-time multi-spectral remote sensing images and the corresponding black and white binary maps are cropped to the same size, the registered dual-time multi-spectral remote sensing images are constructed as input samples, the black and white binary maps are constructed as true labels, and the input samples and the corresponding true labels are constructed as sample data.
3. The deep learning method for detecting newly added photovoltaic power on agricultural land according to claim 1, characterized in that, The decoder of the PV-ChangeNet model further comprises a semantic decoding branch combined with a semantic constraint module SCM, a boundary-aware difference amplification module BDAM, and a change decoder module; The semantic decoding branch is combined with a semantic constraint module SCM for indicating an added photovoltaic region, a decoder part of the PV-ChangeNet model includes a first semantic decoding branch combined with a semantic constraint module SCM, a second semantic decoding branch combined with a semantic constraint module SCM, and an input of the semantic constraint module SCM of the first semantic decoding branch is a feature map and a feature map , and an output of the semantic constraint module SCM of the first semantic decoding branch is a feature map ; The boundary-aware progressive difference amplification (BDAM) module is used to improve the completeness and accuracy of changing boundary information. The decoder part of the PV-ChangeNet model also includes... The boundary-aware, step-by-step difference amplification module (BDAM) is the first... The input to the boundary-aware step-by-step difference amplification module (BDAM) consists of two parts, when At that time, the first part of the feature map is the feature map. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map Among them, when At that time, the first part of the feature map is the enhanced feature map. After the change decoder module The result after one upsampling layer, the second part is the feature map. and feature map ;No. The boundary-aware step-by-step difference amplification module BDAM outputs a feature map. ; feature map is obtained by element-wise multiplication of the feature map with the feature map is obtained by element-wise multiplication of the feature map ; The change decoder module comprises one up-sampling layer; when the input of the first up-sampling layer of the change decoder module is the enhanced feature map ; when the input of the first up-sampling layer of the change decoder module is the feature map ; the output of the first up-sampling layer of the change decoder module is the predicted image of the PV-ChangeNet model.
4. The deep learning method for detecting newly added photovoltaic power on agricultural land according to claim 3, characterized in that, The multi-scale context fusion attention module comprises the following processing steps for the input feature map: Step 3.2.1, the multi-scale context enhancement module enhances the feature maps aligning to a unified spatial resolution and channel dimension, and stacking to obtain multi-scale feature maps; Step 3.2.2, in a way of skip connection, element-wise add the multi-scale feature maps to the feature map to obtain the fused feature map wherein, is the number of channels, and are the height and width of the feature map, respectively. Step 3.2.3, on the feature map performing a dual-path aggregation operation, the dual-path aggregation operation including a spatial feature aggregation operation and a channel feature aggregation operation; Step 3.2.4, the spatial attention enhanced feature map is element-wise multiplied with the channel attention map, and then is element-wise added with the feature map combined together through an element-wise addition operation to generate the final multi-scale context enhanced feature map ; The spatial feature aggregation operation comprises the following steps: First, the feature map Channel compression is performed by 1x1 to compress the number of feature channels to 1 / 4 of the original. Secondly, the compressed feature map of the number of channels are input into parallel convolution branches with convolution sizes of 3x3, 5x5 and 7x7, respectively; Again, the outputs of the plurality of convolution branches are subjected to an element-wise summation operation to obtain a fused spatial feature map; Finally, the fused spatial feature map is subjected to channel dimension compression, 7*7 convolution, and sigmoid activation function in sequence using a pooling operation to obtain a spatial attention feature map, and the spatial attention feature map is subjected to an element-wise multiplication operation with the fused spatial feature map, and then the feature map after the element-wise multiplication operation is subjected to 1*1 convolution to obtain a spatial attention enhanced feature map; The channel feature aggregation operation includes the following processes: first, the feature map is compressed into a channel dimension vector Cx1x1 through global average pooling, and then a channel attention map is generated through 1x1 dimension reduction convolution, a ReLU activation function, and 1x1 dimension increase convolution in sequence. compression into a channel dimension vector Cx1x1 through global average pooling, and then a channel attention map is generated through 1x1 dimension reduction convolution, a ReLU activation function, and 1x1 dimension increase convolution in sequence.
5. The method of claim 3, wherein the method is used for detecting the depth of a newly added photovoltaic in an agricultural land. No. The semantic decoding branch, combined with the semantic constraint module (SCM), specifically includes the following processing steps for the input feature map: Step 3.4.1, on the feature map and the feature map a semantic difference feature map of the semantic decoding is obtained by using an element-by-element subtraction operation; Step 3.4.2, the semantic difference feature map is concatenated with the feature map Channel dimension concatenation is performed, and then 1x1 convolution is performed for channel compression and feature fusion; Step 3.4.3, the channel-compressed and feature-fused feature map is passed through a 3x3 convolution to extract a semantic edge feature map, and an activation function is applied to generate a feature map .
6. The method of claim 3, wherein the method is used for detecting the depth of a newly added photovoltaic in an agricultural land. The first boundary-aware difference amplification module BDAM includes the following processing steps for the input features: Step 3.5.1, the first part of the feature map is subjected to scale adjustment by a CBR module with a convolution kernel size of 3*3 to be adjusted to the same size as the feature map of the current layer; Step 3.5.2, feature map and feature map addition and subtraction operations are performed, respectively; Step 3.5.3, the feature map obtained by performing the addition operation and the feature map obtained by performing the subtraction operation are fused through the Concat operation, and the fused feature map and the feature map The result of performing the element-by-element multiplication is added to the feature map The feature map obtained by performing the addition operation The fused feature map and the feature map The result of performing the element-by-element multiplication is added to the feature map The feature map obtained by performing the addition operation Finally, the feature map and the feature map respectively perform the boundary awareness enhancement operations of steps 3.5.4-3.5.6 to obtain a dual-phase boundary awareness enhancement feature. Step 3.5.4, on the feature map application of a 3D attention mechanism, which specifically includes the following process: on the feature map first, calculate the mean value in the spatial dimension, and then construct the deviation square sum based on the deviation of each position from the mean value, and then apply a nonlinear activation function to map the deviation square sum to generate the attention weight value of the importance of each position, and finally multiply the feature map with the attention weight value of each position element by element to obtain a weighted feature map; Step 3.5.5, performing boundary guided enhancement on the weighted feature map, the boundary guided enhancement specifically includes the following processes: first, performing average pooling operation on the weighted feature map, and performing element-wise subtraction operation between the average pooling result and the original weighted feature map; finally, passing the result of the element-wise subtraction operation through a CBR module with a convolution kernel of 1x1 to obtain a boundary enhanced feature map ; Step 3.5.6: Enhance the boundary feature map First, perform a multiplication operation with the weighted features, and then add the feature obtained from the multiplication operation back to the weighted features to obtain the boundary awareness enhanced feature map; Step 3.5.7, the two-phase boundary-aware enhanced features are respectively subjected to a 3D attention mechanism, and then subjected to an element-by-element subtraction operation, then the feature map after the element-by-element subtraction operation and the feature map are subjected to an addition operation, and finally the feature map after the addition operation is again subjected to a 3D attention mechanism to obtain a feature map .
7. The method of claim 1, wherein the method is used for detecting the depth of a newly added photovoltaic in an agricultural land. Loss function Based on the following equation: ; wherein, and are the height and width of the predicted image, respectively; is the true label of the pixel at position in the predicted image. If the position has changed, then = 1, otherwise = 0; is the probability that the model predicts that the position has changed.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the agricultural land newly added photovoltaic detection deep learning method in any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the agricultural land newly added photovoltaic detection deep learning method in any one of claims 1 to 7.
Citation Information
Patent Citations
Dual-time remote sensing image semantic change detection method based on twin residual network
CN118429819A
Large-area photovoltaic land classification method and system based on joint decision tree and deep learning
CN119559501A