# A Study on Tomato Disease and Pest Detection Method
## 1 Introduction  
Tomatoes are an important vegetable crop that is widely grown throughout the world [1]. The tomato crop is important in terms of food and nutrition, economics, ecosystem services, and cultural and historical values. First, as a nutrient-rich vegetable, tomatoes play an important role in human health. It is rich in nutrients such as vitamin C, folate, and potassium [2], and is also a low-calorie food suitable for weight loss and maintaining a healthy diet. In addition, tomatoes can be used in a variety of sauces and continents to enhance the taste and flavor of food. Second, tomato crops make a significant contribution to the economy and agricultural industry [3]. The cultivation and sale of tomatoes drive many related industries and employment opportunities, including seed production, greenhouse construction, transportation, and sales. Tomato crops also make a positive contribution to the ecosystem. Tomatoes can absorb a large amount of carbon dioxide, reducing greenhouse gases in the atmosphere [4], providing important habitat and food resources, and supporting local biodiversity. Tomatoes are widely used as important research objects and model plants, with significant research value in genetics, cell biology, biotechnology, molecular biology, and genomics [5]. Tomato production is often associated with the occurrence ofpests and diseases that can cause significant yield losses [6], particularly the impact of late blight on tomato production in humid areas [7]. Therefore, prevention and control of tomato pests and diseases are key to improving tomato yield and quality, and early detection of diseases is extremely important for selecting the correct control methods and stopping the spread of diseases [8]. Therefore, it is of great significance to design a simple and efficient real-time detection model for tomato pests and diseases to improve tomato yield.  
The main contributions of this paper include the following three points:  
1. In this paper, we propose a lightweight model for tomato pest and disease detection called YOLOv5n-VCW. This model improves the YOLOv5n architecture by replacing the original backbone network with Efficient Vision Transformer (EfficientViT) [9], replacing the original upsampling method with the lightweight and general-purpose Content-Aware ReAssembly of FEatures (CARAFE) algorithm [10], and replacing Complete-IoU (CIoU) Loss with Wise-IoU (WIoU) Loss [11]. All these improvements are effective in improving the performance of the model in tomato disease and pest detection tasks.
2. This paper evaluates and compares the performance of mainstream object detection models, including YOLOv5n, YOLOv5s, YOLOv5m, YOLOv5l, YOLOv5x, SSD, Faster R-CNN, and the proposed YOLOv5n-VCW model, in the task of detecting tomato pests and diseases. The evaluation results show that YOLOv5n-VCW achieves mAP50 and mAP50:95 scores of 98.1% and 84.8%, respectively, which is a 2.3% and 1.7% improvement over YOLOv5n and even outperforms other models such as YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x.
3. Another contribution of this paper is that it reduces the size of the model parameters to 1.9 M, which is a reduction of 0.4 M compared with YOLOv5n. In addition, the computational complexity is reduced by 1.2 GFLOPs, making the YOLOv5-VCW model much smaller than other evaluated models. This makes the YOLOv5-VCW model more suitable for use on devices with limited computational resources.  
This paper is organized as follows: Following the introduction, Section 2 briefly reviews previous work related to the detection of tomato pests and diseases using deep learning methods. Section 3 describes the base model used in this paper. Section 4 describes the method that improves on the base model. Section 5 provides experimental results. Section 6 discusses the experimental results and the limitations of this study, and finally, Section 7 summarizes some comments and future work.