Highway Solar Panel Extraction from Remote Sensing Images Using an Enhanced HRNet Model

The accelerating global transition towards renewable energy has positioned photovoltaic (PV) power generation as a cornerstone of sustainable development. In this context, the utilization of infrastructure within highway domains—specifically service areas and toll stations—for installing solar panel arrays has emerged as a strategically significant approach. These installations leverage otherwise underutilized spaces such as building rooftops and parking canopies, generating clean electricity for on-site consumption and reducing grid dependency and transmission losses. Effective monitoring and inventory management of these distributed solar panel assets are crucial for energy planning and infrastructure assessment. Remote sensing technology, particularly high-resolution satellite imagery, offers a powerful, synoptic, and efficient tool for large-scale geographical surveys. This research focuses on developing an advanced deep learning-based methodology to automatically and accurately extract solar panel information from high-resolution remote sensing imagery within highway precincts.

Traditional methods for information extraction from imagery, such as threshold segmentation, region growing, and watershed algorithms, often struggle with the complex and varied backgrounds encountered in real-world remote sensing scenes. Their performance is typically marred by significant noise and error when distinguishing target features like solar panel arrays from spectrally similar artificial structures (e.g., gray rooftops, asphalt pavements). While machine learning techniques like Support Vector Machines (SVM) and Random Forests improved upon these methods by learning statistical features, they remained reliant on manual feature engineering, limiting their adaptability and scalability.

The advent of deep learning, particularly Convolutional Neural Networks (CNNs), has revolutionized image analysis. CNNs can automatically learn hierarchical and discriminative features directly from data, dramatically improving the accuracy and efficiency of remote sensing information extraction. Various semantic segmentation architectures, such as U-Net, FCN, and DeepLabV3+, have been successfully applied to tasks like building and road extraction. However, the specific task of segmenting solar panel installations within the constrained and characteristic environment of highway service zones presents unique challenges, including small object size, high spatial similarity to surroundings, and occlusion. While prior studies have extracted solar panels from broader geographical areas, a focused analysis on highway domains is less common. This study addresses this gap by proposing a tailored deep learning solution. We introduce an enhanced version of the High-Resolution Network (HRNet) integrated with a Convolutional Block Attention Module (CBAM) to precisely extract solar panel installations from Google 19-level imagery in Jiangsu Province, China, providing a robust technical framework for intelligent PV infrastructure monitoring along highways.

1. Study Area and Dataset Preparation

The study area encompasses the highway precincts within Jiangsu Province, a region characterized by a dense and well-developed highway network and a strong commitment to renewable energy adoption. This makes it an ideal testbed for evaluating solar panel extraction methodologies. The target features are solar panel arrays installed on buildings, canopies, and other structures within toll stations and service areas.

To delineate the precise area of interest, vector points representing all known toll stations and service areas in Jiangsu were used as centroids. A buffer zone with a radius of 300 meters was generated around each point. These individual buffers were then merged into a single, continuous polygon layer, defining the spatial extent for imagery collection and analysis.

As no public dataset exists for highway-domain solar panels, a custom dataset was meticulously constructed. High-resolution remote sensing images (Google 19-level) covering the defined area were acquired. Within these images, representative examples of installed solar panel arrays were manually identified and annotated at the pixel level to create ground truth masks. The image chips and their corresponding mask chips were uniformly cropped to a size of 256×256 pixels. To augment the dataset and improve model robustness against rotational variance, each original image-mask pair was rotated clockwise by 90°, 180°, and 270°. This process resulted in a final dataset of 356 annotated image samples. The dataset was randomly partitioned into training (60%), validation (20%), and test (20%) sets, ensuring a rigorous evaluation framework. A summary of the dataset is presented in Table 1.

Table 1. Summary of the Custom Highway Solar Panel Dataset
Component Description Count
Source Imagery Google 19-level satellite imagery
Annotation Pixel-level masks for solar panels
Initial Samples Manually annotated 256×256 chips 89
Augmentation Rotations (90°, 180°, 270°) x4
Final Sample Total Image-Mask pairs 356
Training Set Used for model parameter learning 214
Validation Set Used for hyperparameter tuning 71
Test Set Used for final performance evaluation 71

2. Methodology: The Enhanced HRNet Framework

The core of our approach is an enhanced semantic segmentation network based on HRNet, strategically integrated with attention mechanisms. The overall architecture is designed to maintain high-resolution feature representations throughout the network while effectively highlighting salient features pertinent to solar panel recognition.

2.1. Base Network: HRNet (High-Resolution Network)

Unlike traditional encoder-decoder networks (e.g., U-Net, FCN) that repeatedly downsample an input to a low-resolution feature map and then upsample it, HRNet maintains high-resolution representations in parallel with lower-resolution ones from start to finish. It consists of multiple stages connected in parallel, each operating at a different scale. The network starts with a high-resolution subnetwork and gradually adds lower-resolution subnetworks, while repeatedly exchanging information across resolutions through multi-scale fusions. This design ensures that the learned representations are semantically strong (from the low-resolution streams) and spatially precise (from the high-resolution stream). This characteristic is particularly beneficial for segmenting objects like solar panels, which require precise boundary delineation despite their often rectangular and repetitive patterns.

