Back to blog

Explainer • Field Change Alerts

How Farmbit Decides When to Alert You

How Farmbit cleans Sentinel-2 imagery, compares it against a rolling baseline, and only alerts when the signal is strong, persistent, and actionable.

May 7, 2026 6 min read
Field Change Alerts Sentinel-2 NDVI Monitoring Alert logic

Every satellite image tells a story. The hard part is knowing which stories matter.

Farmbit's anomaly-detection pipeline ingests Sentinel-2 imagery, runs it through quality gates, compares it against a rolling baseline, and only notifies you when the signal is strong, persistent, and actionable. Here's how it works.

Farmbit anomaly detection pipeline diagram

From Raw Scene to Clean Signal

Each subscribed field receives regular Sentinel-2 Level-2A scenes. The system clips the image to your field boundary and uses the Scene Classification Layer (SCL) to mask clouds, shadows, and unusable pixels. From the remaining clean pixels, it computes vegetation and moisture indices - median NDVI, NDRE, and NDWI - and tracks the percentage of usable pixels across the field.

It also calculates the strongest negative delta: the largest per-pixel drop in NDVI compared to recent observations. This tells us not just that the field looks different, but exactly where the stress is concentrated.

Building a Rolling Baseline

A single snapshot is noise. Context turns it into signal.

For every new observation, Farmbit queries up to fifty previous observations within a configurable window (default: 60 days). It computes the field's median NDVI, percentile bands, and standard deviation. By default, an alert is not considered unless at least six usable observations exist. This prevents false alarms during early monitoring or after data gaps.

The Quality Gates

Before any alert is evaluated, the scene must pass three gates:

  • Usable pixel threshold: At least 70% of the field must be cloud-free and valid.
  • Baseline thickness: Enough historical observations must exist for a reliable comparison.
  • Affected area minimum: The stressed portion must cover at least 10% of the field.

If a gate fails, the system logs a clear reason - NO_ALERT_LOW_USABLE_PIXELS, NO_ALERT_BASELINE_TOO_THIN, or NO_ALERT_TOO_SMALL_AREA - so you know why nothing fired. No silent rejections.

Computing Severity

Once the gates pass, the worker computes the delta: the minimum of the strongest negative delta and the difference between current and baseline median NDVI. Two thresholds determine severity:

  • Medium: Delta below -0.12. Requires the signal to persist across at least two consecutive usable scenes. This filters out noise and short-term management events like irrigation or harvest.
  • High: Delta below -0.25, with at least 30% affected area and 85% usable pixels. High-severity drops bypass the persistence gate - the signal is strong enough to justify immediate notice.

What You See

When all conditions are met, Farmbit creates a FieldChangeAlert containing:

  • Alert type: vegetation change or moisture change
  • Severity: medium or high
  • Confidence score: derived from image quality, affected area, and delta magnitude
  • Explanation: baseline window, delta value, affected-area percentage, usable-pixel percentage, and persistence count

A disclaimer is included: Farmbit is not diagnosing the cause. It is flagging a signal worth checking.

Dispatch and Feedback

Alerts are delivered via email or push, based on your preferences. They appear in the Farmbit dashboard, where you can review them and provide feedback - looked normal, irrigation issue, wetness, pest-like signs, etc. That feedback feeds back into model improvement.

Configurable and Safe

All thresholds - baseline window, usable pixels, affected area, persistence count, NDVI triggers - are configurable via a JSON environment variable. If the configuration is malformed, the worker falls back to conservative defaults rather than crashing or firing spurious alerts.

The Bottom Line

The system is designed to be conservative and explainable. It cleans the imagery, builds context, enforces strict gates, and only alerts when the signal is strong and persistent. By recording explicit no-alert reasons and exposing every threshold, Farmbit prioritizes trust over aggressive detection.

You get fewer alerts. But the ones you get matter.

Related posts