Agriculture and Crop Analysis
Train a VLM to assess crop health, detect disease, and monitor field conditions from drone and ground-level images.
Monitoring crop health across thousands of acres is a manual, time-intensive task. Agronomists drive through fields, inspect plants by eye, and record findings on paper or spreadsheets. Drone imagery helps with scale, but someone still needs to look at each image and interpret what they see.
For an interactive overview of this application, visit the agriculture monitoring use case on vi.datature.com.
Why use AI for crop monitoring?
A single agronomist can scout a few hundred acres a day. A fixed-wing mapping drone can photograph over a thousand acres in a single afternoon. The bottleneck is not capturing images; it is reviewing them.
Datature Vi closes that gap. You train a model on labeled photos of your crops, showing it what healthy plants look like, what disease looks like, and what stress looks like. Once trained, the model reviews each image and reports what it sees. An agronomist who used to spend days walking fields can now review a full aerial survey in minutes, focusing attention on the plots the model flagged.
No machine learning background is needed. If your team can photograph fields and describe crop conditions, you can build a working model.
This guide is written for agricultural operations teams and agronomists, not data scientists. You need crop images. Budget about 30 minutes of active work to set up and launch your first training run, matching the quickstart timeline; after that, GPU training usually runs 1-3 hours.
What you'll build
A model that takes a photo of a crop field (aerial or ground-level) and answers questions like:
- Is this crop healthy? (overall health assessment)
- What disease or stress is visible? (disease identification)
- What growth stage is this field? (phenological staging)
- Are there weeds present? (weed vs. crop distinction)
What you need
Step 1: Prepare your images
Drone images: Capture at a consistent altitude (30-60 meters for field overview, 10-15 meters for individual plant detail). Nadir (straight-down) shots produce the most consistent results.
Ground-level images: Hold the camera at a consistent distance from the plant canopy. Include the full plant or a representative section, not extreme close-ups of a single leaf unless that's your target use case.
Cover your conditions: Include images from different times of day (morning light vs. midday), different growth stages, and different weather conditions. A model trained only on images from clear, sunny days will struggle with overcast conditions.
Balance disease and healthy examples: If 90% of your training images show healthy crops, the model will learn to default to "healthy." Include enough disease examples (30-50% of your dataset) to teach the difference.
Step 2: Choose your task type
Recommended starting point: VQA for health assessment questions. Phrase grounding if you need to pinpoint where in a field image the problem appears.
Step 3: Create a dataset and annotate
- Create a dataset: choose Visual Question Answering as the type
- Upload your images
- Add annotations: for each image, write question-answer pairs
Annotation examples:
Tips:
- Have your agronomist review annotations for accuracy. Misidentifying a nutrient deficiency as disease will teach the model incorrect associations.
- Use consistent terminology from your team's existing vocabulary. If your operation calls it "leaf blight," don't annotate some images as "blight" and others as "leaf spot."
- Include growth stage context when relevant: "V6 stage corn" is more useful than just "corn."
Step 4: Configure and train
- Create a training project
- Create a workflow with these recommended settings:
System prompt example:
You are an agricultural imaging assistant analyzing crop field photographs. Assess crop health, identify visible diseases or stress symptoms, and note growth stage when identifiable. Base your answers only on what is directly visible in the image. Use standard agronomic terminology. If a symptom could indicate multiple conditions, list the possibilities rather than guessing.- Start the training run. Training takes 1–3 hours depending on dataset size.
Step 5: Deploy and test
from vi.inference import ViModel
model = ViModel(
run_id="your-run-id",
secret_key=".your-secret-key.",
organization_id="your-organization-id",
)
result, error = model(
source="field_photo.jpg",
user_prompt="What is the health status of this crop?"
)
if error is None:
print(result.result.answer)
# e.g. "The corn crop shows early signs of nitrogen deficiency.
# Lower leaves are yellowing while upper canopy remains green."Batch-process drone survey images
import json
from vi.inference import ViModel
model = ViModel(
run_id="your-run-id",
secret_key=".your-secret-key.",
organization_id="your-organization-id",
)
results = model(
source="./drone_survey/",
user_prompt="What is the health status of this crop? Note any disease, stress, or weed presence."
)
report = []
for result, error in results:
if error is None:
report.append({
"image": result.source,
"assessment": result.result.answer
})
with open("field_report.json", "w") as f:
json.dump(report, f, indent=2)
print(f"Assessed {len(report)} images")Improving accuracy
Seasonal variation: Retrain at the start of each growing season with images from the current conditions. A model trained on spring imagery will be less accurate on late-season crops.
Disease-specific training: If you need high accuracy on a particular disease (e.g., soybean rust), add 50+ images showing that disease at various severity levels and growth stages.
Multi-crop support: Train separate models for each crop type, or include crop identification in your annotations ("This is V6 stage corn showing...") so the model learns crop context.
Altitude matters: If you train on drone images taken at 30 meters, the model will perform best on images from similar altitudes. Include a range of altitudes if your drone surveys vary.
Next steps
Updated 4 days ago