The fundamental operation within HRNet can be described as maintaining a set of feature maps at different scales. Let \( \mathbf{F}_s \) represent the feature map at stage \( s \), with resolution indexed by \( r \) (where \( r=1 \) is the highest resolution). The network ensures information flow between scales \( r \) and \( r’ \) through strategic downsampling and upsampling operations within each stage. The final high-resolution feature map is rich in both detail and context, leading to superior segmentation performance.

2.2. Attention Mechanism: CBAM (Convolutional Block Attention Module)

To direct the network’s focus toward the most informative features for identifying solar panels, we integrate the Convolutional Block Attention Module (CBAM). CBAM is a lightweight, sequential attention module that infers attention maps along both the channel and spatial dimensions. Given an intermediate feature map \( \mathbf{F} \), CBAM sequentially applies channel attention and then spatial attention:
$$ \mathbf{F}’ = M_c(\mathbf{F}) \otimes \mathbf{F} $$
$$ \mathbf{F}” = M_s(\mathbf{F}’) \otimes \mathbf{F}’ $$
where \( M_c \) is the channel attention module, \( M_s \) is the spatial attention module, and \( \otimes \) denotes element-wise multiplication. The channel attention focuses on “what” is meaningful by aggregating spatial information using both average-pooling and max-pooling, followed by a shared multi-layer perceptron. The spatial attention focuses on “where” the informative regions are by applying pooling operations along the channel axis and generating a spatial attention map via a convolution layer. This dual attention mechanism allows the model to emphasize important features related to solar panel texture, shape, and context while suppressing irrelevant background information.

2.3. Proposed Integration Strategy

We propose a targeted integration of CBAM modules into the HRNet architecture. The standard HRNet processes features through four sequential stages. Our enhancement involves inserting CBAM modules at two critical points:

  1. After Stage 1: At this early stage, the feature maps have undergone only a few convolutional layers and possess a small receptive field. Adding a CBAM module here injects global contextual information early in the network, helping to establish a broader understanding of the scene context surrounding potential solar panel installations.
  2. At the end of each parallel branch in Stage 4: At this late stage, the feature maps in each parallel branch (high to low resolution) have been extensively processed and encode high-level semantic concepts. Applying CBAM independently to each branch’s final feature map allows the network to re-weight the importance of different feature channels and spatial locations specific to that resolution’s representation. This effectively filters and enhances the most salient features for solar panel segmentation before the multi-resolution features are fused for the final prediction.

This strategic placement ensures that the model benefits from both early global context priming and late-stage feature refinement, tailored specifically for the multi-resolution paradigm of HRNet.

2.4. Hybrid Loss Function

To effectively train the model, we employ a hybrid loss function that combines the benefits of Cross-Entropy (CE) Loss and Dice Loss. This combination addresses both pixel-wise classification accuracy and the inherent class imbalance (where solar panel pixels are far fewer than background pixels).

The standard Binary Cross-Entropy Loss is defined as:
$$ L_{CE} = -[y’ \log(y_p) + (1 – y’) \log(1 – y_p)] $$
where \( y’ \) is the ground truth label (0 or 1) and \( y_p \) is the predicted probability for the positive class.

The Dice Loss, derived from the Dice Coefficient, measures the overlap between prediction and ground truth and is particularly effective for imbalanced data:
$$ L_{Dice} = 1 – \frac{2 y’ y_p + 1}{y’ + y_p + 1} $$
The addition of 1 in the numerator and denominator is a common smoothing factor to avoid division by zero.

Our hybrid loss is a weighted sum:
$$ \text{Loss} = \alpha L_{CE} + (1 – \alpha) L_{Dice} $$
where \( \alpha \) is a weighting parameter set to 0.5 in our experiments to balance the contribution of both terms. This hybrid loss guides the model to not only make correct per-pixel classifications but also to produce segmentation maps that have a high degree of spatial overlap with the ground truth solar panel areas.

3. Experimental Results and Analysis

3.1. Experimental Setup

All experiments were conducted using the PyTorch 1.7.1 deep learning framework on a system equipped with an NVIDIA TITAN-RTX GPU (24GB VRAM). The proposed model and all baselines were trained with consistent settings for a fair comparison: input size of 256×256, batch size of 8, AdamW optimizer with an initial learning rate of \( 1 \times 10^{-4} \), and a total of 200 training epochs until convergence.

We compared our enhanced HRNet+CBAM model against several state-of-the-art semantic segmentation networks:

  • U-Net: A classic encoder-decoder network with skip connections.
  • FCN (Fully Convolutional Network): A pioneer in end-to-end semantic segmentation.
  • ResNet-based FCN: Using a ResNet backbone for feature extraction within an FCN architecture.
  • LANet (Local Attention Network): A network designed to embed local attention from high-level features into low-level features.
  • Standard HRNet: The baseline HRNet without our CBAM enhancements.

3.2. Evaluation Metrics

