A household roof photovoltaic panel segmentation method based on joint task learning

Through the joint task learning method, a semantic segmentation and edge detection network is constructed. Combined with the gated fusion, scale adaptation and position guidance modules, the problems of edge information loss and adhesion in the segmentation of household rooftop photovoltaic panels are solved, and the recognition and segmentation accuracy of photovoltaic panels are improved.

CN120279272BActive Publication Date: 2025-10-21GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510428421.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-10-21
Estimated Expiration
2045-04-08

AI Technical Summary

Technical Problem

Existing deep learning-based photovoltaic segmentation methods suffer from edge information loss and photovoltaic panel adhesion problems in household rooftop photovoltaic systems, resulting in inaccurate segmentation results.

Method used

A joint task learning-based method is adopted to construct a segmentation model consisting of a semantic segmentation network and an edge detection network. A gated fusion module, a scale adaptation module, and a position guidance module are introduced to improve the recognition ability and edge detection accuracy of photovoltaic panels through collaborative work.

Benefits of technology

The accuracy of household rooftop photovoltaic segmentation is improved, the recognition ability of small photovoltaic panels is enhanced, the adhesion of densely installed photovoltaic panels is suppressed, and the edge fineness and stability of the segmentation results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279272B_ABST
    Figure CN120279272B_ABST
Patent Text Reader

Abstract

The application provides a kind of based on joint task learning's family roof photovoltaic panel segmentation method, including constructing data set;Photovoltaic panel segmentation model based on semantic segmentation network and edge detection network is constructed and trained;Photovoltaic panel is segmented and edge detection using the trained photovoltaic panel segmentation model.The application effectively fuses multi-layer features by introducing a gating fusion module, enhancing the recognition ability of small photovoltaic panels;Edge detection network extracts photovoltaic panel edge features, guides semantic segmentation network to generate more accurate edge segmentation results, improves the problem of fuzzy and not fine in segmentation results, through the cooperative work of two networks, improves the accuracy of family roof photovoltaic segmentation;Position guiding module uses channel and spatial attention mechanism to obtain photovoltaic panel positioning information, suppresses other object edge interference, realizes the bidirectional information flow of segmentation branch and edge detection branch, improves the overall accuracy of photovoltaic panel segmentation and edge detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and image segmentation, and in particular to a method for segmenting household rooftop photovoltaic panels based on joint task learning. Background Art

[0002] Among numerous renewable energy sources, distributed solar photovoltaic (PV) systems have attracted widespread attention due to their low investment costs and lack of competition with agricultural land. However, balancing supply and demand becomes a key challenge when connecting distributed PV systems to the grid. Accurate information on the deployment of distributed PV systems, including their installation area and spatial distribution, is fundamental to addressing this issue. Combining this information with meteorological data allows for the prediction of PV power generation, enabling proactive grid management and maintaining a balance between supply and demand. Furthermore, this information can be used to estimate the installed capacity of existing distributed PV systems, enabling authorities to more effectively plan PV development based on regional electricity consumption and existing capacity, thereby reducing the occurrence of curtailed solar power.

[0003] The development of remote sensing technology has made it possible to obtain distributed photovoltaic system deployment information. Early studies used manually designed features and machine learning classifiers (such as random forests) to extract photovoltaic deployment information from remote sensing images. However, these methods are generally difficult to generalize across different scenarios. In contrast, photovoltaic segmentation methods based on deep learning have become the preferred method. These methods use convolutional neural networks (CNNs), such as MobileNet and ResNet, to automatically learn multi-level photovoltaic-related features and use them for photovoltaic segmentation through fully convolutional networks with encoder-decoder architectures (such as UNet and DeeplabV3+). In order to achieve high segmentation accuracy, researchers introduced an attention mechanism to improve the reliability of features. At the same time, due to the application of transfer learning technology, these methods maintain strong generalization capabilities in different scenarios, and have been widely used in the field of photovoltaic segmentation.

