Vision foundation models improve cucumber growth stage classification on smartphones

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

Computer Vision and Pattern Recognition

Summary

It can be hard for computer programs to recognize cucumber plant stages from only a few pictures, especially when leaves block parts of flowers or fruits. The authors created a new way to train vision models that combines simple and complex parts, helping the program learn better from small datasets. This method uses little extra computing power and works well on small devices like smartphones. They tested it on a real cucumber image collection and matched the accuracy of much larger models.

What this means in practice

  • For precision agriculture teams: Deploy efficient cucumber growth stage classifiers on edge devices to enable timely and accurate farming decisions without high computational costs.
  • For mobile app developers: Build smartphone applications that detect subtle plant growth changes enabling agricultural monitoring in field conditions with limited data.$Commercial implications: This paper enables the creation of lightweight, accurate plant growth stage detection apps for farmers and agronomists, making commercial deployment feasible.

Authors

Kostiantyn Khabarlak

Abstract

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.