Energy Infrastructure from Remote Sensing Team Beta
Estimate energy production from open data, and help to inform cantonal energy planning.
The group has been split into two subgroups; for the other subgroup, see Energy Infrastructure from Remote Sensing Team Alpha
The Canton Bern aims to reduce net greenhouse gas emissions to zero by 2050. Energy production from renewable resources will play a major part towards achieving this goal; therefore, new energy production infrastructure is built increasingly. Examples include solar panels or heat pumps. Depending on the project, such installations may not require administrative permission. This makes their installation more attractive, but makes it more difficult to know how much of the goal has already been achieved. From a planning perspective, it would be beneficial to know where solar panels and heat pumps are installed and have an indication about their production capacity. An ai tool based on open data (e.g. LIDAR, orthophoto or satellite data) would be a valuable contribution.
Image source: Bundesamt für Landestopografie swisstopo
Purpose
The aim of the project is to leverage open data, such as LIDAR and satellite imagery, to develop an AI model that can identify and quantify heat pumps installed in the canton. This will provide valuable in-sights for long-term energy planning and support the transition to more climate-friendly heating systems.
Common practices involve manual inspections and energy consumption data analysis. However, these methods are time-consuming and may not provide real-time or comprehensive data. The state-of-the-art in foundation models for this thematic area includes using computer vision and machine learning tech-niques to analyze aerial and satellite imagery for various urban planning purposes. However, specific applications for heat pump identification are less explored, while applications in the detection of solar panels are better established.
Inputs
This challenge involves the following steps:
- Data Collection: Gather and preprocess remote sensing data and information about current infrastructure locations.
- Model Development: Train an AI model to detect heat pumps or solar panels from collected data.
- Validation: Validate the model's accuracy using ground truth data.
- Energy Demand Assessment: Use the model's output to estimate the energy demand created by heat pumps or the production capacity of solar panels.
- Visualization: Create visualizations and dashboards to present the findings.
- Reporting: Document the process, results, and potential applications for energy planning.
Access to AI models and infrastructure will be crucial for executing these activities. This includes:
- Data Sources: Open remote sensing data. Federal info on currently existing infrastructure and their locations.
- AI Tools: Pre-trained models for object detection and image classification.
- Computing Resources: Cloud-based GPUs for model training and inference.
- Software: Python libraries for data processing and machine learning (e.g., TensorFlow, PyTorch).
A list of references can be found on this Zotero Bibliography. For a selection of useful open datasets, see Open Datasets section.
Outputs
This project will promote open science by making the AI model, data, and code publicly available. It will also support public policy by providing data-driven insights for energy planning and climate conscious-ness. The outcomes will catalyze a larger project by demonstrating the feasibility of using AI for energy infrastructure assessment, potentially leading to broader applications.
The proposed activities align with the goals of the Swiss AI Initiative by leveraging sovereign AI for sus-tainable energy planning. The strategic importance and potential impact of this project are significant for Swiss society, as it supports the transition to renewable energy sources and enhances energy planning capabilities. The insights gained can also be relevant for Europe and the world, promoting similar initia-tives in other regions.
Compliance
Ethical considerations include ensuring data privacy and accuracy, acknowledging all contributors, and sharing the results under a permissive license. Regulatory guidelines will be maintained by adhering to data protection laws and obtaining necessary permissions for data use. The project will follow the guidelines outlined in the FAQ of the Swiss {ai} Weeks to ensure ethical norms are upheld.
Open Datasets
- Cadastral Map
- Electricity Production Plants
- Federal Register of Buildings and Dwellings
- OpenAerialMap
- Recipients of Feed-in Remuneration at Cost
- Suitability of Roofs for the Use of Solar Energy
- swissALTI3D
- swissBOUNDARIES3D
- swissBUILDINGS3D 3.0 Beta
- SWISSIMAGE 10 Cm, Digital Orthophotomosaic of Switzerland
- swissSURFACE3D
- swissSURFACE3D Raster
🅰️ℹ️ Written with help from MISTRAL24B
Bern Solar Panel Detection
Un progetto di computer vision per il rilevamento automatico di pannelli solari attraverso l'analisi di ortofoto aeree nel cantone di Berna, Svizzera. Il sistema utilizza dati open data di swisstopo e opendata.swiss per creare un dataset bilanciato di immagini aeree ad alta risoluzione per l'addestramento di modelli di machine learning.
Problema
Identificare automaticamente gli edifici dotati di pannelli solari attraverso l'analisi di fotografie aeree ad alta risoluzione (ortofoto).
Processo di Sviluppo
- Estrazione Dati: Ottenimento dei dati da opendata.swiss sui pannelli solari e edifici nel cantone di Berna
- Estrazione Coordinate: Matching spaziale tra edifici con pannelli solari e coordinate geografiche
- Acquisizione Ortofoto: Download automatico di ortofoto ad alta risoluzione da swisstopo WMS
- Creazione Dataset: Costruzione di un dataset bilanciato con rapporto ~1:3 tra esempi positivi e negativi
Pipeline del Progetto
🏗️ Preprocessing dei Dati
sample.py: Campionamento casuale di 24.000 edifici dal dataset completo del cantone di Bernamatch.py: Matching spaziale tra edifici con pannelli solari e coordinate geografiche per identificare esempi positiviorthophoto.py: Download di ortofoto per edifici con pannelli solari (esempi positivi)original-orthophoto.py: Download di ortofoto per edifici casuali (esempi negativi/non etichettati)
🖼️ Acquisizione Immagini
- Risoluzione: Immagini disponibili in due formati (125x125px e 256x256px)
- Risoluzione spaziale: 20 cm per pixel
- Fonte: Servizio WMS swisstopo (ch.swisstopo.swissimage-product)
- Sistema di coordinate: LV95 (EPSG:2056)
🗺️ Visualizzazione e Analisi
-
folium_map.py: Creazione di mappe interattive HTML con:- Supporto per coordinate Swiss LV95 (EPSG:2056)
- Conversione automatica a WGS84 per visualizzazione web
- Popup informativi dettagliati
- Layer multipli (OpenStreetMap, Esri Satellite)
-
plotmap.py: Visualizzazioni statiche su basemap satellitari:- Plot scatter e hexbin
- Integrazione con dati swisstopo per confini cantonali
- Esportazione in formato PNG ad alta risoluzione
Struttura del Dataset
Dataset Immagini
Il progetto genera quattro directory di immagini per il training di modelli di computer vision:
Esempi Positivi (Edifici con Pannelli Solari)
true-orthophoto-125px/: 8.346 immagini 125x125px di edifici con pannelli solaritrue-orthophoto-256px/: 8.346 immagini 256x256px di edifici con pannelli solari
Esempi Negativi/Non Etichettati
unlabeled-orthophoto-125px/: 23.995 immagini 125x125px di edifici casualiunlabeled-orthophoto-256px/: 19.583 immagini 256x256px di edifici casuali
Rapporto del Dataset: ~1:3 (positivi:negativi), bilanciamento ottimale per training di modelli di classificazione
Dataset CSV
Directory dataset/
BernSolarPanelBuildings.csv: 37.099 edifici con pannelli solari nel cantone di Berna- Include coordinate LV95, indirizzo, potenza installata, data di messa in funzione
buildings_BE.csv: 477.847 edifici totali nel cantone di Bernabuilding_sample_BE.csv: 24.000 edifici campionati casualmente per esempi negativibuildings_BE_matches_xy.csv: 8.347 coordinate di edifici con pannelli solari estratte per il download delle ortofoto
Caratteristiche Tecniche
Coordinate e Proiezioni
- Input: Swiss LV95 (EPSG:2056) - sistema di coordinate ufficiale svizzero
- Output web: WGS84 (EPSG:4326) - conversione automatica per visualizzazione
- Basemap: Web Mercator (EPSG:3857) - per integrazione con mappe satellitari
Parametri Ortofoto
- Risoluzione spaziale: 20 cm/pixel
- Dimensioni immagine: 125x125px (25m x 25m) o 256x256px (51.2m x 51.2m)
- Formato: PNG ad alta qualità
- Copertura: Area di 12.5m di raggio dal centroide dell'edificio
API e Servizi
- Fonte dati: opendata.swiss per dati energia e edifici
- Ortofoto: swisstopo WMS (ch.swisstopo.swissimage-product)
- Confini amministrativi: swisstopo WFS per confini cantonali
Utilizzo
Preparazione del Dataset
# 1. Campionamento di edifici casuali
python sample.py
# 2. Estrazione coordinate edifici con pannelli solari
python match.py
# 3. Download ortofoto edifici con pannelli (esempi positivi)
python orthophoto.py
# 4. Download ortofoto edifici casuali (esempi negativi)
python original-orthophoto.py
Generazione delle Visualizzazioni
# Mappa interattiva di tutti gli edifici con pannelli solari
python folium_map.py --csv dataset/BernSolarPanelBuildings.csv --out maps/solar_buildings.html
# Visualizzazione hexbin della densità di pannelli solari
python plotmap.py --csv dataset/BernSolarPanelBuildings.csv --x _x --y _y --out images/solar_hexbin.png --kind hexbin --gridsize 120
# Scatter plot di tutti gli edifici
python plotmap.py --csv dataset/buildings_BE.csv --x GKODE --y GKODN --out images/buildings_scatter.png --kind scatter --s 0.5
Requisiti
pip install pandas pyproj folium geopandas matplotlib contextily owslib requests
Applicazioni Potenziali
Machine Learning
- Classificazione binaria: Rilevamento presenza/assenza pannelli solari
- Object detection: Localizzazione precisa dei pannelli nelle immagini
- Semantic segmentation: Segmentazione pixel-level dei pannelli solari
- Transfer learning: Fine-tuning di modelli pre-addestrati (ResNet, EfficientNet, etc.)
Analisi Geospaziale
- Mapping: Identificazione automatica di nuove installazioni solari
- Trend analysis: Monitoraggio dell'espansione del fotovoltaico nel tempo
- Urban planning: Supporto alla pianificazione energetica territoriale
- Policy making: Analisi dell'efficacia delle politiche di incentivazione
Computer Vision Research
- Benchmark dataset: Dataset standardizzato per confronto di algoritmi
- Domain adaptation: Trasferimento a altre regioni geografiche
- Multi-temporal analysis: Rilevamento di cambiamenti nel tempo
- Multi-scale analysis: Confronto prestazioni a diverse risoluzioni
Note Tecniche
- Gestione memoria: Download progressivo per dataset di grandi dimensioni
- Error handling: Gestione automatica di fallimenti di download WMS
- Coordinate handling: Supporto automatico per diversi formati di colonne coordinate
- Scalabilità: Pipeline ottimizzata per dataset di centinaia di migliaia di edifici
- Qualità: Controllo qualità automatico delle immagini scaricate
- Reproducibilità: Seed fisso per campionamento deterministico
Struttura Directory
bern-solar-panel-detection/
├── dataset/ # Dataset CSV processati
│ ├── BernSolarPanelBuildings.csv # 37.099 edifici con pannelli
│ ├── buildings_BE.csv # 477.847 edifici totali BE
│ ├── building_sample_BE.csv # 24.000 edifici campionati
│ └── buildings_BE_matches_xy.csv # 8.347 coordinate estratte
├── true-orthophoto-125px/ # 8.346 immagini positive 125px
├── true-orthophoto-256px/ # 8.346 immagini positive 256px
├── unlabeled-orthophoto-125px/ # 23.995 immagini negative 125px
├── unlabeled-orthophoto-256px/ # 19.583 immagini negative 256px
├── maps/ # Mappe HTML interattive
├── images/ # Visualizzazioni statiche PNG
└── *.py # Script di preprocessing e visualizzazione
Licenza e Attribuzioni
- Dati: opendata.swiss (Open Government Data)
- Ortofoto: © swisstopo
- Confini amministrativi: © swisstopo
- Codice: Sviluppato per ricerca accademica in computer vision e energy analytics
Previous
Hackathon Bern
Next project