[0004] Despite significant progress in photovoltaic (PV) segmentation using deep learning, existing deep learning-based PV segmentation methods still face challenges in detection accuracy. This is primarily due to inherent limitations in the network architecture, the small size of household rooftop PV systems, and the tendency for densely installed PV panels to cling together. To accurately locate PV systems in images, convolutional neural networks (CNNs) typically perform extensive downsampling operations during feature extraction to efficiently generate feature maps with large receptive fields and capture global correlations. However, these downsampling operations can lead to a significant loss of edge information, resulting in a mismatch between segmentation results and true edges. This problem is particularly prominent in household rooftop PV systems, as they are smaller than large industrial and commercial installations. Furthermore, the tendency for densely installed PV panels to cling together also significantly impacts detection. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention provides a household rooftop photovoltaic panel segmentation method based on joint task learning. The present invention adopts a segmentation model composed of a semantic segmentation network and an edge detection network, and introduces a gated fusion module to effectively fuse multi-layer features and enhance the recognition ability of small photovoltaic panels. The edge detection network extracts the edge features of the photovoltaic panels and guides the semantic segmentation network to generate more accurate edge segmentation results, thereby improving the edge blur and imprecision problems in the segmentation results. Through the collaborative work of the two networks, the accuracy of household rooftop photovoltaic segmentation is improved.

[0006] The technical solution of the present invention is: a household rooftop photovoltaic panel segmentation method based on joint task learning, comprising the following steps:

[0007] S1), building a manually labeled distributed household rooftop photovoltaic power station dataset;

[0008] S2) Constructing a photovoltaic panel segmentation model based on a semantic segmentation network and an edge detection network, extracting semantic features of the photovoltaic panel through the semantic segmentation network; extracting edge features of the photovoltaic panel through the edge detection network, and guiding the semantic segmentation network to generate fine edge segmentation results;

[0009] S3) Pre-training the photovoltaic panel segmentation model; obtaining the semantic segmentation loss function and the edge detection loss function and then weighting the sum total loss function; optimizing the photovoltaic panel segmentation model parameters through back propagation;

[0010] S4) Use the trained photovoltaic panel segmentation model to segment and detect edges of the photovoltaic panel high-resolution remote sensing image.

[0011] Preferably, in step S2), the semantic segmentation network includes an encoder-decoder based on UNet; the semantic segmentation network introduces a gated fusion module to control the transmission of valuable information and effectively fuse multi-layer features; the encoder adopts an Efficientnet-B1 structure encoder; the high-level semantic features of the photovoltaic panel image are extracted through the EfficientNet-B1 structure encoder; the decoder restores the image size by gradually upsampling low-resolution features; during the upsampling process, the corresponding features of the encoder and decoder are spliced ​​through jump connections.

[0012] Preferably, in step S2), the encoder of the Efficientnet-B1 structure includes multiple MBConv modules; in the MBConv module, 1×1 convolution is first used to change the number of channels of the input feature, and then depth-separable convolution is performed; and the channel attention mechanism of SENet is introduced, and finally 1×1 convolution is used to reduce the number of channels of the feature map.

[0013] Preferably, in step S2), the input of the gated fusion module is composed of features from the i-th layer and features from the adjacent i+1-th layer. The input features are fed into a 1×1 convolutional layer, and then the gated features G are obtained by the Sigmoid function. i ; In this way, the usefulness of the input feature space position is judged; during the photovoltaic panel segmentation model training and actual segmentation, the gated fusion module controls the transmission of multi-layer features according to the gated features.

[0014] Preferably, in step S2), the edge detection network includes multiple scale-adaptive modules, which first expand the receptive field range of the input feature through two convolution operations; then, two feature maps with different receptive field ranges are spliced ​​along the channel dimension; then, a global pooling operation is applied to generate a vector S containing channel statistical information; the channel information of features from different receptive fields in the vector S interacts through a fully connected layer to generate a feature vector Z; the feature vector Z is transformed by using a fully connected layer, and the result is normalized using a softmax function to obtain channel weight matrices W1 and W2; finally, by performing element-by-element multiplication of the normalized weight matrix with the corresponding feature map, adaptive selection and fusion of features from different receptive fields are achieved, thereby enhancing the model's ability to segment various photovoltaic panels.

