# Channel Pruning-Based YOLOv7 Deep Learning Algorithm for Identifying Trolley Codes
## 1 Introduction  
Trolley codes in engineering are presently identified through manual means. However, conventional methods of manual detection face challenges in meeting the necessary criteria due to worker fatigue, suboptimal efficiency, and elevated costs. The automated identification of shopping cart codes has the potential to enhance the precision and effectiveness of detection. In the 1980s, [PERSON] et al. [1] introduced a framework for target detection that aimed to acquire the relevant features directly from samples, without relying on any prior knowledge or a pre-existing model. [PERSON] [2] introduced the scale-invariant feature transform [3], while [PERSON] et al. [4] proposed the histogram of oriented gradients (HOS) as a solution for the identification of pedestrians in static images. [PERSON] et al. (2010) integrated the Histogram of Oriented Gradients (HOG) feature descriptor with the Support Vector Machine (SVM) algorithm, introducing the Deformable Part Model (DPM) [3]. In recent years, deep learning has gained significant popularity and has been extensively applied in various domains such as speech recognition, image analysis, and natural language processing [5]. It has been of significant importance in the field of image processing [6]. AlexNet, a deep convolutional neural network (DCNN), was developed by [PERSON] et al. in 2012 [7]. It gained significant attention for achieving record-breaking accuracy in image classification during the ImageNet Large Scale Visual Recognition Challenge (IL-SRVC). Since then, several deep learning-based approaches for target detection have beendeveloped [8; 9; 10]. Convolutional neural networks are widely regarded as the preferred method for addressing challenges in image recognition and detection. For instance, in their study, [PERSON] et al. [11] introduced the mask region-based convolutional neural networks (MRCNN) model, which accurately identifies the precise location of powdery mildew disease and its extent of infection on individual wheat plant images. [PERSON] et al. [12] introduced a convolutional neural network (CNN) model to classify the emotional category of songs. The YOLO series models also incorporate numerous convolutional layers, which are extensively employed in target recognition research. [PERSON] et al. [13] introduced a novel YOLOv5-CASP model for the detection of lung nodules in medical images. In a similar vein, [PERSON] et al. [14] proposed an effective defect-detection model, named Sim-YOLOv5s, specifically designed for lithium battery steel shells. However, it is worth noting that convolutional neural networks often suffer from the presence of redundant parameters [15], which can negatively impact their real-time performance. This presents a notable obstacle to their implementation in models designed to detect small vehicles with specific markings on them. Given the intricate operational conditions of trolleys, this study presents a novel approach for trolley code identification using YOLOv7 and a channel pruning algorithm. The proposed method aims to address the challenges associated with time-consuming manual detection, inaccurate identification, and model size reduction. The proposed method underwent testing using images that were captured at different points in time, with varying lighting conditions and distances between the camera and the trolley. The YOLOv7 detection model was initially trained to achieve precise and efficient detection of trolley codes. The trained model underwent a channel pruning algorithm to streamline its structure and parameters, while ensuring the preservation of high accuracy. The method proposed in this study makes a significant contribution to thermal imaging image algorithms by effectively reducing the redundant channels in the model, thereby achieving lightweighting and optimization. This approach not only decreases the computational complexity, but also enhances real-time performance.