Skip to content

Latest commit

 

History

389 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoAI.js

Geospatial AI that runs in the browser.
Detect buildings, vehicles, ships, solar panels, and more — on satellite & aerial imagery — without a GPU backend.

npm version CI npm downloads docs license

Live demos → · Docs → · Agent skill →

GeoAI.js DINOv3 feature extraction demo

DINOv3 image feature extraction in the browser — try it at docs.geobase.app/geoai-live


Why GeoAI.js?

Client-side Models run in the browser (WebGPU / WASM) via Transformers.js + ONNX Runtime
Draw → detect Pass a GeoJSON polygon; get detections back as GeoJSON
Your imagery ESRI, Mapbox, Geobase COGs, TMS, WMS, OpenAerialMap, Google Map Tiles
Pipeline-ready Chain tasks; run inference off the main thread with workers
npm i geoai
# peers
npm i @huggingface/transformers onnxruntime-web
import { geoai } from "geoai";

const pipeline = await geoai.pipeline([{ task: "building-detection" }], {
  provider: "esri", // no API key
});

const result = await pipeline.inference({
  inputs: { polygon: myGeoJsonPolygon },
  mapSourceParams: { zoomLevel: 18 },
});
// result.detections → GeoJSON FeatureCollection

CDN:

<script src="https://unpkg.com/geoai@1.0.7/geoai.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/npm/geoai@1.0.7/geoai.min.js"></script>

Use cases

GeoAI.js is built for product teams and researchers who need interactive geospatial AI — not batch jobs on a remote GPU cluster.

  • Urban inventory — building footprints & boxes for planning, insurance, or change tracking
  • Energy & infrastructure — solar panels, oil storage tanks, utility assets
  • Transport & logistics — cars, trucks, ships in ports and yards
  • Environment — land cover and wetland segmentation over AOIs
  • Exploration — zero-shot detection and DINOv3 embeddings for similarity search

Draw an AOI on a map, run a model, store or style the GeoJSON — all in one frontend session.


Integrations

Persist detections, sync in real time, and serve results as vector tiles.

GeoAI.js + Supabase + Geobase — map, detections, and workflow panel

Full-stack demo: draw → detect → save to PostGIS (Supabase or Geobase) with live map layers

Stack What you get
Supabase Auth, PostGIS storage, realtime subscriptions for detection history
Geobase Same PostGIS path plus vector tileserver for thousands of styled detections
MapLibre / React Interactive task demos (live); also 01-quickstart
deck.gl GPU-friendly overlay workflows
Agent skill Cursor / Claude / Codex integration via skills/geoai

Quick links:


Map providers

Point the pipeline at the imagery you already use:

Provider Auth Notes
ESRI None World Imagery — great default for demos
Mapbox Token Satellite styles
Geobase Project + API key Your COG / tileserver
TMS Optional Any {z}/{x}/{y} raster URL
WMS Usually none OGC GetMap (e.g. NRW orthophotos)
OpenAerialMap None HOT Imagery STAC + TiTiler
Google API key Map Tiles API (session + XYZ); prefer a server proxy in browsers
// Free public imagery
{ provider: "esri" }

// Community aerial (OAM)
{ provider: "oam" /* , itemId, mosaic: true */ }

// Your COG on Geobase
{
  provider: "geobase",
  projectRef: "...",
  apikey: "...",
  cogImagery: "https://path-to-your-cog.tif",
}

// Google Map Tiles (enable Map Tiles API; avoid HTTP-referrer–only keys)
{ provider: "google", apiKey: process.env.GOOGLE_MAPS_API_KEY }

Docs: Map providers


Supported tasks

Object detection · Building detection · Building footprint segmentation (ChangeStar) · Car · Ship · Solar panel · Oil storage tank · Oriented object detection · Land cover · Wetland · Mask generation · Zero-shot detection & segmentation · Image feature extraction (DINOv3)

→ Full task reference


Workers & React

Keep the UI smooth — run inference in a Web Worker. Patterns for vanilla JS and React live in the skill and docs (there is no separate geoai/react package export; use the worker + hook examples).


Quickstart clone

git init
git subtree add --prefix=examples/01-quickstart \
  https://github.com/decision-labs/geoai.js main --squash
cd examples/01-quickstart && npm install && npm run dev

Agents & LLMs

Teach coding agents how to integrate GeoAI.js:

npx skills add decision-labs/geoai.js --skill geoai -y
# or globally
npx skills add decision-labs/geoai.js --skill geoai -g -y

Talk

Bringing Earth Observation AI to the Browser with WebGPU — Big Data from Space 2025 (Decision Labs).


Links

Contributing

See CONTRIBUTING.md.

License

MIT — LICENSE.md

About

🛰️ GeoAI.js is a javascript library for use with transformers.js to perform GeoAI on the frontend

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

178 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages