# DScanNet: Packaging Defect Detection Algorithm Based on Selective State Space Models
## 2 Methods  
### YOLO Series Real-Time Target Detection Algorithm  
The YOLO (You Only Look Once) series of algorithms is a typical representative of single-stage target detection models and has been in the research hotspot since it was first proposed in 2016. This series of algorithms has gradually become a widely used real-time target detection framework in industry and academia by continuously optimizing the network structure, feature fusion strategy, and training techniques. The core idea of the algorithm is to transform the target detection task into a single forward-propagation regression problem by predicting the bounding box and category probabilities directly on the image grid, which avoids redundant computation and significantly improves the detection speed compared to the traditional two-stage detector.  
YOLOv1 to YOLOv3 [16, 17, 18] are the forerunners of the YOLO family of models, and their performance improvements are closely related to backbone improvements and have led to the widespread use of DarkNet. YOLOv4 [19] uses architectures such as CSP-Darknet-53 and PAN to optimize speed and accuracy, and proposes the first BoS policy and BoF policy. YOLOv5 [20] replaces the YOLO family of development environments with PyTorch and provides a more detailed design of the backbone network and CSP structure to further optimize ease of use and performance. YOLOv6 [21] constructs EfficientRep, an efficient parameter reformulation network based on RepVGG and designs an effective decoupled detection head to improve classification accuracy. YOLOv7 [22] uses an extended efficient layer aggregation network (E-ELAN) to enhance the learning ability of the network without destroying the original gradient paths. YOLOv8 [23] adopts the C2f structure with richer gradient flow, which ensures lightweight while obtaining richer gradient flow information. YOLOv9 [24] proposed programmable gradient information (PGI) based on YOLOv7, which can maximize the retention of key features required for target detection tasks without incurring additional costs. The architecture of YOLOv10 [25] builds on previous YOLO models by eliminating non-maximal suppression (NMS) and optimizing various model components to achieve state-of-the-art performance while sig nificantly reducing computational overhead. YOLOv11 [26] employs C3k2 module and depth-separable convolution to reduce redundant computation and improve efficiency. YOLOv12 [27] designs a YOLO framework based on an attention mechanism to improve detection speed while maintaining real-time speed.  
YOLOv1-v4 versions have found it difficult to meet the dual requirements of accuracy and real-time performance of current industrial inspection due to performance limitations. Although YOLOv8 and subsequent versions achieve higher inspection accuracy, their computational complexity is more suited to high-performance GPU platforms, making it difficult to be efficiently deployed on edge devices. In contrast, YOLOv5 is still the preferred solution for real-time target detection in edge computing scenarios due to its balanced accuracy, speed, and hardware compatibility advantages.