Preprint
Article

This version is not peer-reviewed.

Med Herb Lens v2: User-Trained Plant Classifiers on Android, iOS and the Web from One Kotlin Multiplatform Code Base

Submitted:

03 November 2026

Posted:

04 November 2026

You are already at the latest version

Abstract
General plant identification services know the species that are photographed most often, but not the poorly documented ones that matter to a farmer, a biosecurity officer or a herbalist: local medicinal plants, newly arrived invasive species, or the plant material traded as herbal products. Med Herb Lens v2 lets anyone turn their own photos into an image classifier, trained on the phone or in the browser without sending the photos anywhere, and share the result as a standard model file. A frozen DINOv2 or MobileNetV3 backbone turns each photo into an embedding, and streaming linear discriminant analysis calculates the classifier from those embeddings in about a second. The application, previously Android only, was rebuilt as one Kotlin Multiplatform code base for Android, iOS and the web, in which 72% of the application’s code is shared by all three platforms and the same training code runs on each. We describe the architecture and the training workflow, and evaluate the product quality characteristics of ISO/IEC 25010 by measurement: accuracy, time, memory, portability, maintainability and security. Building a 10-species model from 200 photos in the Train tab took 32 s on an iPhone, 48 s in a browser and 3 min 19 s on a mid-range Android phone; the platforms agreed within about 2 points of accuracy; and 374 automated tests run on every change. A user survey of quality in use is under way.
Keywords: 
;  ;  ;  ;  ;  
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.