Python · computer vision · geodata · year-over-year change
TreeCounter
An app that counts and measures trees on open orthophotos - and, by comparing archival vintages, flags where trees disappeared. AI detection, heights from Poland's open LIDAR elevation models, and open forestry data come together into a stand report.
The challenge
Green inventories - for tree-removal permits, compensation plantings, or municipal records - are still done on foot, tree by tree. Poland's open GUGiK orthophotos cover the whole country at 25 cm resolution, yet nobody counts them systematically.
The solution
Draw a polygon (or paste a parcel number - the boundary comes from the national ULDK service), and the app fetches Geoportal orthophotos and detects crowns with the DeepForest neural network, measuring their diameters as it goes. Poland's open elevation models (DSM−DTM) give every tree a measured height and the polygon its canopy cover, and comparing two archival vintages (2012-2025) classifies each tree: stable, candidate loss, or new. Results flow straight into office formats: GeoPackage/Shapefile, filling a contracting authority's template geodatabase, a stand report from open forestry data, and a batch CLI.
Scope & technology
A prototype heading toward green pre-inventories for environmental consultancies and municipalities, and loss monitoring (illegal removals, canopy-cover reporting under the EU Nature Restoration Regulation). False positives are cut by a filter cascade: the canopy-height model drops ground-level hits, EGiB+OSM building footprints drop trees "growing" on roofs, and GUGiK's national 3D-tree model (from airborne laser scanning) adds an independent consensus voice plus an agreement score against official data. Bilingual (PL/EN). Python, PySide6, Leaflet, DeepForest/PyTorch, Hungarian matching for accuracy validation; open services: GUGiK (orthophotos, elevation, parcels, 3D trees), Forest Data Bank, GDOŚ.