openpvmapper / README.md
gabrielkasmi's picture
Upload folder using huggingface_hub
c3f10b3 verified
|
Raw
History Blame Contribute Delete
13 kB
metadata
license: cc-by-4.0
language:
  - fr
  - en
pretty_name: OpenPVMapper
tags:
  - geospatial
  - solar-energy
  - photovoltaic
  - remote-sensing
  - france
  - image-segmentation
  - earth-observation
size_categories:
  - 1M<n<10M
task_categories:
  - image-segmentation
configs:
  - config_name: full
    default: true
    data_files:
      - split: train
        path: data/full.parquet
  - config_name: high_confidence
    data_files:
      - split: train
        path: data/high_confidence.parquet
  - config_name: validated
    data_files:
      - split: train
        path: data/validated.parquet
  - config_name: segmentation
    data_files:
      - split: train
        path: data/segmentation/*.parquet
dataset_info:
  - config_name: segmentation
    features:
      - name: array_id
        dtype: string
      - name: tile_bbox
        struct:
          - name: minx
            dtype: float64
          - name: miny
            dtype: float64
          - name: maxx
            dtype: float64
          - name: maxy
            dtype: float64
      - name: tile_size_m
        dtype: float64
      - name: image_source
        dtype: string
      - name: insee
        dtype: string
      - name: dpt
        dtype: string
      - name: kWp
        dtype: float64
      - name: power_class
        dtype: string
      - name: n_sources
        dtype: int64
      - name: sources_list
        list: string
      - name: centroid_lat
        dtype: float64
      - name: centroid_lon
        dtype: float64
      - name: mask_source
        dtype: string
      - name: image
        dtype: image
      - name: mask
        dtype: image
    splits:
      - name: train
        num_examples: 435257

OpenPVMapper

OpenPVMapper is an open, multi-source database of rooftop photovoltaic installations in mainland France: 1,135,850 installations, ~15.0 GWp of estimated installed capacity, covering all 96 mainland départements. It aggregates DeepPVMapper detections (a deep-learning pipeline run on IGN BD ORTHO aerial imagery), OpenStreetMap, FRPV (a per-cadastral-parcel rooftop-PV presence probability), and manual corrections, resolved into a single geometry per installation via a fixed source hierarchy (manual correction > OpenStreetMap > DeepPVMapper > third-party detections).

This Hugging Face release adds two things not in the original data release: derived quality/filtering columns (corroboration count, power class, per-source flags) and an image segmentation config — IGN aerial image + rooftop PV mask pairs for every installation with either multi-source corroboration or manual confirmation, in the spirit of BDAPPV.

See the accompanying paper: Kasmi, G. et al., "OpenPVMapper" (arXiv:2607.25153) for the full construction methodology and validation protocol.

Dataset configs

Config Rows Definition
full (default) 1,135,850 Every installation in the database, no filtering.
high_confidence 430,946 n_sources >= 2 — corroborated by at least 2 independent sources.
validated 26,391 Manually reviewed (false_positive is not null), from the paper's precision/recall annotation campaigns.
segmentation 435,257 Image + mask pairs, for installations that are either high_confidence (n_sources >= 2) OR manually confirmed as a true positive (false_positive == 0).

full, high_confidence, and validated are geospatial tables (one row per installation, GeoParquet with WKB geometry). segmentation is an image dataset (one row per installation, with an aerial image and a rasterized rooftop PV mask).

from datasets import load_dataset

# segmentation: the main entry point for most users — image/mask pairs
# ready for a rooftop PV segmentation model
seg = load_dataset("gabrielkasmi/openpvmapper", "segmentation", split="train")

seg[0]["image"]  # PIL Image, the IGN aerial tile
seg[0]["mask"]   # PIL Image, single-channel 0/255 rooftop PV mask

A few practical things you can do with the tabular configs and the array_id join key:

high_conf = load_dataset("gabrielkasmi/openpvmapper", "high_confidence", split="train")

# residential-scale installations only (P1: 0-9 kWp) — e.g. to study
# self-consumption behavior separately from utility-scale rooftops
residential = high_conf.filter(lambda r: r["power_class"] == "P1")

# all installations in a given département — e.g. for a regional
# capacity study
gironde = high_conf.filter(lambda r: r["dpt"] == "33")

# build a segmentation training subset restricted to large installations
# (P4/P5), by filtering the tabular config first and joining on array_id —
# cheaper than filtering 435k images/masks directly
large_ids = set(high_conf.filter(lambda r: r["power_class"] in ("P4", "P5"))["array_id"])
seg_large = seg.filter(lambda r: r["array_id"] in large_ids)

# quality-weighted analysis: n_sources as a confidence proxy instead of a
# hard cutoff (recall Validation below: precision goes 71.5% -> 96.9% ->
# 98.2% as n_sources goes 1 -> 2 -> 3)
full = load_dataset("gabrielkasmi/openpvmapper", "full", split="train")
by_confidence = full.to_pandas().groupby("n_sources")["kWp"].sum()

For heavier analytical filtering across the full 1.1M-row table, loading the Parquet files directly with pandas/DuckDB/polars will generally be faster than datasets.filter() with a Python predicate.

Schema

full / high_confidence / validated

All three share the same schema — high_confidence and validated are row-filtered subsets of full, not separately-shaped tables.

Original fields (from the source database):

Field Description
array_id Unique, persistent installation identifier.
geometry Installation polygon (WKB), resolved per the source hierarchy above. CRS: EPSG:4326.
insee INSEE commune code.
dpt Département code.
rnb_id Building identifier (Référentiel National des Bâtiments), if matched.
surface Polygon surface area, m².
tilt Estimated panel tilt, degrees.
azimuth Estimated panel azimuth, degrees.
kWp Estimated installed capacity.
sources Raw encoded source ids (e.g. "0,2") — decoded into sources_list below; kept for traceability.
frpv_proba FRPV per-parcel PV-presence probability (0–1), if available.
first_seen / last_seen First / most recent vintage in which the installation is confirmed.
false_positive Manual annotation outcome: 0.0 = confirmed true positive, 1.0 = confirmed false positive, null = never manually reviewed (the large majority of rows — absence of review, not confirmation of correctness).
false_positive_source Which annotation campaign produced false_positive (dpvm_precision / dpvm_recall), null if never reviewed.

Derived fields (added for this release):

Field Description
sources_list sources decoded into readable names, e.g. ["dpvm", "osm"].
n_sources len(sources_list) — corroboration count, the strongest available quality proxy (see Validation below).
has_dpvm, has_frpv, has_osm, has_correction Boolean flags for the four named sources.
power_class P1P5 bucketing of kWp: P1 (0–9), P2 (9–36), P3 (36–100), P4 (100–250), P5 (>250).
bbox {minx, miny, maxx, maxy} bounding box of geometry, lon/lat.
centroid_lon, centroid_lat Installation centroid, as plain floats (for quick filtering without a geometry engine).

segmentation

Field Description
array_id Joins back to the tabular configs above.
image IGN BD ORTHO aerial tile, 400×400px, ~0.2m/px ground sample distance, centered on the installation (or on a random interior point for installations too large to fit the tile at fixed GSD — see Limitations).
mask Single-channel (0/255) rooftop PV mask, rasterized from geometry, pixel-aligned with image.
image_source Imagery provider. "ign" for every row in this release (V1). Reserved for future providers (e.g. Sentinel, SPOT) in a later release — always check this column rather than assuming, if you mix releases.
mask_source Provenance of the polygon rasterized into mask: "osm" if the installation's sources_list includes OSM (a human-traced footprint), else "auto" (DeepPVMapper/FRPV/correction-derived automated detection — 413,368 / 435,257 rows, ~95%). Will later also carry "manual_corrected" for masks fixed through a planned crowdsourced correction tool — see Limitations.
tile_bbox {minx, miny, maxx, maxy} of the fetched tile, lon/lat — lets you re-fetch a sharper/alternate image for the same footprint later.
tile_size_m Ground size of the tile in meters (usually 80m at 0.2m/px × 400px; larger for oversized installations framed differently, see Limitations).
insee, dpt, kWp, power_class, n_sources, sources_list, centroid_lat, centroid_lon Passed through from the tabular schema above, for filtering without a join.

Validation

Precision was assessed by manual review of 1,862 installations (two independent stratified samples: by source combination, and by power class). Global precision, weighted by true stratum population: ~74–75%. Corroboration across sources matters a lot — this is the basis for n_sources as a quality proxy and for the high_confidence/segmentation config perimeters:

Corroboration Precision
1 source 71.5%
2 sources 96.9%
3 sources 98.2%

Only the validated config (26,391 rows) carries a directly human-checked label (false_positive). The 1,862-installation precision sample above is a separate, smaller stratified audit used to estimate accuracy across the whole database — most individual rows outside validated have never been looked at by a human.

Limitations

  • Rooftop PV masks are algorithmically generated, not manually annotated. Every mask in segmentation is a rasterization of a polygon produced by the automated multi-source pipeline (DeepPVMapper detection, OpenStreetMap tracing, or manual correction where mask_source == "osm"/available) — not a pixel-level human annotation. Overlap with the true panel outline is generally good but can be imperfect or partial, especially for irregular roof shapes or multi-part arrays. If you need manually annotated, pixel-accurate segmentation masks, use BDAPPV instead, which is purpose-built for that. A crowdsourced mask-correction tool is planned for OpenPVMapper (see mask_source above); this card will be updated as corrected masks land.
  • Installation/polygon boundaries carry inherent ambiguity — e.g. where a large industrial roof has several separately-tilted PV arrays, or where DeepPVMapper's detection and OSM's tracing disagree on the exact building/array boundary. geometry reflects the source hierarchy's resolution, not a single unambiguous ground truth.
  • Global precision (~74-75%) applies to full, not the whole database uniformly — precision rises sharply with n_sources (see Validation above), which is exactly why high_confidence and segmentation filter on it. Use full only if you specifically need recall over precision, or intend to filter/weight by n_sources yourself.
  • Large installations in segmentation (roughly >32m in ground extent) don't fit inside a single fixed-GSD 400×400px tile alongside their full context. Rather than vary the GSD (which would make masks inconsistent in scale across the dataset) or split into sub-tiles, this release centers the tile on a random point inside the installation's polygon (seeded by array_id, so reproducible) — the mask may then only partially cover the tile. Check tile_size_m if this matters for your use case.
  • image_source is "ign" for every row in this release. The column is reserved for a planned V2 extension (Sentinel/SPOT imagery) — don't assume future releases are IGN-only.

Attribution & citation

Data licensed CC-BY 4.0 (code used to build this release is licensed separately — see the linked repositories).

  • DeepPVMapper: detection pipeline. Source: github.com/gabrielkasmi/deeppvmapper.
  • OpenStreetMap: © OpenStreetMap contributors.
  • FRPV: Nerot, B.; Thébault, M. (2024). "FRPV - Presence of Rooftop Photovoltaic (RPV) systems on French buildings." Recherche Data Gouv, V3. doi.org/10.57745/BXXYW4
  • Imagery: © IGN — BD ORTHO, via the Géoplateforme WMS API (data.geopf.fr).
  • Paper: Kasmi, G. et al., arXiv:2607.25153.

If you use this dataset, please cite the paper above alongside the FRPV and OpenStreetMap attributions where relevant.