Using Machine Learning for Rooftop Detection and Solar Installations

With the majority of roofs in the world still without solar, the scalability of machine learning models in identifying and assessing rooftops for solar is immense, unlike traditional modeling approaches. Solar AI partners with Omdena and more than 30 AI engineers to pull this off.
rooftop detection satellite solar AI

Solar energy is a promising and freely available resource for managing the forthcoming energy crisis, without hurting the environment. Unlike conventional fossil fuels, it won’t run out anytime soon.

Fact  – There’s enough solar energy hitting the Earth every hour to meet all of humanity’s power needs for an entire year.

Let’s face it, what’s cooler than the sun powering your home? And that is quite literally true.

Fun fact  – Solar panels also act as “roof shades” to keep buildings cool. They absorb the sun’s rays, directing them away from the roof, whereas a roof without panels would allow heat to penetrate into the building.

As people around the world look for ways to “go green” and protect the earth, solar panels provide an excellent option. But the utility industry needs smart systems that can help improve the integration of renewables in an effective way.

Solar AI, a Singapore based startup incubated as a part of ENGIE Factory, collaborated with Omdena, to pull off a mission to hyper-scale the deployment of distributed solar and the transition towards 100% renewables by modernizing the way rooftop solar is sold.

The problem statement

The rooftop solar assessment process can be time consuming and expensive, taking anywhere between 1 hour to 2 full days to calculate the solar potential of each rooftop. In the solar industry, this has resulted in the cost of sales taking up to 30–40% of total project costs, significantly worsening the unit economics of solar projects.

By automating these evaluations with Artificial Intelligence, Solar AI aims to drastically reduce the cost of this process and make this information easily available for both building owners as well as solar energy companies.

Our mission:

Combining multiple models that can automatically identify rooftops and detect rooftop features using machine learning like obstacles, material, slopes and area from high-resolution satellite imagery.

The solution

We were first provided with high-resolution satellite imagery in Singapore. With these huge and detailed images in hand, we had a list of tasks to perform.

The 2 GB size of one image fascinated me enough, to begin with pre-processing and creating thousands of smaller tiles out of it — using just a few lines of code bundled up in a function.

Snapshot of a few tiles created from the huge image

The power of annotations

Even the most technically advanced algorithms cannot address or solve a problem without the right data. We know having access to data is quite valuable, but having access to data with a learnable structure is the biggest competitive advantage nowadays. That’s the power of data annotation.

A quirky image with hundreds of rooftops

Our wonderful team of collaborators volunteered to annotate thousands of rooftops in 500+ tiles. We pulled off a smarter method of annotating the buildings, by mapping the OSM data on the raster layer (TIF format tile) in the QGIS software.

The consistent determination of the annotators resulted in a perfectly labeled dataset for Supervised Machine Learning algorithms.

The food for models was ready!

Scanning images of rooftops via machine learning 

The major task was to detect rooftops in a given image using machine learning & computer vision models.

Not just this, we also had to determine their type/structure such as Flat-roof, Hip-roof, Shed-roof, or any other. Hence, this became an instance segmentation problem.

We tried out a number of models such as Mask R-CNN, YOLACT (You Only Look At CoefficienTs), Detectron 2, and more. After training on different batches of annotations as they were delivered, we kept seeing improvement in results. Eventually, the best performing model was selected to go ahead with other tasks.

rooftop detection satellite solar AI

Zooming in on your rooftops 

Now that we had the bounding boxes and mask contours of various rooftops, trapped properly in a data frame, we were ready to start the analysis of individual rooftops. After extracting and zooming into masks of each detected roof, we needed the following attributes:

  • Obstacle Detection
  • Area of the roof (excluding obstacles)
  • The material of the roof
  • Detecting faces of Hip/Shed roof
  • The orientation of individual slopes

Calculating “Area Available” for panels

For the calculation of a rooftop’s effective area, the area occupied by obstacles has to be subtracted from the whole. So that gives rise to the task of identifying obstacles.

Due to the lack of labeled data for obstacle detection, our genius team shifted their thought process towards an unsupervised approach of edge detection and creating contours. By setting a threshold on contour colors, obstacles were distinguished from plain areas to a great extent.

An effective area was therefore mathematically calculated as the difference between total area and obstacle area in terms of pixels, which was then converted into meters squared.

rooftop materials satellite solar AI
Roof materials

Quality of the roof

Because solar panels are installed on your home’s rooftop, it is important to understand how different roof materials may influence this process.

Generally, they range from concrete, metal, roof tiles, eternit to composite shingles.

This task also required a labeled dataset, so I decided to jump in to find a solution where we could skip annotations per se. Using Open Street Maps, we created a small but fruitful dataset labeled with roofs and their materials. A deep learning-based Image Classification model was then created which identifies the material of the roof and gives the probability scores for each class.

Which way do solar panels face?

Orientation, or the direction your roof faces, may have a large impact on how productive roof-mounted solar panels will be. Your system will generate the most energy when it gets as many hours of light exposure per day as possible. In most places, the ideal power generation angle is 30–40 degrees.

The task of identifying many faces of a hip roof was a challenging one. After multiple attempts with different approaches, the task team managed to create an appreciable mathematical model that could identify the facets as well as the angles they’re inclined on, using some constructive utility functions. The output was the orientation of different roof facets.

Conclusion: putting it all together

The outputs of all the tasks were captured systematically in a data frame. Keeping in mind that we computed various attributes based on pixel values, we converted them back to geographic coordinates at the end. This allowed us to project the data on satellite images of a particular CRS (Coordinate Reference System).

After merging everything into an automated pipeline and many rounds of reviews, evaluation, fixing bugs, and testing — our software was ready to be delivered.


This project was a collaboration between Solar AI Technologies and Omdena, involving more than 30 AI engineers and changemakers across the world to detect rooftops and features via satellite images in order to drive rooftop solar deployment.

The original article is also published here: https://omdena.com/blog/machine-learning-rooftops/

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Harshita Chopra
Harshita Chopra
Harshita is a student majoring in Information Technology and pursuing research in domains of Artificial Intelligence. She also contributes to various Omdena projects and took the role of a Lead ML Engineer for creating an impact through the collaboration with Solar AI and ENGIE Factory.
Related Posts
#solarbasics series what are solar PPAs
Basics
Solar PPA and Solar Leasing: What Is It?

A solar power purchase agreement (PPA), or “solar leasing” as it is commonly known in Singapore and Southeast Asia, is a popular financing alternative which has significantly driven solar adoption in the region over the past decade.

Read More
#solarbasics series factors affecting rooftop suitability
Basics
Is Your Rooftop Suitable for Solar?

When you begin thinking about solar, the first thing that comes to mind is probably if your roof is suitable in the first place. Although almost all roofs will be able to accommodate and install solar panels, not every roof is an ideal candidate.

Read More

Awesome! You're now on our waitlist.

We have added your email address to our waitlist, and will keep you posted on our launch date.

Hungry for the product right now? Drop us a note at info@getsolar.ai

Tell your friends about us!

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Thank you for your submission.

We will get back to you with a free solar quote within 48 hours. Here’s to your first step towards a greener Earth.