Source-linked AI summary

Multibranch Ensemble Head in Vision Foundation Models for Efficient Cucumber Phenological Stage Classification

Kostiantyn Khabarlak

arXiv:2610.37118v1cs.CV

TL;DR

Plant growth-stage classification with Vision Foundation Models remains challenging on small, domain-shifted datasets, including cucumber imagery with occlusion and subtle stage cues. The paper proposes a multibranch head that samples a branch during training and averages branch probabilities at inference. On NALEF Food Safety, DINOv2 ViT-S reaches Macro F1 0.978 and matches models with over 300M parameters while using 22.3M parameters and 12.2 GFlops.

  • Problem

    Cucumber growth-stage classification has received limited attention, and adapting Vision Foundation Models to small, domain-shifted datasets remains an open challenge.

    Source: §2 · p. 4
  • Method

    The proposed backbone-agnostic head stochastically samples a light or heavy branch during training and averages their outputs in probability space at inference.

    Source: §1 · p. 2, §3 · p. 4
  • Results

    DINOv2 and DINOv3 outperform similarly sized ResNet, EfficientNet, and supervised ViT models in small- and mid-sized regimes; DINOv2 ViT-S reaches Macro F1 0.978 while matching models with over 300M parameters.

    Source: §7 · p. 8
  • Takeaways & Limitations

    DINOv2 ViT-S with the multibranch head is suitable for smartphone and edge-device deployment, using 12.2 GFlops and 22.3M parameters.

    Source: §7 · p. 8

    Robustness to heavy shading, rain, night capture, or lens contamination was not evaluated, and adapting to other cultivars or environmental conditions requires retraining.

    Source: §6 · pp. 7–8

Abstract

from arXiv · show

Vision Foundation Models (VFMs) pretrained with self-supervised learning, such as DINOv2, provide highly transferable features, yet adapting them to small, domain-shifted datasets is still challenging. We propose a regularizing multibranch ensemble head: a training and inference scheme that pairs low- and high-capacity branches, samples a single branch stochastically at each training step, and averages both branches in probability space at inference. The design adds negligible parameters and essentially no inference overhead over a single heavy head, while improving the accuracy-efficiency trade-off under data-scarce conditions. Accurate classification of plant growth stages is critical for precision agriculture, enabling timely decisions on fertilization, irrigation, and harvesting. Therefore, as a challenging practical case we use cucumber phenological stage classification, in which flowers and fruits are frequently occluded by foliage, and stage transitions manifest primarily as subtle changes in leaf morphology. The NALEF Food Safety dataset contains images of five cucumber growth stages captured under diverse real-world conditions. On it we evaluate a broad range of backbones, including DINOv2 and DINOv3 ViT and ConvNeXt variants, against strongly supervised counterparts (ResNet, EfficientNet, ViT). The proposed DINOv2 ViT-S with multibranch head achieves a Macro F1 of 0.978 and Cohen's Kappa of 0.971, matching the performance of models more than ten times larger in parameters and GFlops, while requiring only 12.2 GFlops and 22.3M parameters, making it deployable on smartphones and edge devices for phenological stage classification.

1. Introduction

Plant growth-stage classification can support agricultural management, but cucumber stages are difficult to distinguish because flowers and fruits are often occluded and transitions depend on subtle leaf changes. The paper proposes a lightweight multibranch head for adapting Vision Foundation Models and evaluates it on cucumber stage classification.

1. Introduction

  • Accurate growth-stage classification supports agricultural decisions such as fertilization, herbicide application, and harvesting; automating it can reduce reliance on labor-intensive, subjective manual analysis.The passage links these decisions to optimizing agricultural management and supporting higher, more consistent crop yields.Source: §1 · p. 1
  • Cucumber stage transitions are challenging because flowers and fruits are frequently occluded by foliage, leaving subtle leaf-morphology changes as key visual cues.Cucumber fruit also resembles the surrounding canopy in color.Source: §1 · p. 2
  • The proposed multibranch head substantially improves the accuracy-efficiency trade-off over the previously reported DINOv2 ViT-L fine-tuning approach on NALEF Food Safety.The scheme samples one branch during training and averages both branches’ probabilities at inference, with negligible added parameters and essentially no inference cost.Source: §1 · p. 2
  • The proposed head pairs a lightweight and a higher-capacity branch, samples one branch per training step, and aggregates both branches’ outputs at inference.The paper presents it as a backbone-agnostic scheme for data-scarce settings.Source: §1 · p. 2
  • DINOv2 ViT-S with the proposed head improves over existing NALEF Food Safety solutions at a small fraction of their computational cost and is described as deployable on smartphones and edge devices.The introduction characterizes the model as requiring few GFlops and parameters.Source: §1 · p. 2

