3D drone wildlife survey dashboard
Find a file
maverick 48866acc97 Enable live D1 for real drone survey ingest
- Created remote D1 (region OC), bound in wrangler.toml (id 03814d82...)
- Remote schema initialized; live ingest + readback verified (simulated:false)
- Deploy uses Workers token; D1 ops use the D1-capable token

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 21:48:53 +10:00
pipeline Add drone ingest pipeline + local D1 dev config 2026-07-21 21:41:59 +10:00
src CritterScope: 3D drone wildlife survey dashboard 2026-07-21 21:10:21 +10:00
.gitignore CritterScope: 3D drone wildlife survey dashboard 2026-07-21 21:10:21 +10:00
package-lock.json CritterScope: 3D drone wildlife survey dashboard 2026-07-21 21:10:21 +10:00
package.json CritterScope: 3D drone wildlife survey dashboard 2026-07-21 21:10:21 +10:00
README.md Add drone ingest pipeline + local D1 dev config 2026-07-21 21:41:59 +10:00
schema.sql CritterScope: 3D drone wildlife survey dashboard 2026-07-21 21:10:21 +10:00
wrangler.dev.toml Add drone ingest pipeline + local D1 dev config 2026-07-21 21:41:59 +10:00
wrangler.toml Enable live D1 for real drone survey ingest 2026-07-21 21:48:53 +10:00

🛰️ CritterScope

Turn a drone survey into georeferenced animal/object detections on a 3D map.

A drone flies a survey → thermal+RGB frames + telemetry → an AI detector emits warm-blob detections → each is projected onto terrain as (lat, lon, type, confidence, temp, time) → this app plots them on a 3D terrain globe with a timeline you can replay.

The dashboard runs today off a built-in simulator, so the whole UI is done and testable before any drone arrives. Real footage feeds the same dashboard via POST /api/ingest.

Stack

  • Cloudflare Worker + Hono (src/index.js)
  • MapLibre GL JS — satellite imagery + Terrarium DEM for real 3D terrain (no API key)
  • D1 (optional) — stores real surveys/detections; schema in schema.sql
  • Deploys to critterscope.theradicalparty.com

Run locally

npm install
npm run dev            # http://localhost:8787

Open / for the dashboard. Point it anywhere:

/?lat=-33.73&lon=150.31&r=1000        # center, radius (m)
/?seed=42                             # different simulated survey

Data contract (what the drone pipeline must produce)

GET /api/survey returns:

{
  "survey":     { "id","name","center_lon","center_lat","radius_m","sensor","drone","started_at","ended_at","simulated" },
  "flight":     [ { "seq","lon","lat","agl_m","t" } ],
  "detections": [ { "id","type","lon","lat","confidence","temp_c","t","frame" } ],
  "stats":      { "total","counts","area_km2","duration_min" }
}

typedeer | fox | rabbit | boar | kangaroo | person | vehicle | unknown.

Feeding real drone data

  1. wrangler d1 create critterscope, paste the id into wrangler.toml, uncomment the binding.
  2. npm run db:init
  3. POST /api/ingest with { survey, flight, detections }.
  4. View it at /?survey=<id>.

The georeferencing step (frame + drone GPS + gimbal angle + terrain → lat/lon) lives in the drone pipeline, not here — this app just needs the resulting detections.

Drone ingest pipeline

See pipeline/ — turns real drone footage + DJI telemetry into georeferenced detections and POSTs them here. Runs end-to-end today via a synthetic flight + stub detector; drop in a trained YOLO model for real thermal.

Roadmap

  • Drone ingest pipeline (frames + SRT telemetry → detector → georeferencer → ingest)
  • Wire a trained thermal-wildlife YOLO model into the ONNX detector
  • Remote D1 (needs a D1-capable Cloudflare token; live site runs the simulator until then)
  • Live mode (stream detections during flight, not just post-survey)
  • Track clustering (merge repeat sightings of the same animal across passes)
  • DEM-based georeferencing (ray/terrain intersection instead of flat ground)