An oil field well site photovoltaic installed capacity prediction method based on aerial images

By using the SAM algorithm based on aerial images and homography matrix processing technology, the installation area of ​​photovoltaic panels in oilfield well sites is automatically planned, solving the problems of time-consuming and labor-intensive manual measurement and inaccurate evaluation, and realizing efficient and intelligent prediction of photovoltaic installed capacity.

CN118334542BActive Publication Date: 2026-11-27CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410502592.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2026-11-27
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

In existing technologies, the assessment of the photovoltaic development potential of oilfield well sites is mainly carried out through manual measurement, which is time-consuming and labor-intensive and makes it difficult to take into account the actual situation inside the well site, resulting in insufficient accuracy of the assessment.

Method used

Using an aerial image-based method, the usable area is segmented through the SAM algorithm. Combined with homography matrix and morphological processing techniques, the open areas of oilfield well sites are extracted, and a safe distance is reserved around them to automatically plan the installation area of ​​photovoltaic panels.

Benefits of technology

It has greatly reduced time and labor costs, improved the accuracy and intelligence of assessments, ensured the safe operation of oilfield facilities, and promoted the digital development of oilfield systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334542B_ABST
    Figure CN118334542B_ABST
Patent Text Reader

Abstract

The application discloses a kind of oilfield well site photovoltaic installed capacity prediction methods based on aerial image, comprising: the aerial image of oilfield well site is preprocessed, and the oilfield well site survey position and main traffic road are marked out;The available area in the aerial image marked is segmented by SAM algorithm;In available area, the negative sample points needing to be rejected are marked, and the oilfield well site empty area is extracted;The oilfield well site empty area is binarized, and the preset safety distance threshold under the world coordinate system is converted into pixel distance under pixel coordinate system according to homography matrix, called preset safety pixel distance;For binarized image, aerial oilfield well site image is centered on survey, road, building and important facility, and the preset safety pixel distance is inflated as radius to obtain the final available area;Photovoltaic panel area is converted into pixel size, and photovoltaic panel area is arranged in the final available area according to pixel size.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic development technology in oilfield well sites, specifically to a method for predicting the installed capacity of photovoltaic power generation in oilfield well sites based on aerial images. Background Technology

[0002] In the process of developing photovoltaics at oilfield well sites, in order to facilitate overall planning and the design of specific schemes, the photovoltaic development potential of the oilfield well site is usually assessed first. This mainly involves assessing the area and capacity of photovoltaic development in the region.

[0003] Currently, the assessment of a region's photovoltaic development potential is mainly done through manual measurement. However, this method is time-consuming and labor-intensive, prone to omissions, and cannot take into account the actual situation inside the oilfield well site as a whole, making it difficult to guarantee the accuracy of the assessment. Summary of the Invention

[0004] In view of this, the present invention provides a method for predicting photovoltaic installed capacity in oilfield well sites based on aerial images, which at least solves the problem that manual measurement is difficult in the existing technology due to the irregularity of open areas.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A method for predicting photovoltaic installed capacity at oilfield well sites based on aerial imagery includes the following steps:

[0007] S1. Preprocess the aerial images of the oilfield well sites and mark the exploration locations and main transportation routes of the oilfield well sites;

[0008] S2. The usable areas in the labeled aerial images are segmented using the SAM algorithm;

[0009] S3. Mark the negative sample points that need to be removed within the available area to extract the empty areas of the oilfield well site;

[0010] S4. Binarize the empty area of ​​the oilfield well site to obtain a binarized image. Based on the homography matrix, convert the preset safe distance threshold in the world coordinate system into the pixel distance in the pixel coordinate system, which is called the preset safe pixel distance.

[0011] S5. For the binarized image, expand the area centered on the geological exploration, roads, buildings and important facilities in the aerial oilfield well site image, with a preset safe pixel distance as the radius, to obtain the final usable area;

[0012] S6. Convert the photovoltaic panel area into pixel size, and arrange the photovoltaic panel area in the final usable area according to the pixel size.

[0013] Preferably, in S2, before segmenting the usable area in the labeled aerial image using the SAM algorithm, the labeled aerial image is normalized and resized:

[0014] (1) For the colored aerial images after annotation, the longest side of the aerial images after annotation is scaled while maintaining the aspect ratio of the images;

[0015] (2) Color normalization is performed by subtracting the mean from each pixel and dividing by the standard deviation;

