# Real-Time Monitoring Method for Traffic Surveillance Scenarios Based on Enhanced YOLOv7
## 2 Related Works  
### General Object Detection  
Image-based object detection algorithms represent fundamental yet challenging research issues in the field of computer vision. These algorithms can be classified into traditional object detection methods [10; 11; 12; 13] and deep learning-based object detection methods [14; 15; 16]. Traditional object detection techniques suffer from poor robustness, high time complexity, and redundant detection windows, which limit the improvement of detection performance. In 2014, [PERSON] et al. proposed R-CNN, which uses convolutional networks for feature extraction, and demonstrated excellent performance on the PASCAL VOC Challenge datasets [17]. Since then, research on image-based object detection has rapidly progressed towards deep learning. In the development of deep learning-based object recognition algorithms, two types of detection frameworks have emerged: two-stage object detection and one-stage object detection [18]. In 2020, a new branch of research emerged in object detection. Facebook introduced the Transformer mechanism into object detection and proposed the DETR method [19]. However, DETR struggles with high resolution images and small object detection, which has limited its application in engineering.  
The two-stage object detection process begins with the identification of potential regions of interest, followed by the extraction, classification, and localization of the targets. Although the detection performance has been significantly enhanced in comparison to traditional methods, the original two-stage detection algorithm, R-CNN, had a complex training process with high time and space complexity [17]. SPP-Net proposed the use of spatial pyramid pooling layers to address the issue of target loss or distortion due to scaling, as well as to handle images of arbitrary sizes and scales [20]. This method achieved detection accuracy comparable to that of R-CNN while simultaneously enhancing the speed of both training and detection. However, both methods shared a common limitation: they necessitated multi-stage training to achieve the object detection task. Subsequently, Fast R-CNN [21] and Faster R-CNN [22] were proposed as solutions to address these problems in a sequential manner. Faster R-CNN, as a region proposal network with a fully convolutional network structure (RPN), overcame the limitations of selective search and effectively accelerated the generation of candidate boxes. Subsequent algorithms, such as FPN [23] and Mask R-CNN [24], further augmented the components of Faster R-CNN and enhanced the performance of two-stage object detection methods. Currently, Faster R-CNN remains a highly competitive algorithm in the field of object detection.  
One-stage object detection algorithms differ from two-stage algorithms in that they do not include a candidate region search step. This eliminates the need for a separate search phase, which is crucial for real-time detection and is well-suited to a variety of scenarios. The first one-stage object detection algorithm, You Only Look Once (YOLO), was proposed in 2015 and applied a single neural network to the entire image. This further improved the real-time performance of detection, although the accuracy slightly decreased [16]. This method divided the input image into a grid of cells for prediction, but due to the limited number of targets within each cell, it struggled to effectively detect dense and small objects. Subsequent versions, such as SSD [25], RetinaNet [26], and later versions of YOLO [27; 28; 29], focused more on addressing these issues.