[0015] Preferably, in step S2), the photovoltaic panel segmentation model also includes a position guidance module, which distinguishes the edge of the photovoltaic panel from the edge of similar objects by optimizing the combination of different channels and spatial attention mechanisms and the photovoltaic panel position guidance information obtained from the segmentation task; so that bidirectional information flow can be carried out between the segmentation branch and the edge detection branch, and the segmentation features guide the edge detection branch to focus on the edge of the photovoltaic panel, while the edge features provide feedback for the segmentation branch.

[0016] Preferably, in step S2), the position guidance module includes an SRM channel attention mechanism and a CBAM spatial attention mechanism. The SRM channel attention mechanism and the CBAM spatial attention mechanism are first used to obtain the photovoltaic panel's positioning information from the segmentation features. The positioning information is then multiplied with the edge feature. This allows the feature to focus on expressing the photovoltaic panel's edge while suppressing interference from the edges of other objects.

[0017] Preferably, in step S3), during the training process, the edge detection network and the semantic segmentation network are trained in parallel and share some feature extraction layers.

[0018] As a preference, in step S3), the total loss Loss totalThe expression is:

[0019] Loss total =Loss seg +Loss edge ;

[0020] Among them, Loss seg Represents the semantic segmentation loss function; Loss edge represents the edge detection loss function.

[0021] The beneficial effects of the present invention are:

[0022] 1. This paper constructs a photovoltaic panel segmentation model composed of a semantic segmentation network and an edge detection network. It also introduces a gated fusion module to effectively fuse multiple layers of features and enhance the recognition of small photovoltaic panels. The edge detection network extracts the edge features of the photovoltaic panel, guiding the semantic segmentation network to generate more accurate edge segmentation results, improving the edge blur and imprecision problems in the segmentation results. Through the collaborative work of the two networks, the accuracy of household rooftop photovoltaic segmentation is improved.

[0023] 2. To address the problems of small photovoltaic panels being difficult to identify and densely installed photovoltaic panels being prone to adhesion, the present invention designs a scale-adaptive module and a position-guiding module. The scale-adaptive module adaptively adjusts the receptive field according to the shape and size of household photovoltaic panels through operations such as expanding the receptive field, splicing feature maps, global pooling, fully connected layer processing, and weight calculation, thereby enhancing the ability to segment photovoltaic edges of different scales. The position-guiding module utilizes channel and spatial attention mechanisms to obtain photovoltaic panel positioning information, suppress interference from the edges of other objects, and achieve bidirectional information flow between the segmentation branch and the edge detection branch, thereby improving the overall accuracy of photovoltaic panel segmentation and edge detection.

[0024] 3. The present invention adopts a semantic segmentation network with an encoder-decoder structure and introduces a gated fusion module; during training and segmentation, this module intelligently controls the multi-layer feature transmission, retains useful information, suppresses useless information, avoids feature loss caused by upsampling, ensures that the original image features are fully involved in the calculation, and improves the accuracy and stability of segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Schematic diagram of the process of the present invention;

[0026] Figure 2 A structural framework diagram of the photovoltaic panel segmentation model constructed for the present invention;

[0027] Figure 3 Schematic diagram of the encoder-decoder structure of UNet of the present invention;

[0028] Figure 4This is a schematic diagram of the structure of the encoder of the EfficientNet-B1 structure of the present invention;

[0029] Figure 5 Schematic diagram of the structure of the gated fusion module of the present invention;

[0030] Figure 6 Schematic diagram of the structure of the scale adaptive module of the present invention;

[0031] Figure 7 It is a structural diagram of the position guidance module of the present invention. DETAILED DESCRIPTION