[0016] (3) Fill the normalized images to ensure that all images have the same dimensions.

[0017] Preferably, the specific content of S2 includes:

[0018] S21. The image is processed by Patch Embedding with a kernel size of 16*16 and a stride of 16 in the image encoder. The output dimension is 768, resulting in 64*64 768-dimensional vector tokens. The tokens are then encoded with position and input into the Transformer block of the image encoder for processing to obtain a high-dimensional image embedding containing rich semantic information and detailed features of the image. The high-dimensional image embedding is then subjected to dimensionality reduction and channel adjustment to obtain a low-dimensional image embedding.

[0019] S22. Adjust the segmentation task of the SAM model by providing cue coordinates to the SAM, including point coordinates and box coordinates;

[0020] S23. Combine the token and the prompt coordinate mask information as tokens and send them to the mask decoder. Perform self-attention processing. Use the tokens that have undergone self-attention processing as a query. Combine them with the key and value of the low-dimensional image embedding to perform a token-to-image attention operation. Then pass them through a multilayer perceptron (MLP) layer to generate new feature representations. The generated new feature representations are then used as keys and values. The low-dimensional image embedding is used as a query, and the image-to-token attention operation is performed again.

[0021] S24. Repeat S23 using the output of S23 as the new input;

[0022] S25. The output of the final image-to-token attention operation is passed through two transposed convolution operations to obtain the transposed convolution result, mapping the features back to the original image size; the output of the final MLP layer is used as a query to perform a token-to-image attention operation, generating two output streams, including: an IoU output token and a mask output token. The IoU output token is passed through an MLP layer and used to predict the Intersection over Union (IoU) between each predicted mask and the ground mask; the mask output token is passed through four MLP layers to obtain a tensor.

[0023] S26. Perform a dot product operation on each mask on the tensor and transpose convolution result to obtain the prediction mask masklogits, adjust the prediction mask size to a higher resolution, remove any padding that may have been added during the processing, and obtain the final prediction mask.

[0024] S27. Scale the final predicted mask back to the size of the original image proportionally to maintain its relative position and scale with the original image;

[0025] S28. Binarize the final prediction mask, select a threshold based on the logits value, mark pixels with values ​​greater than the threshold as object 1, and pixels with values ​​less than the threshold as background 0, thereby generating a binary final prediction mask; segment the usable region based on the binarized final prediction mask, and finally each mask corresponds to a predicted intersection-union ratio (IoU) value for evaluation.

[0026] Preferably, the specific content of S3 includes:

[0027] The image is processed again by inputting a selection area and a negative label, where the area selection is based on box coordinates and point coordinates, and an icon is set as the negative label.

[0028] Preferably, the specific steps for obtaining the homography matrix include:

[0029] (1) Determine the image size and the pixel coordinates and world coordinates of four feature points in the image;

[0030] (2) The relationship between pixel coordinates and world coordinates is fitted using a homography matrix, expressed as:

[0031]

[0032] Let H be a 3x3 matrix, represented as:

[0033]

[0034] Where h9 = 1;

[0035] (3) Solve for H using direct linear transformation. Substitute H into the homography matrix and expand it. Divide the first two rows by the third row to obtain:

[0036] -h1x-h2y-h3+(h7x+h8y+h9)u=0

[0037] -h4x-h5y-h6+(h7x+h8y+h9)v=0

[0038] After sorting, we get:

[0039] Ah = 0

[0040] in,

[0041]

[0042] h=[h1 h2 h3 h4 h5 h6 h7 h8 h9]

[0043] Matrix A is obtained from the four provided feature points;

[0044] (4) Perform singular value decomposition on the coefficient matrix A to obtain A = UDV T The decomposition is given by the matrix, where U and V are orthogonal matrices and D is a diagonal matrix; the eigenvectors corresponding to the last column of matrix V are selected, and the selected eigenvectors correspond to the smallest singular values; the selected eigenvectors are rearranged into a 3*3 matrix form to obtain the homography matrix H.

[0045] (5) Normalize the homography matrix H to obtain the final homography matrix.

[0046] Preferably, the specific content of S5 includes:

[0047] In the binarized image obtained in S4, the inverted binarization method is used, with the threshold set to 1. Pixels greater than the threshold are set to black (0), and pixels less than the threshold are set to white (255), thus inverting the black and white colors of the image.

[0048] Define a preset safe pixel distance as the dilation kernel, and perform dilation operation on the binary image;

