Unified geospatial AI platform with foundation models, FastAPI serving, and end-to-end pipelines for satellite data analysis.
pip install pygeovision==2.2.1 Copy PIP instructions
From "I need imagery of this place" to a finished map, mask or dataset: search, preprocess, model and assess in one package.
Features · Install · Quick start · Case studies · CLI · Pipelines · OBIA · Status · Citation · Docs
Status: actively developed. The core workflow (search → download → preprocess → run a model → assess) is tested, but not everything is equally mature. Project status lists what is partial, optional or deliberately unimplemented, so you know before you rely on it. Two case studies show the published-data pipelines at work on real places.
Applying AI to satellite imagery usually means gluing together a data-download library, a preprocessing pipeline, a modelling framework and a pile of custom code. pygeovision puts those steps behind one package, so there are fewer joins in the chain for things to quietly break.
It is aimed at geospatial researchers who want satellite data and AI in one import, ML practitioners who would rather not hand-roll provider APIs, and teams who need scriptable, schedulable workflows.
pip install pygeovision # core: data search/download + band-math inference pip install "pygeovision[geo]" # rasterio, geopandas, rioxarray, ... pip install "pygeovision[train]" # PyTorch, timm, segmentation-models-pytorch, albumentations, ... pip install "pygeovision[foundation]" # transformers, scikit-learn, umap, faiss (foundation models) pip install "pygeovision[obia]" # scikit-image, scikit-learn, rasterio, geopandas (OBIA) pip install "pygeovision[report]" # map, vector layers and PDF/Word/Excel reports for every pipeline run pip install "pygeovision[all]" # everything except cloud/edge Other extras: vlm (CLIP), labeling, xai, monitoring, advanced, geo3d, viz, edge (ONNX Runtime), cloud (AWS/Azure/GCP SDKs), dev (tests and linters).
Requirements: Python 3.10+. PyTorch is only needed for training and deep-model inference; search, download, NDWI/NDVI segmentation and the OBIA module work without it.
Search, download, prepare and classify one scene:
import pygeovision as pgv client = pgv.PyGeoVision() results = client.search(bbox=(38.6, 8.9, 38.95, 9.15), date_range=("2024-01-01", "2024-04-30"), cloud_cover_max=15) scene = client.download(results[:1], output_dir="./data", bands=["B02", "B03", "B04", "B08", "B11", "B12"])[0] ready = client.prepare_for_ai(scene.path, model_type="foundation", output_path="./data/ready.tif") client.classification.land_cover(ready["output_path"], output_path="./land_cover.tif") Segmentation, detection and change detection follow the same pattern:
client.segmentation.buildings("scene.tif", output_path="buildings.tif") client.detection.ships("port.tif", output_path="ships.tif") client.change.detect("2020.tif", "2024.tif", output_path="change.tif") client.validator checks rasters and can auto-fix common problems before they reach a model.
Two complete analyses built on pygeovision (and, in San Donà, pygeofetch), written as homework for the course 856.114 GeoHumanitarian Action (University of Salzburg, Copernicus Master in Digital Earth, 2026). Both run in Google Colab with one click, need no Google Earth Engine account, and come with a marimo version of the notebook. Each notebook saves every figure and every number it reports.
A 2.76 km² box on the north-eastern fringe of Piura. One building_footprints call per source returns the footprints as a GeoPackage, plus density and count rasters and statistics, all measured in the local UTM zone. The three published datasets differ a lot in the same place:
Building footprints from Microsoft (left), Google (centre) and OpenStreetMap (right), read with pygeovision building_footprints, on a Sentinel-2 image of 5 October 2026.
New built-up surface 2020–2025 per 100 m cell (GHSL GHS_BUILT_S) on Sentinel-2, with the Microsoft footprints from pygeovision in white.
The whole municipality (78.7 km²) of a low-lying town on the lower Piave. pygeovision provides the 15,138 OSM buildings (the population surrogate) and the Microsoft footprints to check them, the OSM street network for walking routes, and the Copernicus DEM. pygeofetch finds the clearest Sentinel-2 day and streams only the study-area window of five bands, and pygeovision's grid reader joins the tiles. The 100-year flood is the JRC / GloFAS flood hazard map with water depth.
The flood covers 65 % of the municipality and inundates 6,927 buildings (45.8 %). It closes one of six critical facilities. Of the 8,609 newly cut-off buildings, 3,287 are dry but isolated by flooded streets.
Walking time from every OSM building to the nearest critical health facility, normal conditions (left) and 100-year flood (right); inundated buildings in blue. Base map: Sentinel-2 fetched with pygeofetch.
Checking the flood layer with pygeofetch: open water in Sentinel-2 (NDWI > 0) against the JRC permanent-water mask. 71 % of the Sentinel-2 water lies in the mask, so the river channel is in the right place.
Everything above is also available from the shell:
pygeovision data search --bbox -74.1 40.6 -73.7 40.9 --date 2024-06 --satellite sentinel-2 pygeovision data download --bbox -74.1 40.6 -73.7 40.9 --date 2024-06 --output ./data/ pygeovision ai segment buildings --input scene.tif --output buildings.tif pygeovision ai change --before 2020.tif --after 2024.tif --output change.tif pygeovision channel list pygeovision channel building_footprints --bbox -0.15 51.47 -0.10 51.52 --date 2024-06 pygeovision status # what is installed and working pygeovision doctor # diagnose a broken setup pygeovision --help shows the full tree: data, ai, channel, pipeline (YAML workflows), models, zoo, label, explain, monitor, edge, cloud, vlm, timeseries, validate, preprocess, indices, postprocess, benchmark, datasets, infer and obia.
CLI_TESTING_GUIDE.md has a runnable example for every command, including all 42 pipelines, and says which ones need network access, credentials or your own trained weights. python tools/verify_cli_guide.py runs the offline examples on synthetic data.
The catalogue holds 42 pipelines, all runnable from Python (client.pipeline(name, ...)) and from the CLI (pygeovision channel ). pygeovision channel list shows each one and its kind:
Every run also leaves a presentation-ready deliverables folder (needs pip install "pygeovision[report]"):
/deliverables/ _report.pdf | .docx | .xlsx cover, key figures, map, tables, method, limitations, references /deliverables/maps/*.png map (scale bar, north arrow, legend with areas) and charts /deliverables/vectors/ .gpkg GeoPackage: aoi + classified polygons + per-class summary /deliverables/vectors/geojson/ | shapefile/ | kml/ the same layers in other formats /run_summary.json machine-readable statistics Areas in the report are measured on the output rasters on the WGS84 ellipsoid and agree with the statistics the pipeline prints. Choose formats with --report-formats pdf,docx,xlsx and --vector-formats gpkg,geojson,shapefile,kml, switch off with --no-report (or PYGEOVISION_REPORT=0, or report=False in Python), and rebuild from a finished run with pygeovision report . In Python: client.pipeline("flood_mapping", ..., report_formats=["pdf"]) and result.deliverables.
The other 21 of the original 49 stay removed because they could not produce a correct result (untrained networks, placeholder indices, invented constants). Each removal has a documented reason: see removed pipelines.
client.pipeline("wildfire_severity", bbox=bbox, output_dir="out", date_before="2018-10", date_after="2018-12") client.pipeline("building_footprints", bbox=bbox, output_dir="out", date="2024-06", checkpoint="runs/buildings/checkpoints/best.pth") 🧠 Models and training 77 registered architectures (pygeovision models list): SegFormer, Mask2Former, DETR/RT-DETR, ChangeFormer, ViT, SAM, CLIP, DINOv2, Prithvi, DOFA and more, plus a 14-model native hub (U-Net, DeepLabV3+, FCOS, RetinaNet, Siamese U-Net, …). 63 registry entries build real models; 14 are explicit placeholders that raise a clear error. See Choosing a model. Fine-tuning: start from a checkpoint, freeze the backbone, and train with geospatially aware augmentation; detection training reports real mAP. Losses: Dice, Focal, Tversky, Boundary-aware, Lovász, Combo and a geospatial mixed loss; GIoU/DIoU/CIoU/SIoU for boxes. Scale: mixed precision, gradient accumulation and distributed multi-GPU training. Tiled inference: Gaussian-blended tiles so a model trained on small chips runs on a full scene; ONNX export; ensembling and prediction validation. 🧩 Object-based image analysis (OBIA) Analyse imagery as objects instead of pixels: segment, describe, classify, assess.
import pygeovision as pgv from pygeovision import obia client = pgv.PyGeoVision() rd = obia.fetch_scene(client, (-1.70, 6.18, -1.655, 6.225), "2024-01", "./download") # real Sentinel-2, cloud-masked seg = obia.segment(rd, "multires", scale=16) # cloud pixels become label 0, no object feats = obia.extract_features(seg.labels, rd, extra_layers=obia.spectral_layers(rd)) rules = obia.RuleBasedClassifier([("water", "mean_ndwi > 0.3"), ("vegetation", "mean_ndvi > 0.5")], default="other") result = rules.classify(feats) It includes six segmentation methods (including Baatz & Schäpe-style region merging with a scale parameter, not a clone of eCognition), spectral/shape/GLCM-texture/context features, rule-based, fuzzy and supervised classifiers, and object-level accuracy and segmentation-quality metrics. It runs on real data fetched with pygeovision's own search and download tools (pygeovision obia fetch, client.obia); see docs/obia for the guide and its limitations.
pip install "pygeovision[dev,train,geo,obia]" pytest tests/ With the full stack installed, the offline suite (tests/test_live.py excluded) runs about 1,300 tests, all of which pass without network access, GPU or pretrained weights. To exercise every CLI command and all 42 pipelines by hand, follow CLI_TESTING_GUIDE.md.
Full documentation is at https://appiahkubis14.github.io/pygeovision-docs/. To build it locally:
pip install -r docs/requirements.txt sphinx-build -b html docs docs/_build/html 📚 Citation If you use pygeovision in your work, please cite it:
Appiah Kubi, S. (2026). pygeovision: A Unified Open-Source Python Platform for Satellite Earth Observation AI (Version 2.1.9) [Software]. Zenodo. https://doi.org/10.5281/zenodo.22258220
@software{appiah_kubi_2026_pygeovision, author = {Appiah Kubi, Samuel}, title = {pygeovision: A Unified Open-Source Python Platform for Satellite Earth Observation AI}, year = {2026}, version = {2.1.9}, publisher = {Zenodo}, doi = {10.5281/zenodo.22258220}, url = {https://doi.org/10.5281/zenodo.22258220} } The satellite data layer is pygeofetch; please cite it too when you use the search, download or streaming tools:
Appiah Kubi, S. (2026). pygeofetch: A Unified Python Framework for Multi-Provider Satellite Data Acquisition, Pre-download Quality Control, and Geospatial Processing (Version v2.6.2.1) [Software]. Zenodo. https://doi.org/10.5281/zenodo.22087230
Data in the case studies: © OpenStreetMap contributors (ODbL); Microsoft Global ML Building Footprints (ODbL); Google Open Buildings v3 (CC BY 4.0); GHSL R2023A, European Commission, Joint Research Centre (Pesaresi & Politis, 2023; Schiavina et al., 2023); Esri / Impact Observatory 10 m land cover (Karra et al., 2021); JRC / Copernicus GloFAS global river flood hazard maps (Baugh et al., 2024); Copernicus Sentinel-2 data and Copernicus GLO-30 DEM (ESA); HeiGIT openrouteservice and ohsome.
Contributions are welcome. See docs/project/contributing.md to get started.
pygeovision is free and open-source software, released under the MIT License.
The satellite data layer is built on pygeofetch (DOI 10.5281/zenodo.22087230), a universal satellite data pipeline that handles search, download, authentication, caching and pipeline orchestration. The modelling, training, labeling and OBIA layers are implemented inside pygeovision itself. The case studies were made for the course 856.114 GeoHumanitarian Action at the University of Salzburg.
geo obia viz train serve labeling vlm xai foundation advanced cloud edge geo3d monitoring enterprise report docs dev ai all minimal
satellite geospatial remote-sensing pygeofetch earthnets deep-learning foundation-models sentinel landsat segmentation change-detection vegetation-index SAR
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




