An uncertainty-aware evaluation framework based on hierarchical vision transformers for robust cross-domain plant leaf disease classification
摘要
Plant leaf disease detection is a critical task in precision agriculture, where reliable diagnosis under real-world conditions is essential for reducing crop losses and supporting timely intervention. Although deep learning models have achieved high classification accuracy, their performance often degrades under domain shift between controlled laboratory datasets and real-field environments, while predictive uncertainty and confidence calibration remain largely unaddressed.This study presents an uncertainty-aware cross-domain evaluation framework based on a Hierarchical Vision Transformer (HViT) for plant leaf disease classification. The framework integrates multi-scale feature learning with Monte Carlo Dropout-based predictive uncertainty estimation and temperature-based calibration to systematically analyze model behavior in terms of accuracy, reliability, and robustness. Experiments were conducted on two complementary datasets: the New Plant Diseases Dataset (controlled conditions) and the PlantDoc dataset (field conditions), enabling bidirectional cross-domain evaluation. Results demonstrate that the proposed framework achieves superior performance, attaining 97.8% accuracy on controlled data and 93.6% on field data, while significantly improving calibration with lower Expected Calibration Error (ECE = 0.032 / 0.041), reduced Negative Log-Likelihood, and lower Brier score compared to baseline CNN and transformer models. Furthermore, the framework exhibits improved robustness under domain shift, with reduced performance degradation and stable uncertainty behavior. Overall, this study highlights the importance of integrating uncertainty estimation and calibration within a hierarchical transformer-based framework, providing a more reliable and deployment-ready solution for real-world agricultural disease diagnosis.