[0032] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0033] like Figure 1 As shown, this embodiment provides a household rooftop photovoltaic panel segmentation method based on joint task learning, including the following steps:

[0034] S1) Construct a manually annotated distributed household rooftop photovoltaic power station dataset; in this embodiment, the dataset shown contains images that can be used to train semantic segmentation and target detection algorithms as well as coordinate information of target boundaries.

[0035] S2) Constructing a photovoltaic panel segmentation model based on semantic segmentation network and edge detection network. The photovoltaic panel segmentation model constructed in this embodiment is as follows: Figure 2 As shown in the figure, the semantic features of the photovoltaic panel are extracted through the semantic segmentation network; the edge features of the photovoltaic panel are extracted through the edge detection network, and the semantic segmentation network is guided to generate fine edge segmentation results;

[0036] In this embodiment, Figure 3 As shown, the semantic segmentation network includes an encoder-decoder based on UNet; the semantic segmentation network introduces a gated fusion module to control the transmission of valuable information and effectively fuse multi-layer features; the encoder adopts the Efficientnet-B1 structure; the high-level semantic features of the photovoltaic panel image are extracted through the encoder of the EfficientNet-B1 structure; the decoder is mainly used to gradually upsample the low-resolution high-level features; the decoder restores the image size by gradually upsampling the low-resolution features; during the upsampling process, the corresponding features of the encoder and decoder are spliced ​​through jump connections.

[0037] like Figure 4As shown in the figure, the encoder of the Efficientnet-B1 structure includes multiple MBConv modules; in the MBConv module, 1×1 convolution is first used to change the number of channels of the input feature, followed by depth-wise separable convolution; and the channel attention mechanism of SENet is introduced, and finally 1×1 convolution is used to reduce the number of channels of the feature map.

[0038] In this embodiment, the encoder includes five encoding modules, corresponding to the structures of stages 0, 2, 3, 5, and 7 of the Efficientnet-B1 architecture. The input image size is 256×256×3, and the output image size is 8×8×320.

[0039] The decoded features represent the output features of the previous decoder module, while the encoded features represent the features passed to the corresponding decoder module via skip connections. First, the decoded features are upsampled twice and then concatenated with the encoded features along the channel dimension. The number of channels in the concatenated features is the sum of the number of channels in the two features. After concatenation and two layers of 3×3 convolutional layers, the output features of the decoder module are obtained. The output features of the current decoder module serve as the input decoded features of the next decoder module.

[0040] In this embodiment, Figure 5 As shown in Figure 2, the input of the gated fusion module consists of features from the i-th layer and features from the adjacent i+1-th layer. The input features are fed into a 1×1 convolutional layer, and then the gated features G are obtained through the Sigmoid function. i ; In this way, the usefulness of the input feature space position is judged; during the photovoltaic panel segmentation model training and actual segmentation, the gated fusion module controls the transmission of multi-layer features according to the gated features.

[0041] In this embodiment, due to the differences in feature size and number of channels, the gated fusion module first performs the gated fusion on the feature F of the i+1th layer. i+1 Perform two upsamplings; and take the feature F of the i+1th layer i+1 The number of channels in the i-th layer is converted to the feature F i The number of channels is the same; then the feature F i and F i+1 Input into the gate unit, the input feature is sent to a 1×1 convolution layer through the gate unit, and then the gate feature G is obtained through the Sigmoid function i ; The gated fusion module controls the transmission of multi-layer features according to the gated features. i+1 (x,y) is large and G i When (x,y) is small, F i+1 Towards F i Transfer F iMissing useful information, when G i+1 (x,y) is smaller or G i When (x,y) is large, useless information transmission is suppressed and information redundancy is reduced, that is:

[0042] F′ i =(1+G i )⊙F i +(1-G i )⊙G i+1 ⊙F i+1

[0043] Where, F i ′ is the output feature of the gated fusion module; ⊙ represents element-by-element multiplication, which refers to two tensors of the same shape, where the elements at corresponding positions are multiplied.

