Solar Panel Segmentation in High-Resolution Satellite Imagery: A YOLOv8-GIS Approach in the Marrakech-Safi Region, Morocco
Keywords: GIS, Computer vision, Yolov8, Solar Panels, Segmentation
Abstract. Green energy usage in Morocco is gaining traction, particularly in the realm of solar panels, which hold great potential for use in agriculture and residential settings. Recently, there has been growing interest in exploring ways to automatically gather important information about solar installations in specific geographic areas of interest. To address this goal, we developed a geoAI approach that utilizes satellite high-resolution imagery and the YOLOv8 computer vision algorithm for accurate solar panel segmentation in the Marrakech-Safi region of Morocco. Training images were obtained from open-source, annotated datasets available on the web, and we pseudo-labeled images from our Area of Interest using a semi-supervised learning approach. We built, trained, and tested the solar panel dataset, which included 4660 images. Subsequently, we performed geoprocessing analysis to extract estimated geometric parameters such as the area, perimeter, and angles of the segmented solar panels. These shape parameters were then employed in unsupervised machine learning to detect anomalies in the segmented data by using the Isolation Forest algorithm. Precision, recall rate, and mAP50 were used for the evaluation of the Yolov8 segmentation model. The results showed a high precision rate of 96.9%, a recall rate of 97.6%, and an mAP score of 0.99, indicating the effectiveness of the Yolov8 segmentations in accurately segmenting solar panels. Our approach successfully segmented 18,050 PV modules, covering an estimated area of 1.47 km2 in the study area, with an average confidence of 89%. This demonstrates the model's capability to accurately identify and isolate solar panels within complex scenes. The high precision and recall rates suggest that our approach is robust for large-scale solar panel detection in diverse landscapes. Successfully segmenting over 18,000 PV modules indicates the scalability of our method. Additionally, integrating geoprocessing analysis and the Isolation Forest algorithm enhances our approach, allowing for the identification of anomalies in solar panel installations. This research provides valuable insights into the extent of solar panel adoption in the Marrakech-Safi region, offers a robust methodology for large-scale solar installation mapping, and establishes a foundation for future nationwide studies, potentially informing energy policies and supporting sustainable development initiatives across Morocco.
