DOI: 10.33640/2405-609x.3476 ISSN: 2405-609X

PalmNet: Confidence-Calibrated Edge-Cloud AI for Field Diagnosis of Date Palm Diseases

Muntadher Kareem, Raed Majeed

Date palm (Phoenix dactylifera L.) is a cornerstone crop for Iraq and the wider MENA region, yet reliable in-field diagnosis of leaf disorders remains slow, labour-intensive, and constrained by a limited pool of agronomists. This paper presents PalmNet, a full-stack diagnostic system that classifies nine leaf conditions through a calibrated edge-cloud framework. The system is developed and evaluated on a public dataset of 3,089 field images spanning the nine classes, using a 70/15/15 stratified split. A ShuffleNetV2 student network, distilled from a ConvNeXt-Tiny teacher, is deployed on two complementary edge endpoints: a Raspberry Pi Zero 2 W field station running ONNX Runtime with GPS-tagged capture, and an Android application built in Kotlin with Jetpack Compose and TensorFlow Lite, exposing separate viewer and expert interfaces. The teacher is served from Google Cloud Run and is invoked only for low-confidence predictions. Post-hoc temperature scaling with a single calibration temperature (Tcal = 1.3976) is applied to the student logits, and a calibration-split threshold sweep selects the operating confidence threshold τ = 0.93 for selective offloading. On a held-out test set of 464 images, PalmNet reaches 99.14% top-1 accuracy, a macro-F1 of 0.9789, and a balanced accuracy of 97.33%, on a par with a fully cloud-based baseline while keeping 93.75% of inferences on-device and reducing uplink traffic by approximately sixteenfold (from about 12.3 MB to 0.77 MB across the test pass). Knowledge distillation improves the student macro-F1 by 1.98 percentage points over a non-distilled baseline, and the deployed student carries roughly ten times fewer parameters and FLOPs than the teacher while running in about 93 ms per image on the field station. Bootstrap confidence intervals indicate that PalmNet is statistically on a par with the cloud-only baseline, and a robustness analysis under degraded captures shows that the calibrated router escalates more cases to the cloud as input quality declines. A Firebase-based expert feedback pipeline enables validation and continuous dataset enrichment with real field samples. These results show that coupling calibrated edge inference, selective cloud assistance, and expert-in-the-loop validation yields a practical solution for in-field palm disease diagnosis under the bandwidth and staffing constraints of real-world deployment.

More from our Archive