[0049] The image is inverted, turning black areas white and white areas black, resulting in an image after safe distance dilation.

[0050] Preferably, the arrangement principle for arranging the photovoltaic panel area within the final usable area according to the pixel size in S6 is as follows:

[0051] Only the white area is compared;

[0052] The white area must be large enough to completely contain a rectangle;

[0053] When comparing the specified rectangles, there should be no black areas within the rectangles;

[0054] The rectangles being compared cannot overlap.

[0055] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method for predicting the photovoltaic installed capacity of oilfield well sites based on aerial images, which has the following beneficial effects:

[0056] This invention presents a method for predicting photovoltaic installed capacity in oilfield well sites based on aerial imagery. It utilizes the SAM algorithm to segment and extract open areas in oilfield well sites, addressing the challenge of manual measurement due to the irregularity of these areas. By introducing coordinate transformation and morphological processing techniques, safe distances are reserved in the extracted open areas, ensuring the normal and safe operation of oilfield facilities and resolving the difficulty of traditional measurement methods in considering actual internal conditions for comprehensive land use planning. Automatic planning and prediction based on available areas significantly reduces time and labor costs, promoting the intelligent and digital development of oilfield systems. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a flowchart of a method for predicting photovoltaic installed capacity in oilfield well sites based on aerial images, as disclosed in this invention.

[0059] Figure 2 This is an example diagram with annotations obtained in S1 of the present invention;

[0060] Figure 3 This is an example diagram of the segmented usable area obtained in S2 of the present invention;

[0061] Figure 4 This is an example diagram of the open area of ​​the oilfield well site obtained in S3 of the present invention;

[0062] Figure 5 This is an example image of the binarized image obtained in S4 of the present invention;

[0063] Figure 6 A diagram illustrating the principle of corrosion expansion in morphological processing;

[0064] Figure 7This is an example image of the dilated image obtained in S5 of the present invention;

[0065] Figure 8 The well site photovoltaic installation capacity prediction and planning diagram provided by this invention;

[0066] Figure 9 This is an example diagram of the feature points of the coordinate transformation disclosed in this invention;

[0067] Figure 10 This is an example diagram of the empty area and negative sample annotation of the oilfield well site in S3 provided in the embodiments of the present invention;

[0068] Figure 11 This is an example diagram of mask 1 and evaluation value provided in an embodiment of the present invention;

[0069] Figure 12 This is an example diagram of mask 2 and evaluation value provided in an embodiment of the present invention;

[0070] Figure 13 This is an example diagram of mask 3 and evaluation value provided in an embodiment of the present invention;

[0071] Figure 14 This is an example diagram of the selected area and negative label provided in the embodiments of the present invention;

[0072] Figure 15 This is an example diagram of the final segmentation result provided in an embodiment of the present invention;

[0073] Figure 16 This is an example image of image binarization provided in an embodiment of the present invention;

[0074] Figure 17 This is an example diagram of the expanded portion provided in an embodiment of the present invention;

[0075] Figure 18 This is an example diagram of the arrangement result provided in an embodiment of the present invention. Detailed Implementation

[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0077] This invention provides a method for predicting the photovoltaic installed capacity of oilfield well sites based on aerial imagery, such as... Figure 1 As shown, it includes the following steps:

[0078] S1. Preprocess the aerial images of the oilfield well sites, marking the exploration locations and main transportation routes; such as... Figure 2 As shown;

[0079] S2. The usable regions in the labeled aerial images are segmented using the SAM algorithm; such as... Figure 3 As shown;

[0080] S3. Mark the negative sample points that need to be removed within the usable area to extract the empty areas of the oilfield well site; such as Figure 4 As shown;

[0081] S4. Binarize the open area of ​​the oilfield well site to obtain a binary image. Based on the homography matrix, convert the preset safe distance threshold in the world coordinate system to the pixel distance in the pixel coordinate system; this is called the preset safe pixel distance. Figure 5 As shown;

[0082] S5. For the binarized image, dilation is performed using the geological exploration, roads, buildings, and important facilities in the aerial oilfield well site image as the center, with a preset safe pixel distance as the radius, to obtain the final usable area; the dilation principle is illustrated in the diagram below. Figure 6 As shown, the final usable area obtained after expansion is as follows: Figure 7 As shown;

