The problem: you can't hand-inspect a farm at scale

A date-palm farm we work with, Taryouvet Farm Management, tracks nearly a thousand individually numbered palms across dozens of planting lines. Palm disease and nutrient deficiency (potassium and magnesium deficiency, black scorch, fusarium wilt, and several others) look subtle in the early stages - a slight discoloration, a change in frond texture - and by the time it's obvious to the eye, the tree has often lost weeks of recoverable time. Walking every line, every week, and getting a trained diagnosis on the spot doesn't scale past a handful of lands. That's the same shape of problem that shows up in manufacturing quality control, retail shelf audits, and medical imaging triage: a visual inspection task that's cheap to describe and expensive to staff at the volume the business actually needs.

This is a write-up of how we productionized that model - not a research paper. The interesting part isn't the accuracy number, it's the engineering decisions that got a model out of a notebook and into a tool a non-technical field team uses every day.

The approach: transfer learning, not training from scratch

Training an image classifier from zero needs a dataset most teams don't have and compute most projects don't budget for. We didn't do that. We started from MobileNetV3-Large pretrained on ImageNet, replaced its final classifier layer with a custom 9-class head, and fine-tuned the whole thing on a public date-palm leaf disease dataset extended with real photos captured on the client's own farm. The pretrained backbone already knows how to see edges, textures, and color gradients - fine-tuning teaches it what those patterns mean for this specific problem. It's the same pattern we'd reach for on any custom image-classification task: start from a strong general-purpose backbone, don't reinvent feature extraction, and spend the training budget on the last few layers that actually need to be domain-specific.

What the model classifies

The classifier head outputs one of nine classes - eight disease/deficiency conditions plus a healthy baseline, so the model always returns a confident answer rather than a binary "sick or not."

# Class Type
1Potassium DeficiencyNutrient deficiency
2Manganese DeficiencyNutrient deficiency
3Magnesium DeficiencyNutrient deficiency
4Black ScorchFungal disease
5Leaf SpotsFungal disease
6Fusarium WiltFungal disease
7Rachis BlightFungal disease
8Parlatoria BlanchardiPest infestation
9Healthy sampleBaseline

Every prediction comes back with a confidence score (via softmax over the nine logits), not just a label - which matters, because a "72% confident" result should be handled differently by the field team than a "99% confident" one, and that distinction only exists if the model exposes it instead of collapsing to a single answer.

The architecture: isolated by design

A standalone service, not a bolt-on feature

The model runs as its own Python/FastAPI service, entirely separate from the main farm-management application. The Node.js backend proxies every photo upload to it and persists the result - the model can be redeployed, rolled back, or retrained without touching the application that depends on it.

CPU inference, deliberately

MobileNetV3 was chosen specifically because it's light enough to run inference on CPU with no GPU dependency. For a farm-management tool that isn't processing video or batches of thousands of images a second, that's a real infrastructure-cost decision, not a limitation.

HEIC support out of the box

Field agents photograph palms on iPhones. Without HEIC decoding, every photo needs a manual conversion step before it can be scored - a small detail that's the difference between a tool people actually use in the field and one they route around.

Permission-gated like everything else

Disease detection isn't a special case bolted outside the access-control system - every scan requires the same role-based permission as any other farm-management action, so it inherits the app's existing security model instead of needing its own.

Results in production

The model runs at 98% detection accuracy in production today. 400 palms were checked in the first launch window, and the farm team keeps running new scans as part of normal operations - it's not a one-time pilot number. Every scan is logged with its confidence score and farm location, feeding a dashboard that tracks total scans, a disease-class breakdown, a 30-day trend, and the most-affected lands, so the model's real-world performance stays measurable rather than becoming a launch-day statistic nobody revisits. A flagged palm now surfaces directly into the farm's existing "Needs Attention" list, alongside every other operational alert - the output of the model plugs into a workflow that already existed, instead of asking the team to check a second dashboard.

Why this generalizes beyond palm farms

Nothing about this approach is specific to agriculture. The pattern - transfer learning from a strong pretrained backbone, an isolated inference service that can be redeployed independently, confidence-scored predictions instead of bare labels, and results wired into a workflow the team already uses - applies to any business sitting on a visual-inspection bottleneck: defect detection on a production line, document or ID verification, shelf/inventory audits from a phone camera, or triage classification in a clinical workflow. The hard part is rarely the model architecture; it's the surrounding engineering that makes a 98%-accurate classifier something a non-technical team can actually rely on.

Try it on your own images

We're opening free, no-cost API access to this model for teams evaluating whether a similar approach fits their own visual-classification problem - manufacturing QC, produce/crop grading, document checks, or anything in that shape. Tell us a bit about what you're trying to classify and we'll set you up with access to test it directly.

Request free API access

No cost, no commitment. Tell us what you're trying to classify and we'll follow up with API access and docs so you can test it against your own images.

We review each request and follow up personally - usually within one business day.

Strategic takeaway

A model that scores 98% in a notebook and a model a farm team trusts enough to act on every day are two different engineering problems. The second one is where transfer learning, service isolation, confidence scoring, and workflow integration actually earn their keep - and it's the same discipline we bring to any custom computer-vision or applied-ML build.