An Intelligent Multi-Scale Lesion Attention Transformer Framework with Retrieval-Augmented Farmer Guidance for Onion Leaf Disease Diagnosis

Onion diseases have been a significant hurdle for crop production, resulting in huge crop losses. It is necessary to detect and identify diseases quickly and correctly for effective disease management. This paper proposes a deep learning framework for identifying onion leaf diseases automatically. Our data collection methodology involves capturing images of onions grown in the field under various conditions in Faridpur, Bangladesh. We used our collected images for classifying diseases through the proposed method.Our proposed framework utilizes EfficientNetB4 along with a lesion attention mechanism and multi-scale feature fusion by transformers to increase feature extraction and classification capability of the network. To make our model more transparent, we have used the XAI approach to explain our prediction using a Grad-CAM visualization technique to help in understanding which region is important for predicting the infection. Furthermore, our model suggests a treatment strategy based on RAG guidance module. As per experimental results, our proposed model performs with 98.65% classification accuracy.