[0083] S6. Convert the photovoltaic panel area to pixel size, and arrange the photovoltaic panel areas within the final usable area according to the pixel size. The arrangement result is shown in the diagram below. Figure 8 As shown.

[0084] To further implement the above technical solution, in S2, before segmenting the usable area in the labeled aerial image using the SAM algorithm, the labeled aerial image is normalized and resized:

[0085] (1) For the colored aerial images after annotation, the longest side of the aerial images after annotation is scaled while maintaining the aspect ratio of the images;

[0086] (2) Color normalization is performed by subtracting the mean from each pixel and dividing by the standard deviation;

[0087] (3) Fill the normalized images to ensure that all images have the same dimensions.

[0088] To further implement the above technical solution, the specific content of S2 includes:

[0089] S21. The image is processed by Patch Embedding with a kernel size of 16*16 and a stride of 16 in the image encoder. The output dimension is 768, resulting in 64*64 768-dimensional vector tokens. The tokens are then encoded with position and input into the Transformer block of the image encoder for processing to obtain a high-dimensional image embedding containing rich semantic information and detailed features of the image. The high-dimensional image embedding is then subjected to dimensionality reduction and channel adjustment to obtain a low-dimensional image embedding.

[0090] S22. Adjust the segmentation task of the SAM model by providing cue coordinates to the SAM, including point coordinates and box coordinates;

[0091] S23. Combine the token and the prompt coordinate mask information as tokens and send them to the mask decoder. Perform self-attention processing. Use the tokens that have undergone self-attention processing as a query. Combine them with the key and value of the low-dimensional image embedding to perform a token-to-image attention operation. Then pass them through a multilayer perceptron (MLP) layer to generate new feature representations. The generated new feature representations are then used as keys and values. The low-dimensional image embedding is used as a query, and the image-to-token attention operation is performed again.

[0092] S24. Repeat S23 using the output of S23 as the new input;

[0093] S25. The output of the final image-to-token attention operation is passed through two transposed convolution operations to obtain the transposed convolution result, mapping the features back to the original image size; the output of the final MLP layer is used as a query to perform a token-to-image attention operation, generating two output streams, including: an IoU output token and a mask output token. The IoU output token is passed through an MLP layer and used to predict the Intersection over Union (IoU) between each predicted mask and the ground mask; the mask output token is passed through four MLP layers to obtain a tensor.

[0094] S26. Perform a dot product operation on each mask on the tensor and transpose convolution result to obtain the prediction mask masklogits, adjust the prediction mask size to a higher resolution, remove any padding that may have been added during the processing, and obtain the final prediction mask.

[0095] S27. Scale the final predicted mask back to the size of the original image proportionally to maintain its relative position and scale with the original image.

[0096] S28. Binarize the final prediction mask, select a threshold based on the logits value, mark pixels with values ​​greater than the threshold as object 1, and pixels with values ​​less than the threshold as background 0, thereby generating a binary final prediction mask; segment the usable region based on the binarized final prediction mask, and finally each mask corresponds to a predicted intersection-union ratio (IoU) value for evaluation.

[0097] It should be noted that:

[0098] In this embodiment, taking a 534x800 pixel color image as an example, the longest side of the image is first scaled to 1024 pixels while maintaining the aspect ratio. Next, color normalization is performed. By subtracting the mean from each pixel and dividing by the standard deviation, color normalization aims to unify the color range of different images, reduce the impact of lighting conditions and device differences on model training, thereby improving the model's generalization ability and accelerating training speed. Finally, padding is applied to ensure that all images have the same dimensions, i.e., 1024*1024.

[0099] After the image has been normalized and resized, the image encoder begins its work. The image encoder used is Vision Transformer (ViT).

[0100] At this stage, a specially designed convolutional layer segments the image into small patches and converts each patch into a depth feature vector. Specifically, Patch Embedding uses a 2D convolution with a kernel size of 16*16, a stride of 16, and an output dimension of 768, resulting in 64*64 768-dimensional vectors (tokens). Then, positional encoding is added. Positional encoding provides the model with the location information of each pixel or patch in the image, enabling the model to understand the spatial arrangement of objects in the image.

[0101] These vectors are then processed using 12 Transformer blocks to obtain a high-dimensional image embedding that contains rich semantic information and detailed features of the image. This embedding is then subjected to dimensionality reduction and channel adjustment for subsequent segmentation tasks.

[0102] The encoder is prompted to adjust the segmentation task of the SAM model.

