Machine Learning for Automated Rooftop Detection and Solar Panel Installation
Machine learning detects rooftops and estimates usable area, materials, and orientation, enabling fast, low-cost solar feasibility assessments.

December 4, 2025
9 minutes read

There is enough solar energy hitting the Earth every hour to meet all of humanity’s power needs for an entire year. In other words, the sun can more than power your home and solar panels do more than generate electricity. They also act as roof shades, absorbing the sun’s rays and keeping heat from penetrating your house.
As people worldwide look for ways to “go green,” rooftop solar assessment has become essential for utilities and homeowners alike. But the utility industry still relies on lengthy, expensive assessments to determine a roof’s solar potential, making the cost of sales 30–40 % of a project’s budget. To accelerate the adoption of solar energy, GetSolar — a Singapore‑based startup incubated by ENGIE Factory collaborated with Omdena to modernize how rooftop solar is sold. Together they set out on an eight‑week mission to build machine learning models that can automatically identify rooftops and detect rooftop features such as obstacles, materials, slopes and available area from high‑resolution satellite imagery.
Framing the problem
The current rooftop solar assessment process can take anywhere from one hour to two full days per building. Solar AI wanted to automate those evaluations using artificial intelligence so that building owners and solar energy companies could instantly see a roof’s solar potential. The mission was clear: develop a pipeline that combines multiple computer‑vision models to identify rooftops and extract the details needed for an accurate assessment.
Manual assessments typically involve measuring roof geometry, mapping obstacles and calculating shading conditions — tasks that require significant human effort and technical expertise. Because technicians must visit the site, draw roof plans and document every feature by hand, the process is both labor‑intensive and slow. These considerations help explain the high costs and long turnaround times cited earlier. Automating these steps with artificial intelligence reduces time and cost, making rooftop solar assessment more accessible to a broader audience.
Preparing the data
Solar AI provided high‑resolution satellite images of Singapore. Each image was roughly 2 GB in size, so the team began by pre‑processing the data, slicing huge images into thousands of smaller tiles with just a few lines of code. These tiles made it feasible to train models efficiently.

Snapshot of a few tiles created from the huge image
These tiles are the basic analytical units for the machine‑learning pipeline. By cutting the original images into manageable pieces, the team ensured that each tile captured local details of individual roofs without overwhelming computational resources.
Large satellite images contain many features at different scales, making them difficult to process as a whole. By breaking them into smaller tiles, the team normalized the size of objects, reduced the memory footprint of training and enabled parallel processing. This pre‑processing step laid the foundation for efficient training and inference across thousands of rooftops.
The power of annotations
Even the most advanced algorithms cannot solve a problem without structured data. Having the right data — and labeling it accurately — was the team’s greatest advantage. A group of volunteers annotated thousands of rooftops across more than 500 tiles. They mapped OpenStreetMap (OSM) building outlines onto the raster tiles using the QGIS software, creating a richly labeled dataset for supervised machine learning.

