Farm tech
An early warning for apple scab in Kashmir

In short: FrostGuard is an open-source early-warning tool for Kashmir's apple orchards. It takes hourly weather, applies a long-standing rule for when apple scab can infect a wet leaf, and counts the hours until an infection completes. It also warns about frost at bud break and can look for scab spots on a photo of a leaf. It only advises. Spray decisions stay with your local horticulture advisory and the product label.
Why timing matters
Apple scab is caused by a fungus, Venturia inaequalis. In spring its spores land on young leaves, and they can only infect if the leaf stays wet for long enough at the right temperature. A Kashmir spring often provides exactly that, with repeated rain between March and May on cool days.
A spray calendar can't see the weather. Following one can mean spraying during a dry spell, when nothing could have infected, and missing the short window after a real infection.
The rule it uses
FrostGuard uses the Revised Mills criteria: W. D. Mills published the rule in 1944, and MacHardy and Gadoury revised it in 1989. An hour counts as wet when relative humidity is 90% or more, or when more than 0.1 mm of rain falls. The colder it is, the more wet hours an infection needs.
| Average temperature | Wet hours needed |
|---|---|
| 4 to 6 °C | 28 |
| 6 to 8 °C | 14 |
| 8 to 10 °C | 11 |
| 10 to 12 °C | 9 |
| 12 to 15 °C | 7 |
| 15 to 24 °C | 6 |
Below 4 °C or above 24 °C, nothing counts. Each wet hour adds its share of the hours needed at that hour's temperature, and when the shares add up to one, an infection period is complete. Eight dry hours in a row end the wet spell and start the count again.
What it tells you
- While leaves are wet, how many hours remain before an infection completes.
- Once an infection has completed, how long ago the wet spell began. Advice on what to do after an infection depends on that.
- A frost alert when any hour drops below −2 °C during bud break (15 March to 20 May unless you change it), when blossom and young leaves are easily damaged.

When I replayed recorded weather for Shopian from 1 April to 15 May 2024 through it, the engine flagged six infection periods.
Checking a leaf photo
FrostGuard can also look for scab spots in a photo of a leaf. The detector is YOLO11n, a small model, trained on 160 lab photos of single leaves from a public dataset and checked on 40 it hadn't seen. Its score on those 40, an mAP50 of 0.531, is modest. It copes with lab-style leaf photos like the ones it learnt from. On fruit, whole trees or microscope images it gives confident wrong answers.
What it can't do yet
- It works out leaf wetness from humidity and rain. Nothing in the orchard measures it.
- Its weather comes from grid squares kilometres wide, not from a station in your orchard.
- It covers the first spring infections from spores. It doesn't model the later spread from spots on the leaves.
- Bud break is set by date. It isn't worked out from each area's warmth.
- It only advises. Follow the SKUAST-K or Horticulture Department spray schedule for your area, and the label on the product.
Try it
The FrostGuard app covers orchard zones including Shopian, Sopore, Pulwama and Baramulla, with live forecasts and a replay of spring 2024. Its free server sleeps when nobody is using it, so your first visit can take up to a minute to wake it.
Is this part of AI Health?
No. FrostGuard is a separate open-source project. Apple leaf screening in AI Health is in preview and doesn't return results yet.
What's next
- Photograph scab on leaves in Kashmir orchards and retrain the detector on them.
- Read from an on-farm weather station where one exists.
- Send alerts by SMS or WhatsApp in Kashmiri, Urdu or Hindi.
Further reading
- The code, model release and benchmarks on GitHub
- The FrostGuard app
- MacHardy, W. E. and Gadoury, D. M. (1989). A revision of Mills's criteria for predicting apple scab infection periods. Phytopathology, 79, 304-310.
