Views
No views yet
| 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 |
1import torch
2from huggingface_hub import hf_hub_download
3from src.model import ProtoNet # from GitHub repo
4
5# Backbone must match the checkpoint; pretrained init is overwritten by load_state_dict
6model = ProtoNet(
7 backbone_name="resnet50",
8 pretrained="imagenet_v1",
9 unfreeze_from="none",
10)
11
12ckpt_path = hf_hub_download(
13 repo_id="zmgul/few-shot-woodland-segmentation",
14 filename="experiments/checkpoints/best_ProtoNet_ResNet50_SeCo_none_fold1_seed-42.pt",
15)
16state = torch.load(ckpt_path, map_location="cpu")
17model.load_state_dict(state["model_state_dict"])
18model.eval()
19
20# 5 support tiles + masks, 1 query tile → binary woodland mask
21# See notebooks/05_qualitative_results.ipynb for end-to-end inference example.1@mastersthesis{gul2026woodland,
2 author = {Gül, Zehra Merve},
3 title = {Woodland Segmentation in High-Resolution Aerial Imagery Using Few-Shot Learning},
4 school = {İstanbul University, Institute of Graduate Studies in Sciences},
5 year = {2026},
6 type = {Master's thesis}
7}