[0044] As preferred in this embodiment, Figure 2 As shown, the edge detection network includes multiple scale adaptive modules, such as Figure 6 As shown in the figure, the scale adaptation module first expands the receptive field range of the input feature through two convolution operations; then, the two feature maps with different receptive field ranges are spliced ​​along the channel dimension; then a global pooling operation is applied to generate a vector S containing channel statistical information; the channel information of features from different receptive fields in the vector S interacts through a fully connected layer to generate a feature vector Z; the feature vector Z is transformed by using a fully connected layer and the result is normalized using the softmax function to obtain channel weight matrices W1 and W2; finally, by performing element-by-element multiplication of the normalized weight matrix with the corresponding feature map, adaptive selection and fusion of features from different receptive fields are achieved, thereby enhancing the model's ability to segment various photovoltaic panels.

[0045] As preferred in this embodiment, Figure 7 As shown, the photovoltaic panel segmentation model also includes a position guidance module, which distinguishes the edges of photovoltaic panels from the edges of similar objects by optimizing the combination of different channels and spatial attention mechanisms and the photovoltaic panel position guidance information obtained from the segmentation task; it enables bidirectional information flow between the segmentation branch and the edge detection branch, and the segmentation features guide the edge detection branch to focus on the edges of the photovoltaic panels, while the edge features provide feedback for the segmentation branch.

[0046] In this embodiment, the position guidance module includes an SRM channel attention mechanism and a CBAM spatial attention mechanism. First, the SRM channel attention mechanism and the CBAM spatial attention mechanism are used to obtain the photovoltaic panel's location information from the segmentation features. This location information is then multiplied with the edge features. This allows the features to focus on representing the photovoltaic panel's edges while suppressing interference from the edges of other objects. This design not only helps the edge features accurately represent the semantic edges of the photovoltaic panel, but also allows the segmentation features to receive back-propagated gradients from the edge features. If the segmentation features fail to effectively distinguish the photovoltaic panel from other similar objects, resulting in incorrect positioning of the photovoltaic panel, these additional back-propagated gradients enhance the segmentation features' ability to correctly segment the photovoltaic panel despite interference from similar objects. The introduction of the position guidance module enables bidirectional information flow between the segmentation branch and the edge detection branch. The segmentation features guide the edge detection branch to focus on the photovoltaic panel's edges, while the edge features provide feedback to the segmentation branch to improve its ability to distinguish the photovoltaic panel from similar objects. This iterative optimization process helps improve the overall accuracy of photovoltaic panel segmentation and edge detection.

[0047] S3) Pre-training the photovoltaic panel segmentation model; obtaining the semantic segmentation loss function and the edge detection loss function and then weighting the sum total loss function; optimizing the photovoltaic panel segmentation model parameters through back propagation;

[0048] In this embodiment, during the training process, the edge detection network and the semantic segmentation network are trained in parallel and share some feature extraction layers.

[0049] The total loss Loss total The expression is:

[0050] Loss total =Loss seg +Loss edge ;

[0051] Among them, Loss seg Represents the semantic segmentation loss function; Loss edge represents the edge detection loss function.

[0052] Loss seg =Loss edge =0.25×BCE+0.75×Dice;

[0053]

[0054] Among them, g i represents the true label value of the i-th pixel, p i It represents the probability value predicted by the model that the i-th pixel belongs to the photovoltaic area.

[0055] For the learnable parameters θ of the model, the gradient g on the current batch data is calculated according to the formula of the total loss function t , g t Represents the gradient of the parameter θ at time t. First calculate the first-order moment estimate:

[0056] m t =β1m t-1 +(1-β1)g t ;

[0057] Among them, m t represents the first-order moment estimate of the gradient at time t, m t-1 represents the first-order moment estimate of the gradient at time t-1, and β1 represents the exponential decay rate of the first-order moment estimate.

[0058] Then calculate the second moment estimate:

