
Lettuce (Lactuca sativa) is critical for Libyan food security and smallholder income, but production is severely affected by fungal, bacterial, and viral diseases. Conventional diagnosis relies on subjective, time-consuming expert inspection, often unavailable in resource limited rural areas. This paper presents a lightweight Artificial Intelligence (AI) system for real time lettuce disease diagnosis, tailored to the Libyan agricultural context.
Methodology: A dataset of 4,619 RGB images was constructed from public sources and field captures in northwestern Libya (2024-2025). Five deep learning architectures (Custom CNN, VGG16, ResNet50, AlexNet, EfficientNetB0) were evaluated using macro F1 score (primary fairness metric), per class recall, and CPU inference latency on a Lenovo Yoga 370 (no GPU). Lighting variability was addressed via histogram equalization and CLAHE as part of preprocessing.
Key results: EfficientNetB0 achieved 90.0% test accuracy and a macro F1 score of 0.78, with 100% recall for Downy Mildew (11/11 cases) – critical for humid greenhouse systems. Inference latency was 158 ms on CPU only hardware, well below the 500 ms real time threshold. A lightweight fallback model (Custom CNN) runs in 28 ms with 89.7% accuracy.
Deployment: The system is integrated into a bilingual (Arabic-English) web prototype providing agronomically validated, Libya compliant treatment recommendations. Results show that efficient deep learning can bridge the gap between AI research and practical field deployment in low resource regions.