Case study
Land-cover segmentation
Wildfire-risk screening for British Columbia homes: segmentation models find buildings and vegetation in aerial imagery, and every parcel gets a FireSmart score.
The problem
FireSmart Canada rates a home's wildfire exposure by how much vegetation sits in the zones around it: the first 1.5 m, out to 10 m, 10 to 30 m, and beyond. Scoring whole communities that way needs building footprints and vegetation masks pulled from aerial imagery, stitched back onto map coordinates and clipped to property parcels so each parcel gets its own number. Built as a course project, for wildland-urban-interface towns in BC.
The approach
- Training data came from LandCover.ai (Poland, five classes) and the INRIA aerial labelling set, tiled to 512 px and re-split by source image so tiles from one photo never leak between train, validation and test.
- A time-budgeted search over segmentation_models_pytorch ran 15 configurations (U-Net, DeepLabV3+, FPN, MAnet, LinkNet and PSPNet with ResNet, EfficientNet and MobileNet encoders at three learning rates) for three epochs each on a subset, ranked them by validation mIoU, then trained the winner in full with AdamW, weighted cross-entropy, mixed precision, a cosine schedule and early stopping. FPN with an EfficientNet-B3 encoder won.
- The multiclass winner was weak on buildings (0.13 IoU against 0.58 for woodland), so the project moved to separate binary detectors for buildings and woodland with BCE-plus-Dice loss and class weighting, and later a ConvNeXt-XLarge encoder with a light MLP decoder and focal loss.
- Inference runs both detectors over tiles and cleans the masks morphologically: erode, drop blobs with the wrong aspect ratio or solidity, dilate, intersect with the raw mask, close, and discard anything under a minimum area.
- Risk scoring finds each building as a connected component, takes a Euclidean distance transform from its edge, forms the four FireSmart rings and sums vegetation density per ring with the inner rings weighted highest. Parcel scoring reads the GeoTIFF's georeferencing tags directly and clips the masks to ParcelMap BC polygons, so results come out per property.
- For West Kelowna, Logan Lake and Silver Star, where only 1 m government orthophotos exist, the same scoring ran on Microsoft Building Footprints and Meta's canopy-height maps, giving a low-resolution comparison against the 6 cm drone imagery and CNN masks used for Cumberland.
The result
The committed Cumberland run scored 2,397 buildings across 1,147 tiles at 6 cm resolution: nine high risk, 39 moderate and the rest low, with a mean distance to the nearest vegetation of 5.7 m. The ConvNeXt woodland model reached 0.90 IoU on its test split; the project's data sheet reports 0.74 IoU for the earlier FPN building model and 0.76 for vegetation.
Built with
More case studies
- TraceUnsupervised anomaly detection that surfaced a hidden multi-stage attack in 180,800 unlabelled Apache log lines, then handed analysts an investigation console.
- MapleVaultSigned, hash-linked supplier attestations for Canadian defence procurement, with a verifier that computes Canadian content and catches forgery, tampering and replay.
- Agent²Your real estate agent's agent: text a number, take a short call with an AI voice agent, and get a matched listing back by SMS.
- PlanteA pixel-art smart greenhouse: a Raspberry Pi watches the plants and works the lid, and the app turns keeping them alive into a game.