FruitNeRF++: A Generalized Multi-Fruit Counting Method Utilizing Contrastive Learning and Neural Radiance Fields
Lukas Meyer, Andrei-Timotei Ardelean, Tim Weyrich, Marc Stamminger
TL;DR
FruitNeRF++ addresses the need for general, shape-agnostic fruit counting from multi-view orchard imagery by integrating a neural radiance field with a neural instance field learned through contrastive training. It leverages vision foundation models to obtain per-fruit instance masks and fuses RGB, semantic, and instance information into a 3D representation that can be clustered to yield counts without fruit-specific templates. The approach introduces a cascaded training scheme, a tailored contrastive loss with fruit prototypes, and a two-stage multi-modal clustering pipeline (spatial partitioning followed by HDBSCAN) to achieve robust counting across diverse fruit types. Evaluation on synthetic data (six fruits) and a real Fuji dataset demonstrates favorable performance and practical advantages over prior, more specialized methods, with insights into embedding size, temperature, and distance weighting that guide practical deployment.
Abstract
We introduce FruitNeRF++, a novel fruit-counting approach that combines contrastive learning with neural radiance fields to count fruits from unstructured input photographs of orchards. Our work is based on FruitNeRF, which employs a neural semantic field combined with a fruit-specific clustering approach. The requirement for adaptation for each fruit type limits the applicability of the method, and makes it difficult to use in practice. To lift this limitation, we design a shape-agnostic multi-fruit counting framework, that complements the RGB and semantic data with instance masks predicted by a vision foundation model. The masks are used to encode the identity of each fruit as instance embeddings into a neural instance field. By volumetrically sampling the neural fields, we extract a point cloud embedded with the instance features, which can be clustered in a fruit-agnostic manner to obtain the fruit count. We evaluate our approach using a synthetic dataset containing apples, plums, lemons, pears, peaches, and mangoes, as well as a real-world benchmark apple dataset. Our results demonstrate that FruitNeRF++ is easier to control and compares favorably to other state-of-the-art methods.