[0059]

[0060] where v t represents the second-order moment estimate of the gradient at time t, v t-1 represents the second-order moment estimate of the gradient at time t-1, and β2 represents the exponential decay rate of the second-order moment estimate.

[0061] Recalculate bias correction

[0062]

[0063] in, represents the corrected first-order moment estimate, and t represents the current iteration time;

[0064]

[0065] in, represents the corrected second moment estimate.

[0066] Finally, the formula for optimizing the photovoltaic panel segmentation model parameters through back propagation is:

[0067]

[0068] Among them, α is the learning rate, ε=10 -8 ,θ t+1 represents the updated model parameters at time t+1, θ t It represents the model parameters at time t.

[0069] S4) Use the trained photovoltaic panel segmentation model to segment and detect edges of the photovoltaic panel high-resolution remote sensing image; the details are as follows:

[0070] S41), inputting the high-resolution remote sensing image into the semantic segmentation network, and extracting high-level semantic features through the encoder of the EfficientNet-B1 structure;

[0071] S42), the features are gated and fused to retain valuable information; the decoder gradually upsamples the low-resolution features, restores the image size, and splices the encoder and decoder features through jump connections;

[0072] S43) The output of the semantic segmentation network is used for edge detection tasks. The position guidance module uses the channel and spatial attention mechanism to obtain the photovoltaic panel positioning information from the segmentation features and multiply it with the edge features, so that the edge features focus on the edges of the photovoltaic panels and suppress interference from other objects.

[0073] S44) The edge detection network output is used to guide the semantic segmentation network to generate a more refined edge segmentation result; and the semantic segmentation and edge detection results are fused to output an image containing the photovoltaic panel position and edge information.

[0074] The above embodiments and descriptions are only for explaining the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, which shall fall within the scope of the invention to be protected.

Claims

1. A household rooftop photovoltaic panel segmentation method based on joint task learning, characterized by: The steps include: S1), building a manually labeled distributed household rooftop photovoltaic panel image dataset; S2), building a photovoltaic panel segmentation model based on semantic segmentation network and edge detection network, and extracting semantic features of photovoltaic panels through semantic segmentation network; The edge detection network is used to extract the edge features of the photovoltaic panel, and the semantic segmentation network is guided to generate fine edge segmentation results. The semantic segmentation network includes multiple gated fusion modules; the gated fusion module first performs a feature F on the i+1th layer. i+1 Perform two upsamplings; and take the feature F of the i+1th layer i+1 The number of channels in the i-th layer is converted to the feature F i The number of channels is the same; then the feature F i and F i+1 Input into the gate unit, the input feature is sent to a 1×1 convolution layer through the gate unit, and then the gate feature G is obtained through the Sigmoid function i ; The gated fusion module controls the transmission of multi-layer features according to the gated features. i+1 (x,y) is large and G i When (x,y) is small, F i+1 Towards F i Transfer F i Missing useful information, when G i+1 (x,y) is smaller or G i When (x,y) is large, useless information transmission is suppressed and information redundancy is reduced, that is: F′ i =(1+G i )⊙F i +(1-G i )⊙G i+1 ⊙F i+1 Where F′ i is the output feature of the gated fusion module; ⊙ represents element-by-element multiplication, which refers to the multiplication of elements in corresponding positions of two tensors of the same shape; The edge detection network includes multiple scale-adaptive modules, which first expand the receptive field range of the input feature through two convolution operations; then, two feature maps with different receptive field ranges are spliced ​​along the channel dimension; then, a global pooling operation is applied to generate a vector S containing channel statistical information; the channel information of features from different receptive fields in vector S interacts through a fully connected layer to generate a feature vector Z; the feature vector Z is transformed by using the fully connected layer and the result is normalized using the softmax function to obtain channel weight matrices W1 and W2; finally, the features from different receptive fields are adaptively selected and fused by performing element-by-element multiplication of the normalized weight matrix with the corresponding feature map; The photovoltaic panel segmentation model also includes a position guidance module, and the output feature F of the gate fusion module i ′ As the input of the position guidance module, the position guidance module distinguishes the edge of the photovoltaic panel from the edges of similar objects by optimizing the combination of different channels and spatial attention mechanisms and the photovoltaic panel position guidance information obtained from the segmentation task. This enables bidirectional information flow between the segmentation branch and the edge detection branch. The segmentation features guide the edge detection branch to focus on the edge of the photovoltaic panel, while the edge features provide feedback to the segmentation branch. S3) Pre-training the photovoltaic panel segmentation model; obtaining the semantic segmentation loss function and the edge detection loss function and then weighting the sum total loss function; optimizing the photovoltaic panel segmentation model parameters through back propagation; S4) Use the trained photovoltaic panel segmentation model to segment and detect edges of the photovoltaic panel high-resolution remote sensing image.

