High-frame-rate pedestrian recognition method and system based on lightweight YOLOv5 and DeepSORT algorithms
By combining YOLOv5, DeepSORT, and CBAM attention mechanisms into a high frame rate pedestrian recognition model, the problem of pedestrian detection in complex backgrounds and occluded scenes is solved, achieving high-precision pedestrian recognition and tracking.
Patent Information
- Application Number
- CN202511559763.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-20
AI Technical Summary
Existing technologies struggle to effectively capture key pedestrian features in complex backgrounds and occluded scenarios, resulting in poor detection performance.
By combining the lightweight YOLOv5 algorithm, DeepSORT algorithm, and CBAM attention mechanism, and introducing scaling intersection-union ratio loss, a high frame rate pedestrian recognition model is constructed to optimize feature extraction and target localization.
It improves the accuracy and precision of pedestrian detection, especially performing well in complex environments, and adapts to the target detection needs of different scenarios.
Smart Images

Figure CN121366427A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition, in particular to a high-frame-rate pedestrian recognition method and system based on lightweight YOLOv5 and DeepSORT algorithm. BACKGROUND
[0002] In recent years, with the continuous development of computer vision technology, image perception and retrieval technology has been widely used in daily life. Among them, pedestrian recognition has attracted much attention in recent years due to its important application prospect in intelligent monitoring systems. Thanks to the promotion of algorithm iteration, the research of pedestrian recognition based on deep learning technology has also made great progress. At present, almost all advanced models in this field are based on deep learning technology.
[0003] For example, in the field of face recognition, Li proposed a local linear discriminant embedding method. This method extracts effective features of facial images through local linear discriminant analysis, achieving efficient face recognition. Zhao also explored a multi-feature-based face recognition method, which combines multiple features through a neural network committee mechanism, thereby improving the robustness and accuracy of face recognition. In terms of neural network models and their optimization, Huang and Santaji systematically studied the neural network pattern recognition theory and explored the structure optimization and application of radial basis function probabilistic neural networks. By introducing probability theory and radial basis function, this network model has achieved remarkable results in pattern recognition.
[0004] Although the above algorithms can be used for pedestrian target detection, it is difficult to prioritize capturing key features or information for pedestrian recognition, resulting in poor detection performance in complex background and occlusion scenarios, i.e., the detection and positioning process of road pedestrians will be disturbed by environmental factors, resulting in a decrease in accuracy. SUMMARY
[0005] The present application aims to provide a high-frame-rate pedestrian recognition method and system based on lightweight YOLOv5 and DeepSORT algorithm, to solve the technical problem that it is difficult to prioritize capturing key features or information for pedestrian recognition in the prior art, and the detection performance is poor in complex background and occlusion scenarios.
[0006] To solve the above technical problems, the present application specifically provides the following technical solutions: A high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm, comprising the following steps: Obtaining a pedestrian video; Combining YOLOv5 algorithm, DeepSORT algorithm and CBAM attention mechanism, and introducing scale intersection over union loss for training, a high-frame-rate pedestrian recognition model is constructed; Perform pedestrian recognition and tracking on the pedestrian video through a high-frame-rate pedestrian recognition model.
[0007] As a preferred scheme of the present application, the network structure building method of the high-frame-rate pedestrian recognition model comprises: YOLOv5 algorithm and DeepSORT algorithm are combined to form a model backbone structure; A CBAM attention mechanism is added before the SPPF layer of the model backbone structure, and a CBAM attention mechanism is introduced at the end of the neck layer to form the network structure of the high-frame-rate pedestrian recognition model.
[0008] As a preferred scheme of the present application, the CBAM attention mechanism comprises a channel attention module CAM and a spatial attention module SAM.
[0009] As a preferred scheme of the present application, the channel attention module CAM is used to obtain the dimension information of each channel, extract the overall feature of each channel through global pooling, generate channel attention weights by using a multi-layer perceptron MLP and a Sigmoid function, and finally generate a channel attention feature map through weighting, and the structure expression of the channel attention module CAM is: ; ; Wherein, is the channel attention weight, is the channel attention feature map, is the input feature of the channel attention module CAM, is the average pooling operation, is the maximum pooling operation, is the multi-layer perceptron MLP operation, is the Sigmoid function, is the element-wise product.
[0010] As a preferred scheme of the present application, the spatial attention module SAM is used to process the feature map output by the channel attention mechanism through channel-based global maximum pooling and global average pooling, while keeping the spatial dimensions of the input and output unchanged, and reducing the channel dimension by means of convolution operation, then processing the spatial attention weights through an activation function, and finally generating a spatial attention feature map through weighting, and the structure expression of the spatial attention module SAM is: ; ; Wherein, is the spatial attention weight, is the spatial attention feature map, is the Convolution operation, For average pooling operations, For max pooling operations, This is for multilayer perceptron (MLP) computation. For the Sigmoid function, This is an element-wise product.
[0011] As a preferred embodiment of the present invention, the scaling intersection-union ratio loss Due to angle loss Distance loss Shape loss and crossover loss The scaling intersection-union ratio loss constitutes... ; As a preferred embodiment of the present invention, the angle loss ,in, It is the ratio of the height difference between the centroids of the predicted bounding box and the ground truth bounding box to the centroid distance; The distance loss , , , ,in, , The coordinates of the centroid of the true bounding box. , The coordinates of the centroid of the predicted bounding box. , These are the width and height of the minimum bounding matrix of the ground truth bounding box and the predicted bounding box, respectively; The shape loss , , ,in, h and h represent the width and height of the prediction box, respectively. , These are the width and height of the actual bounding box, respectively. Parameters for controlling shape loss sensitivity, It is the absolute value; The cross-union loss Where A is the area of the predicted bounding box and B is the area of the ground truth bounding box.
[0012] As a preferred embodiment of the present invention, the evaluation metrics include precision P, recall R, mean precision mAP@0.5 when the IoU threshold is 0.5, and mean precision mAP@0.5:0.95 when the IoU threshold is between 0.5 and 0.95.
[0013] As a preferred scheme of the present application, the training test of the high-frame-rate pedestrian recognition model uses the COCO2017 data set and the COCO128 data set in the COCO data set.
[0014] As a preferred scheme of the present application, the present application provides a high-frame-rate pedestrian recognition system based on a lightweight YOLOv5 and a DeepSORT algorithm, which is applied to a high-frame-rate pedestrian recognition method based on a lightweight YOLOv5 and a DeepSORT algorithm, and the system comprises: A data acquisition unit is configured to acquire pedestrian videos. A model establishment unit is configured to combine a YOLOv5 algorithm, a DeepSORT, and a CBAM attention mechanism, introduce a scaling intersection over union loss for training, and construct a high-frame-rate pedestrian recognition model. A target recognition and tracking unit is configured to perform pedestrian recognition and tracking on the pedestrian videos through the high-frame-rate pedestrian recognition model.
[0015] Compared with the prior art, the present application has the following beneficial effects: The present application adopts a pedestrian recognition and processing technology based on a YOLOv5 and a DeepSORT algorithm, successfully realizes pedestrian tracking detection and recognition functions, introduces a CBAM attention mechanism, improves the recognition accuracy of the model and enhances the attention to pedestrian features, optimizes the performance of the YOLOv5 model in feature extraction and target positioning, and thus improves the pedestrian detection accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0017] Figure 1 A high-frame-rate pedestrian recognition method flow chart based on a lightweight YOLOv5 and a DeepSORT algorithm is provided for the embodiments of the present application. Figure 2 A high-frame-rate pedestrian recognition model structure diagram is provided for the embodiments of the present application. Figure 3 A CBAM attention mechanism structure diagram is provided for the embodiments of the present application. Figure 4 A channel attention module CAM structure diagram is provided for the embodiments of the present application. Figure 5This is a structural diagram of the Spatial Attention Module (SAM) provided in an embodiment of the present invention; Figure 6 A comparison chart of PR curves of the models provided in the embodiments of the present invention; Figure 7 The performance curves of the model without CBAM provided in this embodiment of the invention; Figure 8 The model performance curves with CBAM added are provided for embodiments of the present invention; Figure 9 The image shows the running effect of the high frame rate pedestrian recognition model provided in the embodiment of the present invention. Figure 10 The image shows the recognition result of the high frame rate pedestrian recognition model provided in this embodiment of the invention. Figure 11 A block diagram of a high frame rate pedestrian recognition system based on the lightweight YOLOv5 and DeepSORT algorithms provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] like Figure 1 As shown, this invention provides a high frame rate pedestrian recognition method based on the lightweight YOLOv5 and DeepSORT algorithms, comprising the following steps: Obtain pedestrian video; A high frame rate pedestrian recognition model was constructed by combining the YOLOv5 algorithm, DeepSORT algorithm and CBAM attention mechanism, and introducing scaling intersection-union ratio loss for training. Pedestrian identification and tracking are performed on pedestrian videos using a high frame rate pedestrian recognition model.
[0020] The network architecture construction methods for high frame rate pedestrian recognition models include: The YOLOv5 algorithm and the DeepSORT algorithm are combined to form the main structure of the model; A CBAM attention mechanism was added before the SPPF layer in the main structure of the model, and a CBAM attention mechanism was introduced at the end of the neck layer to form the network structure of the high frame rate pedestrian recognition model.
[0021] This invention combines the YOLOv5 algorithm and the DeepSORT algorithm to form the main framework of the pedestrian recognition model, such as... Figure 2As shown, the YOLOv5 algorithm is used for pedestrian target detection, and the DeepSORT algorithm is used for pedestrian trajectory tracking. It can quickly and accurately locate pedestrian trajectories and positions in massive surveillance video networks and achieve efficient tracking.
[0022] This invention also adds a CBAM attention mechanism to the main framework of the pedestrian recognition model, such as... Figure 2 As shown, the aim is to improve the model's recognition accuracy and enhance its focus on pedestrian features. By integrating the CBAM mechanism, it is expected to optimize the performance of the YOLOv5 model in feature extraction and target localization, thereby improving detection accuracy.
[0023] The CBAM attention mechanism in this invention includes: a channel attention module (CAM) and a spatial attention module (SAM), such as... Figure 3 As shown.
[0024] Among them, such as Figure 4 As shown, the Channel Attention Module (CAM) is used to acquire the dimensional information of each channel. It extracts the overall features of each channel through global pooling, then uses a Multilayer Perceptron (MLP) and a Sigmoid function to generate channel attention weights, and finally generates a weighted channel attention feature map. The structural expression of the Channel Attention Module (CAM) is as follows: ; ; in, For channel attention weights, For channel attention feature maps, The input features are those of the Channel Attention Module (CAM). For average pooling operations, For max pooling operations, This is for multilayer perceptron (MLP) computation. For the Sigmoid function, This is an element-wise product.
[0025] The channel attention weights generated by the channel attention mechanism in this invention reflect the importance of each channel feature, enabling the network to focus on more valuable channel features.
[0026] like Figure 5 As shown, the Spatial Attention Module (SAM) processes the feature map output by the channel attention mechanism through channel-based global max pooling and global average pooling, while maintaining the spatial dimension of the input and output. It also reduces the channel dimension through convolution operations, then applies spatial attention weights processed by an activation function, and finally generates a weighted spatial attention feature map. The structural expression of the Spatial Attention Module (SAM) is as follows: ; ; wherein, is a spatial attention weight, is a spatial attention feature map, is a convolution operation, is an average pooling operation, is a max pooling operation, is a multi-layer perception (MLP) operation, is a Sigmoid function, is an element-wise product.
[0027] The present application focuses on spatial information by using the max pooling and average pooling methods, while keeping the spatial dimensions of the input and output unchanged, and by means of the convolution operation f (7×7) reduces the channel dimension.
[0028] The present application adds a CBAM attention mechanism before the SPPF layer of the backbone network. By combining CBAM with C3 modules to form CBAM_C3 modules, the ability of the algorithm model to detect pedestrians in complex urban environments is significantly improved. This design enables the model to focus more on pedestrian feature extraction, thereby improving the accuracy of tracking and recognition. In addition, we introduce a CBAM attention mechanism at the end of the neck layer to enhance the network's focus on the target area. By adaptively weighting the spatial information and channel information of the feature map, CBAM can effectively improve the feature expression ability of the model, thereby enhancing the detection accuracy and robustness of the network in complex scenes.
[0029] The C3 module combines multiple bottleneck structures and residual connections in YOLOv5 to form an efficient feature extraction module. The C3 module is usually composed of an initial 1x1 convolution layer, multiple bottleneck structures, a residual connection, and a final 1x1 convolution layer. In the C3 module, the feature map will be extracted through multiple bottleneck structures, and the initial features and extracted features will be added through the residual connection to form the final output feature map.
[0030] scaled IoU loss consists of angle loss , distance loss , shape loss and IoU loss , the scaled IoU loss ; angle loss , wherein, is the ratio of the height difference and the centroid distance between the predicted box and the real box; distance loss , , , wherein, , is the center point coordinate of the real frame, , is the center point coordinate of the predicted frame, , are the width and height of the minimum bounding box in the real frame and the predicted frame, respectively; In the present application, the distance difference between the predicted frame and the real frame is quantified by the distance loss, which helps to optimize the relative position of the frame and enables the model to locate the target more accurately.
[0031] Shape loss , , wherein, are the width and height of the predicted frame, respectively, , are the width and height of the real frame, respectively, is a parameter for controlling the sensitivity of the shape loss, is an absolute value; In the present application, the shape loss further adjusts the shape of the target frame by penalizing the aspect ratio difference of the frame, so that the shape of the detected frame is more consistent with that of the real frame.
[0032] IoU (Intersection over Union) is the intersection over union, which is used to measure the similarity between the predicted result and the real label in the semantic segmentation task. The intersection over union loss wherein, A is the area of the predicted frame (Bounding Box), and B is the area of the real frame (Ground Truth).
[0033] In the present application, SIoU introduces more detailed scaling and position weights, making the loss function more adaptable in various scenarios.
[0034] In order to avoid slowing down the model training speed and affecting the training efficiency and real-time performance of the model in the case of limited computing resources, the present application introduces SIoU (Scaling Intersection over Union) as a loss function. SIoU can more accurately measure the relative relationship between frames, especially when there are scale differences, angle deviations and shape inconsistencies in the target, showing stronger robustness. Therefore, using SIoU loss helps to reduce the difference between the predicted frame and the real frame, improves the performance of the pedestrian multi-target detection model in the perception end, shortens the convergence time, and better meets the real-time requirements.
[0035] The evaluation indexes include precision P, recall R, average precision mean mAP@0.5 when the intersection over union IoU threshold is 0.5, and average precision mean mAP@0.5:0.95 when the intersection over union IoU threshold is between 0.5 and 0.95.
[0036] The training test of the high-frame-rate pedestrian recognition model uses the COCO2017 dataset and the COCO128 dataset in the COCO dataset.
[0037] The model is tested for performance in the present application using the COCO2017 dataset and the COCO128 dataset. The COCO128 dataset and the COCO2017 dataset used in the experiment are both from the official website of the COCO dataset (https: / / cocodataset.org / ). COCO stands for Common Objects in Context, and is an image recognition dataset provided by the Microsoft team. COCO collects relevant data by using the Amazon crowdsourcing platform extensively. The dataset currently contains three types of annotations: object instances, object key points, and image descriptions, all stored in JSON format. The COCO2017 dataset used for testing in this paper is composed of three parts: training set, validation set, and test set. The test set does not contain annotation information, while the training set and the validation set both contain annotation content.
[0038] The specific division criteria are as follows: 1. The training set and the validation set (trainval.txt) account for 5% of the total dataset. 2. The training set (train.txt): further divided from the training set and the validation set, accounting for 95% of the total. 3. The validation set (val.txt): the remaining 5%. 4. The test set (test.txt): 95% of the total dataset.
[0039] The precision-recall curve (PR curve) is used in the present application to intuitively present the balance between precision and recall rate of the model. The curve can effectively evaluate the accuracy performance of the model at different recall rate levels, and is an important visualization reference tool for analyzing the performance of classification models, especially suitable for handling data imbalance scenarios. By analyzing the curve, the present application can determine the appropriate threshold and other parameters, thereby achieving dynamic balance between precision and recall rate. Specifically, the PR curve of the model of the present application is as shown in Figure 6 , and the remaining index curves are as shown in Figure 7 , Figure 8 , and the performance index results are shown in Table 1, wherein Figure 6 (a) in Table 1 is the result of the model main framework formed by the YOLOv5 algorithm and the DeepSORT algorithm without adding CBAM test, Figure 6The result of adding CBAM test to the model main body framework formed by the YOLOv5 algorithm and the DeepSORT algorithm is a high-frame-rate pedestrian recognition model proposed in the application, Figure 7 The result of not adding CBAM test to the model main body framework formed by the YOLOv5 algorithm and the DeepSORT algorithm, Figure 8 The high-frame-rate pedestrian recognition model proposed in the application.
[0040] Figure 7 And Figure 8 In the middle: Box meaning: the loss change between the model prediction box (Bounding Box) and the true box. As the training proceeds, the loss gradually decreases, indicating that the error of the model in the boundary box positioning is continuously reduced.
[0041] Objectness meaning: loss of judging whether there is a target in the image. The curve decreases, which means that the model's ability to judge "whether there is a target" is improving.
[0042] Classification meaning: loss of classifying target categories. The value fluctuates little and is close to 0, indicating that the model performs well in class classification and has low loss.
[0043] Precision meaning: precision, that is, the proportion of actual positive samples in the predicted positive samples. The curve first decreases and then stabilizes, reflecting the change of the proportion of accurate positive samples predicted by the model.
[0044] Recall meaning: recall, that is, the proportion of predicted positive samples in actual positive samples. The curve rises, indicating that the model can find more actual existing targets.
[0045] val Box meaning: change of boundary box loss on the validation set, used to evaluate the generalization ability of the model in boundary box positioning on unseen data, and the decrease of the loss reflects the improvement of the generalization effect.
[0046] val Objectness meaning: loss of "target existence" judgment on the validation set, and its change reflects the generalization performance of the model in judging the existence of the target on the validation set.
[0047] val Classification meaning: loss of classifying categories on the validation set, and the value is low and stable, indicating that the model generalizes well in classifying categories on the validation set.
[0048] mAP@0.5 meaning: average precision mean when the intersection over union (IoU) threshold is 0.5, which comprehensively measures the detection accuracy of the model on different categories. The curve first decreases and then rises, and finally rises, indicating that the overall detection accuracy of the model gradually improves from the trough.
[0049] mAP@0.5:0.95: The average precision mean between the IoU threshold from 0.5 to 0.95 (with a step of 0.05), more comprehensively evaluates the detection performance of the model under different strictness. The curve continues to rise, indicating that the detection ability of the model under various IoU requirements is enhanced.
[0050] Table 1: Comparison table of model performance evaluation Method Indicator comparison Accuracy Recall rate mAP@0.5 mAP@0.5:0.95 Invention Maximum value 0.6024 0.9418 0.9272 0.692 Average 0.5475 0.9175 0.8954 0.6367 Average of the last 20 times 0.5996 0.9360 0.9212 0.6805 No CBAM Maximum value 0.4103 0.8618 0.7932 0.5345 Average 0.4354 0.8444 0.7821 0.5117 Average of the last 20 times 0.4116 0.8608 0.791 0.5298 From the evaluation indicators of the above model, the maximum value, the average value and the average value of the last 20 times of the CBAM module are all higher than those without the CBAM module. Therefore, the present application combines YOLOv5, DeepSORT and CBAM (Convolutional Block Attention Module) attention mechanism for pedestrian detection and tracking tasks, aiming to improve the performance of the system in complex background and occlusion scenes, while ensuring high recognition rate.
[0051] Through iterative training of the model, the present application can realize an average processing time of only 0.02 seconds for a single image, and the pedestrian recognition accuracy of the model converges to 0.927, as shown in the specific results of Figure 9 At the same time, the extremely lightweight characteristics of the model make it run smoothly on a GeForce GTX 1050 Ti graphics card, and it can also run stably on a computer with weaker performance.
[0052] Further, the pedestrian recognition results on the test set of the present application are shown in Figure 10 It can be clearly seen that the high-frame-rate pedestrian recognition model proposed by the present application can effectively realize pedestrian recognition and tracking.
[0053] As shown in Figure 11 The present application provides a high-frame-rate pedestrian recognition system based on lightweight YOLOv5 and DeepSORT algorithm, which is applied to a high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm, and the system comprises: A data acquisition unit for acquiring pedestrian video; A model establishment unit for combining YOLOv5 algorithm, DeepSORT algorithm and CBAM attention mechanism, and introducing scale intersection over union loss for training, to construct a high-frame-rate pedestrian recognition model; A target recognition and tracking unit for performing pedestrian recognition and tracking on the pedestrian video through the high-frame-rate pedestrian recognition model.
[0054] The application adopts a pedestrian recognition and processing technology based on YOLOv5 and a deep sorting algorithm DeepSORT, successfully realizes pedestrian tracking detection and recognition functions, and introduces a CBAM attention mechanism, realizes improving the recognition accuracy of the model and enhancing the attention degree to pedestrian features, can optimize the performance of the YOLOv5 model in feature extraction and target positioning, so as to improve the pedestrian detection accuracy.
[0055] The above examples are only exemplary embodiments of the application and are not intended to limit the application, and the protection scope of the application is defined by the claims. Those skilled in the art can make various modifications or equivalent replacements to the application within the spirit and protection scope of the application, and such modifications or equivalent replacements are also regarded as falling within the protection scope of the application.
Claims
1. A high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm, characterized in that, The method comprises the following steps: acquiring a pedestrian video; combining YOLOv5 algorithm, DeepSORT algorithm and CBAM attention mechanism, introducing a scaling intersection over union loss for training, and constructing a high-frame-rate pedestrian recognition model; performing pedestrian recognition and tracking on the pedestrian video through the high-frame-rate pedestrian recognition model.
2. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 1, characterized in that: The network structure construction method of the high-frame-rate pedestrian recognition model comprises: combining YOLOv5 algorithm and DeepSORT algorithm to form a model backbone structure; adding CBAM attention mechanism before the SPPF layer of the model backbone structure, and introducing CBAM attention mechanism at the end of the neck layer to form the network structure of the high-frame-rate pedestrian recognition model.
3. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 2, characterized in that: The CBAM attention mechanism comprises a channel attention module CAM and a spatial attention module SAM.
4. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 3, characterized in that: The channel attention module CAM is used to acquire dimension information of each channel, extract the overall feature of each channel through global pooling, generate channel attention weights by using a multi-layer perceptron MLP and a Sigmoid function, and finally generate a channel attention feature map by weighting, and the structure expression of the channel attention module CAM is: ; ; wherein, is a channel attention weight, is a channel attention feature map, is an input feature of a channel attention module CAM, is an average pooling operation, is a max pooling operation, is a multi-layer perceptron MLP operation, is a Sigmoid function, is an element-wise product.
5. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 4, characterized in that: The spatial attention module SAM is used to process the feature map output by the channel attention mechanism through channel-based global maximum pooling and global average pooling while keeping the spatial dimensions of the input and output unchanged, and reduce the channel dimension by means of convolution operation, and then process the spatial attention weights by using an activation function, and finally generate a spatial attention feature map by weighting, and the structure expression of the spatial attention module SAM is: ; ; wherein, is a spatial attention weight, is a spatial attention feature map, is is a convolution operation, is an average pooling operation, is a max pooling operation, is a multi-layer perceptron (MLP) operation, is a Sigmoid function, is an element-wise product.
6. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 1, characterized in that: the scaled intersection over union loss comprising an angle loss , a distance loss , a shape loss , and an intersection over union loss , the scaled intersection over union loss .
7. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 6, characterized in that: the angle loss wherein, is the ratio of the height difference between the predicted and the ground truth bounding box centroids and the distance between the centroids. the distance loss , , , wherein, , are the coordinates of the center point of the real box, , are the coordinates of the center point of the predicted box, , are the width and height of the minimum circumscribed matrix in the real box and the predicted box, respectively. the shape loss , , wherein, , h are the width and height of the prediction box respectively, , are the width and height of the ground truth box respectively, is a parameter to control the sensitivity of the shape loss, is an absolute value; The intersection over union loss where A is the area of the predicted box and B is the area of the ground truth box.
8. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 1, characterized in that: The evaluation indexes of the high-frame-rate pedestrian recognition model include precision P, recall R, average precision mean mAP@0.5 when the intersection over union IoU threshold is 0.5, and average precision mean mAP@0.5:0.95 when the intersection over union IoU threshold is between 0.5 and 0.
95.
9. The high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to claim 1, characterized in that: The training and testing of the high-frame-rate pedestrian recognition model use COCO2017 dataset and COCO128 dataset in COCO dataset.
10. A high frame rate pedestrian recognition system based on lightweight YOLOv5 and DeepSORT algorithm, characterized in that, The system is applied to the high-frame-rate pedestrian recognition method based on lightweight YOLOv5 and DeepSORT algorithm according to any one of claims 1-9, and comprises: a data acquisition unit configured to acquire a pedestrian video; a model establishment unit configured to combine YOLOv5 algorithm, DeepSORT algorithm and CBAM attention mechanism, introduce a scaling intersection over union loss for training, and construct a high-frame-rate pedestrian recognition model; a target recognition and tracking unit configured to perform pedestrian recognition and tracking on the pedestrian video through the high-frame-rate pedestrian recognition model.