A research pipeline for large-scale urban tree crown detection and tree genus mapping using very-high-resolution multispectral aerial imagery and LiDAR data.
The multispectral aerial imagery and LiDAR data provided by the LGL Open GeoData-Portal https://www.lgl-bw.de/Produkte/Open-Data/
Urban Tree Genera Mapping provides an end-to-end, research-oriented workflow to:
- Download and preprocess LGL Open GeoData (multi-spectral orthophotos & nDSM).
- Build 5-channel raster tiles (RGB + NIR + normalized height).
- Perform tree crown delineation and detection
- Predict tree genera using deep learning
- Apply a teacher–student learning strategy with human-in-the-loop curation
- Scale inference to statewide coverage
- Export results as GeoPackage for GIS analysis
The code accompanies an upcoming open dataset and scientific publication on regional-scale tree genera mapping in Baden-Württemberg, Germany.
Clone the repository:
git clone https://github.com/GIScience/tree-genera-mapping
cd tree-genera-mappingCreate and activate a Conda environment:
conda env create -f environment.yaml
conda activate map-tree-generaHow to run the pre-trained YOLOv11l model 5CH imagery
- Download LGL products to Generate TileDataset for selected tile ids:
python scripts/fetch_tiles.py \
--tile-id 32_355_6048- Run pre-trained YOLOv11l model to detect and classify tree genus:
python scripts/predict_yolo.py --tiles-gpkg data/tiles.gpkg --images-dir cache/tiles_5ch --model-path models/pretrained_yolov11l_tree_genus.pth --output-dir cache/initial_inference| Task | Model Name | Modification | URL Link |
|---|---|---|---|
| Object Detection (tree + genus) | YOLO11l | 5-Channel Input | yolo11l_tree_genus.pt |
| Object Detection (tree) | YOLO11l | 5-Channel Input | yolo11l_tree.pt |
This repository accompanies:
- Dataset: {add}
- Paper: {add}
If you use this code or workflow, please cite the accompanying paper.
See CITATION.cff for details.

