Skip to main content
Back

UC Davis Uses Gemma 3 and Qwen3-VL to Automate Farm Digital Twins

Researchers at UC Davis tested whether vision-language models can read drone images and auto-generate the JSON configs needed to spin up 3D crop simulations — no human annotation required.

Pro

  • First-of-its-kind benchmark: UC Davis researchers tested VLMs on generating full JSON simulation configs for 3D crop digital twins directly from drone images.
  • Models tested: Gemma 3 and Qwen3-VL (4B to 32B) evaluated across 5 in-context learning strategies plus LoRA fine-tuning.
  • Best result: Adding GPS-derived grounding info (plant count, sun angle) was the single biggest performance boost across all metrics.
  • Contextual bias problem: Removing the image entirely sometimes beat the full-image condition — models copy few-shot examples when visual signals are weak.
  • Biophysical estimation failed: Leaf pigment parameters (chlorophyll, anthocyanin) could not be reliably estimated; larger models were sometimes worse.
  • Open pipeline: Uses Helios simulator and locally-served models via Ollama; no proprietary APIs required.

Building a digital twin of a farm field sounds futuristic, but the core bottleneck is surprisingly mundane: someone has to fill in a configuration file. Every 3D plant simulation needs dozens of parameters , plant positions, leaf pigment levels, sun angle, soil type, camera settings , before it can render a single virtual crop. Today, that work is done by hand or through painstaking field measurement. A new paper from UC Davis asks whether a vision-language model (VLM) can just... look at a drone photo and write that config file itself.

Why this is harder than it sounds

The simulation engine at the center of this work is Helios, a C++ library for 3D physical simulation of plant and environmental systems. The framework is designed for plant remote and proximal sensing image simulation, capable of simulating RGB, multispectral, thermal, and depth cameras, and producing associated plant images with fully resolved reference labels such as plant physical traits, leaf chemical concentrations, and leaf physiological traits. It is powerful, but it demands a rich JSON configuration file as input before it can generate anything.

The broader class of tools Helios belongs to are called functional-structural plant models (FSPMs) , simulations that model both the 3D geometry of a plant and the biological processes happening inside it (photosynthesis, water use, light interception). FSPMs integrate structural and architectural characteristics, environmental triggers, and physiological responses of plants, making them powerful tools to understand the triple interactions between structure, environment, and physiology. The problem is scale. Their high complexity and low throughput create bottlenecks for deployment at scale. Setting up a simulation for a single plot takes expert knowledge and significant manual effort , multiply that across hundreds of breeding trial plots and the pipeline collapses.

The idea: let the model read the field

The researchers propose a novel approach that leverages open-source VLMs , Gemma 3 and Qwen3-VL , to directly generate simulation parameters in JSON format from drone-based remote sensing images. The task bundles together several hard vision problems at once: counting plants, localizing their positions, estimating plant age, inferring sun angle, and predicting leaf biochemistry , all from a single overhead image. No prior study had attempted to use a VLM to generate the full structural JSON needed to instantiate a plant simulation.

The JSON schema the models had to produce is substantial. It contains six top-level sections covering a random seed, metadata (year, location, plant type, days after planting), environment (soil type, sun elevation and azimuth), field layout (plot size, bed count, individual plant positions), plant properties (PROSPECT leaf optics parameters like chlorophyll and carotenoid content), and camera settings. Getting all of these right from a bird's-eye image is a tall order.

Five ways to prompt a plant simulator

The team tested five in-context learning (ICL) strategies , a technique where the model learns from examples embedded directly in the prompt, without any weight updates. Each method added progressively more information:

  1. Zero-shot: Role definition + task description + format instruction ("respond as JSON")
  2. + JSON schema: Added the full key structure and variable types
  3. + few-shot JSONs: Added three example JSON outputs with reasoning traces
  4. + few-shot images: Paired those examples with their corresponding drone images
  5. + grounding info: Provided plant count, approximate locations, and sun angles computed from GPS and timestamp metadata

An important design choice: every prompt instructed the model to write a "reasoning" key first, letting it think in natural language before filling in the numeric fields. This chain-of-thought style approach is known to improve structured output quality. They also tested LoRA fine-tuning , a lightweight method that trains only a small fraction of the model's weights (about 0.65% of the 32B model, or 141.9M parameters) on 1,788 synthetic cowpea images.