2. Literature Overview

The literature review identifies limited attention to cucumber growth-stage classification and relatively little VFM work on the task. It situates the proposed approach among prior plant-monitoring studies and self-supervised vision models.

2. Literature Overview

  • Prior cucumber computer-vision work covers root traits, harvesting detection, fruit quality, phenotyping, and pest classification, while is closest with DINOv2 ViT-L fine-tuning for growth stages.The review describes as using progressive layer unfreezing.Source: §2 · p. 3
  • DINOv2 combines masked image modeling with teacher-student feature consistency, while DINOv3 adds a Gram loss and is distilled into ViT and ConvNeXt variants.The review characterizes both as Vision Foundation Models whose features transfer across downstream tasks.Source: §2 · p. 3
  • DINOv2’s unlabeled LVD-142M dataset contains 142 million images, mostly not plant-focused; despite the domain gap from DINOv2’s web-sourced collection, self-supervised methods have been successfully adapted to plant-related tasks, [17].DINOv3’s LVD-1689M comprises 1,689 million Instagram photos and is substantially larger, likely entailing a greater domain gap than DINOv2’s web-sourced collection.Source: §2 · p. 3
  • Cucumber growth-stage classification has received limited attention, and prior VFM work on this task used a single large-backbone configuration; lightweight ensemble heads for improving the accuracy-efficiency trade-off remain unexplored.The task relies on subtle leaf morphology because flowers and fruits are frequently occluded.Source: §2 · pp. 3–4

3. Materials and Methods

The study compares CNN and Transformer backbones with lightweight, heavy, and multibranch classification heads. The proposed head samples one branch per training batch and aggregates both branches’ outputs at inference.

3. Materials and Methods

  • The comparison spans convolutional and Transformer architectures.The supplied Table 1 caption identifies the backbone roster but does not provide its entries.Source: §3 · p. 4, Table 1 · p. 5
  • The head variants are a linear probe, a two-layer GELU MLP with dropout probability 0.3, and the proposed multibranch head.The linear probe is presented as a lightweight option for VFM features; a heavier head may help address pretraining-to-agriculture domain shift.Source: §3 · p. 4
  • The multibranch head pairs a linear probe with a dropout-regularized MLP, samples one branch per batch during training, and aggregates both branches at inference.The light and heavy branches target simpler and more complex feature transformations, respectively.Source: §3 · p. 4
  • Inference aggregates branch outputs in probability space, avoiding direct averaging of logits that may have different scales.The passage describes this aggregation as consistent with mixture-of-experts averaging and a uniform Bayesian model average.Source: §3 · pp. 4–5
  • Training uses AdamW with batch size 32, pretrained backbone weights, and a randomly initialized head; it proceeds in two stages to mitigate catastrophic forgetting.The supplied passage does not specify the full two-stage schedule.Source: §3 · p. 5

4. Experiments

Experiments use the NALEF Food Safety cucumber dataset, with five annotated growth stages and images collected under varied real-world conditions. Because the stage counts are strongly imbalanced, the study reports Macro F1 and Cohen’s Kappa.

4. Experiments

  • 787 training and 239 test images cover five cucumber growth stages, but the public test set lacks ground-truth annotations, so reported experiments use a stratified 80/20 train/validation split.The stages are plantula, early vegetative, vegetative growth, flowering, and fruit setting.Source: §4 · p. 5
  • Images were captured with professional and smartphone cameras under varying environmental conditions.Source: §4 · pp. 5–6
  • Strong class imbalance leaves about ten validation images for minority stages, so the study evaluates models with Macro F1 and Cohen’s Kappa rather than relying on accuracy.Plantula is the smallest class and vegetative growth the largest.Source: §4 · p. 6
  • The dataset counts are organized by class for a stratified 80/20 train/validation split.Source: Table 2 · p. 6

5. Results

