Few-Shot Woodland Segmentation
Master's thesis: Woodland Segmentation in High-Resolution Aerial Imagery Using Few-Shot Learning.
Source code: github.com/zmgul/few-shot-woodland-segmentation
Prototypical network (ProtoNet) based 1-way 5-shot binary segmentation on LandCover.ai v1, with woodland as the novel class. 4 checkpoints published — one per experiment, each being the best-fold weights from 5-fold cross-validation.
Results
| Experiment | Configuration | Checkpoint | fgIoU |
|---|---|---|---|
| 1 — Backbone | Swin-T (frozen, ImageNet) | best_ProtoNet_SwinT_none_fold1_seed-42.pt |
0.603 |
| 2 — Layer unfreezing (CNN) | ResNet-50 layer3 | best_ProtoNet_ResNet50_layer3_fold4_seed-42.pt |
0.587 |
| 3 — Stage unfreezing (ViT) | Swin-T stage3 | best_ProtoNet_SwinT_ImageNetV1_stage3_fold1_seed-42.pt |
0.605 |
| 4 — Pre-training ★ | SeCo + ResNet-50 (frozen) | best_ProtoNet_ResNet50_SeCo_none_fold1_seed-42.pt |
0.656 |
Key finding: Pre-training source dominates other factors — self-supervised SeCo outperforms all supervised sources, including domain-aligned Million-AID. Δ_pretrain = 0.103 (≈ 2× backbone effect, ≈ 8× fine-tuning effect).
Dataset
LandCover.ai v1 — 41 high-resolution aerial images (25–50 cm/pixel) over Poland. 4 labeled land-cover classes + background. Woodland (33.3%) is held out as the novel class; building, water, road are base classes used for episodic training.
Usage
import torch
from huggingface_hub import hf_hub_download
from src.model import ProtoNet # from GitHub repo
# Backbone must match the checkpoint; pretrained init is overwritten by load_state_dict
model = ProtoNet(
backbone_name="resnet50",
pretrained="imagenet_v1",
unfreeze_from="none",
)
ckpt_path = hf_hub_download(
repo_id="zmgul/few-shot-woodland-segmentation",
filename="experiments/checkpoints/best_ProtoNet_ResNet50_SeCo_none_fold1_seed-42.pt",
)
state = torch.load(ckpt_path, map_location="cpu")
model.load_state_dict(state["model_state_dict"])
model.eval()
# 5 support tiles + masks, 1 query tile → binary woodland mask
# See notebooks/05_qualitative_results.ipynb for end-to-end inference example.
Citation
@mastersthesis{gul2026woodland,
author = {Gül, Zehra Merve},
title = {Woodland Segmentation in High-Resolution Aerial Imagery Using Few-Shot Learning},
school = {İstanbul University, Institute of Graduate Studies in Sciences},
year = {2026},
type = {Master's thesis}
}
License
MIT (code). LandCover.ai dataset and external pre-trained weights are subject to their original licenses.