📄️ Building a Segmentation Dataset
This guide explains how to prepare data and configure the SegmentationDataset class for semantic segmentation training. The dataset system is built around a CSV index file that points to image and mask pairs on disk.
📄️ Building a Frame Field Dataset
Frame field models (such as the Frame Field Learning approach for polygon extraction) require additional auxiliary masks beyond a standard polygon segmentation mask. This guide explains the extended CSV schema, the FrameFieldSegmentationDataset class, and how to configure it.
📄️ Sliding-Window Patch Dataset
RasterPatchDataset provides systematic, deterministic sliding-window training directly from full-size raster images (GeoTIFF, etc.) — no pre-generated tiles on disk required.
📄️ Building Detection & Instance Segmentation Datasets
This guide covers the ObjectDetectionDataset and InstanceSegmentationDataset classes, which extend the base CSV-driven dataset system with bounding-box and instance mask support.
📄️ Building Training Masks from Vector Data
The build-mask CLI mode automates the generation of all raster mask files needed for segmentation and frame field training. Given a set of georeferenced raster images and a vector polygon source, it produces every mask type and writes a ready-to-use CSV dataset index.
📄️ Training a Semantic Segmentation Model
This guide walks through setting up and running a full semantic segmentation training job using the Model base class, which wraps a segmentationmodelspytorch architecture inside PyTorch Lightning.
📄️ Training a Frame Field Segmentation Model
Frame field segmentation extends standard semantic segmentation with an additional crossfield output that encodes the local orientation of boundaries. This makes the predicted contours geometrically regular and well-suited for building footprint extraction and subsequent polygon reconstruction.
📄️ Training Object Detection & Instance Segmentation Models
This guide covers training object detection and instance segmentation models using ObjectDetectionPLModel and InstanceSegmentationPLModel. Both classes wrap torchvision.models.detection architectures inside PyTorch Lightning using the same Hydra config system.
📄️ Advanced Training Features
This guide covers advanced configuration topics that apply across all model types: compound losses, GPU augmentations, mixed precision, gradient clipping, OneCycleLR, multispectral weight adaptation, and checkpointing.
📄️ Running Inference
After training a model, you can run inference on new images using either of two CLI modes: predict for single-image sliding-window processing, or predict-from-batch for batch processing via PyTorch Lightning's Trainer.predict.
📄️ Polygonization: Masks to Vector Polygons
Polygonization converts a raster segmentation mask — a grid of predicted class probabilities or binary labels — into a set of vector polygon geometries. The output can be written as GeoJSON, Shapefile, or directly into a PostGIS database.
📄️ Evaluation Pipeline
The evaluation pipeline lets you compare the segmentation quality of one or more trained models side-by-side on a shared test dataset. It runs predictions for each experiment, computes pixel-level metrics from confusion matrices, aggregates results across images, and optionally generates comparison visualizations.
📄️ Dataset Conversion
This guide covers converting segmentation datasets into formats required by specialized models. Currently the primary supported conversion target is the Polygon-RNN format, which requires cropped per-object images, normalized polygon files, and a generated CSV index.