Pedestrian and vehicle detection method based on improved YOLOv10

By improving the YOLOv10 model, using technical means such as space-to-depth convolution and focused spatial pyramid pooling, the problems of scale changes and background interference in urban vehicle detection are solved, and higher recognition accuracy and robustness are achieved.

CN119625783APending Publication Date: 2025-03-14HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411690790.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

There are scale changes and background interference problems in urban vehicle detection, resulting in reduced recognition accuracy.

Method used

Improve the YOLOv10 model, design the global grouping coordinate attention module GGCA by replacing the specific layer in Backbone into the space-to-deep convolution SPDConv in the feature extraction part, and fusing the LSKA module into the spatial pyramid pooling layer, and introducing a WIou loss function to optimize the network.

Benefits of technology

While maintaining the number of model parameters, the recognition accuracy and robustness of the detection targets are improved, and the convergence speed and regression accuracy of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625783A_ABST
    Figure CN119625783A_ABST
Patent Text Reader

Abstract

The invention discloses a pedestrian and vehicle detection method based on an improved YOLOv10n. The pedestrian and vehicle detection method comprises the following steps: on the basis of an original model YOLOv10n, replacing a first layer and a third layer in Backbone and a seventeenth layer Conv in Neck with a space-to-depth convolution SPDConv; a focused spatial pyramid pooling module ASPPF is constructed, and semantic fusion of cross-level features is optimized; designing a global grouping coordinate attention module GGCA, fusing the GGCA into a Neck layer, generating attention maps by using global information of the feature maps in the spatial dimension, and weighting the input feature maps through the attention maps to enhance the feature expression ability; a WIou loss function is introduced, the bounding box loss of the network is optimized, and the convergence speed and regression precision of the model are improved. And training a model by using a data set which is made by autonomous labeling to obtain a training result, and completing a pedestrian and vehicle detection task by using an optimal training weight. According to the method, a good detection effect is achieved with a small number of model parameters, and the pedestrian and vehicle recognition accuracy is well improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and target detection, and in particular to a pedestrian and vehicle detection method based on improved YOLOv10. Background Art

[0002] The application scenarios of pedestrian and vehicle detection are wide and diverse, and they play an indispensable role in all fields of modern society. In intelligent transportation systems, pedestrian and vehicle detection is a key technology to achieve smooth and safe traffic: by capturing road images with high-definition cameras, the system can detect pedestrians, cars, motorcycles, bicycles and other targets in real time, so as to accurately judge traffic conditions. In the field of intelligent security, pedestrian and vehicle target detection is also of great significance. By installing surveillance cameras in key areas, the system can monitor the entry and exit of people and vehicles around the clock, effectively preventing illegal acts such as theft and vandalism.

[0003] In recent years, deep learning-based pedestrian and vehicle detection methods have gradually attracted widespread attention from researchers and have shown great application potential. These methods make full use of the ability of deep learning algorithms to automatically learn data features and show excellent detection performance in various scenarios. At present, there are still the following difficulties in urban vehicle target detection: scale change, due to the different distances and angles of vehicles entering the shooting range, the size and shape of the vehicles may vary greatly; background interference, the background captured by traffic cameras often contains a lot of interference information, such as building occlusion, vehicle occlusion, and road texture, etc. These background noises will reduce the significance of the target vehicle. These factors will become a problem for urban vehicle detection. Therefore, how to improve the accuracy and robustness of urban vehicle target detection is a challenging task. Summary of the invention

[0004] Purpose of the invention: In response to the problems raised in the background question, the present invention provides a pedestrian and vehicle detection method based on improved YOLOv10, which solves the problem that the background interference and scale change of the detection target greatly reduce the recognition accuracy while keeping the model parameter quantity as much as possible.

[0005] Technical solution: The present invention proposes a pedestrian and vehicle detection method based on improved YOLOv10n, comprising the following steps:

[0006] Step 1: Collect pedestrian and vehicle images to create a dataset, and create a label dataset, and integrate the image dataset and label dataset into a training dataset;

[0007] Step 2: Improve based on YOLOv10n model:

[0008] Step 2.1: In the feature extraction part, replace the first and third layers in Backbone and the 17th layer Conv in Neck with spatial-to-depth convolution SPDConv;

[0009] Step 2.2: Fuse the LSKA module into the spatial pyramid pooling layer SPPF to obtain the focused spatial pyramid pooling module ASPPF;

