Individual-plant snap bean yield estimation from smartphone RGB images under agrivoltaic shading using canopy traits and frozen DINOv2 embeddings

Justin Jinchuan Zheng, Hansheng Liu, Marcus Wu, Haotian Li, Anna Stuhlmacher, Ana Dyreson, Joshua M. PearcearXiv 2026

TL;DR

Can you predict how many snap beans a plant will produce over an entire growing season using just a smartphone, without ever counting a single bean pod? This paper shows you can, by combining two simple canopy measurements with off-the-shelf, frozen vision foundation models—no expensive sensors or model fine-tuning required.

What Problem Does This Paper Address?

Estimating crop yield for individual plants usually requires either pricey hardware (like hyperspectral cameras or LiDAR) or directly detecting the fruit. For snap beans, direct pod detection is notoriously tricky because dense foliage hides the pods, and the pods are the same green color as the leaves.

Add agrivoltaics—growing crops underneath solar panels—into the mix, and things get even harder. Single-axis tracking solar panels cast shifting shadows across the plants, changing lighting conditions in every photo. The authors wanted to know if repeated, everyday smartphone RGB photos could estimate a plant's total seasonal harvested pod mass without seeing the pods or training custom deep-learning models.

Methods

The authors built a completely training-free computer vision pipeline that runs on a standard laptop CPU (taking about 16 seconds per photo):

Figure 1. Overview of the workflow for estimating seasonal harvested pod mass from RGB photographs. Pot detection and canopy segmentation defined plant regions for extracting canopy traits and frozen DINOv2 visual embeddings. Observations were summarized for each plant and used in separate canopy and embedding regression models. The two models’ predictions were combined using an unweighted mean. The dashed box illustrates leave-one-plant-out validation. Under leave-one-row-out validation, both models were fitted to the 24 plants in the other four rows.
  1. Pot Detection & Scale Reference: Because handheld camera distance varied from shot to shot, they used a COCO-pretrained Mask R-CNN to detect the plant pots. The pot's width in pixels served as a local ruler to normalize plant size.
Figure 2. Example of pot selection in a row photograph. Green boxes indicate the six retained foreground pots, while red boxes indicate detections outside the selected set. The retained pots provided reference locations for subsequent plant localization and canopy segmentation.
  1. Canopy Segmentation: Using the pot locations as anchors, they prompted Grounding DINO to draw a bounding box around each plant, then fed those boxes and point prompts to the Segment Anything Model (SAM) to isolate the canopy. Non-green pixels were filtered out using normalized excess green (ExG).
  2. Two-Branch Prediction: Repeated weekly observations (weeks 4–9) were summarized via medians for each plant and fed into two separate regression models:
  3. Canopy Traits Model: Ordinary least-squares regression using just two interpretable traits—top-view canopy area and side-view greenness.
  4. Embedding Model: Ridge regression on the first five principal components of 768-dimensional visual embeddings extracted from a frozen DINOv2-base encoder.
  5. Fusion: The final yield prediction is simply the unweighted average of the two models' outputs.

Datasets

The authors collected a new dataset at an agrivoltaic testbed in Calumet, Michigan:

  • Plants: 30 potted Blue Lake bush bean plants arranged in 5 rows of 6, spanning three shading treatments (heavy shading, moderate shading, and an unshaded control).
  • Imagery: Photographed 3 times a week over 66 days using an iPhone 16 Pro Max from both a 45° oblique ("top") view and a horizontal side view. The primary models used 180 row photographs from weeks 4–9 (covering the harvest window).
  • Ground Truth: Pods were harvested and weighed per plant across six dates, yielding a mean seasonal harvested pod mass of 24.34 g per plant.

Key Insights and Ideas

  • No pod counting, no fine-tuning: Off-the-shelf foundation models (Mask R-CNN, Grounding DINO, SAM, DINOv2) worked out of the box without any agricultural fine-tuning.
  • Simple traits hold their own: While DINOv2 embeddings slightly outperformed the two-trait canopy model when individual plants were held out, the two-trait model actually beat DINOv2 when entire rows were held out—showing that simple, interpretable features generalize better across spatial and shading shifts.
  • Top-view beats side-view: Top-view DINOv2 embeddings consistently outperformed side-view embeddings.
  • Modest ensemble boost: Averaging the canopy and embedding models gave the lowest overall error, though the improvement over the better individual model was modest (0.2–0.7 g).

Key Results

  • Leave-one-plant-out cross-validation: The combined model achieved $r = 0.84$ and $\text{RMSE} = 10.8\text{ g}$ (44.4% of the 24.34 g mean), nearly halving the training-mean baseline RMSE of 20.5 g.
  • Leave-one-row-out cross-validation: The combined model achieved $r = 0.83$ and $\text{RMSE} = 11.3\text{ g}$ (46.4% of the mean), compared to 21.4 g for the baseline—an increase of only 0.5 g when holding out whole rows.
  • Error analysis: Five plants accounted for 62% of the total squared error, largely due to overlapping canopies between neighbors, weeds or background vegetation sneaking into masks, and early plant mortality.

Limitations and Future Work

  • Small, single-site sample: With only 30 plants in one season and location, cross-validation estimates carry uncertainty, and the two canopy traits were screened using the dataset's yield data.
  • Pot dependency: Relying on pots for scale and localization limits direct use in open-ground fields.
  • No early-season forecasting: Summarizing weeks 4–9 via medians estimates seasonal yield rather than forecasting it before harvest.
  • Future directions: The authors suggest testing across multiple seasons and sites, using weekly sequences instead of medians for early forecasting, adding color checkers to control for smartphone auto-white-balance, and mounting cameras on solar racks or robots.

Summary updated

BibTeX
@misc{zheng2026individual,
  author = {Justin Jinchuan Zheng and Hansheng Liu and Marcus Wu and Haotian Li and Anna Stuhlmacher and Ana Dyreson and Joshua M. Pearce},
  title = {{Individual-plant snap bean yield estimation from smartphone RGB images under agrivoltaic shading using canopy traits and frozen DINOv2 embeddings}},
  year = {2026},
  eprint = {2612.00745},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.00745},
}
Figure