S

03 / 04 Agro · May 2026

Crop disease, detected and forecast.

A plant-disease classifier, an inventory forecast and a spread model, built as one system for a district of farms. First place at the UCL AFS Hackathon. The classifier reaches 96.4% accuracy across 38 disease classes.

Role
Sole author · UCL AFS Hackathon
When
May 2026 · UCL AFS Hackathon
Stack
Python, MobileNetV2, statsmodels, PostGIS
Result
1st place · 96.4% on 38 classes

01 — Problem

A photo, a stock room, and the neighbours.

A farmer with a diseased plant needs three things: what it is, whether the treatment is in stock, and whether the farms next door are about to get it. Each is a different model, and they are only useful together.

[Dataset and district: where the leaf images came from, how many farms, what the hackathon brief asked for.]

02 — Method

Classify, forecast, propagate.

Detection. MobileNetV2 embeddings of leaf photographs feed a logistic-regression classifier over 38 plant-disease classes. The backbone is frozen; only the classifier is trained, which keeps inference cheap enough for a phone.

Inventory. A SARIMA model over the monthly infection series forecasts demand for each medication, so stock is ordered ahead of the season rather than after the first case.

Spread. Farms are nodes in a PostGIS k-nearest-neighbour graph. An SIR model simulated over that graph predicts where an outbreak goes next, and farms in the forecast path are alerted before it arrives.

Fig. III cAn SIR epidemic over 50 farms and their 4 nearest neighbours. Infected in the accent, recovered filled.

03 — Results

Three numbers, one for each model.

96.4%classifier accuracy, 38 classes
1stUCL AFS Hackathon
[0.00]SARIMA forecast error (MAPE)
[0]dalert lead time before spread

[One paragraph: held-out split for the 96.4%, which classes confuse, how the SARIMA was validated, and what the SIR parameters were fitted to.]

04 — Stack

What it is made of.

01 Interface 02 Models 03 Features 04 Data 05 Serving UPLOAD EMBED DIAGNOSIS CASE STOCK SEEDS SPREAD FARMER APP ALERTS CLASSIFIER · 38 SARIMA SIR MOBILENETV2 MONTHLY SERIES K-NN GRAPH LEAF PHOTOS INFECTION RECORDS FARM COORDINATES POSTGIS PYTHON SERVICE 01 Interface 02 Models 03 Features 04 Data 05 Serving FARMER APP ALERTS CLASSIFIER · 38 SARIMA SIR MOBILENETV2 MONTHLY SERIES K-NN GRAPH LEAF PHOTOS INFECTION RECORDS FARM COORDINATES POSTGIS PYTHON SERVICE

System design5 layers, 13 flows. Arrows are the data path; dashed ones are side channels. Hover a layer.