[0010] Step 2.3: Design a global group coordinate attention module GGCA and fuse it into the Neck layer, use the global information of the feature map in the spatial dimension to generate an attention map, and weight the input feature map through the attention map;

[0011] Step 2.4: Introduce the WIou loss function into the Neck network to optimize the bounding box loss of the network and improve the convergence speed and regression accuracy of the model;

[0012] Step 3: Use the training data set to train the improved YOLOv10n network model in step 2;

[0013] Step 4: Save the model weights at the training location and select the best weight file from the training results for pedestrian and vehicle detection tasks.

[0014] Furthermore, in the step 1, the prepared image dataset is annotated with the pedestrian and vehicle images using the data annotation tool Labelimg, the annotated image labels are divided into pedestrians, bicycles, buses, cars, and motorcycles, and the positions of pedestrians and vehicles in the image are marked with rectangular boxes and annotated in YOLO format to obtain pedestrian and vehicle image datasets, and the image dataset and the label dataset are integrated to prepare a training dataset; the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.

[0015] Furthermore, the operation steps of the SPDConv module are as follows:

[0016] First, any intermediate feature map X with an input size of S×S×C is sliced ​​according to the parameter scale factor scale in the SPD module to achieve feature transformation. The size formula of the series of sub-feature maps belonging to X is:

[0017] f 0,0 =X[0:S:scale,0:S:scacle],

[0018] f 1,0 =X[1:S:scale,0:S:scacle],

[0019] Similarly, f 2,0 , ...,

[0020] f scale-1,0 =X[scale-1:S:scale,0:S:scacle],

[0021] f 0,1 =X[0:S:scale,1:S:scale],

[0022] Similarly, f 0,2 , ...,

[0023] f 0,scale-1 =X[0:S:scale,scale-1:S:scacle]

[0024] f 1,1 =X[1:S:scale,1:S:scale],

[0025] Similarly, f 2,1 ,...,

[0026] f scale-1,1 =X[scale-1:S:scale,1:S:scale]

[0027] Similarly, f scale-1,2 ,...,

[0028] f scale-1,scale-1 =X[scale-1:S:scale,scale-1:S:scacle]

[0029] For the Conv module, it consists of a convolutional layer with a step size of 1, which only changes the number of channels of the feature map and changes the number of output channels to C2 = scale 2 ×C1;

[0030] Input feature map f 0,0 ,f 1,0 ,f 0,1 ,f 1,1 , its size is (S / scale)×(S / scale)×C1. The SPD layer concatenates all sub-images along the channel, and then adds a convolutional layer Conv with a channel number and a step size of 1. Finally, the module size is (S / scale)×(S / scale)×C2.

[0031] Furthermore, in step 2.2, the LSKA module is integrated into the spatial pyramid pooling layer SPPF to construct a focused spatial pyramid pooling module ASPPF, and the construction process is as follows:

[0032] First, perform maximum pooling operations of different scales on the input feature map. The pooling operation at each scale produces an output of a fixed size. The pooling results at different scales are spliced ​​together along the channel dimension to form a high-dimensional feature map. This high-dimensional feature map includes information at different scales.

[0033] Then, the concatenated feature map is input into an 11×11 LSKA module, which uses large-size separable convolution to capture long-range feature dependencies, thereby extracting features in a wider receptive field;

[0034] Finally, the feature maps output by the LSKA module are integrated through a common convolutional layer to adjust the dimension of the feature maps to make them suitable for subsequent detection tasks.

[0035] Furthermore, in step 2.3, a global grouped coordinate attention module GGCA is designed and fused into the Neck layer, and its design process is represented by the following formula:

[0036] First, the input feature map is represented as X∈R B×C×H×W According to the number of channels, they are divided into G groups, each group contains channels, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively, and the grouped feature map is expressed as: g=1,2,...,G;

[0037] Then, the grouped feature map X g Perform global average pooling and global maximum pooling operations in the height direction and width direction respectively, and obtain two vectors:

[0038] Pooling results in height direction:

[0039] Pooling results in width direction:

[0040] Among them, GAP h and GMP h Respectively represent the global average pooling and global maximum pooling along the height direction; GAP w and GMP w Represents global average pooling and global maximum pooling along the width direction; the semicolon (;) represents the concatenation operation of the vector;

[0041] To obtain and A shared convolutional layer is applied to further extract features. The convolutional layer includes two 1×1 convolutional layers, a batch normalization layer BN and a ReLU activation function. Let the output after the convolutional layer be and By taking the output of the convolutional layer and Add them together and pass the Sigmoid activation function to generate the attention weights in the height and width directions:

