Skip to main content

AI Canopy-to-Impervious Ratio: Intelligent Urban Planning

Gitlab Project

At a Glance #

Context: University project for “Baum Schwyz” within the APPLAI module.
Goal: Automated calculation of the tree canopy to impervious surface ratio (CIR).
Tech Stack: PyTorch (U-Net), LiDAR, GeoPandas, Python.
Result: A pipeline generating high-resolution heatmaps to strategically plan tree planting locations.


Motivation #

In the face of climate change, urban heat islands and biodiversity loss are massive issues. The “Baum Schwyz” initiative aims to counteract this, but effective interventions require data: Where does a new tree provide the most benefit?

The goal of this project was to move away from mere estimates and develop a scalable, automated metric: The Canopy-to-Impervious Ratio (CIR). We wanted to identify “hotspots”—areas with lots of concrete and little shade.

The Solution #

I developed a system that fuses two distinct data streams:

  1. 3D LiDAR Data for precise vegetation detection.
  2. High-resolution Aerial Imagery (RGB) for detecting impervious surfaces (asphalt, concrete, roofs).

The result is not just a spreadsheet, but a visual heatmap showing stakeholders at a glance where action is needed.

Methodology & Tech Stack #

1. Data Pipeline #

I used two primary sources:

  • Tree Detection (LiDAR): I didn’t train a model from scratch here, but used classified point clouds from swisstopo. Using a height filter (> 3m above ground), I reliably isolated trees from bushes and grass.
  • Imperviousness Detection (Aerial Imagery): Precise data was lacking here, so I trained my own ML model.

2. The Model: U-Net instead of YOLO #

Initially, I experimented with Object Detection (YOLO).

  • Problem: A road isn’t a discrete object like a “car” with a bounding box. It is a continuous surface with complex boundaries.
  • Solution: Switched to U-Net (Semantic Segmentation). This model classifies every single pixel as “Impervious” or “Permeable”.

Architecture Details:

  • Backbone: ResNet34 (pre-trained on ImageNet) for fast convergence.
  • Input: 512x512 pixel tiles (Training) / 256x256 tiles (Inference).
  • Tiling: To process the massive aerial images, the system breaks the map into small tiles, analyzes them, and stitches them back together seamlessly.

Challenges #

“Is that water or asphalt?” #

The biggest hurdle was distinguishing visually similar surfaces.

  • Dark lakes looked like fresh asphalt to the model.
  • Light gravel paths looked like concrete.

Solution: I conducted specific “labeling rounds” focusing only on these edge cases (lakeshores, forest paths) to teach the model the difference. Additionally, I used a Gaussian Filter to smooth the heatmap and suppress “noise” (individual misclassified pixels).

Results #

The final model achieved an IoU (Intersection-over-Union) of ~85%.

The pipeline (cir_report) is fully automated. You input a Bounding Box (Swiss LV95 coordinates) and receive:

  1. Shapefiles (.shp): For GIS professionals for further processing.
  2. Visual Report: A heatmap for decision-makers.

Interested in a project?