Back to Case Studies
Agri-tech · Mobile App · On-Device Computer Vision

Crop Disease Detection App for Field Agronomists

FlutterTensorFlow LiteOn-Device AIEdge MLPythonFastAPI
91%
Diagnosis accuracy on-device
1.8s
Inference time, no internet needed
7wk
Discovery to App Store
The problem

Field agronomists working across rural Pakistan, Sub-Saharan Africa, and South Asia were manually identifying crop diseases from visual inspection — a process that took 30–60 minutes per field visit, required specialist knowledge, and frequently resulted in misdiagnosis and delayed treatment.

The client had tried a cloud-based image recognition API, but rural fields have no reliable connectivity. Images sat in a queue, results came hours later, and the tool was effectively useless in the field.

The constraint that shaped everything

Zero internet dependency

The entire model inference pipeline had to run on-device. No API calls, no image uploads, no connectivity requirement of any kind. A field visit in a remote area could not be bottlenecked by signal.

Works on mid-range Android hardware

Target devices were Android phones in the $150–$250 range. The model had to be optimised to run efficiently on ARM Cortex A55 CPUs without a dedicated NPU.

High stakes accuracy requirement

A misdiagnosis doesn't just waste treatment cost — it can destroy an entire harvest. The model needed to reach 90%+ top-1 accuracy across 38 disease classes before we would ship.

Our approach
1
Dataset curation & augmentation
We sourced 24,000 annotated images across wheat, rice, cotton, and maize — combining PlantVillage with client field photos. Applied extensive augmentation: blur, rotation, lighting shift, soil noise to simulate real field conditions.
2
Model architecture — EfficientNet-B0
Selected EfficientNet-B0 for the accuracy-to-size tradeoff. Trained on Python/TensorFlow, achieving 94.2% accuracy at full precision. Then applied 8-bit post-training quantization, reducing model size from 21MB to 5.4MB with only 2.8% accuracy drop.
3
TFLite conversion & on-device runtime
Converted the quantized model to TFLite format. Integrated via the tflite_flutter package. The inference pipeline runs on the CPU — capture, resize to 224×224, normalise, run inference, return top-3 predictions with confidence. Total: 1.8s on a Redmi 9.
4
Flutter app with offline-first architecture
Built in Flutter for iOS and Android from a single codebase. Diagnosis history, treatment recommendations, and field notes stored locally in SQLite. When connectivity is available, records sync to the FastAPI backend for agronomist review.
5
CoreML conversion for iOS
For iOS devices, we additionally converted the model to CoreML using coremltools, enabling the Neural Engine on supported iPhones. Inference on iPhone 12 dropped to 0.4s — nearly instant.
Results in production

The app was deployed to 340 agronomists across three countries within 3 weeks of launch. Field visit time dropped from 45 minutes average to under 10 minutes. Farmers reported treatment accuracy improved dramatically — early season interventions increased significantly in pilot regions.

Our agronomists used to spend the majority of their time just identifying what was wrong. Now they walk in, photograph the affected plants, and spend the rest of the visit on treatment and farmer education. The app works in the most remote fields we operate in — no signal needed.
— Head of Field Operations, Agri-tech NGO
Related service

Computer Vision
on mobile.

We embed production-grade on-device CV models into iOS and Android apps. Fast inference, no cloud required.