Performance was evaluated using five standard metrics for binary segmentation, where True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN) are defined for the solar panel class:

  1. Accuracy (A): Proportion of correctly classified pixels.
    $$ A = \frac{TP + TN}{TP + TN + FP + FN} $$
  2. Precision (P): Proportion of predicted solar panel pixels that are correct.
    $$ P = \frac{TP}{TP + FP} $$
  3. Recall (R): Proportion of actual solar panel pixels that are correctly detected.
    $$ R = \frac{TP}{TP + FN} $$
  4. F1-Score (F1): Harmonic mean of Precision and Recall.
    $$ F1 = \frac{2 \times P \times R}{P + R} = \frac{2TP}{2TP + FP + FN} $$
  5. Intersection over Union (IoU): Ratio of overlap between prediction and ground truth to their union.
    $$ IoU = \frac{TP}{TP + FP + FN} $$

3.3. Ablation Study: Impact of CBAM Placement

We first conducted an ablation study to validate our CBAM integration strategy. We compared three models: the standard HRNet, HRNet with CBAM added only at the final output fusion stage (“HRNet + CBAM (output only)”), and our proposed model with CBAM added after Stage 1 and at each branch of Stage 4 (“Proposed HRNet+CBAM”).

As shown in Table 2, our proposed integration strategy yields the best overall performance across all metrics. Adding CBAM only at the output provides a noticeable improvement over the standard HRNet (e.g., IoU increases from 0.6694 to 0.6982), but our strategic multi-stage placement achieves a significantly higher gain, pushing the IoU to 0.7402. This demonstrates that early contextual priming and late-stage multi-resolution feature refinement are both crucial for accurately segmenting solar panels. Visually, our model produces cleaner results with fewer false positives (e.g., misclassifying roads) and more complete detection of solar panel clusters compared to the other variants.

Table 2. Ablation Study on CBAM Integration Strategy
Model Accuracy (A) Precision (P) Recall (R) F1-Score IoU
Standard HRNet 0.9636 0.7817 0.7380 0.7592 0.6694
HRNet + CBAM (output only) 0.9647 0.8028 0.7468 0.7738 0.6982
Proposed HRNet+CBAM 0.9794 0.8352 0.7876 0.8083 0.7402

3.4. Comparative Analysis with Other Networks

We then compared our final proposed model against other established segmentation networks on the same test set. The quantitative results are summarized in Table 3.

Table 3. Performance Comparison of Different Semantic Segmentation Models
Model Accuracy (A) Precision (P) Recall (R) F1-Score IoU
U-Net 0.9434 0.5670 0.5808 0.5447 0.4400
FCN 0.9527 0.6638 0.6197 0.6410 0.5213
ResNet-based FCN 0.9578 0.7221 0.7210 0.7004 0.5952
LANet 0.9608 0.7005 0.6845 0.6795 0.5761
Proposed HRNet+CBAM 0.9794 0.8352 0.7876 0.8083 0.7402

The results clearly indicate the superiority of our proposed model. It achieves the highest scores across all five evaluation metrics. Notably, its F1-Score (0.8083) and IoU (0.7402) are substantially higher than those of the other models, with the next best performer (ResNet-based FCN) scoring 0.7004 and 0.5952, respectively. This significant margin underscores the effectiveness of combining HRNet’s high-resolution feature maintenance with our strategic use of attention mechanisms for the specific task of highway solar panel extraction. The model demonstrates a strong ability to precisely locate solar panel arrays while minimizing confusion with other man-made structures commonly found in service areas.

4. Conclusion and Future Work

This research presents a robust deep learning framework based on an enhanced HRNet architecture for the automated extraction of solar panel installations from high-resolution remote sensing imagery within highway domains. By strategically integrating CBAM attention modules at critical stages of the HRNet, the model effectively harnesses both global contextual information and refined multi-resolution features. This design enables precise segmentation of solar panel arrays, which are often challenging to distinguish due to their spectral similarity to backgrounds like rooftops and roads. Experimental results on a custom dataset from Jiangsu Province demonstrate that our proposed model outperforms several state-of-the-art semantic segmentation networks, including U-Net, FCN, and the standard HRNet, across key metrics such as IoU and F1-Score.

The methodology provides a scalable and efficient technical solution for inventorying and monitoring distributed PV infrastructure along transportation corridors. This capability is vital for energy companies and government agencies to assess the penetration of renewable energy, plan for maintenance, and evaluate future integration potential. While the model shows promising performance, several avenues exist for future improvement. Firstly, expanding the training dataset to include solar panel installations from diverse geographical regions, under different seasonal and lighting conditions, would enhance the model’s generalizability. Secondly, exploring advanced data augmentation techniques and integrating multi-spectral or multi-temporal data could further improve accuracy, especially in complex scenes with shadows or occlusions. Thirdly, addressing the challenge of fragmented predictions for very small or densely packed solar panel arrays through post-processing or refined loss functions remains an area for investigation. In conclusion, this work establishes a strong foundation for the intelligent extraction of solar panel information, contributing to the broader goals of sustainable energy management and smart infrastructure development.

Scroll to Top