# Improving Moving Insect Detection with Difference of Features Maps in YOLO Architecture
## 1 Introduction
### Related Work
The use of motion has proven effective for enhancing object visibility and improving model performance in object detection tasks. Nevertheless, the integration of motion information remains relatively underexplored, particularly in challenging environments. In addition to the approach proposed by [29], other studies have also leveraged motion cues to distinguish objects from complex backgrounds. For instance, ref. [33] utilized motion information from video sequences by applying background subtraction and optical flow to detect freely moving fish in underwater environments. The outputs of Gaussian Mixture Model (GMM) and optical flow were combined with raw video frames containing texture and shape information. This combined input was then fed into an R-CNN model, which achieved state-of-the-art performance in the fish detection task. Another example is presented in [34], where a novel approach integrating a CNN model, specifically Single-Shot Detector with MobileNetV2 backbone, with motion cues is presented. In this method, intermediate feature maps from the CNN are used to identify regions of motion within each frame. By focusing only on moving objects, the approach effectively reduces false-positive detections and improves computational efficiency by lowering the average processing time. One of the major drawbacks of methods such as [29; 33] is their reliance on preprocessing steps to incorporate motion information. For instance, ref. [33] employs a GMM to separate foreground objects from the background, a computationally intensive process that requires multiple frames to construct a reliable background model. Similarly, ref. [29] requires a motion-enhanced image to be generated from three consecutive frames before being passed to the detection network. This preprocessing step not only adds complexity but also depends on frame differencing, which is highly sensitive to lighting variations commonly encountered in real-field scenarios. These limitations highlight the need for more efficient and robust approaches to motion integration in object detection. Feature maps extracted by convolutional layers are distortion and translation invariant, allowing the CNN to refine hierarchically more intricate patterns [35]. Some papers have operated feature maps to enhance predictions; for example, ref. [36] proposes an accelerating image classification through feature map similarity. In [37], uses the difference of feature maps to extract geometrical patterns in medical images. On the other hand, ref. [38] combines feature maps from different layers to offer scale-robust object detection. To address challenges mentioned above, we propose the motion module, a lightweight component designed to enhance object detection performance by integrating motion information directly at the feature map level within the YOLOv8 backbone. This approach eliminates the need for any preprocessing and introduces only minimal computational overhead. The main contributions of this work are as follows:  
* We introduce the motion module, a lightweight and efficient module that boosts YOLOv8 performance by incorporating motion cues directly into the network backbone. By incorporating motion information at an early stage in the feature extraction pipeline, the module enables the network to learn richer representations without incurring significant computational overhead. A key aspect of our design is the prioritization of a balanced trade-off between performance and computational cost. The module has been designed to maintain a low parameter count, ensuring the improved accuracy does not come at the expense of efficiency. * Our method avoids any external preprocessing and operates with only two consecutive raw frames as input, allowing the network to extract motion cues internally without relying on handcrafted features. This desicurgn choice enables a more streamlined and efficient pipeline that is easier to deploy. Processing only two frames at a time reduces memory usage.