# Improving Moving Insect Detection with Difference of Features Maps in YOLO Architecture
## 2 Materials and Methods  
### Dataset  
To evaluate the performance of the proposed model, we conducted experiments using the publicly available dataset introduced in [29]. This dataset serves as a benchmark for assessing object detection models targeting small insects in real-world environments. This dataset consists of time-lapse images captured at 30-s intervals. The camera system was used to monitor three different plant species: _Trifolium patense_ (red clover), _Cakile martiima_ (sea rocket), and _Malwa sylvestris_ (common mallow). While the primary focus of the monitoringsystem was to capture honeybees visiting the plants, the dataset also includes occasional appearances of other animals such as beetles, butterflies, and spiders. This dataset provides realistic scenarios with natural lighting, vegetation and background variability, making it suitable for evaluating detection models in outdoor environments. All images in the dataset are in high definition, with a resolution of 1920 \(\times\) 1080 pixels (width \(\times\) height), which allows small insects to be visible. Additionally, the distribution of bounding box sizes was analyzed through boxplots of normalized dimensions. Figure 1 shows that the normalized bounding box width reaches up to approximately 0.100 of the image width, while the height reaches up to approximately 0.175 of the image height. This suggests that most bees occupy a relatively small portion of the image, which highlights the importance of sufficient resolution and sharpness for reliable detection. During image acquisition, the camera remained stationary during individual recordings but was relocated periodically throughout the monitoring period to ensure coverage of different flowering plants from both lateral and overhead perspectives. The authors in [29] provide predefined train, validation and test splits of the dataset. However, the training and validation sets do not contain consecutive time-lapse images captured at 30-s intervals. To address this limitation, we constructed a modified version of the dataset by selecting samples exclusively from the original test split, which preserves temporal continuity between frames. This modified dataset ensures a consistent 30-s interval between images, allowing us to leverage motion information more effectively. Summary statistics of the original test split are presented in Table 1.  
As mentioned previously, we constructed a modified version of the dataset by selecting samples exclusively from the original test split. However, as shown in Table 1, a significant proportion of these images do not contain any insects. To address this issue, we filtered the dataset by selecting only the images that included at least one insect for each camera system. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Camera** & **Insects** & **Images** & **Ratio (\%)** & **Plant** \\ \hline S1-0 & 170 & 14,092 & 1.2 & Rocket \\ S1-1 & 333 & 15,120 & 2.2 & Clover \\ S2-0 & 322 & 14,066 & 2.3 & Mallow \\ S2-1 & 411 & 14,011 & 2.9 & Mallow \\ S3-0 & 2100 & 15,120 & 13.9 & Clover \\ S4-0 & 2319 & 15,120 & 15.3 & Clover \\ S4-1 & 701 & 15,120 & 4.6 & Clover \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Test split of the dataset presented in [29]. It includes time-lapse images captured by multiple camera systems, each identified by a unique ID (e.g., Sx-0, Sx-1). The table summarizes the number of images and the presence or absence of insects per camera. Figure 1: Distribution of normalized bounding box sizes for honeybees dataset. Then, to balance the dataset, we randomly sampled an equal number of images without insects (background images) from the corresponding camera system, ensuring a balanced distribution for training and evaluation. Additionally, we performed data cleaning on this modified dataset by removing false-positive annotations and out-of-focus images. As previously noted, some images contained insects other than honeybees; however, due to the small proportion of these instances, such images were excluded from the dataset.