[0103] like Figure 10 As shown, the coordinates given to SAM are: point coordinates are (360, 276). Points have positive and negative labels. Here, the green pentagram represents a positive label.

[0104] Tokens are fed into the mask decoder and undergo self-attention processing. The self-attention mechanism teaches the model to find and amplify important relationships within the tokens. Next, these self-attention-processed tokens are used as queries, combined with the key and value of the image embedding for token-to-image attention. This step aims to combine the information processed by the cue words with the rich contextual information of the original image, thereby introducing visual information into the decoding process.

[0105] The results are then passed through a multilayer perceptron (MLP) layer to generate new feature representations. These feature representations are subsequently used as keys and values, with the image embeddings used as queries, to perform another round of image-to-token attention, further refining the model's understanding of the images.

[0106] The above process constitutes the first part of the mask decoder. The second part uses the same structure to further enhance feature representation.

[0107] In the model's output stage, there are two branches. One branch increases the dimensions from 256×64×64 to 32×256×256 through two transposed convolution operations to map the features back to the original image dimensions. The other branch uses the output of the previous MLP as a query to perform a token-to-image attention operation, generating two output streams: one is an IoU output token (1×256), which, after passing through an MLP layer, can predict the Intersection over Union (IoU) between each predicted mask and the ground truth mask; the other output is the output token for each mask (4×256), which, after passing through four MLP layers, yields a tensor of (1+3)×32.

[0108] Finally, this (1+3)×32 tensor is used to perform a dot product per mask operation with the previous 32×256×256 result, resulting in a final predicted mask (mask logits) of (1+3)×256×256. These logits need to be resized to a higher resolution, namely 3×1024×1024. Next, any padding that may have been added during processing is removed to ensure that the mask is tightly aligned with the boundaries of the original image.

[0109] Then, these masks are scaled back to the original image size (e.g., 3×534×800) to maintain their relative position and scale. Once the mask logits corresponding to the original image size are obtained, the next step is binarization. This process converts the logits into sharp binary masks, where 1 represents the object's location and 0 represents the background. In this way, the object of interest can be clearly separated from its surroundings, and each mask ultimately corresponds to a predicted Intersection over Union (IoU) value for evaluation. The masks 1-3 and their corresponding evaluation values ​​obtained after the above processing of the oil well image are shown below. Figures 11-13 As shown.

[0110] To further implement the above technical solution, the specific content of S3 includes:

[0111] The image is processed again by inputting a selection area and a negative label, where the area selection is based on box coordinates and point coordinates, and an icon is set as the negative label.

[0112] It should be noted that,

[0113] In this embodiment, the box is (119, 37, 928, 590) (the coordinates of two points, the top left and bottom right); the point coordinates are (721, 352). Here, the red pentagram represents a negative label, such as... Figure 14 As shown, the final segmentation result is as follows: Figure 15 As shown, for ease of processing, the image is binarized as follows: Figure 16 As shown.

[0114] To further implement the above technical solution, the specific details of obtaining the homography matrix include:

[0115] (1) Determine the image size and the pixel coordinates and world coordinates of four feature points in the image, such as... Figure 9 As shown;

[0116] (2) The relationship between pixel coordinates and world coordinates is fitted using a homography matrix, expressed as:

[0117]

[0118] Let H be a 3x3 matrix, represented as:

[0119]

[0120] Where h9 = 1;

[0121] (3) Solve for H using direct linear transformation. Substitute H into the homography matrix and expand it. Divide the first two rows by the third row to obtain:

[0122] -h1x-h2y-h3+(h7x+h8y+h9)u=0

[0123] -h4x-h5y-h6+(h7x+h8y+h9)v=0

[0124] After sorting, we get:

[0125] Ah = 0

[0126] in,

[0127]

[0128] h=[h1 h2 h3 h4 h5 h6 h7 h8 h9]

[0129] Matrix A is obtained from the four provided feature points;

[0130] (4) Perform singular value decomposition on the coefficient matrix A to obtain A = UDV T The decomposition is given by the matrix, where U and V are orthogonal matrices and D is a diagonal matrix; the eigenvectors corresponding to the last column of matrix V are selected, and the selected eigenvectors correspond to the smallest singular values; the selected eigenvectors are rearranged into a 3*3 matrix form to obtain the homography matrix H.

[0131] (5) Normalize the homography matrix H to obtain the final homography matrix.

[0132] It should be noted that:

