Skip to content

Instantly share code, notes, and snippets.

@hkristen
hkristen / habitalp2_usage_guide.md
Created January 16, 2026 12:00
HabitAlp2 DataModule Usage Guide

HabitAlp2 DataModule - Quick Reference

What's New

Built on your original semantic segmentation work with these additions:

  • Change Detection task - multiclass CD (9 classes) with bi-temporal pairs
  • 12 terrain layers - LiDAR-derived features (2013/2020 only)
  • Multi-year support - 2003 (RGB only), 2013, 2020 (RGB+NIR+terrain)

⚠️ Critical Limitation: No Proper Splits

@hkristen
hkristen / tiled_inference_example.py
Created January 4, 2026 09:01
TiledInferenceCallback example for TorchGeo PR #3214
"""Example: TiledInferenceCallback for large-scale geospatial inference.
This script demonstrates how to use TorchGeo's TiledInferenceCallback to run
inference on large rasters that don't fit in memory. It handles:
- Tiled processing with configurable patch size and overlap
- Weighted blending at patch boundaries (cosine/linear)
- Automatic geospatial metadata preservation
- Chunked GeoTIFF output for large results
Usage:
@hkristen
hkristen / 102a_coco_retinanet.ipynb
Created December 11, 2018 14:12
Trying to implement Retinanet with fastai
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hkristen
hkristen / lesson1-imageclef2013_plant_leaf_types_natural_custom_head.ipynb
Last active November 22, 2018 11:05
Transfer Learning with pretrained fastai model -> custom head
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# This webapp is based on Healthy or Not (https://github.com/nikhilno1/healthy-or-not) -> Thanks!
from starlette.applications import Starlette
from starlette.responses import JSONResponse, HTMLResponse, RedirectResponse
from fastai import *
from fastai.vision import *
import torch
from io import BytesIO
import uvicorn
import aiohttp
@hkristen
hkristen / lesson1-imageclef2013_plant_leaf_types.ipynb
Last active November 5, 2018 13:40
fastai_v1: Imageclef2013 plant leaf types
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.