Energy services are fundamental to socioeconomic development and human well-being. Yet access remains scarce in many parts of the world. In Kenya, 13 million people still lack electricity access, and over 39 million continue to use unhealthy, polluting fuels for cooking.
WRI, in collaboration with over 300 partners, developed the Energy Access Explorer (EAE) to help bring electricity to unserved and underserved communities. Currently available in eight countries across Africa and Asia, EAE is an online, open-source, interactive platform that enables clean energy players to map energy access gaps, identify high priority areas for energy interventions, and expand access faster and more equitably.
In Kenya, EAE is already being used to inform the design of County Energy Plans, as mandated by the country’s Energy Act of 2019. These plans require granular data on demographics and productive uses of renewable energy to assess current and potential electricity demand. They also require data on infrastructure and resource availability to map energy supply. But this is where current data comes up short: While Kenya has significantly scaled up solar power access in recent years, it does not have detailed information on where small-scale solar PV systems are located. This data is currently only available at coarse resolutions (at the sub-county level rather than building level; Figure 1), which limits inclusive planning efforts.
Simply put: If energy planners and clean energy businesses don’t know which buildings are powered by solar systems, how can they effectively plan for the expansion of energy services to underserved communities?
Illuminating Kenya’s Solar Landscape
To bridge this knowledge gap, WRI, in partnership with OMDENA, piloted the use of AI and Earth Observation (EO) technologies to generate high-resolution mapping of solar PV systems on building rooftops. We started with in Kilifi County, Kenya; specifically, Kilifi South, where about 1 in 5 people use solar power as their main source for lighting.
First, we collected data from various sources, including open-access satellite imagery from Sentinel-1 and Sentinel-2, high-resolution images from Google Maps Static API images, and publicly available research datasets. Once we gathered the images, we processed them to enhance their quality. This included removing blurry parts or noise and enhancing their resolution. Given the limitations of open-access data, we mainly relied on high-resolution imagery from Google Maps for higher accuracy.
After enhancing the image quality, we manually labelled the location of solar panels in the high-resolution images using Google Earth Engine to build a robust training dataset. To increase the variety of training examples, we also divided larger images into smaller sections and applied simple transformations, like rotating or flipping.
This labeled dataset was then used to train our AI object detection model, built using YOLOv81, which is designed to efficiently and accurately identify solar panels.
Once the model was trained, we first tested its performance on a separate set of images that had not been used during training. This achieved an accuracy of 94% based on common evaluation methods (precision, recall and F1 scores). To further assess its real-world applicability, we conducted cross-validation using manually labeled ground truth data from Kilifi South. This step allowed us to measure how well the model could detect solar panels in new, unseen imagery (Figure 2). High precision (the model’s prediction was correct in more than 90% of cases) indicated that most detected solar panels were indeed true solar panels, while high recall suggested that the model successfully identified most solar panels present in the images.
We then applied the model to satellite images of Kilifi South sub-county to map the locations of solar panels in the area and create a georeferenced2 dataset: a digital map layer showing where solar panels are installed. The final model was fine-tuned based on misclassifications, improving its ability to detect panels under varying lighting conditions, rooftop orientations and panel sizes.
Results and Next Steps
We successfully identified 274 existing rooftop solar PV systems within Kilifi town, while also developing a scalable methodology that can provide actionable insights to national and subnational governments, clean energy businesses, civil society and financiers. The outputs of this model – when integrated into EAE and combined with other datasets, such as energy demand, socioeconomic indicators or solar irradiation – can further enhance its utility for integrated energy planning.
This method marks a step forward in improving data-informed, integrated and inclusive energy planning in Kenya by providing high-resolution data on rooftop solar PV systems. Thanks to our modular, open-source approach, we plan to refine and scale the model to assess current and potential applications of small-scale solar systems across Kenya and in other countries in Africa and Asia.
By illuminating where solar power is deployed today, we can chart a brighter, more inclusive energy future for tomorrow.
1 YOLOv8 is a cutting-edge AI model that helps detect objects in images, like spotting solar panels on rooftops. It’s fast, accurate, and easy to train with your own data, making it a powerful tool for real-world mapping and planning projects.
2 “Georeferenced” means that the data is linked to specific geographic locations on the Earth’s surface, allowing it to be accurately placed and viewed on a map.