Building segmentation for Croatian DOF5 orthophotos (U-Net / ResNet-34)

Binary building-footprint segmentation model for Croatian official digital orthophotos (DOF5) published by the State Geodetic Administration (Državna geodetska uprava, DGU). Given a 3-band RGB orthophoto chip at ~0.5 m/pixel, it predicts a per-pixel probability of "building". Developed for a longitudinal construction-monitoring study of the City of Kaštela (Split-Dalmatia County), 2011–2023.

  • Author: Dino Novak
  • Architecture: U-Net with ResNet-34 encoder (ImageNet-initialized), built with segmentation-models-pytorch
  • Input: 3×512×512 RGB, per-chip per-channel z-score normalization
  • Output: 1×512×512 logits (sigmoid → building probability)
  • Weights: unet_best.pt (PyTorch state_dict, ~98 MB)

Training data (all public/open sources)

Imagery — DGU DOF5 digital orthophoto, 2023 survey. The official state orthophoto map of the Republic of Croatia at 1:5000 scale, RGB, native 20–25 cm GSD, served openly via the DGU Geoportal WMS (https://geoportal.dgu.hr/services/inspire/orthophoto_2023/wms, "Digitalni ortofoto 2023. – WMS za anonimne korisnike"). Downloaded and resampled to 0.5 m/px over the study area (City of Kaštela and surroundings, ~215 km², HTRS96/TM EPSG:3765). Terms: Croatian Open Data Licence (https://data.gov.hr/otvorena-dozvola), attribution: Državna geodetska uprava, Republika Hrvatska.

Labels — DGU cadastral building polygons (INSPIRE Buildings theme). "Zgrade iz Digitalnog katastarskog plana – INSPIRE" served via public WFS (https://api.uredjenazemlja.hr/services/inspire/bu/wfs, layer BU.Building). ~38,000 building polygons within the study area were rasterized over the 2023 mosaic as binary masks. Attribution: Državna geodetska uprava / Uređena zemlja.

Dataset: ~1,900 chips of 512×512 px (0.5 m GSD), all chips containing buildings plus 25% of building-free chips (hard negatives: orchards, vineyards, bare karst, roads, greenhouses). 85/15 train/validation split.

Label noise is inherent and accepted: unregistered buildings appear as unlabeled roofs; a small number of registered buildings post-date the 2023 imagery. The model demonstrably still learns to detect unregistered buildings, since they are visually identical to registered ones.

Training procedure

BCE + Dice loss, AdamW (lr 3e-4, cosine annealing), batch 16, mixed precision, early stopping on validation IoU. Augmentation: flips, 90° rotations, and photometric augmentation designed for epoch transfer (per-channel gamma 0.6–1.6, Gaussian blur σ 0.5–1.8, sensor noise) so the model generalizes from the 2023 survey to older, hazier DOF5 epochs (2011, 2014/16, 2017, 2019, 2021) despite different cameras and atmospheric conditions. Per-chip z-score input normalization additionally removes linear radiometric differences between epochs.

Evaluation

Pixel validation IoU on held-out 2023 chips: 0.526 (40 epochs, early stopping; best at epoch 30). Note that this is measured against noisy cadastre labels, so instance-level performance is materially better than the pixel score suggests. An ablation without photometric augmentation scores nominally higher on same-epoch validation (0.541) but transfers far worse to older DOF5 epochs (e.g. 25.5% vs 61.5% cadastre coverage on the 2017 epoch) — the augmented model is the published one.

Cross-epoch recall proxy — share of cadastre buildings (≥25 m²) covered

30% by predicted footprints, City of Kaštela (note: the cadastre is cumulative-to-2026, so early epochs are expected to cover less of it — buildings did not exist yet):

DOF5 epoch coverage >30% median coverage
2011 48.7% 0.27
2017 61.5% 0.60
2019 57.6% 0.52
2021 69.6% 0.72
2023 80.5% 0.87

Intended use

  • Building-footprint extraction from DGU DOF5 RGB orthophotos (2011 and newer epochs, 20–50 cm native GSD, used at 0.5 m/px).
  • Multi-epoch change detection / construction monitoring: comparing footprints between DOF5 surveys to locate new construction, including buildings absent from the cadastre.
  • Geography: trained on Dalmatian coastal settlement patterns (terracotta and flat grey/white roofs, karst, Mediterranean vegetation). Expected to transfer to similar Croatian coastal areas; validate before relying on it for continental Croatia or other countries.

Out of scope / limitations

  • Not trained on satellite imagery, other national orthophoto programs, or GSD coarser than ~0.6 m — performance there is unknown.
  • Touching buildings in dense historic cores can merge into one polygon (raise the threshold to ~0.6 to mitigate).
  • Occasional confusion with large containers, paved terraces.
  • Not a legal instrument. Outputs are probabilistic image analysis and must not be the sole basis for enforcement, legalization, or property decisions. Croatian regulations treat the DOF5/2011 orthophoto as a statutory reference for legalization; any official determination requires human verification against authoritative sources.

How to use

import numpy as np, torch, segmentation_models_pytorch as smp

model = smp.Unet("resnet34", encoder_weights=None, in_channels=3, classes=1)
model.load_state_dict(torch.load("unet_best.pt", map_location="cpu"))
model.eval()

def zscore(img):                      # img: float32 (3,H,W)
    m = img.mean(axis=(1, 2), keepdims=True)
    s = img.std(axis=(1, 2), keepdims=True) + 1e-6
    return (img - m) / s

chip = ...  # (3,512,512) uint8 RGB from a DOF5 orthophoto at 0.5 m/px
x = torch.from_numpy(zscore(chip.astype(np.float32))[None])
with torch.no_grad():
    prob = torch.sigmoid(model(x))[0, 0].numpy()   # (512,512) in [0,1]
mask = prob > 0.5

inference_example.py in this repository is a complete sliding-window script: GeoTIFF/VRT in → building-footprint GeoPackage out.

Attribution & license

Model weights and card: CC-BY-4.0. The model derives from open data of the Republic of Croatia; when using it or its outputs, attribute:

Imagery and cadastral data: Državna geodetska uprava (DGU), Republika Hrvatska — DOF5 digital orthophoto (geoportal.dgu.hr) and INSPIRE Buildings / Digitalni katastarski plan (uredjenazemlja.hr), Croatian Open Data Licence (data.gov.hr/otvorena-dozvola).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support