Pedestrian target detection model training method, device and equipment
By introducing the DCNv2 and CBAM attention mechanisms, as well as the DyHead dynamic detection head into the YOLOv7 model, the feature extraction is optimized, which solves the problem of insufficient detection accuracy and speed of pedestrian target detection in complex scenes, and improves the detection performance in multi-scale scenes.
Patent Information
- Application Number
- CN202410733468.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-29
AI Technical Summary
Existing pedestrian target detection algorithms have shortcomings in detection accuracy and speed in complex scenes. Especially in multi-scale and complex environments, it is difficult to effectively identify blocked and diverse pedestrian targets.
By introducing DCNv2 deformable convolution and CBAM attention mechanism into the YOLOv7 model, and using the DyHead dynamic detection head, the feature extraction and fusion process is optimized, redundant context information is eliminated, and the model's adaptability to multi-scale scenes is improved.
It significantly improves the detection accuracy and generalization ability of pedestrian target detection, reduces the missed detection rate and false detection rate, adapts to target detection of different scales and complexities, and optimizes the performance of the model in multi-scale scenarios.
Smart Images

Figure CN118865433A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pedestrian target detection, and in particular relates to a pedestrian target detection model training method, device and equipment. Background Art
[0002] Pedestrian detection is an important research field in computer vision. Deep learning has broad application prospects in the field of pedestrian detection, involving many different application scenarios, such as traffic safety, intelligent driving, security and monitoring systems, intelligent robots, drone monitoring and rescue, etc.
[0003] In the research and development of target detection, there have been two key periods. The first is the exploration period of traditional target detection methods, and the other is the rapid development period of target detection algorithms based on deep learning. Before 2014, the mainstream algorithm in the field of target detection was still the traditional target detection algorithm. The implementation of the traditional target detection algorithm mainly includes the following three steps. First, the image regions are enumerated by sliding window and other methods. Then, the image regions are subjected to feature extraction operations by feature extraction algorithms such as Histogram of Oriented Gradients (HOG) and Scale Invariant Feature Transform (SIFT) to obtain the features of the target region. Finally, the extracted target region features are input into classification algorithms such as Support Vector Machine (SVM) and Adaboost to calculate the classification results. These traditional target detection algorithms all extract the features of the target region by manually designing feature extraction methods. The extracted features directly affect the quality of the detection results. Therefore, they have relatively high requirements for the debugging experience of the debugger. Compared with the target detection algorithm based on deep learning, the feature extraction of the traditional target detection algorithm is relatively complex, and it is difficult to extract deeper features. Despite this, the ideas of sliding windows, difficult sample mining, and bounding box regression used in traditional target detection algorithms still influenced the development of subsequent deep learning-based target detection algorithms.
[0004] With the in-depth study of subsequent convolutional neural networks, target detection methods based on deep learning have gradually become mainstream. Target detection methods based on deep learning are mainly divided into two categories. One is the two-stage model. The main idea of the two-stage model is to divide the target detection task into two stages: candidate box generation and in-box target classification. The most representative algorithm is the R-CNN series of algorithms. R-CNN is the first algorithm that successfully applies deep learning to target detection. It replaces the process of manually extracting features in traditional target detection algorithms with the use of CNN to extract features, thereby improving detection accuracy. Since the traditional candidate box search algorithm in R-CNN is slow in exhausting candidate areas, some scholars later proposed Fast R-CNN and FasterR-CNN to make different improvements to reduce computational redundancy, but the detection speed still cannot meet the requirements of real-time detection. The other type is the single-stage model. The main idea of the single-stage model is to regard the target detection task as a model that directly predicts the bounding box and category problem from the image. Representative single-stage algorithms are the SSD and YOLO series algorithms, which use a single convolutional neural network to directly predict the bounding box of the object and the probability of its category, converting the target detection problem into a regression problem. Compared with the two-stage algorithm, it has achieved a significant improvement in detection speed. The YOLO series algorithm achieves higher performance in both detection accuracy and speed, and can meet the basic needs of pedestrian detection. Summary of the invention
[0005] The embodiments of the present invention provide a method, device and equipment for training a pedestrian target detection model, aiming to solve at least one technical problem in the background technology.
[0006] The embodiment of the present invention is implemented as follows: a pedestrian target detection model training method, the method comprising:
[0007] Obtaining pedestrian target images for training a pedestrian target detection model, and annotating each of the pedestrian target images to obtain annotated training data to form a training data set;
[0008] The training images in the training data set are input into the preset pedestrian target detection network for training. The training images undergo feature extraction and feature fusion in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head. For details, please refer to Figure 2 and Figure 3 , Figure 2 This is the network structure diagram of YOLOv7. Figure 3The improved YOLOv7 network structure diagram is shown, wherein the part enclosed by the rounded rectangular frame is the improved part of the model;
[0009] The model loss is calculated according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and the pedestrian target detection network parameters are iteratively updated according to the model loss and the back propagation algorithm, and finally the pedestrian target detection model is trained.
[0010] Furthermore, the preset pedestrian target detection network is an improved YOLOv7 network, and compared with the original model, the improved YOLOv7 network also includes the use of DCNv2 deformable convolution, CBAM attention mechanism and DyHead dynamic detection head.
[0011] Furthermore, the training images in the training data set are input into a preset pedestrian target detection network for training. The training images are subjected to feature extraction processing and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process is also subjected to DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the steps of outputting predicted pedestrian target detection information through the DyHead dynamic detection head include:
[0012] The training images in the training data set are input into the model Backbone feature extraction network for feature extraction to obtain the intermediate features output by the backbone network. In the feature extraction process, the optimized ELAN module (ELAN-DC) is obtained by replacing the 3×3 convolutional layer in the ELAN module with the deformable convolutional layer DCNv2 and using the CBAM attention mechanism after channel splicing. The optimized module effectively eliminates redundant context information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks;
[0013] The intermediate features extracted by the backbone network are further extracted through the feature extraction network of YOLOv7 to obtain the final features used by the detection head for detection and classification;
[0014] The extracted final features are input into the DyHead dynamic detection head for detection and classification to obtain the predicted pedestrian target detection information.
[0015] Furthermore, after the step of calculating the model loss according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively updating the pedestrian target detection network parameters according to the model loss and using the back propagation algorithm to finally train the pedestrian target detection model, the method further includes:
[0016] The pedestrian target detection model is evaluated using a preset model evaluation algorithm.
[0017] Furthermore, the step of evaluating the pedestrian target detection model using a preset model evaluation algorithm includes:
[0018] Calculating the logarithmic mean missing rate of the pedestrian target detection model;
[0019] The pedestrian target detection model is evaluated according to the logarithmic mean missing rate of the pedestrian target detection model.
[0020] The pedestrian target detection model training method according to claim 5, characterized in that the calculation formula of the logarithmic mean missing rate is:
[0021]
[0022] MR=1-R
[0023]
[0024]
[0025] Where R represents the correct prediction ratio among all the results whose true values are positive categories, TP represents the number of correctly predicted positive samples, FP represents the number of incorrectly predicted positive samples, FN represents the number of incorrectly predicted negative samples, MR represents the missed detection rate, FPPI represents the average false positive rate of the image, N represents the number of images, and δ(FPPI) represents the mapping relationship between FPPI and log(MR).
[0026] When evaluating the model, pedestrian targets are further divided into reasonable, small, and heavy occlusion subsets according to the degree of occlusion of pedestrians and the height of the pixels they occupy. Considering the impact of overlap on pedestrian detection, pedestrian targets are also divided into four subsets with overlap ratios of 0, 0.25, 0.50, and 0.75 when evaluating the model to verify the false detection and missed detection of the model when identifying targets with different degrees of overlap.
[0027] The embodiment of the present invention further provides a pedestrian target detection model training device, the device comprising:
[0028] A data acquisition module is used to acquire pedestrian target images for training a pedestrian target detection model, and to annotate each of the pedestrian target images with pedestrian targets to obtain annotated training data to form a training data set;
[0029] A network processing module is used to input the training images in the training data set into a preset pedestrian target detection network for training. The training images undergo feature extraction and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head;
[0030] The model training module is used to calculate the model loss based on the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively update the pedestrian target detection network parameters based on the model loss and using the back propagation algorithm to finally train the pedestrian target detection model.
[0031] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the pedestrian target detection model training method as described above.
[0032] An embodiment of the present invention also provides a pedestrian target detection model training device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the pedestrian target detection model training method as described above is implemented.
[0033] The beneficial effects achieved by the present invention are as follows: by optimizing the pedestrian target detection network, in the feature extraction process, feature extraction processing and feature fusion processing are performed. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head. The optimized model effectively eliminates redundant context information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks. By using the DyHead dynamic detection head, the model can effectively adapt to targets of different scales and complexities, thereby improving the performance of the model in multi-scale scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of a pedestrian target detection model training method in Embodiment 1 of the present invention;
[0035] Figure 2 The YOLOv7 network structure diagram of the first embodiment of the present invention;
[0036] Figure 3 This is a diagram of the improved YOLOv7 network structure in Embodiment 1 of the present invention;
[0037] Figure 4 This is the specific structure diagram of the CBAM module;
[0038] Figure 5 This is the specific structure diagram of the channel attention module;
[0039] Figure 6 This is the specific structure diagram of the spatial attention module;
[0040] Figure 7 The sampling positions of 3×3 standard convolution and deformable convolution are shown: (a) Standard convolution sampling method; (b) The deformable convolution summarizes the special transformation of offset and offset direction; (c) The deformable convolution summarizes the special transformation of offset, offset direction and rotation; (d) The general sampling method of deformable convolution;
[0041] Figure 8 This is a schematic diagram of the implementation principle of 3×3 deformable convolution;
[0042] Fig. 9 This is a schematic diagram of the implementation principle of 3×3 deformable RoI pooling;
[0043] Fig.10 A schematic diagram showing the principle of network training using R-CNN feature imitation;
[0044] Fig.11 It is a method diagram of DyHead;
[0045] Fig.12 Schematic diagram of the DyHead detection head: (a) Detailed implementation of each attention module; (b) Applying the DyHead detection head module to a single-stage object detector;
[0046] Fig.13 The following is a comparison of the detection effects of YOLOv7 and improved YOLOv7 in Example 1 of the present invention;
[0047] Fig.14 Indicates the amount of calculation, MR- 2 Comprehensive comparison with parameter quantities;
[0048] Fig.15 4 is a structural block diagram of a pedestrian target detection model training device in Embodiment 3 of the present invention;
[0049] Fig.16 It is a structural block diagram of the pedestrian target detection model training device in the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] Embodiment 1
[0052] See also Figure 1 , shown is a pedestrian target detection model training method in embodiment 1 of the present invention. The pedestrian target detection model training method can be implemented by software and / or hardware. The method specifically includes steps S01 to S03.
[0053] Step S01, obtaining pedestrian target images for training a pedestrian target detection model, and annotating each of the pedestrian target images with pedestrian targets to obtain annotated training data to form a training data set.
[0054] In specific implementation, pedestrian target images can be obtained from public datasets, or pedestrian target images can be obtained through public solicitation, or pedestrian target images can be obtained by shooting a large number of pedestrian targets. In some preferred implementations of this embodiment, pedestrian target images in the Citypersons dataset and the INRIA dataset are specifically used to train the pedestrian target detection model. Among them, the Citypersons dataset is a subset of the Cityscapes dataset that only annotates pedestrians. The dataset contains street scene images taken in 27 different cities, including 2975 images for training, 500 images for verification and 1575 images for testing. The image resolution is 2048×1024 pixels, of which the training set has 2500 positive samples and 475 negative samples, and the verification set has 441 positive samples and 59 negative samples. The INRIA dataset was collected by Navneet Dalal in his research work on detecting upright pedestrians in images and videos. The dataset has a total of 2573 pedestrian images of different resolutions, of which the training set has 614 positive samples, 1218 negative samples, and the test set has 288 positive samples and 453 negative samples. Most of the human bodies in the images of the dataset are standing and their height is greater than 100 pixels. In the experiment of this embodiment, a complete training set containing 1832 positive and negative samples is used for training. During the test, only 288 positive sample test set images are used to evaluate the model detection results. Since the marked bounding boxes have very large differences in width, the heights of all bounding boxes are standardized to 0.41 times the width during the evaluation. The images in the dataset are all taken in real scenes, so they have good authenticity and diversity.
[0055] In addition, after obtaining the pedestrian target image, the labelimg labeling software can be used to label the pedestrian target image, and the labeled training data is formed after labeling, thereby forming a training data set. The labeled training data includes the training image (that is, the original pedestrian target image) and the position information and size information of the pedestrian target in the image, wherein the position information and size information of the pedestrian target are specifically the position and size of the pedestrian target labeling box.
[0056] Step S02: input the training images in the training data set into a preset pedestrian target detection network for training. Figure 2 and Figure 3 , Figure 2 This is the network structure diagram of YOLOv7. Figure 3 This is the improved YOLOv7 network structure diagram. The training image undergoes feature extraction and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head.
[0057] Specifically, in this embodiment, the preset pedestrian target detection network can be an improved YOLOv7 network. Compared with the original model, the improved YOLOv7 network includes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head.
[0058] That is, in some optional situations of this embodiment, step S02 specifically includes:
[0059] The training images in the training data set are input into the model Backbone feature extraction network for feature extraction to obtain the intermediate features output by the backbone network. In the feature extraction process, the optimized ELAN module (ELAN-DC) is obtained by replacing the 3×3 convolutional layer in the ELAN module with the deformable convolutional layer DCNv2 and using the CBAM attention mechanism after channel splicing. The optimized module effectively eliminates redundant context information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks;
[0060] The intermediate features extracted by the backbone network are further extracted through the feature extraction network of YOLOv7 to obtain the final features used by the detection head for detection and classification;
[0061] The extracted final features are input into the DyHead dynamic detection head for detection and classification to obtain the predicted pedestrian target detection information.
[0062] It should be noted that the ELAN feature extraction module is the basic structure of the traditional YOLOv7 network. In order to solve the problem of weak feature expression ability of the Faster-RCNN algorithm and the SSD algorithm, the applicant first proposed to use the traditional YOLOv7 algorithm to realize pedestrian target detection in the specific research. However, in the actual research process, it was found that although the traditional YOLOv7 algorithm has stronger feature expression ability than the Faster-RCNN algorithm and the SSD algorithm, due to the complexity, diversity and variability of pedestrian target detection, especially in the field of autonomous driving, the pixels, postures and angles of pedestrian targets captured by different devices are completely different, and vehicles and pedestrians are moving, there is strong jitter interference, so the feature expression ability of the traditional YOLOv7 algorithm is still insufficient.
[0063] To this end, this embodiment, based on the traditional YOLOv7 algorithm, combines the complexity, diversity and variability of pedestrian target detection, and proposes an improved YOLOv7 algorithm. Specifically, the traditional YOLOv7 algorithm uses the CBAM attention mechanism after channel splicing of the two feature extraction ELAN modules of the backbone feature extraction network, replaces the 3×3 convolution of the two feature extraction ELAN modules of the backbone feature extraction network with deformable convolution DCNv2, and replaces the detection head of YOLOv7 with a DyHead detection head with an attention mechanism.
[0064] The specific functions and principles of the above modules are as follows:
[0065] ELAN-DC is a module created in this optimized neural network instance. This module is based on the ELAN module, by replacing the 3×3 convolution in the ELAN module with the deformable convolution DCNv2 and using the CBAM attention mechanism after the channel splicing in the module. ELAN is the module used by YOLOv7 in the backbone network feature extraction part. This module enables the network to learn more features and has stronger robustness by controlling the shortest and longest gradient paths. This is a layer aggregation architecture with an effective gradient propagation path. This module solves the problem that the convergence of deep models will gradually deteriorate when performing model scaling. This module avoids the use of too many transition layers by using a stack structure in the calculation block, making the gradient path of the entire network the shortest, so that the length of the network can quickly become longer, so that deeper networks can also learn and converge effectively. The principle of the CBAM attention mechanism is to extract data features by mixing cross-channel and spatial information during the convolution operation, which greatly enhances the meaningful features in the two dimensions of channel and space. The core principle of the DCNv2 deformable convolution module is based on adding an additional offset to the position information of spatial sampling in the module and learning the offset from the target task. The introduced deformable convolution greatly enhances the modeling ability of geometric transformation. In addition, the modulation mechanism and feature simulation scheme are introduced to guide network training. The modulation mechanism enables the deformable convolution module not only to learn the size of the offset, but also to modulate by learning the feature amplitude to change the spatial distribution and relative influence of the samples. The feature simulation scheme guides network training, which further improves the modeling ability of the deformable convolution module.
[0066] Specifically, the CBAM module is a simple and effective feed-forward convolutional neural network attention module. This module contains two independent submodules, namely the channel attention module and the spatial attention module. Figure 4 .
[0067] This module receives the output result F∈R of an intermediate convolutional layer. C×H×W As feature data input, the intermediate feature data is obtained by sequentially obtaining the channel attention feature map M in two different dimensions c ∈R C×1×1 and spatial attention feature map M s ∈R 1×H×W , that is, it first passes through a channel attention module, and then passes through a spatial attention module for weighted calculation after the weighted calculation of the channel attention module. In order to make the feature output in different dimensions more refined each time, the attention feature map after each attention weighted calculation is multiplied by the input feature map for adaptive feature refinement, and finally the output result is obtained. This process can be written as:
[0068]
[0069] in Represents element-wise multiplication.
[0070] Channel attention module (see the specific structure) Figure 5 ): This submodule first performs maximum pooling and average pooling operations on the input feature map to aggregate the spatial information of the input feature map, and obtains the maximum pooling feature F of the input feature map c max and average pooling feature F c avg Then the two pooled features obtained by different operations are sent to a multi-layer perceptron shared network with one hidden layer. After the two pooled features pass through the shared network, the channel attention feature map M is obtained. c ∈R C×1×1 Finally, the two output feature vectors processed by the shared network are merged by element-by-element summation. The calculation formula is as follows:
[0071]
[0072] Where σ represents the sigmoid function, and W0 and W1 represent the MLP weights shared by the two inputs.
[0073] Spatial attention module (see the specific structure) Figure 6 ): The spatial attention module is different from the channel attention module. The spatial attention module focuses on the position information and complements the channel attention module. The principle of this submodule is to take the feature map output by the channel attention module as input, first perform maximum pooling and average pooling operations on the input feature map to aggregate the channel information of the feature map, and obtain the maximum pooling feature F of the input feature map s max ∈R 1×H×W and average pooling feature F s avg ∈R 1×H×W , and then the two pooling features are spliced channel by channel. Then a 7×7 convolution layer and a sigmoid activation function are used to generate the spatial attention feature map M s ∈R H×W The spatial attention calculation formula is as follows:
[0074]
[0075] where f 7×7 Represents a convolution operation with a convolution kernel size of 7×7.
[0076] Specifically, the DCNv2 module introduces a modulation mechanism based on DCNv1, so that the deformable convolution module can not only learn the size of the offset, but also modulate the feature amplitude by learning to achieve the change of sample space distribution and relative influence. In addition, DCNv2 also proposes a feature simulation scheme to guide network training, further improving the modeling ability of the deformable convolution module. For details on the difference in sampling position between deformable convolution and standard convolution, please refer to Figure 7 .
[0077] The principle of deformable convolution is as follows: For the implementation process of standard convolution, given the convolution kernel of K sampling positions, first sample the input feature map x, and then sum the sampled values weighted by w. For each position p on the output feature map y, the formula is as follows:
[0078]
[0079] where p k represents the pre-specified offset at the kth position of the convolution kernel. For a 3×3 standard convolution kernel with N=9, p k ∈{(-1, -1), (-1, 0), ..., (0, 1), (1, 1)}.
[0080] In deformable convolution, a learnable parameter Δp is added to the scope of the convolution operation. k , which represents the learnable offset of the kth sampling position in the deformable convolution, then the formula becomes:
[0081]
[0082] Since the offset is usually a non-integer, it is implemented via bilinear interpolation as:
[0083]
[0084] Among them, p represents an arbitrary sampling position, q represents all integer spatial positions in the enumerated feature map x, and G is a bilinear interpolation kernel function, which can be divided into two one-dimensional kernels:
[0085] G(q,p)=g(q x , p x )·g(q y , p y )
[0086] Where g(a,b)=max(0,1-|ab|).
[0087] For details on how to obtain the offset, see Figure 8As shown in the figure, for a 3×3 deformable convolution, the offset output required for the deformable convolution is first obtained by applying a convolution layer on the same input feature map (the number of output offest field channels is 2N, representing the offset in the x and y directions respectively), and then the obtained offset is applied to the convolution kernel to achieve the deformable convolution effect.
[0088] The principle of Deformable RoI Pooling is as follows: The RoI pooling module can convert an input rectangular area of any size into a fixed-size feature. Its implementation principle is: given a RoI of size w×h, the RoI pool divides the RoI into m×m blocks and finally obtains an output feature map y of size m×m through the pooling operation. The pooling operation for the kth block is defined as:
[0089]
[0090] where p kj represents the sampling position of the jth network unit in the kth block, n k Represents the number of network units in the kth sampling block.
[0091] Similarly, in deformable RoI pooling, an offset Δp is also added k , then it becomes:
[0092]
[0093] Deformable RoI pooling implementation principle reference Fig. 9 , first obtain the pooled feature map, then obtain the normalized offset output by applying a fully connected layer on the same input feature map, and finally convert it to the final offset Δp by multiplying it with the width and height of the ROI k .
[0094]
[0095] Where γ is a scalar used to adjust the magnitude of the offset.
[0096] The above is the implementation principle of DCNv1. In DCNv2, the offset is reformulated by introducing learnable feature amplitudes, further improving its capabilities. Modulated deformable convolution can be expressed as:
[0097]
[0098] Where Δp k and Δm k are the learnable offset and modulation scalar of the kth position respectively. Modulation scalar Δm kIt is in the range of [0, 1]. The offset and modulation scalar are obtained by applying a convolutional layer on the same input feature map (the number of channels of the output offest field is 3N, the first 2N channels represent the offset in the x and y directions respectively, and the remaining N channels are further fed to the sigmoid layer to obtain the modulation scalar).
[0099] The design of modulated deformable RoIpooling is similar. Let Δp k and Δm k is the learnable offset and modulation scalar of the kth block. The modulated deformable RoIpooling is calculated as follows:
[0100]
[0101] For standard convolutional neural networks and deformable convolutional neural networks, redundant contextual information outside the RoI will affect the extracted features and thus the final detection results. For the deformable convolutional neural network DCNv2, the weight of each sampling point can be controlled by controlling the modulation scalar of the modulated deformable RoI pooling module, thereby eliminating redundant contextual information. To further reduce the interference of redundant contextual information and improve its ability to adjust the spatial support area, DCNv2 builds an R-CNN teacher network to guide the features after RoIpooling to simulate the features of R-CNN. Through this auxiliary training module, DCNv2 can learn a more concentrated feature representation.
[0102] The network architecture of the deformable Faster R-CNN used for training is shown in Fig.10 As shown in Figure 1. First, given the RoI b for feature imitation, the corresponding image patch is cropped and resized to 224×224 pixels. In the R-CNN branch, the backbone network operates on the resized image patch and produces a feature map with a 14×14 spatial resolution. Then the modulated deformable RoIpooling layer is applied on top of the feature map. After that, two 1024-D fully connected layers are applied to produce the R-CNN features of the input image patch, which are used as f RCNN (b) means, similarly, using f FRCNN (b) represents the Faster R-CNN feature corresponding to the R-CNN feature. Then the Softmax classifier is used for classification, and the feature simulation loss is defined as f RCNN (b) and f FRCNN (b) The cosine similarity between them is calculated as:
[0103]
[0104] The total loss during network training consists of the feature imitation loss and the R-CNN classification loss as well as the original loss term in Faster R-CNN. In inference, only the Faster R-CNN network is used for image testing, so R-CNN feature imitation does not introduce additional calculations in inference.
[0105] Specifically, the DyHead dynamic detection head is a dynamic head framework that combines the target detection head with attention. In order to enhance the scale perception, spatial awareness, and task awareness of the target detection head, the DyHead dynamic detection head combines the multi-head self-attention mechanism in the feature layer of scale perception, the spatial position of spatial perception, and the output channel of task perception, unifying scale perception, spatial perception, and task perception, and significantly improving the target detection head's ability to perceive pedestrian targets. The specific theoretical implementation of DyHead is as follows (see the specific diagram of DyHead for details). Fig.11 ):
[0106] Given a feature tensor F∈R L×S×C , the general formula for applying self-attention is:
[0107] W(F)=π(F)·F
[0108] Where π is the attention function. Since the dimensions of the tensor are very high, directly calculating the attention function for all dimensions will result in a large amount of computational cost. Therefore, the consumption of computing resources can be reduced by converting the attention function into continuous attention under three different perspectives. The calculation formula is as follows:
[0109] W(F)=π C (π S (π L (F)·F)·F)·F
[0110] where π L , π S and π C They represent the attention functions applied to three different dimensions, L, S, and C, respectively. The calculation formula is as follows:
[0111] Scale-aware attention π L : Dynamically fuse features of different scales according to semantic importance.
[0112]
[0113] Where f is the linear function approximated by the 1×1 convolutional layer, and σ(x)=max(0, min(1, (x+1) / 2)) is the hard-sigmoid function.
[0114] Spatial Perception Attention π S: We make attention learning sparse by using deformable convolutions and then aggregate different levels of features at the same spatial location.
[0115]
[0116] Where K represents the number of sparse sampling locations, Δp k and Δm k They represent the offset and modulation scalar learned by deformable convolution, respectively.
[0117] Task-aware attention π C : In order to achieve joint learning and summarize different representations of objects, task-aware attention is used at the end of the architecture, which can dynamically control the opening and closing of different feature channels to support different tasks.
[0118] π C (F)·F=max(α 1 (F)·F c +β 1 (F), α 2 (F)·F c +β 2 (F)
[0119] where Fc represents the feature slice of the c-th channel and [α1, α2, β1, β2]T = θ(·) is the hyperfunction that learns to control the activation threshold.
[0120] The above three attention mechanisms can also be nested multiple times to integrate multiple π L , π S and π C Blocks are stacked together. For detailed configuration of DyHead blocks, refer to Fig.12 shown.
[0121] Step S03, calculating the model loss according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively updating the pedestrian target detection network parameters according to the model loss and using the back propagation algorithm, and finally training to obtain the pedestrian target detection model.
[0122] Among them, the predicted pedestrian target detection information can specifically be the position and size of the pedestrian target prediction box, and the annotated real pedestrian target detection information specifically includes the position and size of the pedestrian target annotation box. Specifically, the loss function of the YOLOv7 network can be used to calculate the model loss, and then the pedestrian target detection network parameters are iteratively updated according to the model loss and the back propagation algorithm, and finally the pedestrian target detection model is trained.
[0123] In summary, the pedestrian target detection model training method in this embodiment optimizes the pedestrian target detection network so that features can be fused during the feature extraction process. The feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head. The optimized target detection network can increase the network's ability to express image features and effectively improve the model's detection accuracy and generalization ability.
[0124] For details on the inference performance of the improved YOLOv7 model compared to the original model, please refer to Fig.13 .
[0125] Embodiment 2
[0126] Embodiment 2 of the present invention also proposes a pedestrian target detection model training method. The pedestrian target detection model training method in this embodiment is different from the pedestrian target detection model training method in the first embodiment in that:
[0127] After the step of calculating the model loss according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively updating the pedestrian target detection network parameters according to the model loss and using the back propagation algorithm to finally train and obtain the pedestrian target detection model, the method further includes:
[0128] The pedestrian target detection model is evaluated using a preset model evaluation algorithm.
[0129] Specifically, in this embodiment, the step of evaluating the pedestrian target detection model using a preset model evaluation algorithm specifically includes:
[0130] Calculating the logarithmic mean missing rate of the pedestrian target detection model;
[0131] The pedestrian target detection model is evaluated according to the logarithmic mean missing rate of the pedestrian target detection model.
[0132] The pedestrian target detection model training method according to claim 5, characterized in that the calculation formula of the logarithmic mean missing rate is:
[0133]
[0134] MR=1-R
[0135]
[0136] Where R represents the correct prediction ratio among all the results whose true values are positive categories, TP represents the number of correctly predicted positive samples, FP represents the number of incorrectly predicted positive samples, FN represents the number of incorrectly predicted negative samples, MR represents the missed detection rate, FPPI represents the average false positive rate of the image, N represents the number of images, and δ(FPPI) represents the mapping relationship between FPPI and log(MR).
[0137] When evaluating the model, pedestrian targets are further divided into reasonable, small, and heavy occlusion subsets according to the degree of occlusion of pedestrians and the height of the pixels they occupy. Considering the impact of overlap on pedestrian detection, pedestrian targets are also divided into four subsets with overlap ratios of 0, 0.25, 0.50, and 0.75 when evaluating the model to verify the false detection and missed detection of the model when identifying targets with different degrees of overlap.
[0138] In this embodiment, according to the above evaluation algorithm, ablation experiments are performed on the three improvement points on the Citypersons dataset for different improvement schemes of the three different improvement points, respectively representing the improvement schemes of adding the CBAM attention mechanism, replacing the ordinary convolution with the DCNv2 deformable convolution, and using the Dyhead detection head. The specific evaluation data are shown in Table 1 below.
[0139] Table 1: Performance comparison of different improvement schemes of CBAM, DCNv2, and DyHead modules
[0140]
[0141] In this embodiment, the comprehensive performance of target detection models such as Faster-RCNN (Resnet50+FPN), SSD (vgg512), YOLOv5, YOLOv7, and YOLOv8 are evaluated on the Citypersons dataset according to the above evaluation algorithm. The specific evaluation data are shown in Table 2 below.
[0142] Table 2: Performance comparison with other general target detection network models
[0143]
[0144] From the comparative experimental results in Table 2, we can see that the improved YOLOv7 pedestrian detection network model in this paper has better comprehensive performance than the MR of the two-stage target detection network Faster-RCNN (Resnet50+FPN) model. -2 12.34% lower, MR on a subset of small and occluded pedestrian targets -2They are reduced by 17.84% and 16.78% respectively. Compared with the single-stage algorithm models SSD (vgg512), YOLOv51 and YOLOv81, MR -2 The MR performance on the small pedestrian subset is reduced by 12.89%, 7.96% and 7.6% respectively. -2 The MR on the subset of occluded target pedestrians is reduced by 24.25%, 15.49%, and 15.87%, respectively. -2 They were reduced by 4.59%, 9.49%, and 9.5%, respectively. Specifically, the parameter quantity, calculation amount, and MR were comprehensively analyzed. -2 For details, see Fig.14 ,Through the comparison results, it can be seen that the improved model only increases ,the amount of parameters by 0.2M, which is almost negligible, but the amount of calculation and MR-2 are greatly reduced. ,The improved YOLOv7 model has excellent performance in terms of the ,comprehensive performance of parameter amount, calculation amount and MR-2.
[0145] In addition, the detection performance of the improved YOLOv7 pedestrian detection network model and other existing pedestrian target detection network models on the INRIA dataset for pedestrian targets with different degrees of overlap is compared. The specific evaluation data is shown in Table 3 below.
[0146] Table 3: Performance comparison with other existing pedestrian target detection network models
[0147]
[0148] From Table 2 and Table 3 above, we can see that the logarithmic mean missing rate (MR) of the improved YOLOv7 algorithm -2 ) achieved the lowest value in all experimental data (the smaller the better). The improved YOLOv7 algorithm uses the CBAM attention mechanism and deformable convolution DCNv2 in the two feature extraction ELAN modules of the backbone feature extraction network, which improves the model's perception of pedestrian targets in the input image and the modeling ability of pedestrians with different postures. It also effectively eliminates the redundant contextual information around the pedestrian targets, allowing the model to learn more concentrated feature representations. In addition, the detection head of YOLOv7 is replaced by the DyHead detection head with an attention mechanism, which unifies scale perception, spatial perception and task perception, greatly improving the performance of the model in multi-scale scenarios.
[0149] Embodiment 3
[0150] Another aspect of the present invention is to provide a pedestrian target detection model training device, see Fig.15 , which is a pedestrian target detection model training device provided by Embodiment 3 of the present invention, and the device comprises:
[0151] The data acquisition module 11 is used to acquire pedestrian target images for training the pedestrian target detection model, and to annotate each of the pedestrian target images with pedestrian targets to obtain annotated training data to form a training data set;
[0152] The network processing module 12 is used to input the training images in the training data set into the preset pedestrian target detection network for training. The training images are subjected to feature extraction processing and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process is also subjected to DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head;
[0153] The model training module 13 is used to calculate the model loss based on the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively update the pedestrian target detection network parameters based on the model loss and using the back propagation algorithm, and finally train the pedestrian target detection model.
[0154] Furthermore, in some optional embodiments of the present invention, the preset pedestrian target detection network is an improved YOLOv7 network, and the improved YOLOv7 network also includes a DCNv2 deformable convolution module, a CBAM convolution attention module and a DyHead dynamic detection head module compared to the original model.
[0155] Furthermore, in some optional embodiments of the present invention, the network processing module 12 is further used to input the training images in the training data set into a preset pedestrian target detection network for training, and the training images are subjected to feature extraction processing and feature fusion processing in the pedestrian target detection network. The feature extraction process is also subjected to DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the step of outputting predicted pedestrian target detection information through the DyHead dynamic detection head includes:
[0156] The training images in the training data set are input into the model Backbone feature extraction network for feature extraction to obtain the intermediate features output by the backbone network. In the feature extraction process, the optimized ELAN module (ELAN-DC) is obtained by replacing the 3×3 convolutional layer in the ELAN module with the deformable convolutional layer DCNv2 and using the CBAM attention mechanism after channel splicing. The optimized module effectively eliminates redundant context information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks;
[0157] The intermediate features extracted by the backbone network are further extracted through the feature extraction network of YOLOv7 to obtain the final features used by the detection head for detection and classification;
[0158] The extracted final features are input into the DyHead dynamic detection head for detection and classification to obtain the predicted pedestrian target detection information.
[0159] Furthermore, in some optional embodiments of the present invention, the pedestrian target detection model training device further includes:
[0160] The model evaluation module is used to evaluate the pedestrian target detection model using a preset model evaluation algorithm.
[0161] Furthermore, in some optional embodiments of the present invention, the model evaluation module is also used to calculate the logarithmic mean missing rate of the pedestrian target detection model respectively; and evaluate the pedestrian target detection model according to the logarithmic mean missing rate.
[0162] The calculation formula of the logarithmic mean missing rate is:
[0163]
[0164] MR=1-R
[0165]
[0166] Where R represents the correct prediction ratio among all the results whose true values are positive categories, TP represents the number of correctly predicted positive samples, FP represents the number of incorrectly predicted positive samples, FN represents the number of incorrectly predicted negative samples, MR represents the missed detection rate, FPPI represents the average false positive rate of the image, N represents the number of images, and δ(FPPI) represents the mapping relationship between FPPI and log(MR).
[0167] When evaluating the model, according to the degree of occlusion of pedestrians and the different pixel heights occupied, pedestrian targets are divided into all (pixel height: [20, +∞); pedestrian target visible ratio: [0.2, +∞)), reasonable (pixel height: [50, +∞); pedestrian target visible ratio: [0.65, +∞)), small (pixel height: [50, 75]; pedestrian target visible ratio: [0.65, +∞)), heavy occlusion (pixel height: [50, +∞); pedestrian target visible ratio: [0.2, 0.65]) subsets. Considering the impact of overlap on pedestrian detection, pedestrian targets are also divided into four subsets according to overlap ratios of 0, 0.25, 0.50, and 0.75 when evaluating the model to verify the false detection and missed detection of the model when identifying targets with different degrees of overlap.
[0168] The functions or operation steps implemented when the above modules and units are executed are generally the same as those in the above method embodiments, and will not be repeated here.
[0169] In summary, the pedestrian target detection model training device in this embodiment optimizes the pedestrian target detection network, and the training image undergoes feature extraction processing and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head. The optimized model effectively eliminates redundant contextual information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks. By using the DyHead dynamic detection head, the model can effectively adapt to targets of different scales and complexities, thereby improving the performance of the model in multi-scale scenes.
[0170] Embodiment 4
[0171] See also Fig.16 Embodiment 4 of the present invention proposes a pedestrian target detection model training device, including a processor 10, a memory 20, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the program 30, the pedestrian target detection model training method as described above is implemented.
[0172] In some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 20, such as executing access restriction programs.
[0173] Among them, the memory 20 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of the pedestrian target detection model training device, such as the hard disk of the pedestrian target detection model training device. In other embodiments, the memory 20 can also be an external storage device of the pedestrian target detection model training device, such as a plug-in hard disk equipped on the pedestrian target detection model training device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 20 can also include both an internal storage unit and an external storage device of the pedestrian target detection model training device. The memory 20 can not only be used to store application software and various types of data installed in the pedestrian target detection model training device, but also can be used to temporarily store data that has been output or is to be output.
[0174] It should be pointed out that Fig.16 The structure shown does not constitute a limitation on the pedestrian target detection model training device. In other embodiments, the pedestrian target detection model training device may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0175] In summary, the pedestrian target detection model training device in this embodiment optimizes the pedestrian target detection network, and the training image undergoes feature extraction processing and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process also undergoes DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead dynamic detection head. The optimized model effectively eliminates redundant contextual information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks. By using the DyHead dynamic detection head, the model can effectively adapt to targets of different scales and complexities, thereby improving the performance of the model in multi-scale scenes.
[0176] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the pedestrian target detection model training method as described above is implemented.
[0177] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0178] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0179] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0180] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0181] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A pedestrian target detection model training method, characterized in that: The method comprises: Obtaining pedestrian target images for training a pedestrian target detection model, and annotating each of the pedestrian target images to obtain annotated training data to form a training data set; The training images in the training data set are input into a preset pedestrian target detection network for training. The training images are subjected to feature extraction and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process is also subjected to DCNv2 (Deformable ConvNets v2) deformable convolution processing and CBAM (Convolutional Block Attention Module) attention mechanism processing. After completing all feature extraction work, the predicted pedestrian target detection information is output through the DyHead (Dynamic Head) dynamic detection head; The model loss is calculated according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and the pedestrian target detection network parameters are iteratively updated according to the model loss and the back propagation algorithm, and finally the pedestrian target detection model is trained.
2. The pedestrian target detection model training method according to claim 1, characterized in that: The preset pedestrian target detection network is an improved YOLOv7 network. Compared with the original model, the improved YOLOv7 network also includes a DCNv2 deformable convolution module, a CBAM convolution attention module and a DyHead dynamic detection head module.
3. The pedestrian target detection model training method according to claim 2, characterized in that: The training images in the training data set are input into a preset pedestrian target detection network for training. The training images are subjected to feature extraction processing and feature fusion processing in the pedestrian target detection network. Compared with the original YOLOv7 model, the feature extraction process is also subjected to DCNv2 deformable convolution processing and CBAM attention mechanism processing. After completing all feature extraction work, the steps of outputting predicted pedestrian target detection information through the DyHead dynamic detection head include: The training images in the training data set are input into the model Backbone feature extraction network for feature extraction to obtain the intermediate features output by the backbone network. In the feature extraction process, the optimized ELAN module (ELAN-DC) is obtained by replacing the 3×3 convolutional layer in the ELAN module with the deformable convolutional layer DCNv2 and using the CBAM attention mechanism after channel splicing. The optimized module effectively eliminates redundant context information, enables the model to learn more concentrated and meaningful feature representations, and effectively solves the problem of complex scenes in pedestrian target detection tasks; The intermediate features extracted by the backbone network are further extracted through the feature extraction network of YOLOv7 to obtain the final features used by the detection head for detection and classification; The extracted final features are input into the DyHead dynamic detection head for detection and classification to obtain the predicted pedestrian target detection information.
4. The pedestrian target detection model training method according to claim 1, characterized in that: After the step of calculating the model loss according to the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively updating the pedestrian target detection network parameters according to the model loss and using the back propagation algorithm to finally train and obtain the pedestrian target detection model, the method further includes: The pedestrian target detection model is evaluated using a preset model evaluation algorithm.
5. The pedestrian target detection model training method according to claim 4, characterized in that: The step of evaluating the pedestrian target detection model using a preset model evaluation algorithm includes: Calculating the logarithmic mean missing rate of the pedestrian target detection model; The pedestrian target detection model is evaluated according to the logarithmic mean missing rate of the pedestrian target detection model.
6. The pedestrian target detection model training method according to claim 5, characterized in that: The calculation formula of the logarithmic mean missing rate is: MR=1-R Where R represents the correct prediction ratio among all the results whose true values are positive categories, TP represents the number of correctly predicted positive samples, FP represents the number of incorrectly predicted positive samples, FN represents the number of incorrectly predicted negative samples, MR represents the missed detection rate, FPPI represents the average false positive rate of the image, N represents the number of images, and δ(FPPI) represents the mapping relationship between FPPI and log(MR).
7. When evaluating the model, according to the degree of occlusion of pedestrians and the different pixel heights occupied, pedestrian targets are divided into all (pixel height: [20, +∞); pedestrian target visible ratio: [0.2, +∞)), reasonable (pixel height: [50, +∞); pedestrian target visible ratio: [0.65, +∞)), small (pixel height: [50, 75]; pedestrian target visible ratio: [0.65, +∞)), heavy occlusion (pixel height: [50, +∞); pedestrian target visible ratio: [0.2, 0.65]) subsets. Considering the impact of overlap on pedestrian detection, pedestrian targets are also divided into four subsets according to overlap ratios of 0, 0.25, 0.50, and 0.75 when evaluating the model to verify the false detection and missed detection of the model when identifying targets with different degrees of overlap.
8. A pedestrian target detection model training device, characterized in that: The device comprises: A data acquisition module is used to acquire pedestrian target images for training a pedestrian target detection model, and to annotate each of the pedestrian target images with pedestrian targets to obtain annotated training data to form a training data set; A network processing module, used for inputting the training images in the training data set into a preset pedestrian target detection network for training, wherein the training images are subjected to feature extraction processing, feature fusion processing, feature coupling processing and convolution attention processing in the pedestrian target detection network in sequence, and then outputting predicted pedestrian target detection information through an output head; The model training module is used to calculate the model loss based on the predicted pedestrian target detection information and the labeled real pedestrian target detection information, and iteratively update the pedestrian target detection network parameters based on the model loss and using the back propagation algorithm to finally train the pedestrian target detection model.
9. A pedestrian target detection model training device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the pedestrian target detection model training method as described in any one of claims 1-7 is implemented.
Citation Information
Cited By
Automatic deviation rectifying and stacking control method for packaging bags
CN119057820A
SAR (Synthetic Aperture Radar) aircraft target identification method in combination with lightweight attention and deformable convolution
CN119693787A
Product surface defect identification method and device based on multi-domain feature fusion network, and medium
CN119904427A
Rail transit personnel detection method and device and storage medium
CN119964090A
Pedestrian intention recognition and collision avoidance method based on multi-modal perception
CN121259789A