[0133] In this embodiment, the image size is set to 960*720, and the pixel coordinates corresponding to the four feature points are P1(92, 29), P2(99, 462), P3(714, 453), and P4(703, 17). With P1 as the origin, the world coordinates of the true distance (in meters) corresponding to the feature points are: P1(0, 0, 0), P2(78.731, 0, 0), P3(78.731, 111.238, 0), and P4(0, 111.238, 0).

[0134] Based on the method described above, we can conclude that:

[0135]

[0136]

[0137]

[0138] To further implement the above technical solution, the specific content of S5 includes:

[0139] In the binarized image obtained in S4, the inverted binarization method is used, with the threshold set to 1. Pixels greater than the threshold are set to black (0), and pixels less than the threshold are set to white (255), thus inverting the black and white colors of the image.

[0140] Define a preset safe pixel distance as the dilation kernel, and perform dilation operation on the binary image;

[0141] The image is inverted, turning black areas white and white areas black, resulting in an image after safe distance dilation.

[0142] It should be noted that:

[0143] The example diagram after expansion in this embodiment is shown below. Figure 17 As shown.

[0144] To further implement the above technical solution, the arrangement principle of photovoltaic panel area in the final usable area according to pixel size in S6 is as follows:

[0145] Only the white area is compared;

[0146] The white area must be large enough to completely contain a rectangle;

[0147] When comparing the specified rectangles, there should be no black areas within the rectangles;

[0148] The rectangles being compared cannot overlap.

[0149] It should be noted that:

[0150] After processing the image, we have obtained the area available for installing photovoltaic panels. Next, we need to predict the installation capacity of this available area. We first assume the installation area of ​​a photovoltaic panel and then compare it to the available area. If there are already installed photovoltaic panels in the field, the length is set according to the smallest area of ​​the photovoltaic panel. There is an installation spacing between the photovoltaic panels; in this embodiment, the spacing is set to 3 meters. Due to the top-down view, the width of the photovoltaic panel itself is set to 3.5 meters based on the width in the image. Using this as a standard, we set the length and width of a photovoltaic panel. Following the above principles, we place rectangles in the same direction as the already installed photovoltaic panels in the image for comparison. Taking the dimensions of photovoltaic panels already installed in an oilfield well site as an example, the length of the rectangle is set to 0.992 * 7 = 6.944 meters. With a 3-meter spacing, the length is set to 9.944 meters, and the width is 6.5 meters. These dimensions are converted to pixel distances and compared in the processed image. The results are then displayed in the original image as shown below. Figure 18 As shown, the well site is predicted to be able to install 22 photovoltaic panels. Assuming each panel is 330W, the total photovoltaic installed capacity of this well site is 203.28kW.

[0151] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for predicting photovoltaic installed capacity at oilfield well sites based on aerial imagery, characterized in that, Includes the following steps: S1. Preprocess the aerial images of the oilfield well sites and mark the exploration locations and main transportation routes of the oilfield well sites; S2. The usable regions in the labeled aerial images are segmented using the SAM algorithm; the specific content of S2 includes: S21. The image is processed by Patch Embedding with a kernel size of 16*16 and a stride of 16 in the image encoder. The output dimension is 768, resulting in 64*64 768-dimensional vector tokens. The tokens are then encoded with position and input into the Transformer block of the image encoder for processing to obtain a high-dimensional image embedding containing rich semantic information and detailed features of the image. The high-dimensional image embedding is then subjected to dimensionality reduction and channel adjustment to obtain a low-dimensional image embedding. S22. Adjust the segmentation task of the SAM model by providing cue coordinates to the SAM, including point coordinates and box coordinates; S23. Combine the token and the prompt coordinate mask information as tokens and send them to the mask decoder. Perform self-attention processing. Use the tokens that have undergone self-attention processing as a query. Combine them with the key and value of the low-dimensional image embedding to perform a token-to-image attention operation. Then pass them through a multilayer perceptron (MLP) layer to generate new feature representations. The generated new feature representations are then used as keys and values. The low-dimensional image embedding is used as a query, and the image-to-token attention operation is performed again. S24. Repeat S23 using the output of S23 as the new input; S25. The output of the final image-to-token attention operation is passed through two transposed convolution operations to obtain the transposed convolution result, mapping the features back to the original image size; the output of the final MLP layer is used as a query to perform the token-to-image attention operation, generating two output streams, including: IoU output token and mask output token. The IoU output token is passed through an MLP layer and used to predict the Intersection over Union (IoU) between each predicted mask and the real mask; the mask output token is passed through four MLP layers to obtain a tensor. S26. Perform a dot product operation on each mask by convolving the tensor with the transpose to obtain the prediction mask logits, adjust the prediction mask size to a higher resolution, remove any padding that may have been added during the processing, and obtain the final prediction mask. S27. Scale the final predicted mask back to the size of the original image proportionally to maintain its relative position and scale with the original image. S28. Binarize the final prediction mask, select a threshold based on the logits value, mark pixels with values ​​greater than the threshold as object 1, and pixels with values ​​less than the threshold as background 0, thereby generating a binary final prediction mask; segment the usable region based on the binarized final prediction mask, and finally each mask corresponds to a predicted intersection-union ratio (IoU) value for evaluation. S3. Mark the negative sample points that need to be removed within the available area to extract the empty areas of the oilfield well site; S4. Binarize the empty area of ​​the oilfield well site to obtain a binarized image. Based on the homography matrix, convert the preset safe distance threshold in the world coordinate system into the pixel distance in the pixel coordinate system, which is called the preset safe pixel distance. S5. For the binarized image, expand the area centered on the geological exploration, roads, buildings and important facilities in the aerial oilfield well site image, with a preset safe pixel distance as the radius, to obtain the final usable area; S6. Convert the photovoltaic panel area into pixel size, and arrange the photovoltaic panel area in the final usable area according to the pixel size.

