Computer Vision Framework Accurately Maps Urban Rooftop Solar Potential in Pakistan – Bioengineer.org

Computer Vision Framework Accurately Maps Urban Rooftop Solar Potential in Pakistan
A research team has demonstrated an automated computer vision pipeline combining the YOLOv8 object detection model and Meta AI’s Segment Anything Model to identify urban rooftops and calculate photovoltaic potential from high-resolution satellite imagery. Published in Energy Reports, the investigation focuses on bridging the gap between coarse bounding-box detectors and computationally heavy segmentation networks when surveying dense built environments. By deploying high-resolution GeoEye-1 satellite images across Karachi and Lahore, Pakistan, the sequential pipeline isolates structural footprints and traces rooftop boundaries without task-specific fine-tuning for segmentation. The integrated architecture recorded a mean average precision of 94.1 percent at a 0.5 intersection-over-union threshold for detection, alongside an 89.3 percent intersection-over-union score for instance segmentation. These benchmarks show that coupling single-stage neural detectors with vision foundation models offers an accurate, scalable mechanism for evaluating rooftop solar capacity across South Asian urban landscapes where dense informal settlements and heterogeneous construction materials complicate remote sensing surveys.
The research addresses renewable energy planning requirements in Pakistan, where rapid urbanisation, escalating electricity costs, and acute manifestations of climate change have made transitioning to decentralized clean energy a national priority. Citing baseline resource evaluations by Hussain and colleagues, the authors note that urban Pakistan holds an estimated technical rooftop solar potential between 1.5 and 2.0 terawatts, corresponding to 1500 to 2000 gigawatts of installed capacity. This projection assumes a total urban rooftop surface area of approximately 3500 to 4500 square kilometres, of which roughly 60 to 70 percent is deemed technically feasible after accounting for structural considerations, obstructions, and shading losses. Taking an average annual global horizontal irradiance of 5.3 kilowatt-hours per square metre per day across major Pakistani cities, assuming standard monocrystalline panel efficiency of 18 percent, and applying a system performance ratio of 0.75 for system losses, the annual energy yield reaches approximately 260 to 290 kilowatt-hours per square metre when aggregated over available rooftop surfaces.
Accurately determining available rooftop area remains the most uncertain input parameter when modeling urban photovoltaic potential, as conventional site assessments rely on manual physical surveys that are time-consuming, expensive, and vulnerable to human error. While automated aerial and satellite image processing has progressed, existing machine learning workflows present distinct operational trade-offs. Standard object detection models, including earlier YOLO variants such as YOLOv5, rapidly predict rectangular bounding boxes; however, bounding boxes encompass surrounding streets, vegetation, and adjacent infrastructure, substantially overestimating usable surface area. Conversely, dedicated segmentation networks like U-Net and Mask R-CNN generate precise pixel-level boundaries but impose significant computational burdens. Mask R-CNN requires a complex two-stage region proposal network, whereas U-Net demands dense pixel-level manual annotations that cannot easily scale to city-wide satellite analysis. Furthermore, earlier segmentation benchmarks were developed primarily on Western datasets with pitched roofs, showing marked performance drops on the flat-roofed, high-density urban fabric typical of South Asian cities.
To overcome these limitations, the researchers compiled high-resolution satellite imagery from two regional collections: the Karachi Rooftop Solar Potential Dataset and the Lahore Satellite Imagery Dataset. Captured by the GeoEye-1 satellite operating at an orbital altitude of 681 kilometres with a 1950-millimetre focal length sensor, the imagery provides a ground sample distance of roughly 0.3 to 0.5 metres per pixel in panchromatic mode. This spatial fidelity permits fine-grained visual discrimination of structural roof edges and diverse architectural typologies, including flat, sloped, residential, commercial, and industrial structures. Ground truth annotations were established through manually drawn rectangular bounding boxes for detection and polygon masks for instance segmentation. The combined image corpus was partitioned into training, validation, and testing sets using a 70:15:15 ratio. To improve model generalization and mitigate overfitting, training data were expanded using data augmentation techniques including random rotations, horizontal flipping, brightness adjustments, scaling, and random cropping.
For the detection stage, the authors selected YOLOv8x, citing its architectural advantages over prior detector generations. Operating with an anchor-free detection head, YOLOv8 eliminates manually tuned anchor boxes, boosting convergence speeds and detection accuracy for irregularly shaped buildings. The backbone incorporates Cross-Stage Partial with two convolutions modules to enhance gradient flow and feature reuse, alongside a Spatial Pyramid Pooling Fast layer that pools features into fixed dimensions. A decoupled head separates classification from bounding box regression, utilizing Complete Intersection over Union and Distribution Focal Loss functions alongside binary cross-entropy. The YOLOv8 network was trained over 300 epochs with an input dimension of 640 by 640 pixels, a batch size of 16, and the AdamW optimizer with an initial learning rate of 0.001 and cosine scheduling. Training was performed on an NVIDIA RTX 4090 GPU with 24 gigabytes of memory, using early stopping to retain model weights with optimal validation mean average precision.
The operational pipeline executes a structured seven-step sequence that routes candidate rooftops from satellite input to capacity modeling. In the initial steps, raw GeoEye-1 satellite images are resized to 640 by 640 pixels, normalized, and processed by the trained YOLOv8 model to generate localized bounding boxes with associated confidence scores. Detections falling below a confidence threshold of 0.5 are discarded to filter out false positives. In the fourth step, the remaining bounding box coordinates serve as discrete spatial prompts passed to the Segment Anything Model, which predicts a pixel-wise binary segmentation mask isolating the roof surface from surrounding context. Following mask generation, morphological post-processing removes small artifact masks occupying an area under 100 pixels, while overlapping masks from adjacent detections are unified through union operations. The resulting segmented masks delineate usable rooftop boundaries, stripping away extraneous imagery features such as adjacent streets, open ground, or tree canopies.
Once refined binary masks are produced, the pipeline computes actual physical rooftop areas by converting pixel counts using the satellite sensor’s ground sample distance. The mathematical formulation calculates planar rooftop area by multiplying the total pixel count by the square of the ground pixel resolution, applying a conversion factor of 10.7639 when converting square metres into square feet. Because nadir-view satellite imagery captures projected horizontal dimensions, this calculation accurately reflects the planar footprint of flat urban rooftops that dominate Pakistani metropolitan areas. From this usable area, the system estimates potential photovoltaic installation capacity by factoring in the physical dimensions of standard monocrystalline solar panels and reserving necessary clearance intervals required for maintenance and access. Concurrently, filtering logic accounts for major structural exclusions, allowing energy planners to derive aggregate power generation estimates using regional annual solar irradiance profiles and standard system derating factors.
Empirical evaluation on the isolated test dataset confirmed robust quantitative performance across both stages of the integrated framework. In the detection phase, YOLOv8 achieved a precision of 92.8 percent, a recall of 90.7 percent, and an overall F1-score of 91.7 percent. When evaluated across mean average precision metrics, the model reached 94.1 percent at mAP@0.5 and 81.5 percent across mAP@0.5:0.95 thresholds, demonstrating high localization accuracy across varying rooftop scales. The model also successfully identified 3697 out of 3700 ground-truth rooftop instances during testing, achieving a 99.5 percent instance detection rate within a 50 percent bounding box overlap. In the subsequent segmentation phase, the prompt-guided Segment Anything Model achieved an average Intersection over Union of 89.3 percent, a Dice coefficient of 93.7 percent, and an overall pixel accuracy of 95.1 percent. Qualitative evaluations by domain experts verified that the resulting masks reliably delineate physical roof boundaries while separating usable surface areas from surrounding non-rooftop elements.
The authors benchmarked the performance of the proposed YOLOv8-SAM architecture against established rooftop detection baselines, specifically evaluating U-Net, Mask R-CNN, and the DeepRoof framework on the same regional test imagery. The comparative analysis demonstrated clear empirical gains for the proposed approach across all standard evaluation criteria. The baseline U-Net architecture recorded a precision of 85.2 percent, a recall of 83.4 percent, and a mAP@0.5 score of 86.7 percent. Mask R-CNN achieved higher performance, yielding an 89.1 percent precision, an 87.9 percent recall, and a 90.3 percent mAP@0.5. DeepRoof delivered competitive detection metrics with 90.2 percent precision, 88.5 percent recall, and 91.4 percent mAP@0.5. The proposed YOLOv8-SAM framework outperformed all three baseline methods, registering 92.8 percent precision, 90.7 percent recall, and 94.1 percent mAP@0.5. The researchers attribute this superior performance to YOLOv8’s anchor-free detection head and feature reuse capabilities, combined with SAM’s prompt-driven visual segmentation.
Despite the high precision recorded across Karachi and Lahore, the authors outline several explicit methodological constraints that govern how these findings can be applied. The models were trained and tested exclusively on satellite imagery of urban Pakistani environments dominated by flat concrete roofs; consequently, the pipeline cannot be directly transferred to regions with pitched roofs or differing construction materials without dedicated domain adaptation. Furthermore, calculating surface area via planar nadir projections underrepresents the actual usable area on inclined surfaces where trigonometric cosine adjustments for roof slope would be required. The basic geometric filtering framework also does not currently model dynamic shadows caused by adjacent high-rise buildings, vegetation, or rooftop obstacles such as water tanks and HVAC units. To address these limitations, future research will explore integrating digital elevation models, LiDAR point clouds, and automated irradiance modeling tools such as PVGIS or NASA POWER to account for local microclimates and detailed shading effects.
Subject of Research: Automated rooftop solar potential mapping using computer vision and satellite imagery
Article Title: AI-enabled rooftop solar mapping and optimization: A computer vision approach for photovoltaic systems
Article References: Daniyal, S. M., Abro, A. A., Abbasi, M. M., Algarni, A. D., Ahmad, S., & Ateya, A. A. (2026). AI-enabled rooftop solar mapping and optimization: A computer vision approach for photovoltaic systems. Energy Reports, 16, Article 109893. https://doi.org/10.1016/j.egyr.2026.109893
Image Credits: AI Generated
DOI: 10.1016/j.egyr.2026.109893
Keywords: rooftop solar mapping, photovoltaic potential, YOLOv8, Segment Anything Model, computer vision, satellite imagery, GeoEye-1, urban solar energy, Karachi, Lahore, Pakistan, instance segmentation, object detection, solar irradiance, monocrystalline panels, deep learning, remote sensing, energy planning
News Source: Blake Davidson. (November 12, 2026). Computer Vision Framework Accurately Maps Urban Rooftop Solar Potential in Pakistan. Scienmag.
We bring you the latest biotechnology news from best research centers and universities around the world. Check our website.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.


Bioengineer.org © Copyright 2023 All Rights Reserved.
Login to your account below




Please enter your username or email address to reset your password.


Bioengineer.org © Copyright 2023 All Rights Reserved.

source

This entry was posted in Renewables. Bookmark the permalink.

Leave a Reply