Active Nov 2026

Fieldstation (An Autonomous Ecology Station)

Role: Solo, end-to-end: system design, the ingest and classification pipeline, the model and audio experiments, the privacy invariants and their tests, the dashboard, the public site, the CLI, and the docs.
Status: Paused on purpose since 2026-11-14, after running daily from 2026-09-07. The GPU it ran on is doing longer unattended jobs, and two months of daily running had proven the station.
Tech Stack: Python 3.12, SQLite (WAL), Frigate (D-FINE-m) and BirdNET-Go for detection, BioCLIP 2 for zero-shot species classification, a vision model for captions (local over Ollama at first, Claude Haiku over the API from 2026-10-12), MegaDetector for mammals, Datasette for the dashboard.
Live: spskelly.github.io/fieldstation-site, the station’s full record through its last day, from its own public repo (github.com/spskelly/fieldstation-site). While the station ran, the site regenerated every 10 minutes or so during the day.
Repository: The pipeline repo is private. Demo available on request

Overview

I set up a bird feeder that I wasn’t always around to watch, and I wanted to know which species were actually visiting and what patterns would show up over time. So I built a station to do the watching for me. For its first five weeks the stack was completely local: no cloud services, no subscriptions, no paid model APIs. Detection and species identification stayed local throughout; on 2026-10-12 the one step that writes captions for bird crops moved to a small hosted model, after a measurement described below.

A camera and a microphone each feed one SQLite database. Frigate does object detection on the video, BirdNET-Go does species detection on the audio, and everything downstream (classification, merging the two senses into one “visit,” a written narrative, eBird export, the public site) runs against that one store.

Through 2026-09-25, from the station’s own database: 3,360 bird visits on camera and 4,197 audio detections over 19 days, 44 species between the two (29 seen, 35 heard), and 322 mammal finds from a nightly pass. Tufted Titmouse leads with 1,497 visits, then Carolina Chickadee at 633 and Ruby-throated Hummingbird at 245. My 383 review calls (230 verified, 147 rejected) are the ground truth most of the experiments below are graded against.

By the last publish, the public site’s index covered 68 days with data (2026-09-07 to 2026-11-13) and listed 62 species, 39 of them confirmed, with 11,358 visit records and 20,637 audio detections attributed to a species. Tufted Titmouse still led at 5,430, then Carolina Chickadee at 2,350.

I stopped the station on 2026-11-14. Nothing broke: I had started doing longer unattended GPU work, and the station’s daily GPU-heavy jobs and its constant detector load on the same card were in the way.

What makes the project interesting to me is that it doesn’t trust its own upgrades. Every model, gate and filter got measured before it went in, and several lost: the vision model I expected to improve identification made it worse, a diffusion upscaler invented detail, and a microphone diagnosis I’d written down was wrong by the next evening.

System Architecture

graph TD
    CAM["RTSP camera (Frigate, birds only)"] --> ING["ingest/ (camera, audio, weather, daylight, noise)"]
    MIC["Microphone (BirdNET-Go)"] --> ING
    ING --> DB[("fieldstation.db, one SQLite file, WAL")]
    DB --> CLS["classify: crop -> BioCLIP 2 -> ensemble tiers"]
    DB --> COR["correlate audio with video"]
    CLS --> VIS["visits/consolidate"]
    COR --> VIS
    VIS --> ENR["enrich: vision model captions, narrative"]
    ENR --> SITE["public site repo"]
    ENR --> EBIRD["eBird CSV"]
    DB --> DASH["Datasette dashboard (owner-only)"]
    CAM -.->|recordings, read-only, nightly| RMAM["MegaDetector mammal pass"]
    RMAM --> MDB[("mammal_finds, dashboard-only")]
    MDB -.-> DASH
  • Ingest - source-specific modules (camera, audio, weather, daylight timing, noise floor, regional species expectations) writing into one schema.
  • Classify - BioCLIP 2 runs zero-shot against a station-specific species list, averaged over clip frames, and resolves into confident, probable or candidate tiers rather than one always-confident guess.
  • Visits - video and audio detections close enough in time merge into one visit, the unit the narrative, export and review all work with.
  • Enrich - uncertain visits go to a vision model whose answer is validated against a JSON schema, not parsed out of free text.
  • Rescan - Docker Compose side services that re-read the recordings Frigate keeps, for the birds and mammals the live pass missed.

