# Improved YOLOv7 for Small Object Detection Algorithm Based on Attention and Dynamic Convolution
## 1 Introduction  
Object detection involves the classification and localization of targets within images or videos. Its significance has grown greatly in recent years due to its diverse array of applications. Additionally, object detection serves as the foundation for other advanced tasks within the realm of computer vision, such as target tracking and target segmentation. These tasks encompass two primary components: identifying the target's class within an image and accurately determining the target's spatial location [1]. Early conventional object-detection methods, including the Viola-Jones detector [2] and Histogram of Oriented Gradients (HOG) [3], relied on manual feature construction. However, these initial approaches were marred by slow processing speeds, reduced accuracy, and inadequate performance when faced with unfamiliar datasets. The introduction of Convolutional Neural Networks (CNNs) has ushered in a transformative era in object detection. This study delves into target detection methods facilitated by fundamental deep learning models [4]. Notably, target detection methodologies can be broadly categorized into two major classifications: the two-stage model and the one-stage model. The former employs a CNN to generate a set of prospective candidate regions, subsequently accomplishing tasks related to classification and localization. On the other hand, the latter adopts a regression approach, directing input images through a CNN and directly yielding detection results thereafter. Small Object Detection (SOD) has a relatively short history compared to other computer vision tasks. Small targets were defined in 2014 by the common dataset MSCOCO as objects having a density of less than 32 \(\times\) 32 px. A small detection of targets network based on deep learning was proposed in the literature in 2016 [5], and by including a tiny-target-detection dataset and the evaluation metrics of the dataset, the part of the target box area of 0.05% to 0.58% of the total area in the same category of targets was defined as a small target from the relative size, which laid a certain foundation for exploring small target detection. The literature [6] proposed a technique based on upsampling to achieve better results in small target detection. In 2018, the literature [7] applied the deconvolutional RCNN to remote sensing small target detection. Subsequently, based on Faster RCNN [8], SSD [9], and the YOLO series of network models, researchers proposed many small-target-detection network models. ReDet [10], Oriented Bounding Boxes [11], and Box Boundary-Aware Vectors [12] enhance the identification of tiny targets by rotating the prediction frame and rotating the detector, but target only remote sensing scenarios; by including target detection layers and employing a transformer prediction Head to integrate the CBAM attention module, TPH-YOLOv5 [13] enhances the detection effectiveness of small targets [14], which successfully enhances the detection efficiency of the network for tiny targets, but it easily results in missed detection in non-dense scenarios; For YOLO-Z [15], although a series of operations such as replacing PAFPN with Bi-FPN and expanding the Neck layer make the shallow and middle features well fused, it is not applicable to target size scenarios with large variations. [PERSON] and [PERSON] et al. [16] dealt with the problem of the difficulty in detecting small targets when the image has very few details and it is difficult to detect enough information. A Slice-Assisted Hyper-Inference (SAHI) was proposed to aid detection. In order to better cope with the problems of modeling difficulty and insufficient training due to the insufficient data volume in small target detection, [PERSON] et al. [17] constructed the SODA-D dedicated dataset for small target detection in driving behavior and the SODA-A dedicated dataset for small target detection for airborne scenarios, which provide a solid foundation for future research on small target detection.