Self-supervised backbones generally outperform strongly supervised models of comparable size, with the advantage concentrated among small and mid-sized models. DINOv2 ViT-S with the multibranch head reaches 0.978 Macro F1 among small models, while ViT-L attains the highest overall Macro F1 at 0.979.

5. Results

  • 0.979 Macro F1 is the highest overall result, achieved by strongly supervised ViT-L, which is on par with the best DINO-pretrained models; most strongly supervised backbones are outperformed by self-supervised models of comparable size.Source: Figure 2 · p. 6, §5 · p. 6
  • 0.978 Macro F1 is achieved by DINOv2 ViT-S with the multibranch head, the best result for a small model and evidence of a self-supervised advantage in the small-model regime.Source: §5 · p. 6
  • ConvNeXt-Tiny reaches 0.959 Macro F1, while DINOv3-style pretraining raises it to 0.968.Source: §5 · p. 6
  • DINOv2 backbones outperform their DINOv3 ViT and ConvNeXt counterparts; the text attributes the latter’s slightly inferior performance as likely due to greater pretraining-data domain shift.Source: §5 · p. 6

6. Discussion

Ablations show stepwise F1 gains from the multibranch head and subsequent full-backbone fine-tuning, with negligible added inference overhead. Errors are confined to adjacent growth stages, while the evaluation remains bounded by the dataset and capture conditions.

6. Discussion

  • F1 rises from 0.955 with a heavy head to 0.960 with multibranch, then to 0.978 after full-backbone fine-tuning.Table 4 reports the incremental improvements over DINOv2 ViT-S.Source: §6 · p. 6, Table 4 · p. 7
  • The multibranch head adds negligible parameters and essentially no inference overhead versus a single-branch heavy head, yielding the best quality-efficiency trade-off.Backbone computation dominates inference cost.Source: §6 · p. 7
  • Foliage often occludes flowers and fruits, leaving the model to distinguish stages from subtle leaf and vine differences.The residual vegetative-growth versus flowering confusion reflects this leaf-centric cue limitation.Source: §6 · p. 7
  • NALEF Food Safety is the target, adverse capture conditions were untested, other cultivars or environments require retraining, and validation imbalance cautions small Macro F1 differences.Untested conditions include heavy shading, rain, night-time capture, and lens contamination on smartphones and edge devices.Source: §6 · pp. 7–8
  • The classifier makes no errors between non-adjacent stages and remains accurate on minority classes despite significant class imbalance.The confusion matrix reports that the only misclassifications are between vegetative growth and flowering stages.Source: §6 · p. 7, Figure 3 · p. 8
  • Evaluation on species recognition or disease-severity grading is proposed to establish how far the regularization benefit generalizes.The head targets fine-grained classification with limited data and overfitting risk.Source: §6 · p. 8

7. Conclusions

The multibranch head adapts vision foundation models to small, domain-shifted datasets, and DINOv2 ViT-S achieves strong cucumber stage classification with a compact model. Errors remain confined to adjacent stages, and evaluation on additional fine-grained benchmarks is identified as future work.

7. Conclusions

  • DINOv2 and DINOv3 outperform comparable ResNet, EfficientNet, and strongly supervised ViT models in the small- and mid-sized regimes, while strongly supervised ViT-L remains competitive at the largest scale.Overall, the authors report that VFMs transfer well to agricultural imagery, with the clearest benefit when model capacity is limited.Source: §7 · p. 8
  • Macro F1 0.978 and Cohen’s Kappa 0.971: DINOv2 ViT-S with the multibranch head matches models with over 300M parameters using 22.3M parameters and 12.2 GFlops.The authors describe this configuration as suitable for smartphones and edge devices.Source: §7 · p. 8
  • The multibranch head improves over both linear-probe and heavy-head alternatives, while full-network fine-tuning yields further gains with essentially zero inference overhead over a single heavy head.Training stochastically samples between a lightweight linear branch and a heavier MLP branch; inference averages their predictions in probability space.Source: §7 · p. 8
  • Misclassifications occur only between adjacent stages, specifically vegetative growth and flowering; no errors occur between non-adjacent stages.The authors relate the adjacent-stage confusions to leaf-centric images in which flowers and fruits are often occluded.Source: §7 · p. 8
  • Future work will extend evaluation to additional crop species and growth-stage taxonomies and incorporate explainability using large language models.Source: §7 · p. 8
Loading 2610.37118v1…