[0042] Attention weight in height direction:

[0043] Attention weight in width direction:

[0044] Among them, σ represents the Sigmoid activation function, which is used to convert the output into a value between 0 and 1 as the attention weight;

[0045] Finally, we convert the original input feature map X into the attention weights calculated above. and After weighting, the final output feature map Y is obtained.

[0046] Furthermore, the WIou loss function is implemented as follows:

[0047] First, calculate the IoU between the predicted box p and the true box t. Where Area represents the area;

[0048] Then, a -log function is used to amplify the impact of low IoU values: L WIOUv1 (p, t) = -log(IoU(p, t)), where L represents the loss function Loss;

[0049] Finally, we introduce parameter γ based on WIOUv1 to get WIOU: Among them, γ is used to dynamically adjust the loss contribution of samples of different qualities, and WIOU fully considers the outlier degree of samples in the implementation process.

[0050] Furthermore, the specific training parameters of step 3 are set to 200 iterations, the image size is uniformly adjusted to 640×640 pixels, the initial learning rate is set to 0.01, the minimum learning rate is set to 0.001, and bitch_size is set to 16.

[0051] Beneficial effects:

[0052] 1. The SPDConv convolution used in this invention consists of a space-to-depth layer (SPD) and a convolution-free stride layer (Conv), which can be used as a plug-and-play downsampling component to replace the convolution layer in the CNN network. This module can retain the originally lost fine-grained information to the greatest extent while reducing the amount of calculation and the number of parameters, thereby improving the lightweight performance of the model while maintaining the model detection performance.

[0053] 2. Construct a focused spatial pyramid pooling module ASPPF, integrate features through ordinary convolutional layers, and adjust the dimension of the feature vector output by Backbone to make it more suitable for subsequent detection tasks.

[0054] 3. The GGCA global attention mechanism is cleverly integrated into the neck structure of the YOLOv10 model, aiming to use the global information of the feature map in the spatial dimension to generate attention maps, and use these attention maps to weight the input feature maps, enhance the feature expression ability, and improve the overall performance of the model and the feature expression ability of targets such as vehicles and pedestrians.

[0055] 4. The WIOU loss function is used to reduce the harm of low-quality samples to the network and improve the convergence speed and regression accuracy of the improved model. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flow chart of the method of the present invention;

[0057] Figure 2 Improve the overall network structure diagram of YOLOv10n for the present invention;

[0058] Figure 3 This is a flow chart of the SPDConv module of the present invention;

[0059] Figure 4 This is a schematic diagram of the ASPPF module of the present invention;

[0060] Figure 5 Schematic diagram of the GGCA module introduced in the present invention;

[0061] Figure 6 The figures are comparison diagrams of the effects of the model before and after the improvement of the present invention, wherein (a) shows the effect diagram of the model before the improvement, and (b) shows the effect diagram of the model after the improvement;

[0062] Figure 7 This is a diagram showing the detection effect of the present invention. DETAILED DESCRIPTION

[0063] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0064] This embodiment proposes a pedestrian and vehicle detection method based on improved YOLOv10, see Figure 1 , the specific implementation steps are as follows:

[0065] Step 1: Collect pedestrian and vehicle images to create an image dataset, annotate them using labeling tools, and create a labeled dataset. Integrate the image dataset and the labeled dataset to create a training dataset.

[0066] Step 1.1: Obtain image data of pedestrians and vehicles on the traffic section and make an image dataset;

[0067] Step 1.2: Use the data annotation tool Labelimg to annotate the pedestrian and vehicle images of the prepared image dataset. The annotated image labels are divided into pedestrians, bicycles, buses, cars and motorcycles. Use rectangular boxes to mark the positions of pedestrians and vehicles in the image. Annotate in YOLO format to obtain the image dataset;

[0068] Step 1.3: Integrate the image dataset and the label dataset to create a training dataset; the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.

[0069] Step 2: Construct an improved YOLOv10n network model. The improved network model is as follows Figure 2 As shown in Figure 1, the first and third layers in Backbone and the seventeenth Conv layer in Neck are replaced by SPDConv; SPDConv consists of a space-to-depth layer (SPD) and a convolution-free stride layer (Conv). The specific structure of SPDConv is as follows Figure 3 shown.