The Public Site

The pipeline repo stays private, but its output doesn’t. fieldstation-site is a static site the pipeline rendered and pushed to a separate public repo, so anyone could see what had been at the feeder that day. It now holds the whole run, 2026-09-07 to 2026-11-13. The site repo’s commit times on 2026-09-25 show a fresh build every 9 to 14 minutes through the day and about once an hour overnight. Everything on it has already passed the privacy rules below: crops only by default, a location randomized within about a kilometer, no people or vehicles.

Engineering Details

1. The Vision Model Made Identification Worse

Does sending an uncertain visit to a local vision model improve the species call, or just burn GPU time? The model’s answers and my reviews were both already in the database, so on 2026-09-15 I joined them: 532 answers from qwen3.8:27b against the latest review on 254 visits. On the 79 visits where the true species was on the list the model was offered:

  • BioCLIP’s top guess was right 53 times (67%). The vision model was right 27 times (34%).
  • It flipped 32 correct BioCLIP calls to wrong and fixed only 6.
  • At a stated confidence of 0.8 or higher it was right 17 times, wrong 30, and named something that wasn’t a bird 21 times.
  • After the 2026-09-13 feeder and prompt change: BioCLIP 28, the vision model 10.

Its “unknown” answer didn’t work as a reject signal either; it would have thrown out 23 real birds. The reviewed visits aren’t a random sample, since I review what looks off, but both models were graded on the same visits. After that, the vision model could no longer overrule the classifier.

I repeated the measurement on 2026-10-12 with a hosted model, replaying 239 visits from 2026-10-07 to 10-10 through both. On the 43 disagreements I labelled, BioCLIP was right 33 times, Claude Haiku 28 and Qwen 4; Haiku fixed 3 BioCLIP errors and broke 9. So captions and quality scores moved to Haiku, and the vision model’s vote on species was turned off altogether: it now changes neither the species nor the tier. That is four days of visits, not a season.

2. Grading the Gates

On 2026-09-11 I scored 89 vision-model-adjudicated visits under three gates. As an independent second opinion, Claude read every crop from contact sheets; it named a species on 49, and the 15 where it disagreed with the local model became the test set.

  • No gate: all 15 wrong calls stayed, plus three impossible by size: a 6 cm “Wild Turkey,” a 14 cm hovering “White Ibis,” and a 4 cm “Golden-winged Warbler.”
  • The live 1-10 quality score: 8 wrong and one size-impossible, at no extra cost.
  • A four-question yes/no rubric: 12 wrong and all three size-impossible, and it needed a re-enrichment pass to exist. Dropped and written up as a negative result.

The same review found a metal leaf ornament on the old feeder that had been detected as a bird 35 times. Frigate’s onboard classifier got the same treatment on 2026-09-10: over 39 events where it and BioCLIP both made a call, they agreed 18 times, and 10 of the 21 disagreements were Frigate naming a species that doesn’t live in the region. Its vote is now advisory only. A backtested review-triage rule came out of this work too (a 20-visit spot check found 17 right, 3 too degraded to call, none wrong); it’s written up, not built.

3. The Hummingbirds the Live Detector Missed

Hummingbirds are the hardest thing at the feeder: small, fast, and gone in a frame or two. On 2026-09-09 I replayed frames around ten labeled hummingbird visits through candidate detectors and counted frames scoring over 0.4. D-FINE-s scored 297, D-FINE-m 458, and the YOLOv9 family about ten times worse. D-FINE-m became the live detector. The same measurement showed the live pipeline turned only 2 of those 10 visits into events, because Frigate drops frames it can’t process in time.

So I built an offline pass over the recordings Frigate keeps: the same model at native resolution around the nectar feeder. The first trial made live Frigate skip frames, so I stopped it. A pre-sunrise run produced 997 detections, every one a false positive from infrared glare, rain and insects. Restricted to daylight, the 2026-09-14 run recovered 44 hummingbird visits on 09-13 and 26 on 09-14 that the live pipeline had missed. That trial became the production rescan.

4. Did the Detail Come From the Bird or the Model?

