Uncertainty-Aware Hybrid Deep Learning for Robust Tomato Disease Detection: Field Validation and Edge Efficiency
Main Article Content
Abstract
Tomato leaf disease detection outdoor field performance has not been possible because of domain shift between laboratory and non-constrained outdoor settings, the inability to calibrate models, and farmer trust which cannot be interpreted by such models. We report an integrated system of frozen MobileNetV2 feature picking and XGBoost classification confirmed on both the laboratory-curated PlantVillage images and an external set of curated field condition images of 6, 682 images. Test-time augmentation measures the uncertainty of prediction and allows a reject choice on samples with low-confidence, whereas temperature scaling fields probability output. Dual-layer explainability through Gradient-weighted Class Activation Mapping (Grad-CAM) and SHapley Additive exPlanations (SHAP) gives clear arguments behind the diagnosis. Field validation gives 87.94% accuracy to the model (95% confidence interval: [0.872, 0.887]) with macro F1-score of 0.8786. The unpredictability-based rejection eliminates 19.4 percent of forecasts, and the rejection is 95.64 percent on the accepted predictions. Temperature scaling also cuts down Headed Expected Calibration Error by a factor of 0.0198 to 0.0096. The pipeline is very lean and only takes 2.26 million parameters and runs in 2.93 ms/image. The ability to extract classification-independent feature extraction is a defining feature of decoupling which facilitates robustness to domain shift, as well as better calibration than end-to-end methods. Gambling-sensitive reject option and the calibrated confidence scores can facilitate risk sensitive deployment that can be deployed in applications targeting farmers. The code and pretrained weights can be received publicly to facilitate their re-producibility and further researches on AI in agriculture.