[0070] Step 2.1: Regarding the SPD (Separable Pointwise Convolutional Network) module: Any intermediate feature map X of input size S×S×C can be sliced ​​according to the parameter scale factor scale to achieve feature transformation. The size of the series of sub-feature maps belonging to X is shown as follows:

[0071] f 0,0 =X[0:S:scale,0:S:scacle],

[0072] f 1,0 =X[1:S:scale,0:S:scacle],

[0073] Similarly, f 2,0 , ...,

[0074] f scale-1,0 =X[scale-1:S:scale,0:S:scacle],

[0075] f 0,1 =X[0:S:scale,1:S:scale],

[0076] Similarly, f 0,2 , ...,

[0077] f 0,scale-1 =X[0:S:scale,scale-1:S:scacle]

[0078] f 1,1 =X[1:S:scale,1:S:scale],

[0079] Similarly, f 2,1 ,...,

[0080] f scale-1,1 =X[scale-1:S:scale,1:S:scale]

[0081] Similarly, f scale-1,2 ,...,

[0082] f scale-1,scale-1 =X[scale-1:S:scale,scale-1:S:scacle]

[0083] Step 2.2: Conv (Non-strided Convolution) module: It consists of a convolution layer with a step size of 1. This module only changes the number of channels of the feature map and changes its output channel number to C2 = scale 2 ×C1.

[0084] Step 2.3: Input feature map f 0,0 ,f 1,0 ,f 0,1 ,f 1,1 , whose size is (S / scale)×(S / scale)×C1. The SPD layer concatenates all sub-images along the channels. On this basis, a convolutional layer Conv with a channel number of 1 and a stride of 1 is added, and the final module size is (S / scale)×(S / scale)×C2.

[0085] Step 3: Construct the focused spatial pyramid pooling module ASPPF. The construction process is as follows:

[0086] Step 3.1: First, perform maximum pooling operations of different scales on the input feature map. The pooling operation at each scale will produce an output of a fixed size. The pooling results at different scales are spliced ​​together along the channel dimension to form a high-dimensional feature map. This high-dimensional feature map contains information of different scales.

[0087] Step 3.2: Then, the concatenated feature map is input into an 11×11 LSKA convolution module. The LSKA module uses large-sized separable convolutions to capture long-range feature dependencies, thereby extracting features over a wider receptive field.

[0088] Step 3.3: Finally, the feature map output by the LSKA module is integrated through a normal convolutional layer to adjust the dimension of the feature map to make it suitable for subsequent detection tasks.

[0089] Step 4: Design a GGCA global grouping coordinate attention module into the Neck layer. The design process can be expressed by the following formula:

[0090] Step 4.1: First, for the input feature map we represent it as X∈R B×C×H×W We divide them into G groups according to the number of channels, each group contains Here, B is the batch size, C is the number of channels, and H and W are the height and width of the feature map, respectively. g=1,2,...,G.

[0091] Step 4.2: Then, the grouped feature map X g Perform global average pooling and global maximum pooling operations in the height direction and width direction respectively, and obtain two vectors:

[0092] Pooling results in height direction:

[0093] Pooling results in width direction:

[0094] Among them, GAP h and GMP h Respectively represent the global average pooling and global maximum pooling along the height direction; GAP w and GMP w Represents global average pooling and global maximum pooling along the width direction; the semicolon (;) represents the concatenation operation of the vector;

[0095] To obtain and A shared convolutional layer is applied to further extract features. The convolutional layer includes two 1×1 convolutional layers, a batch normalization layer BN and a ReLU activation function. Let the output after the convolutional layer be and By taking the output of the convolutional layer and Add them together and pass the Sigmoid activation function to generate the attention weights in the height and width directions:

[0096] Attention weight in height direction:

[0097] Attention weight in width direction:

[0098] Among them, σ represents the Sigmoid activation function, which is used to convert the output into a value between 0 and 1 as the attention weight;

[0099] Finally, we convert the original input feature map X into the attention weight A calculated above. h g and A w g After weighting, the final output feature map Y is obtained.

[0100] Step 5: Introduce the WIou loss function, use the dynamic non-monotonic focusing mechanism of Wise-IOU, and use "outlier degree" instead of IOU to evaluate the quality of the anchor box.

[0101] First, calculate the IoU between the predicted box p and the true box t. Where Area represents the area;

[0102] Then, a -log function is used to amplify the impact of low IoU values: L WIOUv1 (p, t) = -log(IoU(p, t)), where L represents the loss function Loss;

[0103] Finally, we introduce parameter γ based on WIOUv1 to get WIOU:

