Photovoltaic power station refined extraction method based on GEE cloud platform and SAM model
Through the refined extraction method of photovoltaic power stations based on GEE cloud platform and SAM model, the problem of low extraction accuracy of photovoltaic power stations in complex environments is solved, efficient and accurate identification of photovoltaic power station locations and boundaries is achieved, and the accuracy and efficiency of extraction are improved.
Patent Information
- Application Number
- CN202510664372.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-09-02
AI Technical Summary
In complex geographical environments, the spectral characteristics of photovoltaic power plants are easily confused with the background objects, resulting in low extraction accuracy, insufficient boundary details of photovoltaic power plants in medium-resolution images, making it difficult to meet the requirements of refined management, and the existing methods require a lot of manual correction.
The photovoltaic power station fine extraction method based on GEE cloud platform and SAM model is adopted. By constructing the photovoltaic power station sample data set, the medium-resolution remote sensing image is used for preliminary extraction, and the SAM model is fine-tuned, combined with high-resolution image is used for fine-tuning. Spectral features, exponential features and texture features are used to add LoRA layers for fine-tuning of the model to improve model performance.
It realizes high-precision identification of photovoltaic power station locations and boundaries, improves the accuracy and efficiency of extraction, and reduces the need for manual correction.
Smart Images

Figure CN120580604A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image processing, and in particular to a photovoltaic power station refined extraction method based on a GEE cloud platform and a SAM model. Background Art
[0002] Photovoltaic technology, as one of the key ways to utilize solar energy, directly converts solar energy into electricity through solar panel arrays without the need for heat engines. It is an effective solution for developing new energy and mitigating the impacts of climate change. Therefore, a comprehensive understanding of the development and status of existing photovoltaic power plants is crucial for the scientific planning and sustainable development of the future photovoltaic industry.
[0003] In the field of photovoltaic power plant monitoring, remote sensing technology, with its advantages of high timeliness, wide coverage, and low cost, has become an important means of monitoring the construction progress, regional distribution, and dynamic changes of photovoltaic power plants. Remote sensing imagery can be used to extract spectral and geospatial information from photovoltaic power plants, enabling real-time, efficient, and high-precision remote sensing detection of these plants. With the rapid development of deep learning, many semantic segmentation models have been applied to the extraction of photovoltaic power plants. Machine learning methods can improve the efficiency of identifying photovoltaic power plants, but are often limited by computing resources and accuracy in complex situations. Deep learning, as a branch of machine learning, significantly improves the distinction between target and background by deeply exploiting target features. It utilizes deep convolutional neural networks to automatically, accurately, and efficiently extract photovoltaic power plants from high-resolution imagery, and can also obtain more detailed photovoltaic power plant outlines and boundaries.
[0004] However, there are still some urgent problems to be solved in current technology: First, in complex geographical environments, the spectral characteristics of photovoltaic power stations are easily confused with background objects, which directly leads to low extraction accuracy; second, most existing studies extract photovoltaic power stations in medium-resolution images, and the extracted photovoltaic power station boundaries lack details, making it difficult to meet the requirements of refined management, and a large amount of manual correction is still required in the later stage, which restricts the accuracy and efficiency of photovoltaic power station boundary extraction. Summary of the Invention
[0005] Purpose of the invention: The present invention provides a refined extraction method for photovoltaic power stations based on the GEE cloud platform and the SAM model, which can achieve high-precision identification of the location and boundaries of photovoltaic power stations, greatly improving the accuracy and efficiency of extraction.
[0006] Technical solution: The present invention provides a photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model, comprising the following steps:
[0007] Step 1: Label the photovoltaic power stations and create a sample dataset of photovoltaic power stations;
[0008] Step 2: On the remote sensing cloud platform, an extraction model is constructed based on the spectral characteristics of the photovoltaic power station and the random forest algorithm, and the preliminary location and boundary of the photovoltaic power station is obtained using medium-resolution remote sensing images;
[0009] Step 3: Fine-tune the SAM model, retrain and obtain gradient updated weights, and quantitatively evaluate the model performance;
[0010] Step 4: Use the fine-tuned SAM model and high-resolution images to finely extract the photovoltaic power station and make a quantitative evaluation of the final segmentation results.
[0011] Furthermore, in step 1, random points are generated in the existing open PV power station dataset to screen PV power station and non-PV power station samples; PV power station and non-PV power station samples are labeled separately and divided into training dataset, validation dataset and test dataset according to the ratio of 8:1:1.
[0012] Furthermore, in step 2, an extraction model is constructed on the remote sensing cloud platform based on the spectral characteristics of the photovoltaic power station and the random forest algorithm. The preliminary location and boundary of the photovoltaic power station are obtained using medium-resolution remote sensing images. The specific steps include the following:
[0013] Step 21: Preprocess the medium-resolution remote sensing images on the Google Earth Engine remote sensing cloud platform, including screening of image time and cloud cover, and synthesis and stitching of the screened images.
[0014] Step 22: Utilize medium-resolution remote sensing images to extract spectral information of photovoltaic power plants, and construct a photovoltaic power plant extraction model by combining spectral features, index features, texture information, and a random forest model.
[0015] Step 23: Add the labeled PV power station sample dataset and use the PV power station extraction model to preliminarily extract the location and contour boundaries of the PV power station.
[0016] Furthermore, in step 22, the spectral features include reflectance data of seven bands (B1-B7) of the Landsat8 image, including visible light bands (blue light, green light, and red light), infrared bands, near infrared bands, and shortwave infrared bands;
[0017] The index features include the Normalized Difference Building Index (NDBI), the Normalized Difference Vegetation Index (NDVI), the Modified Normalized Difference Water Index (MNDWI), and the PV Enhancement Index (EPVI), which are calculated as shown in formulas (1-1)-(1-4):
[0018]
[0019]
[0020] SWIR1, SWIR2, NIR, RED, and GREEN represent the shortwave infrared 1 band (B6), shortwave infrared 2 band (B7), near infrared band (B5), red band (B4), and green band (B3) of Landsat 8, respectively.
[0021] There are 17 texture feature indicators based on various GLCM texture feature indicators, including _corr and _dent.
[0022] Furthermore, in step 3, the SAM model is fine-tuned, retrained, and gradient-updated weights are obtained, and the model performance is quantitatively evaluated. The specific steps include the following:
[0023] Step 31. Add the LoRA layer to the imagesencoder module, fine-tune the q, k, and v parameters, and freeze the prompt encoder and mask decoder modules.
[0024] W1=W0+α(A·B) (2-1)
[0025] Where W0 is the original weight without gradient update, A and B are low-rank matrices, α is the scaling factor, and W1 is the weight after gradient update;
[0026] Step 32: Load the fine-tuned SAM model architecture, input the training dataset to retrain the SAM model and obtain the gradient updated weights, and quantitatively evaluate the model performance, including the binary cross entropy loss function BCELoss, intersection over union (IoU), accuracy, precision, recall, and F1 score.
[0027] Furthermore, in step 32, the model performance results of the binary cross entropy loss function (BCELoss) on the training dataset, intersection over union (IoU), accuracy, precision, recall, and F1 score are tested on the public photovoltaic power station dataset (Jiang et al., 2021):
[0028]
[0029]
[0030] Among them, A in formula (2-2) i Indicates the true label, that is, the sample value is 1 or 0, B iRepresents the prediction result output by the model, the BCELoss value range is (0,1), N is the total number of samples, A in formula (2-3) represents the part with the predicted mask of 1, B represents the part with the actual mask of 1, and the IoU value range is (0,1). In formulas (2-4)-(2-7), TP represents the correctly predicted positive sample, FP represents the sample that is actually negative but predicted to be positive, and FN represents the sample that is actually positive but predicted to be negative. The value range of the three indicators is (0,1).
[0031] Furthermore, in step 4, the fine-tuned SAM model and high-resolution images are used to perform fine extraction of the photovoltaic power station and quantitatively evaluate the final segmentation results. The specific steps include the following:
[0032] Step 41: Based on the preliminary extraction results of the photovoltaic power station obtained on the remote sensing cloud platform, the Python integrated library segment-geospatial is used to obtain a high-resolution Google tile image of the same location;
[0033] Step 42: Load the new network architecture and weights of the SAM model and input the preliminary extraction results of the photovoltaic power station. Randomly sample 3 positive sample points and 3 negative sample points from the preliminary extraction results as point prompts; use the outer contour of the overall preliminary extraction result as a box prompt, and use a point-box hybrid prompt to obtain the first segmentation result;
[0034] Step 43: dilate and crop the image and the mask obtained after the first segmentation to adapt to the image size input by the model, and then input the processed mask as a point-frame blending prompt to obtain the final segmentation result;
[0035] Step 44: Perform post-processing such as hole filling on the mask result to generate a vector data file.
[0036] Beneficial effects: Compared with the existing technology, the present invention has the following significant advantages: (1) A photovoltaic power station extraction model is constructed on GEE, and the position and outline of the photovoltaic power station are preliminarily extracted based on the spectral information, characteristic texture, etc. of the photovoltaic power station in the image, which improves the efficiency of photovoltaic power station position recognition and provides a preliminary point box prompt input for the subsequent SAM model; (2) The image encoder module architecture of the SAM model is fine-tuned, the LoRA layer is added, and the q, k, and v parameters are added to the self-attention module to achieve lightweight fine-tuning of the large model, taking into account the model's running speed and segmentation quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of the method of the present invention.
[0038] Figure 2 This is a schematic diagram of the model training of the present invention.
[0039] Figure 3 These are example diagrams of photovoltaic power station segmentation results with different backgrounds of the present invention. DETAILED DESCRIPTION
[0040] like Figure 1 As shown in FIG, a photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model includes the following steps:
[0041] Step 1: Manually label photovoltaic power stations and create a photovoltaic power station sample dataset;
[0042] Step 2: On the remote sensing cloud platform, an extraction model is constructed based on the spectral characteristics of the photovoltaic power station and the random forest algorithm, and the preliminary location and boundary of the photovoltaic power station is obtained using medium-resolution remote sensing images;
[0043] Step 3: Fine-tune the SAM model, retrain and obtain gradient updated weights, and quantitatively evaluate the model performance;
[0044] Step 4: Use the fine-tuned SAM model and high-resolution images to finely extract the photovoltaic power station and make a quantitative evaluation of the final segmentation results.
[0045] Furthermore, the specific steps of step 1 include:
[0046] Step 1.1: Generate random points nationwide and in existing open PV power station datasets, and select PV power station and non-PV power station samples;
[0047] Step 1.2: Manually label the PV power station and non-PV power station samples and divide them into training, validation, and test datasets according to an 8:1:1 ratio.
[0048] Furthermore, the specific steps of step 2 include:
[0049] Step 2.1: Preprocess the medium-resolution remote sensing images on the Google Earth Engine remote sensing cloud platform, including screening of image time and cloud cover, and synthesis and stitching of the screened images.
[0050] Step 2.2: Use medium-resolution remote sensing images to extract spectral information of photovoltaic power plants, and build a photovoltaic power plant extraction model by combining spectral features, index features, texture features, and random forest models;
[0051] The spectral features include reflectance data from seven bands (B1-B7) of Landsat 8, including visible light bands (blue, green and red), infrared bands, near-infrared bands and short-wave infrared bands.
[0052] Index features include the Normalized Difference Built-up Index (NDBI), the Normalized Difference Vegetation Index (NDVI), the Modified Normalized Difference Water Index (MNDWI), and the Enhanced PV Index (EPVIndex). They are calculated as shown in formulas (1-1) to (1-4):
[0053]
[0054] Among them, SWIR1, SWIR2, NIR, RED and GREEN represent the shortwave infrared 1 band (B6), shortwave infrared 2 band (B7), near infrared band (B5), red band (B4) and green band (B3) of Landsat 8, respectively.
[0055] There are 17 texture feature indicators, as shown in Table 1:
[0056] Table 1 Introduction to various texture feature indicators based on GLCM
[0057]
[0058]
[0059] Table 2 Quantitative evaluation of classification accuracy of the initial extraction model of photovoltaic power stations based on Landsat8
[0060]
[0061] Step 2.3: Add the manually labeled PV power station sample dataset and use the PV power station extraction model to preliminarily extract the location and contour boundaries of the PV power station.
[0062] Further, such as Figure 2 As shown, the specific steps of step 3 include:
[0063] Step 3.1: Add the LoRA layer to the imagesencoder module, fine-tune the q, k, and v parameters, and freeze the prompt encoder and mask decoder modules.
[0064] W1=W0+α(A·B) (2-1)
[0065] Among them, W0 is the original weight without gradient update, A and B are low-rank matrices, α is the scaling factor, and W1 is the weight after gradient update.
[0066] Step 3.2: Load the fine-tuned SAM model architecture, input the training dataset to retrain the SAM model and obtain the gradient updated weights. Use the Binary Cross Entropy Loss (BCELoss) function on the training dataset to test the model performance results. Intersection over Union (IoU), Accuracy, Precision, Recall, and F1 score are used to test the model performance on the public photovoltaic power station dataset (Jiang et al., 2021). The quantitative evaluation index values are shown in Table 3:
[0067]
[0068]
[0069] Among them, A in formula (2-2) i Indicates the true label, that is, the sample value is 1 or 0, B i The BCELoss value ranges from (0, 1), N represents the total number of samples, and in formula (2-3), A represents the portion where the predicted mask is 1, B represents the portion where the actual mask is 1, and IoU ranges from (0, 1). In formulas (2-4)-(2-7), TP represents correctly predicted positive samples, FP represents samples that are actually negative but predicted as positive, and FN represents samples that are actually positive but predicted as negative. All three metrics range from (0, 1).
[0070] Table 3 Quantitative evaluation results of model performance
[0071]
[0072] Furthermore, the specific steps of step 4 include:
[0073] Step 4.1: Based on the preliminary extraction results of the photovoltaic power station obtained on the remote sensing cloud platform, the Python integrated library segment-geospatial is used to obtain high-resolution images of the same location;
[0074] Step 4.2: Load the new SAM model network architecture and weights, and input the preliminary extraction results of the photovoltaic power station. Randomly sample three positive sample points and three negative sample points from the preliminary extraction results as point prompts. The outer contour of the overall preliminary extraction result is used as a box prompt, and a point-box hybrid prompt is used to obtain the first segmentation result.
[0075] Step 4.3: Dilate and crop the image and the mask obtained after the first segmentation to adapt to the image size of the model input. Then input the processed mask as the point-box blending prompt to obtain the final segmentation result;
[0076] Step 4.4: Perform post-processing such as hole filling on the mask result to generate a vector data file.
[0077] like Figure 3 Shown are examples of PV plant segmentation results with five different backgrounds.
Claims
1. A photovoltaic power station refined extraction method based on GEE cloud platform and SAM model, characterized in that: The steps include: Step 1: Label the photovoltaic power stations and create a sample dataset of photovoltaic power stations; Step 2: On the remote sensing cloud platform, an extraction model is constructed based on the spectral characteristics of the photovoltaic power station and the random forest algorithm, and the preliminary location and boundary of the photovoltaic power station is obtained using medium-resolution remote sensing images; Step 3: Fine-tune the SAM model, retrain and obtain gradient updated weights, and quantitatively evaluate the model performance; Step 4: Use the fine-tuned SAM model and high-resolution images to finely extract the photovoltaic power station and make a quantitative evaluation of the final segmentation results.
2. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 1 is characterized in that: In step 1, random points are generated in the existing open PV power station dataset, and PV power station and non-PV power station samples are screened. PV power station and non-PV power station samples are labeled separately and divided into training dataset, validation dataset, and test dataset according to the ratio of 8:1:
1.
3. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 1 is characterized in that: In step 2, an extraction model is constructed on the remote sensing cloud platform based on the spectral characteristics of the photovoltaic power station and the random forest algorithm. The preliminary location and boundaries of the photovoltaic power station are obtained using medium-resolution remote sensing images. The specific steps include the following: Step 21: Preprocess the medium-resolution remote sensing images on the Google Earth Engine remote sensing cloud platform, including screening of image time and cloud cover, and synthesis and stitching of the screened images. Step 22: Utilize medium-resolution remote sensing images to extract spectral information of photovoltaic power plants, and construct a photovoltaic power plant extraction model by combining spectral features, index features, texture information, and a random forest model. Step 23: Add the labeled PV power station sample dataset and use the PV power station extraction model to preliminarily extract the location and contour boundaries of the PV power station. In step 22, the spectral features include reflectance data of seven bands (B1-B7) of the Landsat 8 image, including the visible light band, i.e., blue light, green light, and red light, the infrared band, the near infrared band, and the short-wave infrared band.
4. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 3 is characterized in that: In step 22, the index features include the normalized building index NDBI, the normalized vegetation index NDVI, the modified normalized water index MNDWI and the PV enhancement index EPVI, which are calculated as shown in formulas (1-1)-(1-4): Among them, SWIR1, SWIR2, NIR, RED and GREEN represent the shortwave infrared 1 band B6, shortwave infrared 2 band B7, near infrared band B5, red band B4 and green band B3 of Landsat 8 respectively; There are 17 texture feature indicators based on various GLCM texture feature indicators, including _corr and _dent.
5. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 1 is characterized in that: In step 3, the SAM model is fine-tuned, retrained, and gradient-updated weights are obtained. The model performance is then quantitatively evaluated. The specific steps are as follows: Step 31. Add the LoRA layer to the images encoder module, fine-tune the q, k, and v parameters, and freeze the prompt encoder and mask decoder modules. W1=W0+α(A·B) (2-1) Where W0 is the original weight without gradient update, A and B are low-rank matrices, α is the scaling factor, and W1 is the weight after gradient update; Step 32: Load the fine-tuned SAM model architecture, input the training dataset to retrain the SAM model and obtain the gradient updated weights, and quantitatively evaluate the model performance, including the binary cross entropy loss function BCELoss, intersection over union (IoU), accuracy, precision, recall, and F1 score.
6. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 1, characterized in that: In step 32, the model performance results of the binary cross entropy loss function BCELoss on the training dataset are used to test the model performance on the public photovoltaic power station dataset using the intersection over union (IoU), accuracy, precision, recall, and F1 score. Among them, A in formula (2-2) i Indicates the true label, that is, the sample value is 1 or 0, B i Represents the prediction result output by the model, the BCELoss value range is (0,1), N is the total number of samples, A in formula (2-3) represents the part with the predicted mask of 1, B represents the part with the actual mask of 1, and the IoU value range is (0,1). In formulas (2-4)-(2-7), TP represents the correctly predicted positive sample, FP represents the sample that is actually negative but predicted to be positive, and FN represents the sample that is actually positive but predicted to be negative. The value range of the three indicators is (0,1).
7. The photovoltaic power station refined extraction method based on the GEE cloud platform and the SAM model according to claim 1, characterized in that: In step 4, the fine-tuned SAM model and high-resolution images are used to perform fine extraction of the photovoltaic power station and quantitatively evaluate the final segmentation results. The specific steps include the following: Step 41: Based on the preliminary extraction results of the photovoltaic power station obtained on the remote sensing cloud platform, the Python integrated library segment-geospatial is used to obtain a high-resolution Google tile image of the same location; Step 42: Load the new network architecture and weights of the SAM model and input the preliminary extraction results of the photovoltaic power station. Randomly sample 3 positive sample points and 3 negative sample points from the preliminary extraction results as point prompts; The outer contour of the overall preliminary extraction result is used as a frame prompt, and a point-frame mixed prompt is used to obtain the first segmentation result; Step 43: dilate and crop the image and the mask obtained after the first segmentation to adapt to the image size input by the model, and then input the processed mask as a point-frame blending prompt to obtain the final segmentation result; Step 44: Perform post-processing such as hole filling on the mask result to generate a vector data file.