On 2026-09-21 the database held 6,561 crops with a median short side of 119 px. A diffusion upscaler that recovered identifying detail would help both BioCLIP and my reviews, so I tested Qwen-Image-2.1 on four verified crops. To tell recovered detail from invented detail, I downsampled each result back to source size and compared, and ran the same input with two seeds. Its error against the source was 12.5 to 23.7 levels against Lanczos’s 1.0 to 1.7, and the two seeds disagreed by 14.08 levels on average, visibly changing the bird’s body and tail. Detail that changes with the random seed is generated, not recovered. A follow-up found Real-ESRGAN looked cleanest and strayed furthest from the source. Lanczos stays the default, with the caveat that this was four crops.

5. Tuning What the Microphone Hears

A filter bench renders the same recordings through different versions of the live filter chain and rescans each with the real BirdNET model. Three findings are now in the live capture script:

  • Filtering in 16-bit instead of float roughly halved BirdNET’s detections on quiet signal, purely from rounding noise (2026-09-22). The chain now converts to float first.
  • The hum notches cut 60 Hz by 17.7 dB and 180 Hz by 20.5 dB while a 3 kHz insect band moved 0.003 dB (2026-09-13).
  • A 20 ms capture period instead of ffmpeg’s 2 ms minimum dropped the Pi’s CPU from 53% of a core to 15% (2026-09-15).

The clip set is biased toward showing harm (every clip was saved because BirdNET already heard something), so the bench keeps a near-no-op control variant to read the others against. A separate pass on non-bird labels caught the night insect chorus scoring as “Great Plains Narrow-mouthed Toad” at 0.9 or higher, a species that lives nowhere near here (2026-09-22).

6. Corrections in the Commit Log

Some of the most useful commits are corrections of my own conclusions.

  • The microphone. 26.2% of the new Pi mic’s samples were exactly zero, which I read as a quiet but working mic. The next evening I heard crickets the Pi never recorded. The camera mic showed a 24 dB spike at 3 to 4.5 kHz where crickets sing, and the Pi sat at exactly -74.7 dBFS second after second. Air doesn’t do that; electronics do. The zeros had only ruled out digital silence, never shown the capsule was connected (2026-09-12).
  • The stream dropouts. An RTSP outage had been blamed on a SET_PARAMETER message. Counting instead of reasoning from one line: it appeared once in 30 hours, against 320 timeouts and 148 sequence errors, and the errors tracked scene load (2 in ten dark hours, 257 in four daylight hours), which pointed at the camera’s bitrate cap (2026-09-18).
  • The GPU numbers. Binned by bird activity, moving video decode to the CPU cost 0 to 26 points of a core, not the half core the raw comparison suggested. The same work showed I’d been reading Frigate’s inference_speed backwards: it rises when detections are sparse because the GPU downclocks when idle (2026-09-18).

7. A Failed Stage Never Stops the Run

Condensed from fieldstation/run.py

def run_stage(conn, cfg, stage: str, date_local: str, fn: Callable[[], dict]) -> dict:
    """Run one pipeline stage, recording a pipeline_runs row throughout.
    On any exception, error is set to repr(exc) and logged, and the
    exception is never re-raised, so a caller sequencing several stages
    can always continue to the next."""
    db.upsert_pipeline_run(conn, cfg.station_id, stage, date_local, "running", {})
    try:
        metrics = fn()
    except Exception as exc:  # a stage failure must never abort the sequence
        db.upsert_pipeline_run(conn, cfg.station_id, stage, date_local, "failed",
                                {"error": repr(exc)})
        logger.exception("stage %s failed", stage)
        return {"status": "failed", "error": repr(exc)}
    db.upsert_pipeline_run(conn, cfg.station_id, stage, date_local, "ok", metrics)
    return {"status": "ok", "metrics": metrics}

Every stage is also a standalone subcommand, so one bad night of camera trouble doesn’t cascade into a nightly run with no narrative, no export, and no record of what happened. run hourly|nightly just calls the same stage functions in sequence.

8. Privacy as a Control Case

Distributed cameras, a local classifier, normalized records, an index, queries across time: point that architecture at people and it’s a license-plate-reader network. What separates an ecological instrument from a dragnet is the deployment: whether observations tie to an identifiable individual, whether the subject consented, who holds the index, and how long the raw record lasts. Birds are the subject where none of those can be violated, so the station is a control case, with its rules written as tests rather than promises.

