Agriculture faces challenges in achieving high-yield production while minimizing the use of chemicals. The excessive use of chemicals in agriculture poses many problems. Accurate disease diagnosis is crucial for effective plant disease detection and treatment. Automatic identification of plant diseases using computer vision techniques offers new and efficient approaches compared to traditional methods. Transformers, a type of deep learning model, have shown great promise in computer vision, but as the technology is still new, many vision transformer models struggle to identify diseases by examining the entire leaf. This paper aims to utilize the vision transformer model in analyzing and identifying common diseases that hinder the growth and development of plants through the plant leave images. Besides, it aims to improve the model's stability by focusing more on the entire leaf than individual parts and generalizing better results on leaves not in the image center. Added features such as Shift Patch Tokenization, Locality Self Attention, and Positional Encoding help focus on the whole leaf. The final test accuracy obtained is 89.58%, with relatively slight variances in precision, accuracy, and F1 score across classes, as well as satisfactory model robustness towards changes in leaf orientation and position within the image. The model's effectiveness shows the vision transformer's potential for automated plant disease diagnosis, which can help farmers take timely measures to prevent losses and ensure food security.
Read full abstract