Early and Accurate Detection of Tomato Leaf Diseases Using
TomFormer
Asim Khan
1
, Umair Nawaz
2
, Lochan Kshetrimayum
1
, Lakmal Seneviratne
1
, and Irfan Hussain
1
Abstract— Tomato leaf diseases pose a significant challenge
for tomato farmers, resulting in substantial reductions in crop
productivity. The timely and precise identification of tomato
leaf diseases is crucial for successfully implementing disease
management strategies. This paper introduces a transformer-
based model called TomFormer for the purpose of tomato leaf
disease detection. The paper’s primary contributions include
the following: Firstly, we present a novel approach for detecting
tomato leaf diseases by employing a fusion model that combines
a visual transformer and a convolutional neural network.
Secondly, we aim to apply our proposed methodology to the
Hello Stretch robot to achieve real-time diagnosis of tomato
leaf diseases. Thirdly, we assessed our method by comparing it
to models like YOLOS, DETR, ViT, and Swin, demonstrating
its ability to achieve state-of-the-art outcomes. For the purpose
of the experiment, we used three datasets of tomato leaf
diseases, namely KUTomaDATA, PlantDoc, and PlanVillage,
where KUTomaDATA is being collected from a greenhouse in
Abu Dhabi, UAE. Finally, we present a comprehensive analysis
of the performance of our model and thoroughly discuss the
limitations inherent in our approach. TomFormer performed
well on the KUTomaDATA, PlantDoc, and PlantVillage datasets,
with mean average accuracy (mAP) scores of 87%, 81%, and
83%, respectively. The comparative results in terms of mAP
demonstrate that our method exhibits robustness, accuracy,
efficiency, and scalability. Furthermore, it can be readily
adapted to new datasets. We are confident that our work holds
the potential to significantly influence the tomato industry by
effectively mitigating crop losses and enhancing crop yields.
I. INTRODUCTION
Solanum lycopersicum is the scientific name for tomatoes,
which can grow on almost any well-drained soil [1] and is
grown in fields by nine out of ten farmers. To use freshly pro-
duced tomatoes in their kitchens and enjoy excellent meals,
many gardeners cultivate tomatoes in their home gardens.
Depending on unfavourable seasonal and environmental con-
ditions, plant diseases and pests significantly reduce plant
yield, resulting in economic and societal losses. It takes
time and money for people to identify pests and pathogens.
Farmers still face difficulties in accurately identifying plant
diseases. They are limited to speaking with other farmers
or respective agricultural professionals as their only choices.
The ability to recognize leaf diseases requires knowledge
*This research is supported by ASPIRE, the technology program man-
agement pillar of Abu Dhabi’s Advanced Technology Research Council
(ATRC), under the ASPIRE project “Aspire Research Institute for Food
Security in the Drylands ” within Theme 1.4.
1
A. Khan, L. Kshetrimayum, L. Seneviratne and I. Hussain are with
the Department of Mechanical Engineering, Khalifa University, Abu Dhabi,
United Arab Emirates. [@ku.ac.ae]
2
U. Nawaz Researcher is with the Department of Electrical
Engineering, Namal University, Mianwali, Punjab, Pakistan
[1601005@namal.edu.pk]
of plant diseases. As a result, farmers want automated AI
image-based solutions.
The present state of computer vision applications, specif-
ically in image and video analysis, involves utilising and
acknowledging images as a dependable approach to disease
diagnosis. This recognition is primarily facilitated through
the accessibility of suitable software packages or tools.
These technologies employ sophisticated image processing
techniques, contributing to intelligent image identification,
thereby enhancing recognition efficiency, cost reduction, and
overall recognition accuracy [2].
Transformer networks have demonstrated their efficacy in
various natural language processing tasks, such as machine
translation, summarising texts, and question answering [3].
Recently, there has been a surge in the inclination towards
employing transformer networks for computer vision tasks,
encompassing image classification and object detection. This
research presents a novel methodology for identifying tomato
leaf diseases using a customized transformer network in-
tegrated into the sophisticated Hello Stretch robot. Our
methodology is founded upon the incorporation of the sub-
sequent two fundamental concepts:
• Use a transformer network to extract features from
images of tomato leaves.
Transformer networks are ideally suited for this task
because they can discover long-range dependencies in
data sequences. This is important for tomato leaf disease
detection, as the symptoms of different diseases often
appear in different parts of the leaf.
• Use the Hello Stretch robot to collect images of
tomato leaves.
The Hello Stretch robot is a mobile manipulator de-
signed for indoor use. It has a depth camera to capture
high-quality images of tomato leaves.
II. RELATED WORK
Computer vision has experienced rapid growth in re-
cent years due to advancements in modern science and
technology. This has led to a broader range of computer
vision applications, including identifying and categorising
plant diseases. Numerous artificial intelligence methods are
currently employed for this purpose, encompassing a range
of techniques such as k-nearest neighbors algorithm (K-
NN), logistic regression (LR), decision trees (DTs), support
vector machines (SVMs), and deep convolutional neural
networks (DCNNs) [4], [5]. These methods improve feature
extraction when applied with image preprocessing. However,
these methods are still weak regarding the model’s efficiency.
arXiv:2312.16331v1 [eess.IV] 26 Dec 2023