← all work
major project2026

AgriBurn

End-to-end geospatial ML pipeline for stubble-burn detection across 5 years of Sentinel-2 imagery.

role

ML + pipeline lead

context

EPICS extension, solo build

An end-to-end geospatial ML pipeline that detects stubble-burnt farmland across Sehore and Vidisha districts in Madhya Pradesh using 10 m Sentinel-2 imagery. Five years of data, four land-cover classes, and a model that holds up across districts.

PythonGoogle Earth EngineSentinel-2scikit-learnXGBoostLightGBMrasteriogeopandasSHAPStreamlit

highlights

  • 88.2% CV accuracy (ensemble; 88.5% best single model) with 0.95 F1 on the 'burnt' class
  • ~220 million pixels per district, chunked at 300 MB peak RAM
  • Cross-district generalisation: 96-97% on combined training
  • Validated against NASA FIRMS VIIRS-SNPP active fire data

why i built this

Stubble burning around north India gets a lot of news airtime every winter. Central India doesn't - but the fields still burn, the air still thickens, and nobody has a clear map of it. During the burning season, the surroundings of my hostel lit up everyday. My EPICS project looked at the narrower side. This is the extension: the map.

The pitch is simple - given a rabi-season Sentinel-2 image of a district, classify every pixel into {growing crop, residue, burnt, bare soil} and hand that back as a GeoTIFF + percentages. Everything else is details.

system at a glance

GEE + Sentinel-2chunked tiles23 featuresensemble modelGeoTIFF mapStreamlit UI
end-to-end pipeline from GEE to dashboard

the data fight

Sentinel-2 gives you 10 m optical bands every 5 days. The problem is that a rabi-harvest pixel of dry residue looks suspiciously like bare soil, and a partially-burnt field looks like residue. You can't solve that with more model; you have to solve it with features.

I ended up engineering 23 features per pixel:

  • raw Sentinel-2 bands (B2-B12)
  • vegetation indices - NDVI, EVI, SAVI
  • burn indices - NBR, BAI
  • residue / tillage - NDTI, STI
  • soil and water - BSI, CRI, NDWI
  • pairwise band ratios tuned for residue vs. burnt separability

models & the 88.2%

I tried RF, XGBoost, LightGBM individually, then a soft-voting ensemble of all three. Honest result: the three were within a point of each other (RF 88.5%, XGBoost 88.4%, LightGBM 87.8%) and the ensemble landed at 88.2% ± 0.8%, so it didn't beat Random Forest alone. I kept it anyway because the individual models disagreed on residue-vs-bare, and averaging their probabilities smoothed that out.

Random ForestXGBoostLightGBMsoft voteprob(crop)prob(residue)prob(burnt)argmax → class
model comparison and ensemble strategy

Burnt F1 ended up at 0.95, which is the number I actually cared about - false negatives here mean a farmer's burn never shows up on the map.

inference on 220 million pixels

Full-district GeoTIFFs are ~30 GB each. Loading them into memory is a no. I chunked every raster into 2048x2048 tiles, ran inference per chunk, and stitched predictions back with rasterio windows - dropping peak RAM from a naive 8 GB to ~300 MB. Not glamorous, but it fits inside a 16 GB laptop and ran overnight.

for window in tqdm(windows):
    patch = src.read(window=window)          # (bands, h, w)
    feats = engineer(patch)                  # (23, h, w)
    flat = feats.reshape(23, -1).T           # (h*w, 23)
    probs = ensemble.predict_proba(flat)     # soft vote
    cls = probs.argmax(axis=1).reshape(h, w)
    dst.write(cls.astype("uint8"), 1, window=window)

what i found

  • Sehore: 11.70% burnt in 2020 → 9.03% in 2024 (−0.69%/yr)
  • Vidisha: 5.43% → 4.69% (−0.14%/yr)
  • 40,000-84,000 ha of annual stubble burning mapped across the two districts
  • Decline roughly tracks the MP govt's 2021 residue-management scheme - not causal, but suggestive

what still sucks

  1. Residue vs. bare soil recall is stuck at 77% - that's a physics ceiling for passive optical at 10 m
  2. Training labels are still ~500 manually clicked points per class per year - tedious
  3. Only covers rabi; kharif paddy burning needs separate labels

what's next

Fusing Sentinel-1 SAR to push residue recall to 85-90%, auto-labelling from stable NDVI-timeseries signatures, and a statewide rollout with near-real-time fire alerts. Longer-term: biomass tonnage estimation, which would let panchayats price residue as a supply-chain input instead of a nuisance.