[0104] Among them, γ is used to dynamically adjust the loss contribution of samples of different qualities, and WIOU fully considers the outlier degree of samples in the implementation process.

[0105] Step 6: Train the improved YOLOv10n network model to obtain the best model weights and perform human and vehicle detection on the image data to be detected.

[0106] Step 6.1: The specific settings are 200 iterations, the image size is uniformly adjusted to 640×640 pixels, the initial learning rate is set to 0.01, the minimum learning rate is set to 0.001, and bitch_size is set to 16.

[0107] Step 6.2: After training, the optimal weights are obtained, and the test set is tested using the optimal weights to obtain the test results.

[0108] The experimental environment parameters of the present invention are shown in Table 1 below, and the training results are shown in Table 2.

[0109] Table 1 Experimental environment

[0110]

[0111]

[0112] Table 2 Training results

[0113]

[0114] The present invention uses precision, recall, meanAveragePrecision (mAP), parameters, and GFLOPs as evaluation indicators. The evaluation indicator formulas are as follows:

[0115] Precision(P):

[0116]

[0117] Recall(R):

[0118]

[0119] Mean Average Precision (mAP50):

[0120]

[0121] Among them, TP refers to the number of samples that are positive and predicted as positive, FP refers to the number of samples that are negative and predicted as positive, FN refers to the number of samples that are positive and predicted as negative, n is the number of target categories detected, AP i is the AP of the ith target class.

[0122] Compared with YOLOv10n, the pedestrian and vehicle detection method based on the improved YOLOv10n shows good precision, recall rate and map@.5. The specific data are shown in Table 3.

[0123] Table 3 Effect comparison data

[0124]

[0125] The results show that, see Figure 6 and Figure 7 , the improved YOLOv10 improves accuracy, recall and average precision by 3.2%, 3.1% and 1.6% respectively. Figure 7 As can be seen from the renderings, the improved model is able to recognize some tiny and occluded small targets, achieving our expected effect.

[0126] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A pedestrian and vehicle detection method based on improved YOLOv10n, characterized in that: The steps include: Step 1: Collect pedestrian and vehicle images to create a dataset, and create a label dataset, and integrate the image dataset and label dataset into a training dataset; Step 2: Improve based on YOLOv10n model: Step 2.1: In the feature extraction part, replace the first and third layers in Backbone and the 17th layer Conv in Neck with spatial-to-depth convolution SPDConv; Step 2.2: Fuse the LSKA module into the spatial pyramid pooling layer SPPF to obtain the focused spatial pyramid pooling module ASPPF; Step 2.3: Design a global group coordinate attention module GGCA and fuse it into the Neck layer, use the global information of the feature map in the spatial dimension to generate an attention map, and weight the input feature map through the attention map; Step 2.4: Introduce the WIou loss function in the Neck network to optimize the bounding box loss of the network and improve the convergence speed and regression accuracy of the model; Step 3: Use the training data set to train the improved YOLOv10n network model in step 2; Step 4: Save the model weights at the training location and select the best weight file from the training results for pedestrian and vehicle detection tasks.

2. According to claim 1, a pedestrian and vehicle detection method based on improved YOLOv10 is characterized in that: In the step 1, the prepared image dataset is annotated with the data annotation tool Labelimg to annotate the pedestrian and vehicle images. The annotated image labels are divided into pedestrians, bicycles, buses, cars, and motorcycles. The positions of pedestrians and vehicles in the image are annotated with rectangular boxes and annotated in YOLO format to obtain pedestrian and vehicle image datasets. The image dataset and the label dataset are integrated to prepare a training dataset; the dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:

1.

3. The pedestrian and vehicle detection method based on improved YOLOv10 according to claim 1, characterized in that: The operation steps of the SPDConv module are as follows: First, any intermediate feature map X with an input size of S×S×C is sliced ​​according to the parameter scale factor scale in the SPD module to achieve feature transformation. The size formula of the series of sub-feature maps belonging to X is: f 0,0 =X[0:S:scale,0:S:scacle], f 1,0 =X[1:S:scale,0:S:scacle], Similarly, f 2,0 , ..., f scale-1,0 =X[scale-1:S:scale,0:S:scacle], f 0,1 =X[0:S:scale,1:S:scale], Similarly, f 0,2 , ..., f 0,scale-1 =X[0:S:scale,scale-1:S:scacle] f 1,1 =X[1:S:scale,1:S:scale], Similarly, f 2,1 ,..., f scale-1,1 =X[scale-1:S:scale,1:S:scale] Similarly, f scale-1,2 ,..., f scale-1,scale-1 =X[scale-1:S:scale,scale-1:S:scacle] For the Conv module, it consists of a convolutional layer with a step size of 1, which only changes the number of channels of the feature map and changes the number of output channels to C2 = scale 2 ×C1; Input feature map f 0,0 ,f 1,0 ,f 0,1 ,f 1,1 , its size is (S / scale)×(S / scale)×C1. The SPD layer concatenates all sub-images along the channel, and then adds a convolutional layer Conv with a channel number and a step size of 1. Finally, the module size is (S / scale)×(S / scale)×C2.

