# A New Hybrid ConvViT Model for Dangerous Farm Insect Detection
## 1 Introduction  
Agriculture has an important place in the world economy and forms the economic infrastructure of many countries. Today, agriculture also provides jobs for various groups in a country's population while providing food and raw materials. However, plants and agricultural products are adversely affected by various factors such as chemicals, breeds, frost, and insects. For these reasons, insects have an important place. The most significant damage they cause to agriculture is shown as product losses. In addition, the transfer of bacteria to plants causes viral or fungal infections and affects many negative situations, from eating leaves to entering fruits [1]. Harmful insects or pests in agriculture are the main reason the world's agricultural production losses decrease by 20% to 40% every year. Various chemicals are used toprevent such pests. These chemicals are used intensively in agriculture to protect the products. However, the resistance of insects to these chemicals increases and causes many conditions, such as air pollution, water pollution, poisoning, and other health problems. Pest management systems require early detection of pests to prevent excessive use of chemicals. Integrated pest management systems prevent excessive use of these chemicals and ensure the detection of pests. The main objectives of these systems can be listed as providing farmers with a decision support tool, contributing to the optimization of their products, increasing environmental sustainability, and improving product quality [2]. The cost of these invasive pests is increasing day by day. For example, in 2016, it was reported that the cost of such insects to the United States was at least USD 70 billion annually. Rather than sending experts to the field to detect these insects, a low-cost method for surveillance and control is to attract these insects into traps using colors and lights. However, identifying and counting the collected samples can be both labor-intensive and expensive. Automated identification systems therefore provide a promising solution by enabling large-scale operations with high accuracy and reduced costs [3]. Pests are seen as the most important factors that damage crops on Earth. Control or prevention of these insects can reduce losses in agriculture. Correct and early classification and detection of these insects are important. Since these tasks require continuous and expensive surveillance, interest in automatic insect detection has increased recently. Traditional pest surveillance systems rely on pest experts or technicians to manually identify pests, which is both a subjective method and an application that prevents large-scale applications in terms of workload. With cameras in embedded systems and the internet reaching a significant stage, computer vision technologies have played an important role in automatic pest surveillance and detection [4]. Traditional pest detection and identification processes are based on manually generated, hand-crafted features. Then, classical machine learning techniques such as k-nearest neighbors, support vector machine, and random forest are used to perform the identification process. These handcrafted feature-based methods are entirely dependent on the characterization of these features. Therefore, they are not robust against complex environments and similar target outputs. Therefore, classical classification accuracy rates are low. The application of learning in different fields has enabled this technology to be used in the detection and identification of malicious software in the field of agriculture [5]. In general, harmful insects are one of the main reasons for reduced product efficiency and quality. Although various chemicals are used to eliminate these insects, they harm the environment, human health, and natural resources. Integrated pest management systems in an alternative way control these insects and reduce the damage they cause, increase product quality, and reduce excessive use of chemicals.