A quirky image with hundreds of rooftops
At this stage the dataset resembles a quilt of annotated rooftops. Each rectangle and mask visible in the image corresponds to a labeled roof that will serve as input for the learning algorithms.
The quality of this dataset is paramount. Annotators carefully traced building outlines and marked obstacles, ensuring that the model learned to distinguish roof surfaces from trees, roads and other structures. Accurate annotations reduce noise in the training data and improve the model’s ability to generalize to new images.
Detecting rooftops and classifying structures
Once the dataset was prepared, the team tackled the core computer‑vision task: detect rooftops in an image and determine each roof’s structure whether flat, hip, shed or otherwise. This is an instance segmentation problem, where the model must locate and outline every individual object. The collaborators experimented with several architectures, including Mask R‑CNN, YOLACT (“You Only Look At Coefficients”) and Detectron2, training them on successive batches of annotated data. Results improved with each iteration, and the best‑performing model was selected for downstream analysis.
Mask R‑CNN, YOLACT and Detectron2 are state‑of‑the‑art deep‑learning architectures designed for instance segmentation. They rely on convolutional neural networks to simultaneously detect objects and delineate their shapes, which makes them well suited for rooftop detection. As the annotation team delivered more data, the model’s performance improved. This iterative training approach allowed the team to refine hyperparameters and leverage transfer learning, gradually increasing detection and classification accuracy.
instance‑segmentation models delineated roof surfaces
This figure showcases how the instance‑segmentation models delineated roof surfaces and architectural edges. These preliminary results provided confidence that the subsequent attribute extraction would be reliable.
Zooming in on individual rooftops
After training, the chosen model produced bounding boxes and mask contours for each roof in a tile. Those masks were stored in a data frame, allowing the team to analyze every rooftop individually. To build a comprehensive rooftop solar assessment, they extracted several key attributes:
- Obstacle detection – identify objects on the roof that could block panel placement,
- Area of the roof – calculate usable surface area while excluding obstacles,
- Material – determine whether the roof is concrete, metal, tile, eternit or composite shingles,
- Faces of hip or shed roofs – detect the multiple facets of non‑flat roofs, and
- Slope orientation – measure the direction each facet faces.
Calculating area available for panels
Determining a roof’s effective area required subtracting obstacle footprints from the total surface. Because there was no labeled data for obstacles, the team adopted an unsupervised approach: applying edge detection to the roof masks, creating contours and then filtering by contour color. This method distinguished obstacles from plain roof areas sufficiently well. The effective area could then be calculated in pixel units and converted to square metres. That quantitative output formed the basis for estimating how many solar panels could be installed.

Roof Materials
The distribution of materials shown here hints at the diversity of roof types in the dataset. Understanding these proportions is important because mounting hardware and panel compatibility vary with the underlying surface.
Assessing roof quality
Solar panels must be mounted securely, so roof material matters. Common roof types include concrete, metal, roof tiles, eternit and composite shingles. Each surface brings its own considerations: concrete and metal can generally support heavier loads, while tiled and composite roofs may require specialised mounting brackets and careful handling. Knowing the material ahead of time helps installers plan for these variations.
Instead of relying on volunteers to label every roof by hand, the team combined OpenStreetMap data with satellite imagery to build a focused yet informative dataset for classification. A deep‑learning model trained on this dataset outputs probability scores for each class, allowing the system to infer roof material automatically and flag cases where predictions are uncertain.
Determining orientation
The direction a roof faces dramatically affects solar energy production. Systems generate the most power when they receive the most sunlight, and in many places the ideal tilt is between 30 and 40 degrees. South‑facing roofs in the northern hemisphere and north‑facing roofs in the southern hemisphere typically capture more midday sun, but local shading and architectural variations can alter the optimal angle.
Identifying the facets of a hip roof proved challenging because such structures comprise multiple planes at different angles. To handle this complexity, the team built a mathematical model that traces each face of the roof, measures its orientation relative to true north, and estimates the slope angle using a set of custom utility functions. The resulting orientation data feed directly into the final recommendation about panel placement and tilt, ensuring that arrays are aligned for maximum energy capture.

orientation detection pinpoints the azimuth direction of each roof face.
The first diagram illustrates how orientation detection pinpoints the azimuth direction of each roof face. By overlaying compass directions onto the roof facets, the algorithm determines where sunlight is most abundant.

variation in slope angles across different facets becomes apparent.
In the second diagram, the variation in slope angles across different facets becomes apparent. Such information guides installers in adjusting panel tilt to maximise exposure in specific geographic regions.
Conclusion
This project demonstrated how machine learning can automate rooftop assessment by detecting roof structures, estimating usable area, identifying obstacles and inferring material and orientation. By combining instance-segmentation architectures with intelligent downstream analysis, the pipeline transformed raw satellite imagery into structured insights that directly support solar feasibility evaluations.
The approach proved both scalable and transferable. With retraining, the same pipeline can be applied to new cities and regions, drastically shortening assessment time and reducing costs. Ultimately, this work provides a foundation for faster, data-driven solar adoption — allowing installers, utilities and property owners to make smarter decisions and accelerate clean energy deployment.
This AI approach reduces survey time, lowers costs, and helps installers prioritize the most viable rooftops. Collaborate with Omdena to deploy a solution customized to your workflow and target locations.