4. The pedestrian and vehicle detection method based on improved YOLOv10 according to claim 1, characterized in that: In step 2.2, the LSKA module is integrated into the spatial pyramid pooling layer SPPF to construct a focused spatial pyramid pooling module ASPPF, and the construction process is as follows: First, perform maximum pooling operations of different scales on the input feature map. The pooling operation at each scale produces an output of a fixed size. The pooling results at different scales are spliced ​​together along the channel dimension to form a high-dimensional feature map. This high-dimensional feature map includes information at different scales. Then, the concatenated feature map is input into an 11×11 LSKA module, which uses large-size separable convolution to capture long-range feature dependencies, thereby extracting features in a wider receptive field; Finally, the feature maps output by the LSKA module are integrated through a common convolutional layer to adjust the dimension of the feature maps to make them suitable for subsequent detection tasks.

5. The pedestrian and vehicle detection method based on improved YOLOv10 according to claim 1, characterized in that: In step 2.3, a global grouping coordinate attention module GGCA is designed and fused into the Neck layer. The design process is represented by the following formula: First, the input feature map is represented as X∈R B×C×H×W According to the number of channels, they are divided into G groups, each group contains channels, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively, and the grouped feature map is expressed as: Then, the grouped feature map X g Perform global average pooling and global maximum pooling operations in the height direction and width direction respectively, and obtain two vectors: Pooling results in height direction: Pooling results in width direction: Among them, GAP h and GMP h Respectively represent the global average pooling and global maximum pooling along the height direction; GAP w and GMP w Represents global average pooling and global maximum pooling along the width direction; the semicolon (;) represents the concatenation operation of the vector; To obtain and A shared convolutional layer is applied to further extract features. The convolutional layer includes two 1×1 convolutional layers, a batch normalization layer BN and a ReLU activation function. Let the output after convolutional layer processing be and By taking the output of the convolutional layer and Add them together and pass the Sigmoid activation function to generate the attention weights in the height and width directions: Attention weight in height direction: Attention weight in width direction: Among them, σ represents the Sigmoid activation function, which is used to convert the output into a value between 0 and 1 as the attention weight; Finally, we convert the original input feature map X into the attention weights calculated above. and After weighting, the final output feature map Y is obtained.

6. The pedestrian and vehicle detection method based on improved YOLOv10 according to claim 1, characterized in that: The WIou loss function implementation formula is as follows: First, calculate the IoU between the predicted box p and the true box t. Where Area represents the area; Then, a -log function is used to amplify the impact of low IoU values: L WIOUv1 (p, t) = -log(IoU(p, t)), where L represents the loss function Loss; Finally, the parameter γ is introduced on the basis of WIOUv1 to obtain WIOU: L WIOU (p,t)=(1-IoU(p,t)) γ ·L WIOUv1(p,t) , where γ is used to dynamically adjust the loss contribution of samples of different qualities, and WIOU fully considers the outlier degree of samples in the implementation process.

7. A pedestrian and vehicle detection method based on improved YOLOv10 according to any one of claims 1 to 6, characterized in that: The specific training parameters of step 3 are set to 200 iterations, the image size is uniformly adjusted to 640×640 pixels, the initial learning rate is set to 0.01, the minimum learning rate is set to 0.001, and bitch_size is set to 16.

Citation Information

Cited By

  • Deep learning-based disordered material identification method and device, electronic equipment and program product

    CN121415262A

  • Deep learning-based methods, devices, electronic equipment, and software products for identifying randomly piled materials.

    CN121415262B

  • Personnel test standardized detection and autonomous alarm system and method

    CN122113016A

  • A system and method for standardized detection and autonomous alerting of personnel testing

    CN122113016B

  • Belt conveyor coal flow foreign matter identification method and device based on hanging rail type inspection robot

    CN122416394A