Six invariants each pair a rule with a named test in tests/test_invariants.py:

  • I1: only the target class exists, in the detector’s track list, every table and every export.
  • I2: raw media is a short ring buffer, and published media defaults to crops only.
  • I3: no individual identity. “17 visits” is a valid statistic; “17 individual cardinals” is not.
  • I4: published location and timing don’t describe a household: a randomized location, uptime as a percentage, visit times relative to sunrise and sunset.
  • I5: any network contribution is opt-in and carries no raw media.
  • I6: weakening a rule means editing a test that says what it protects.

The mammal pass had to meet the same rules rather than get an exception. The original plan was to give the classifier a mammal vocabulary, but the spike behind it found only 2 of 1,315 vision-model captions described a mammal, while MegaDetector run directly on the recordings found a squirrel, a chipmunk, a night mammal and the neighborhood dog in a 240-segment sample. So on 2026-09-23 a nightly MegaDetector pass replaced that plan, writing to its own mammal_finds table. A test fails if any pipeline module other than the importer so much as names that table, a find that looks like a pet is dropped before anything is written, and the review form doesn’t offer “dog,” “cat” or “person.” The later roadmap phases (a custom detector, a training loop, a second camera) are design only.

Build Log

591 commits over 27 active days, 2026-09-07 through 2026-10-22, from git log on the GitHub repo (510 in September, 81 in October):

  • 2026-09-07 (71 commits): the whole pipeline shape in one day, from Frigate and BirdNET-Go ingest through BioCLIP, review, eBird export and a crop-only site renderer, with a golden-day regression test.
  • 2026-09-09 to 09-11: BioCLIP averaged over clip frames, the detector comparison, the Frigate agreement check and the gate comparison.
  • 2026-09-12 (50 commits): the microphone comparison and its correction.
  • 2026-09-13 to 09-15: a new feeder, the triage backtest, the hummingbird rescan and the vision-model measurement.
  • 2026-09-17 (68 commits, the busiest day): the rescan subsystem.
  • 2026-09-18 to 09-22: the decode and dropout recounts, the upscaling benchmark, the audio filter bench.
  • 2026-09-23 (25 commits): the nightly mammal pass, from scan to dashboard review, in one day.
  • October: the hosted-model comparison and the caption move (10-12), the nectar feeder swapped for a seed cage at the end of hummingbird season (10-09), and dashboard review work.
  • 2026-11-14: paused on purpose.

CLI Interface

docker compose exec fieldstation fieldstation status
docker compose exec fieldstation fieldstation run nightly --date 2026-09-07 --retry
docker compose exec fieldstation fieldstation review --visit <id> --reviewer shawn --verify
docker compose exec fieldstation fieldstation export ebird --date 2026-09-07 --out /data/exports/2026-09-07.csv
docker compose --profile manual run --rm rescan-video   # never starts with `up`

Features

  • Two senses, one record - video and audio detections merge into a single visit.
  • A near-realtime public site - rebuilt every 10 minutes or so during the day while the station ran, crops only, randomized location.
  • Tiered identification - confident, probable and candidate tiers instead of one always-confident guess.
  • Every addition measured first - detectors, gates, upscalers, a vision model and the audio chain, with the losers documented next to the winners.
  • A second pass for missed visits - the offline rescan recovered 70 hummingbird visits over two days in its trial.
  • Six tested privacy invariants - plus a mammal pass that can’t reach the public pipeline.
  • A dead-man-switch health check and eBird export.

Tech Stack

  • Language: Python 3.12 with a short dependency list (PyYAML, Jinja2, jsonschema, astral, Pillow), plus the torch stack behind BioCLIP as an optional extra.
  • Detection: Frigate (D-FINE-m on the GPU) for video, BirdNET-Go on a Raspberry Pi for audio, MegaDetector for mammals.
  • Classification: BioCLIP 2 zero-shot rather than fine-tuned, because the species list changes with the season.
  • Storage and dashboard: one SQLite file in WAL mode; Datasette with saved queries, owner-only.
  • Hardware: an RTX 3090 for local processing and a Raspberry Pi for the microphone.
  • Testing: pytest, 2,565 tests collected across 77 files, 22,970 non-blank lines of tests against 11,774 in the core package (counted 2026-11-21 at the 2026-10-22 commit). Benchmarks and backtests are repo scripts that checkpoint per sample.
  • CI: none yet; tests run locally.