Agribound
An AI-powered field boundary delineation toolkit combining satellite foundation models, embeddings, and global training data for accurate agricultural parcel/field boundary mapping.
Install / Use
/learn @montimaj/AgriboundREADME
agribound
Unified agricultural field boundary delineation toolkit
Overview
Agribound is a Python package that provides a unified framework for agricultural field boundary delineation by combining seven complementary approaches: object detection, semantic segmentation, vision transformer segmentation, foundation model inference, embedding-based unsupervised clustering, supervised fine-tuning, and multi-engine ensembling. It handles the full pipeline from satellite composite generation through Google Earth Engine (or local GeoTIFFs) to vectorized, post-processed field boundary polygons, supporting Landsat, Sentinel-2, HLS, NAIP, SPOT, and pre-computed embedding datasets (Google Satellite Embeddings, TESSERA) out of the box.
Unlike other field boundary tools that detect all visual boundaries (roads, water, forests, buildings), agribound automatically removes non-agricultural polygons using LULC data: NLCD for CONUS (1985–2024), Dynamic World globally (2015–present), or C3S Land Cover for pre-2015 coverage, with all zonal statistics computed server-side on GEE. It also supports a fully automated pipeline that combines embedding clusters, Dynamic World crop filtering, and SAM2 boundary refinement on Sentinel-2 to delineate fields anywhere in the world without human-labeled reference data or model training.
The result is a single agribound.delineate() call or CLI command that replaces dozens of ad hoc scripts with a reproducible, configurable workflow. Fifteen example scripts and Jupyter notebooks demonstrate workflows spanning six continents, eight satellite sources, and all delineation engines.
Results
Supervised: DINOv3 + SAM2 on NAIP (Eastern Lea County, New Mexico, USA)
DINOv3 (SAT-493M satellite-pretrained) fine-tuned on NMOSE reference boundaries, with LULC crop filtering (NLCD) and per-field SAM2 refinement on 1 m NAIP imagery (2020). Blue polygons are model-predicted boundaries; yellow polygons are NMOSE reference boundaries. Note: Fields in Texas bordering New Mexico are also present.
<img src="https://raw.githubusercontent.com/montimaj/agribound/main/assets/NM_example.png" alt="DINOv3 + SAM2 on NAIP — Eastern Lea County, New Mexico, USA" width="700">Unsupervised: TESSERA Embeddings + LULC Filter + SAM2 (Pampas, Argentina)
Fully automated pipeline with no reference boundaries or training. TESSERA (128-D) embedding clustering, LULC crop filtering (Dynamic World), and SAM2 boundary refinement on Sentinel-2 (2024).
<img src="https://raw.githubusercontent.com/montimaj/agribound/main/assets/Pampas_example.png" alt="TESSERA + LULC + SAM2 — Pampas, Argentina" width="700">Note: The satellite basemap shown in these screenshots may not correspond to the same acquisition date as the imagery used for delineation. See the docs gallery for results across all regions and engines.
Features
- Multi-satellite support – Landsat (30 m, 1984–present), Sentinel-2 (10 m), Harmonized Landsat Sentinel (HLS, 30 m), NAIP (1 m), and SPOT 6/7 (6 m)
- All spectral bands downloaded – Full multi-band composites are downloaded for each sensor (e.g., all 12 Sentinel-2 spectral bands, all 6 Landsat SR bands). Engines automatically extract and reorder the bands they need via canonical band mappings (e.g., FTW expects R, G, B, NIR as bands 1–4 matching its
B04, B03, B02, B08training order, so agribound extracts those from the full composite before passing to FTW) - Seven delineation engines – Delineate-Anything, Fields of The World (FTW), GeoAI Field Boundary, DINOv3, Prithvi-EO-2.0, embedding-based unsupervised delineation, and a multi-model ensemble mode
- SAM2 boundary refinement – Optional post-processing step that feeds field bounding boxes as prompts to SAM2, producing pixel-accurate masks that replace the original polygons. Best applied to the final ensemble output for efficiency. Can also be used per-engine via
engine_params={"sam_refine": True} - 14+ pre-trained FTW models – All FTW model variants (EfficientNet-B3/B5/B7, CC-BY and standard licensing, v1–v3) are available via
agribound.list_ftw_models()and selectable throughengine_params - Smart DA routing – For Sentinel-2, Delineate-Anything automatically delegates to FTW's built-in instance segmentation with proper S2 preprocessing and native MPS (Apple GPU) support. For other sensors, the standalone DA pipeline with sensor-agnostic normalization is used
- Google Earth Engine integration – Annual cloud-free composite generation with configurable date ranges, compositing methods (median, greenest pixel, max NDVI), and cloud masking
- Embedding-based unsupervised delineation – Google AlphaEarth and TESSERA (Feng et al.) embeddings for CPU-only boundary extraction without any labeled training data
- Automatic fine-tuning – Supply reference boundaries and agribound will fine-tune Delineate-Anything (YOLO), GeoAI, DINOv3 (LoRA), or Prithvi on your region before inference. FTW uses pre-trained weights (fine-tuning requires paired temporal windows not yet supported)
- CLI and Python API – Full-featured command-line interface (
agribound delineate) and a clean Python API (agribound.delineate()) for scripting and notebooks - fiboa-compliant output – Export to GeoPackage, GeoJSON, or GeoParquet with field area, perimeter, and compactness attributes
- Dask-based parallelism – Large study areas are automatically tiled and processed in parallel
- Automatic LULC crop filtering – Unlike other field boundary packages that detect all visual boundaries (roads, water, forests, buildings), agribound automatically removes non-agricultural polygons using the best available land cover dataset for the study area. Uses NLCD (CONUS, 1985–2024), Dynamic World (global, 2015–present), or C3S Land Cover (global, pre-2015). All datasets use nearest-year matching. Enabled by default, configurable threshold, no user intervention required
- Post-processing pipeline – Configurable minimum area filtering, Chaikin corner-cutting smoothing, metric-aware polygon simplification, overlap removal, and slivers cleanup
- Built-in evaluation – Compare delineated boundaries against reference data with IoU, boundary F1, and over/under-segmentation metrics
Satellite Sources
All spectral bands are downloaded for each sensor. Engines automatically select the bands they need via canonical R/G/B/NIR mappings.
| Source | Key | Resolution | Bands Downloaded | GEE Collection ID | Notes |
|---|---|---|---|---|---|
| Sentinel-2 | sentinel2 | 10 m | B1–B12, B8A (12 bands) | COPERNICUS/S2_SR_HARMONIZED | Default source; L2A surface reflectance |
| Landsat | landsat | 30 m | SR_B2–SR_B7 (6 bands) | LANDSAT/LC08/C02/T1_L2, LANDSAT/LC09/C02/T1_L2 | Long time-series; L5/7 bands harmonized to L8/9 naming |
| HLS | hls | 30 m | B1–B7 (7 bands) | NASA/HLS/HLSL30/v002, NASA/HLS/HLSS30/v002 | Harmonized Landsat+Sentinel-2 |
| NAIP | naip | 1 m | R, G, B, N (4 bands) | USDA/NAIP/DOQQ | 4-band (RGBN); best for small fields. Very slow over large areas (100–900x more pixels than S2) |
| SPOT 6/7 | spot | 6 m | R, G, B (3 bands) | Restricted – see SPOT Access | Restricted GEE collection. Very slow over large areas; see note below |
| SPOT 6/7 Panchromatic | spot-pan | 1.5 m | P (1 band, triplicated as pseudo-RGB) | Restricted – see SPOT Access | Panchromatic band at 1.5 m; triplicated to 3-band pseudo-RGB for engines that expect RGB input. Restricted access |
| Local GeoTIFF | local | Any | All bands | N/A | Bring your own imagery via --local-tif |
| Google Embeddings | google-embedding | 10 m | 64-D embeddings | GOOGLE/SATELLITE_EMBEDDING/V1/ANNUAL | Pre-computed satellite embeddings |
| TESSERA Embeddings | tessera-embedding | 10 m | 128-D embeddings | N/A | TESSERA foundation model embeddings. Coverage varies by region/year (2017–2025); see geotessera |
Delineation Engines
| Engine | Key | Approach | Strengths | GPU Required | Reference |
|---|---|---|---|---|---|
| Delineate-Anything | delineate-anything | YOLO instance segmentation (2 model variants) | Fast; resolution-agnostic (1–10 m+); routes through FTW for S2 with native MPS support | Recommended | Lavreniuk et al. (2025) |
| Fields of The World | ftw | Semantic segmentation (14+ models: EfficientNet-B3/B5/B7, UNet, UPerNet) | Strong generalization; 25-country training set; all models via list_ftw_models() | Yes | Kerner et al. (2025) |
| GeoAI Field Boundary | geoai | Mask R-CNN instance segmentation | Built-in NDVI support; auto-falls back to CPU on Apple Silicon. Without fine-tuning on region-specific reference data, GeoAI typically does not delineate any fields | No | [Wu (2026)](https://github.com/opengeos/geo
