=== versions === python 3.12.0 | torch 2.15.0+cpu | transformers 5.23.0 | rasterio 1.5.2 | geopandas 1.2.0 | shapely 2.2.0 device: CPU (8 threads), CUDA available: False === aerial photography (PDOK Luchtfoto 2025 ortho 25 cm) === Kanaleneiland calibration centre RD 135240, 453790 | 2048 x 2048 px at 0.25 m = 512 x 512 m Parkwijk, Leidsche Rijn test centre RD 132510, 456750 | 2048 x 2048 px at 0.25 m = 512 x 512 m === reference: BGT (Basisregistratie Grootschalige Topografie) === Kanaleneiland buildings (pand) 318 | roof blocks 144 | water 1.70 ha | registered trees 887 | road and parking surface 8.50 ha Parkwijk, Leidsche Rijn buildings (pand) 464 | roof blocks 175 | water 2.18 ha | registered trees 533 | road and parking surface 9.57 ha === models === IDEA-Research/grounding-dino-base: 232 M parameters | facebook/sam2.1-hiera-large: 217 M parameters | loaded in 1.8 s (both Apache-2.0) === Grounding DINO: 6 prompts x 2 tile sizes (9 tiles of 1024 px, 49 of 512 px per site) === Kanaleneiland: detections read from kanaleneiland_detections.csv Parkwijk, Leidsche Rijn: detections read from parkwijk_detections.csv === SAM 2.1: one box prompt per detection (9 tiles of 1024 px per site) === Kanaleneiland: masks read from kanaleneiland_masks.gpkg Parkwijk, Leidsche Rijn: masks read from parkwijk_masks.gpkg timings from the run that built the caches in data/: count total_s seconds_each step Grounding DINO, 1024-px tile 144 583.458 4.052 Grounding DINO, 512-px tile 784 2981.202 3.803 SAM 2.1 image encoder, 1024-px tile 18 77.068 4.282 SAM 2.1 mask decoder, per box 14302 456.565 0.032 polygons with a box score of at least 0.1: Kanaleneiland Parkwijk, Leidsche Rijn cls prompt det_tile building building. 512 294 345 1024 170 190 house. 512 580 664 1024 289 347 roof. 512 293 354 1024 196 187 car car. 512 506 664 1024 197 368 tree a tree. 512 427 584 1024 262 242 tree crown. 512 461 503 1024 143 62 tree. 512 1511 1977 1024 995 1252 water water. 512 75 104 1024 26 34 === calibration: every prompt wording, tile size and score threshold === best F1 on Kanaleneiland for each wording and tile size: cls prompt det_tile thr objects precision recall f1 building building. 512 0.20 88 0.64 0.86 0.74 building building. 1024 0.18 77 0.60 0.92 0.73 building house. 512 0.22 99 0.67 0.85 0.75 building house. 1024 0.22 76 0.64 0.84 0.73 building roof. 512 0.15 156 0.55 0.87 0.67 building roof. 1024 0.15 93 0.54 0.87 0.66 tree a tree. 512 0.10 427 0.73 0.71 0.72 tree a tree. 1024 0.10 262 0.81 0.68 0.74 tree tree crown. 512 0.10 461 0.66 0.71 0.68 tree tree crown. 1024 0.10 143 0.80 0.55 0.65 tree tree. 512 0.12 1076 0.51 0.80 0.62 tree tree. 1024 0.18 232 0.71 0.74 0.72 water water. 512 0.30 7 0.75 0.56 0.64 water water. 1024 0.15 9 0.71 0.61 0.66 cars on Kanaleneiland (how many, and the share on a BGT road or parking surface): objects on_road det_tile 512 1024 512 1024 thr 0.10 506.0 197.0 0.79 0.82 0.15 243.0 72.0 0.88 0.89 0.20 126.0 26.0 0.90 0.85 0.25 66.0 10.0 0.89 1.00 0.30 28.0 3.0 0.96 1.00 0.35 13.0 0.0 1.00 0.00 0.40 4.0 0.0 1.00 0.00 0.45 2.0 0.0 1.00 0.00 0.50 0.0 0.0 0.00 0.00 chosen: building: 'house.' on 512-px tiles, score >= 0.225; tree: 'a tree.' on 1024-px tiles, score >= 0.1; water: 'water.' on 1024-px tiles, score >= 0.15; car: 'car.' on 512-px tiles, score >= 0.3 (building, tree, water: highest F1; car: the most cars with at least 95% on a road or parking surface) === accuracy with the Kanaleneiland settings === Kanaleneiland (calibration) building 99 polygons | pixels: precision 67%, recall 85%, IoU 0.60, F1 0.75 | objects (IoU >= 0.5): F1 0.12 against single BGT pand, 0.28 against roof blocks tree 262 crowns | 81% hold a registered tree; 68% of 887 registered trees are inside a crown; F1 0.74 water 9 polygons | pixels: precision 71%, recall 61%, IoU 0.49, F1 0.66 car 28 cars | 96% on a BGT road or parking surface best F1 this site could have reached with its own settings: building 0.75, tree 0.74, water 0.66 Parkwijk, Leidsche Rijn (test) building 103 polygons | pixels: precision 59%, recall 86%, IoU 0.54, F1 0.70 | objects (IoU >= 0.5): F1 0.08 against single BGT pand, 0.35 against roof blocks tree 242 crowns | 65% hold a registered tree; 67% of 533 registered trees are inside a crown; F1 0.66 water 11 polygons | pixels: precision 42%, recall 38%, IoU 0.25, F1 0.40 car 33 cars | 94% on a BGT road or parking surface best F1 this site could have reached with its own settings: building 0.70, tree 0.68, water 0.49 === what SAM adds: the Grounding DINO boxes alone as building outlines === Kanaleneiland boxes: pixel IoU 0.33, F1 0.50, object F1 0.04 | SAM 2.1 masks: pixel IoU 0.60, F1 0.75, object F1 0.12 Parkwijk, Leidsche Rijn boxes: pixel IoU 0.38, F1 0.55, object F1 0.04 | SAM 2.1 masks: pixel IoU 0.54, F1 0.70, object F1 0.08 === Parkwijk: share of BGT buildings found, by footprint size === buildings recall size under 20 m² 200 0.00 20-50 m² 46 0.04 50-150 m² 194 0.03 150-500 m² 12 0.58 over 500 m² 12 0.67 median IoU of the matched buildings: 0.67 === outputs === wrote 787 polygons in 8 layers to text_prompt_sam.gpkg (EPSG:28992) figures written to output/