The dataset: synthetic cowpeas, real drone flights

The team used a synthetic cowpea plot dataset generated via the Helios 3D procedural plant generation library, testing five in-context learning methods and evaluating models across three categories: JSON integrity, geometric evaluations, and biophysical evaluations. The synthetic dataset consisted of 1,120 images rendered at four growth stages (30, 50, 70, and 90 days after planting, or DAP). For real-world validation, they flew drone missions over an actual cowpea breeding experiment in California, manually annotating plant locations in 10 DAP images as ground truth. Evaluation metrics spanned three tiers:

  • JSON integrity: Syntax error rate, missing key rate, and BLEU-4 score (a text similarity metric borrowed from machine translation)
  • Geometric: MAE on DAP, plant count, sun elevation/azimuth, and Chamfer Distance for plant locations (a metric that measures how well two sets of 2D points match each other)
  • Biophysical: MAE on leaf pigment concentrations , chlorophyll, carotenoid, anthocyanin , plus water mass and dry matter

What actually worked

Results show that while VLMs can interpret structural metadata and estimate parameters like plant count and sun azimuth, they often exhibit performance degradation due to contextual bias or rely on dataset means when visual cues are insufficient. The headline finding is that grounding information , providing plant count, locations, and sun angles derived from GPS and timestamps , was the single most impactful addition, reducing errors across nearly all metrics.

On the model comparison front, Qwen3-VL consistently outperformed Gemma 3 on geometric tasks. Notably, the Qwen3-VL 4B model sometimes beat the Gemma3 27B model on DAP estimation , a striking result that suggests architecture and training data matter more than raw parameter count for this domain. Fine-tuning with LoRA further improved plant count MAE and location accuracy, especially at early growth stages.

The biophysical layer was a different story. For most leaf pigment estimation tasks, models failed to estimate values reliably regardless of model size or context. Chlorophyll showed modest improvement with scale, but anthocyanin MAE actually increased with model size , suggesting larger models were confidently wrong, leaning on general-world priors rather than the subtle spectral cues in the images.

The contextual bias trap

The most revealing finding came from an ablation study where the researchers simply removed the target image from the final prompt entirely , a "blind baseline." In several cases, this no-image condition achieved lower error than the full image condition. The implication is stark: when a model cannot extract a reliable visual signal, adding the image acts as noise, and the model falls back to copying values from the few-shot examples in the prompt. This is contextual bias in action , the model is pattern-matching to the distribution of its examples rather than reasoning about what it sees.

This also explains why adding few-shot images sometimes caused models to hallucinate double-row planted plots, even though the real cowpea plots were single-row. The visual examples shifted the model's prior in the wrong direction.

What this unlocks , and what it doesn't yet

The practical value here is real, even if the results are mixed. This is the first study to utilize VLMs to generate structural JSON configurations for plant simulations, providing a scalable framework for reconstructing 3D plots for digital twins in agriculture. For parameters that can be cross-referenced with external metadata , sun position from GPS and timestamp, plot dimensions from field records , VLMs perform well and could meaningfully reduce manual annotation work. The pipeline is also entirely open-source: the paper uses Gemma 3 and Qwen3-VL served locally via Ollama, making it reproducible without proprietary APIs.

Where it falls short is on the purely visual inference tasks , estimating leaf biochemistry, precise plant locations in dense canopies at late growth stages, and any parameter that requires spectral sensitivity beyond what an RGB drone image carries. The authors note that the models have not yet reached human-annotated accuracy or even basic computer-vision baselines on these harder tasks. Expanding context windows to 128K tokens, adding color reference charts for leaf pigments, and training on larger synthetic datasets are flagged as the most promising next steps.

The broader implication is a new kind of interface between field sensing and simulation: instead of a domain expert manually translating drone imagery into simulator inputs, a VLM handles the first pass, with grounding metadata doing the heavy lifting on the hardest geometric parameters. It is not a solved problem, but it is a credible starting point for automating one of precision agriculture's most stubborn bottlenecks.