Introduction
Plant identification applications like Pl@ntNet and Google Lens have revolutionized how we interact with nature. However, these tools typically rely on cloud-based architectures, requiring a stable internet connection to process images on powerful remote servers. This dependency becomes a significant hurdle in deep forests, remote mountain ranges, or rural areas where connectivity is often non-existent. To address this, researchers are focusing on "embedded recognition"—deploying deep learning models directly onto mobile devices. This paper benchmarks several modern, lightweight neural network architectures to determine their suitability for offline plant identification, specifically targeting the limitations of smartphone hardware.
The Challenge of On-Device Recognition
Moving AI from the cloud to the edge involves balancing three critical, often conflicting, factors:
- Accuracy: The model must distinguish between hundreds of morphologically similar species.
- Memory Footprint: Storage is limited; a model should not occupy excessive space on a user's device.
- Inference Time: For a positive user experience, results must be nearly instantaneous, ideally under a few milliseconds.
The current baseline for many offline applications is SqueezeNet, a model released in 2016. While exceptionally small, its performance has been surpassed by newer architectures designed for mobile CPUs.
The InterFolia 2.0 Dataset
To evaluate these models, the authors introduced InterFolia 2.0, a refined dataset specifically curated for trees and shrubs found in metropolitan France. This dataset merges the original InterFolia collection with the Bark-101 dataset, resulting in 477 plant classes.
The images are categorized by organ:
- Leaves: 2,514 images.
- Barks: 2,305 images.
- Flowers and Fruits: 5,239 images.
A significant challenge within this dataset is class imbalance. Some species are well-represented, while others have as few as three images, necessitating models that can handle "few-shot" learning scenarios.
Methodology and Benchmarking
The study benchmarked five lightweight architectures:
- SqueezeNet (Baseline): The ultra-small veteran.
- MobileNet V2 & V3: Architectures optimized for mobile CPUs using depthwise separable convolutions.
- EfficientNet-B0: A model known for its balanced scaling of depth, width, and resolution.
- MobileViT-S: A hybrid architecture combining standard convolutions with Vision Transformers (ViT).
Models were trained using PyTorch and converted via CoreML for deployment on an iPhone 12 Pro. This approach allowed for real-world measurements of inference time and memory usage on actual mobile hardware.
Results and Discussion: The "Bark" Problem
The benchmarks revealed that identifying a tree by its bark is significantly more difficult than by its leaves or flowers. While leaves have distinct geometric shapes, bark identification is almost entirely dependent on texture.
Furthermore, bark texture changes as a tree matures, adding temporal complexity. The results showed:
- EfficientNet-B0 was the overall champion for leaves and flowers, achieving 50.59% Top-1 accuracy on leaves (vastly outperforming SqueezeNet's 12.31%) with a fast inference time of 2.62ms.
- MobileNet V2 emerged as a surprise winner for bark identification. While its accuracy was lower (~29%), it was the fastest model tested (1.86ms) and maintained a small memory footprint (9.5MB).
- MobileNet V3 showed high accuracy but surprisingly high inference times on the iPhone (over 20ms), likely due to current optimization gaps in CoreML for its specific layers.
- MobileViT-S, despite its theoretical advantages, struggled with the transition to mobile hardware in this benchmark, showing that newer "transformer" hybrids may require further optimization for specific mobile frameworks like CoreML.
Conclusion
The study concludes that SqueezeNet is largely obsolete for modern mobile plant identification. EfficientNet-B0 and MobileNet V2 offer far superior accuracy with manageable footprints. Future work will focus on "model fusion"—combining data from multiple organs (e.g., leaf and bark) to improve overall confidence—and using data augmentation to address the scarcity of images for rare species.
Summary updated