2. The method for predicting photovoltaic installed capacity in oilfield well sites based on aerial imagery according to claim 1, characterized in that, In S2, before segmenting the usable areas in the labeled aerial images using the SAM algorithm, the labeled aerial images are normalized and resized: (1) For the colored aerial images after annotation, the longest side of the aerial images after annotation is scaled in a way that maintains the aspect ratio of the images; (2) Color normalization is performed by subtracting the mean from each pixel and dividing by the standard deviation; (3) Fill the normalized images to ensure that all images have the same dimensions.

3. The method for predicting photovoltaic installed capacity of oilfield well sites based on aerial imagery according to claim 1, characterized in that, The specific content of S3 includes: The image is processed again by inputting a selection area and a negative label, where the area selection is based on box coordinates and point coordinates, and an icon is set as the negative label.

4. The method for predicting photovoltaic installed capacity of oilfield well sites based on aerial images according to claim 1, characterized in that, The specific steps for obtaining the homography matrix include: (1) Determine the image size and the pixel coordinates and world coordinates of the four feature points in the image; (2) The relationship between pixel coordinates and world coordinates is fitted using the homography matrix, expressed as: ; Let H be a 3x3 matrix, represented as: ; in, ; (3) Solve for H using direct linear transformation. Substitute H into the homography matrix and expand it. Divide the first two rows by the third row to obtain: ; After sorting, we get: ; in, ; Matrix A is obtained from the four provided feature points; (4) Perform singular value decomposition on the coefficient matrix A to obtain The decomposition is given by the matrix, where U and V are orthogonal matrices and D is a diagonal matrix; the eigenvectors corresponding to the last column of matrix V are selected, and the selected eigenvectors correspond to the smallest singular values; the selected eigenvectors are rearranged into a 3*3 matrix form to obtain the homography matrix H. (5) Normalize the homography matrix H to obtain the final homography matrix.

5. The method for predicting photovoltaic installed capacity of oilfield well sites based on aerial imagery according to claim 1, characterized in that, The specific content of S5 includes: In the binarized image obtained in S4, the inverted binarization method is used, with the threshold set to 1. Pixels greater than the threshold are set to black (0), and pixels less than the threshold are set to white (255), thus inverting the black and white colors of the image. Define a preset safe pixel distance as the dilation kernel, and perform dilation operation on the binary image; The image is inverted, turning black areas white and white areas black, resulting in an image after safe distance dilation.

6. The method for predicting photovoltaic installed capacity of oilfield well sites based on aerial images according to claim 1, characterized in that, In S6, the principle for arranging the photovoltaic panel area within the final usable area based on pixel size is as follows: Only the white area is compared; The white area must be large enough to completely contain a rectangle; When comparing the specified rectangles, there should be no black areas within the rectangles; The rectangles being compared cannot overlap.

Citation Information

Patent Citations

  • County photovoltaic developed area calculation method and device

    CN116563364A