2. The method for segmenting household rooftop photovoltaic panels based on joint task learning according to claim 1, characterized in that: In step S2), the semantic segmentation network includes an encoder-decoder based on UNet; wherein the encoder adopts an encoder with an EfficientNet-B1 structure; the high-level semantic features of the photovoltaic panel image are extracted by the encoder with the EfficientNet-B1 structure; the decoder restores the image size by gradually upsampling low-resolution features; during the upsampling process, the corresponding features of the encoder and decoder are spliced ​​through jump connections.

3. The method for segmenting household rooftop photovoltaic panels based on joint task learning according to claim 2, characterized in that: In step S2), the encoder of the Efficientnet-B1 structure includes multiple MBConv modules; in the MBConv module, 1×1 convolution is first used to change the number of channels of the input feature, followed by depthwise separable convolution; and the channel attention mechanism of SENet is introduced, and finally 1×1 convolution is used to reduce the number of channels of the feature map.

4. The method for segmenting household rooftop photovoltaic panels based on joint task learning according to claim 1, characterized in that: In step S2), the position guidance module includes an SRM channel attention mechanism and a CBAM spatial attention mechanism; first, the SRM channel attention mechanism and the CBAM spatial attention mechanism are used to obtain the positioning information of the photovoltaic panel from the segmentation features; then, the positioning information is multiplied by the edge feature.

5. The method for segmenting household rooftop photovoltaic panels based on joint task learning according to claim 1, characterized in that: In step S3), during the training process, the edge detection network and the semantic segmentation network are trained in parallel, sharing some feature extraction layers; The total loss Loss total The expression is: Loss total =Loss seg +Loss edge ; Among them, Loss seg Represents the semantic segmentation loss function; Loss edge represents the edge detection loss function; Loss seg =0.25×BCE+0.75×Dice; Loss edge =0.25×BCE+0.75×Dice; Among them, g i represents the true label value of the i-th pixel, p i represents the probability value predicted by the model that the i-th pixel belongs to the photovoltaic area; The expression for optimizing the photovoltaic panel segmentation model parameters through back propagation is: Among them, α is the learning rate, ε=10 -8 ,θ t+1 represents the updated model parameters at time t+1, θ t It represents the model parameters at time t; in, represents the corrected first-order moment estimate, and t represents the current iteration time; in, represents the corrected second-order moment estimate; m t =β1m t-1 +(1-β1)g t ; Among them, m t represents the first-order moment estimate of the gradient at time t, m t-1 represents the first-order moment estimate of the gradient at time t-1, β1 represents the exponential decay rate of the first-order moment estimate, g t represents the gradient of the parameter θ at time t; Among them, v t represents the second-order moment estimate of the gradient at time t, v t-1 represents the second-order moment estimate of the gradient at time t-1, and β2 represents the exponential decay rate of the second-order moment estimate.

Citation Information

Patent Citations

  • Coding and decoding end edge information enhancement and attention guidance image segmentation method and system

    CN114677349A

  • Photovoltaic panel segmentation method based on deep learning technology

    CN116935241A