Abstract:
Crop death often accounts for food insecurity and famine, and the most common form of production
failure worldwide is leaf diseases. Tomato leaf diseases are among them, with their devastating
effect on yield is so profound. Nevertheless, the traditional dependence on slow and often inaccu rate visual inspection by farmers is a notable bottleneck to effective intervention. To address the
urgent necessity of accurate and effective agricultural management, this study constructed a com plex deep learning architecture aimed at classifying, evaluating, and detecting tomato leaf injuries.
By employing Swin-UNet, which is a hybrid architecture combining Swin Transformer and U-Net,
this study aimed to predict and correctly classify healthy tissue, bacterial spots, and early blight.
A dataset of 2,000 images created under controlled conditions formed the basis for the develop ment of the model, which was annotated by hand and augmented to guarantee good generalization.
The training was performed with 100 epochs with a composite loss, cross-entropy, Dice, and focal
Tversky loss, and this choice was made to address the issue of class imbalance. The performance
obtained was very successful, with a mean Intersection over Union (mIoU) of 0.82 in the validation
set. The accuracy of the diagnosis was also supported by F1 scores of 0.940 for healthy leaves, 0.895
for bacterial spot, and 0.937 for early blight. Finally, this end-to-end system, including data collec tion for severity processing, validates the effectiveness of transformer-based systems in performing
challenging visual tasks and offers a convenient, highly accurate instrument for contemporary agri culture.