# Improving Moving Insect Detection with Difference of Features Maps in YOLO Architecture
## 1 Introduction
### Related Work  
As previously noted, both traditional ML techniques and CNNs have been applied to automate pest detection tasks. In [19], a comparative study between these approaches is presented for automated pest detection and identification on greenhouse tomato and pepper crops. They show that CNNs offer superior performance, achieving higher accuracy than traditional ML methods and effectively distinguishing between visually similar pest classes. However, the images used in this study were captured under controlled environmental conditions, specifically within a cultivation chamber. As a result, the model shows limited effectiveness when applied to real-world cultivation field scenarios. This performance gap arises from the fact that, in field conditions, models must cope with additional challenges such as diverse backgrounds, varying lighting conditions, occlusion and important changes in apparent characteristics of pests due to view angle and distance difference during image acquisition [20; 21]. Studies such as [20; 22] report that models trained on images acquired in controlled environments tend to perform poorly when tested under actual field conditions. To address this limitation, ref. [22] recommends prioritizing the inclusion of images captured under real-world conditions in the training dataset. To overcome this limitation, efforts have focused on the collection of datasets composed of images captured directly in the field. For instance, ref. [23] introduces a dataset specifically designed to reflect real-world conditions, this dataset contains 750,000 images of 102 insect classes. Such datasets are essential for improving the generalization capabilities of deep learning models and ensuring their applicability in practical agricultural scenarios. Regarding insect detection in real world scenarios, ref. [24] proposed a object detection algorithm based on YOLOv3 for early detection of tomato diseases and pests, dilated convolution replaces convolution layers in the network backbone, resulting in improved ability for small object detection. [PERSON] et al. [25] constructed a three-scale CNN with channel and spatial attention mechanisms, they showed that the proposed method can achieve both high speed and accuracy of crop pest detection, outperforming architectures such as VGG16. Recently, transformer-based architectures have gained significant attention in the deep learning community. Originally introduced for natural language processing tasks [26], the transformer architecture has since been successfully adapted for various computer vision applications. One such adaptation is Vision Transformer (ViT) [27]. Building on this approach, ref. [28] proposed a multi-scale and multi-factor ViT attention model for pest detection and classification over the IP102 [23] dataset. Their results demonstrate that transformer-based models can improve both classification and detection performance. An interesting approach is [29], where motion information is used to enhance the visibility of insects in time-lapse RGB images. The preprocessed images are fed into a CNN. The proposed method improves the performance of object detection models such as YOLO and Faster R-CNN. Additionally, the authors provide a dataset containing 107,383 annotated time-lapse images, including 9423 labeled insect instances. Several other insect monitoring systems have been deployed using traps equipped with cameras, such as [30; 31]. These systems are designed to attract and capture insects for close-range imaging, often resulting in high-resolution data suitable for classification tasks. However, they typically rely on different lures or attractants [32], which may introduce sampling bias and alter insect behavior. Furthermore, the majority of trapping methods are invasive, which results in rare insect species being killed [29]. A time-lapse setup avoids interference with natural insect behavior and supports broader spatial coverage.