An occluded pedestrian detection method based on low-parameter attention mechanism
Through the low-parameter attention module based on the strip receptive field and coordinate attention mechanism, the problem of low pedestrian detection accuracy in occluded scenes is solved, and efficient pedestrian detection effect is achieved.
Patent Information
- Application Number
- CN202211501857.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-11-28
AI Technical Summary
Existing pedestrian detection networks have low detection accuracy in occluded scenes and have difficulty effectively distinguishing pedestrians from the background. In addition, existing methods fail to effectively solve the background interference problem caused by the square receptive field.
A low-parameter attention module based on strip receptive field is designed. Through multi-branch parallel convolution and coordinate attention mechanism, redundant background information is filtered out, pedestrian-related areas are highlighted, and detection accuracy is improved.
It significantly improves pedestrian detection accuracy in occlusion conditions, reduces background interference, and does not increase network complexity, with good independence and portability.
Smart Images

Figure CN115761810B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, specifically to the field of pedestrian detection in computer vision, and more particularly to a method for detecting occluded pedestrians based on a low-parameter attention mechanism. Background Art
[0002] Pedestrian detection plays a vital role in fields such as autonomous driving and intelligent transportation. Conventional pedestrian detection networks can already meet the needs of most scenarios. However, complex scenarios such as street crossings, inclement weather, and dense crowds pose significant challenges to pedestrian detection. Maintaining high-accuracy detection in these complex scenarios, thereby mitigating safety risks, remains a hot topic in the field.
[0003] Occlusion is the most common complex scenario in pedestrian detection, primarily consisting of inter-class occlusion and intra-class occlusion. Inter-class occlusion refers to pedestrians being blocked by other objects, such as vehicles and trees, while intra-class occlusion refers to mutual occlusion caused by the clustering of pedestrians. Both types of occlusion introduce a significant amount of interference into the pedestrian detection network, leading to a sharp drop in detection accuracy. Currently, there are two main approaches to addressing occlusion: 1) Component-based models utilize partially visible parts of pedestrians to assist in detecting invisible regions. For example, JointDet and DoubleAnchor use the head to assist in human detection, generating candidate bounding boxes for the human body and head as a candidate pair. These two features are then fused, and non-maximum suppression is used to discard candidate pairs that do not meet the requirements. This reduces false positives in head detection and improves human detection performance. In 2018, Zhang et al. proposed introducing an attention mechanism into component detectors to enhance the network's ability to focus on visible regions, enabling better detection of occluded pedestrians. In 2020, Wu et al. proposed using temporal information to assist in occluded pedestrian detection, iteratively searching for unoccluded or less occluded targets along the time axis to provide more reference information for occluded pedestrian detection in the current frame; 2) Based on the loss function, a specially designed loss function is used to enable the detection box to better distinguish occlusion situations. This type of method is generally suitable for two-stage detection networks such as Fast R-CNN, and the detection speed is relatively slow. In 2018, Replusion Loss proposed that for the same detection target, only one detection box with the highest confidence score is retained. In order to prevent the true boxes of neighboring targets from being mistakenly filtered out, Replusion Loss requires the predicted box to be close to the true pedestrian target while also being away from other true boxes next to the target. The above methods mainly focus on how to make the model focus on the unobstructed visible pedestrian area, ignoring the background interference information caused by the imbalance between the square receptive field and the inherent aspect ratio of pedestrians in the neural network. This problem is more obvious in the case of occlusion. The size of pedestrians is basically fixed and appears as a strip, resulting in most of the standard square receptive field being irrelevant areas. It is more difficult for the network to distinguish between pedestrians and background categories. The detection of occluded pedestrians will be unsatisfactory due to the interference of a large amount of background.
[0004] In response to the above problems, the technical difficulty that the present invention needs to solve is to design a plug-and-play low-parameter attention module based on a strip receptive field and apply it to the pedestrian detection network to improve the network's pedestrian detection accuracy under occlusion without introducing excessive complexity. Summary of the Invention
[0005] To improve the network's ability to detect pedestrians in occluded scenarios, this paper proposes an occluded pedestrian detection method based on a low-parameter attention mechanism. Its core technology lies in a low-parameter attention module based on strip receptive fields (SRF-Attention module). This module focuses on filtering redundant background information and highlighting visible areas. It also exhibits excellent independence and portability, allowing it to be quickly embedded in different pedestrian detection networks, significantly improving pedestrian detection accuracy in occluded scenarios.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] A method for detecting occluded pedestrians based on a low-parameter attention mechanism includes the following steps:
[0008] Step 1: Input the pedestrian image to be detected into the backbone network;
[0009] Step 2: The feature map output in step 1 is fed into the strip receptive field module to filter out redundant background information and highlight the areas related to pedestrians.
[0010] Step 3: The feature map output by the strip receptive field module is fed into the coordinate attention module, and different weights are assigned to each channel;
[0011] Step 4: Feed the feature map output by the coordinate attention module into the detection head to obtain the final detection result.
[0012] Furthermore, the strip receptive field module in step 2 includes four parallel convolution branches. The first branch uses a standard 3x3 square convolution to obtain a 3x3 receptive field. The second branch uses a 3x1 strip convolution to obtain a 3x1 receptive field. The third branch uses a dilated convolution with a dilated rate of (2, 1) and a size of 5x3 to obtain a 5x3 receptive field. The fourth branch combines the second and third branches, and uses the output of the second branch as the input of the third branch to obtain a 7x3 receptive field.
[0013] The specific calculation formula of the receptive field size is as follows:
[0014]
[0015] Among them: RF n Indicates the length or width of the receptive field of the nth layer, k n Indicates the length or width of the n-th layer convolution kernel, d n Indicates the length or width of the convolutional hole rate of the nth layer, s i Indicates the stride of the i-th convolution layer.
[0016] Furthermore, the coordinate attention module in step 3 performs one-dimensional pooling on the horizontal and vertical directions of the input feature map to obtain a feature map with specific direction information. The two obtained feature maps are then fused and sent to the Concat layer, convolution layer, batch normalization layer and activation function in sequence. Subsequently, the attention maps of the input feature map in the horizontal and vertical directions are obtained through two parallel branches containing convolution and HardSwish activation functions, so that the position information is preserved. Finally, the two generated attention maps are multiplied and fused with the original feature map.
[0017] The specific formula for the output in the horizontal direction is as follows:
[0018]
[0019] in: represents the output of the cth channel with a width of w in the horizontal direction, H represents the size of the one-dimensional pooling convolution kernel acting in the horizontal direction is (H, 1), x c (j,w) represents the jth intermediate feature vector of the input of the cth channel with width w in the horizontal direction;
[0020] The specific formula for the output in the vertical direction is as follows:
[0021]
[0022] in: represents the output of the cth channel with a height of h in the vertical direction, W represents the size of the one-dimensional pooling convolution kernel acting in the vertical direction is (1, W), x c (h,i) represents the i-th intermediate feature vector of the input of the c-th channel with height h in the vertical direction;
[0023] The specific formula of the Hard Swish activation function is as follows:
[0024]
[0025] ReLU6(x)=min(6,max(0,x)),
[0026] Among them, ReLU6(x) represents the output of the nonlinear activation function ReLU6.
[0027] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0028] 1. Based on the perspective that standard square convolution will introduce more background information, this invention designs a strip receptive field that is more consistent with the inherent aspect ratio of pedestrians, reduces the interference of irrelevant background information, and adopts a multi-branch parallel structure to extract more feature information. Subsequently, a coordinate attention mechanism is used to assign different weights to each channel feature, allowing the network to focus more on the unobstructed visible area, thereby improving the model's ability to deal with pedestrian occlusion problems.
[0029] 2. The present invention utilizes the characteristic of dilated convolution that it can expand the receptive field without introducing a large number of additional parameters, and uses dilated convolution instead of the larger standard convolution to ensure the lightweight of the attention module based on the strip receptive field. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a structural diagram of the occluded pedestrian detection method based on the low-parameter attention mechanism described in the present invention;
[0031] Figure 2 Schematic diagram of the strip receptive field module described in the present invention;
[0032] Figure 3 Schematic diagram of the dilated convolution described in the present invention;
[0033] Figure 4 Schematic diagram of the coordinate attention module described in the present invention. DETAILED DESCRIPTION
[0034] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0035] Example: Figure 1 As shown, the present invention provides a method for detecting occluded pedestrians based on a low-parameter attention mechanism, and the specific steps are as follows:
[0036] Step 1: Input the pedestrian image to be detected into the backbone network for feature extraction;
[0037] Step 2: Not all the feature information extracted in step 1 is beneficial to pedestrian detection. In most cases, pedestrian targets are strip-shaped, with length greater than width. The square receptive field obtained by standard convolution will undoubtedly contain a large amount of background information, which will interfere with the network's detection. This situation is more serious in the case of occlusion. Therefore, the present invention proposes the following Figure 2The strip receptive field module shown in the figure feeds the feature map output from step 1 into the module. The strip receptive field with a closer aspect ratio to the pedestrian’s inherent aspect ratio is used to filter out redundant background information and highlight areas related to pedestrians. The strip receptive field module contains four parallel convolution branches. The first branch uses a standard 3x3 square convolution to obtain a receptive field size of 3x3; the second branch uses a 3x1 strip convolution to obtain a receptive field size of 3x1; the third branch uses a dilated convolution with a dilated rate of (2, 1) and a size of 3x3, and the receptive field size is 5x3. The dilated convolution is shown in the figure. Figure 3 As shown in the figure, the reason why 3x3 dilated convolution is used here instead of 5x3 ordinary convolution is that dilated convolution can expand the receptive field without introducing a large number of additional parameters, which meets the needs of 5x3 receptive field and ensures the lightweight of the module; the fourth branch is to combine the second and third branches, and use the output of the second branch as the input of the third branch, and the resulting receptive field size is 7x3;
[0038] The specific calculation formula of the receptive field size is as follows:
[0039]
[0040] Among them: RF n Indicates the size of the receptive field of the nth layer, k n Indicates the size of the convolution kernel in the nth layer, d n Indicates the size of the convolutional hole rate of the nth layer, s i Indicates the stride of the i-th convolution layer.
[0041] Step 3: After filtering out irrelevant background through the strip receptive field module, the feature map output from step 2 is fed into Figure 4 The coordinate attention module shown in the figure assigns different weights to each channel, allowing the network to pay more attention to the visible area and filter out interference information caused by occlusion. The coordinate attention module contains two branches, which perform one-dimensional pooling on the horizontal and vertical directions of the input feature map respectively to obtain a feature map with specific direction information. The two obtained feature maps are then fused and sent to the Concat layer, convolution layer, batch normalization layer and activation function in sequence. Subsequently, two parallel branches containing convolution and HardSwish activation functions are used to obtain the attention map of the input feature map in the horizontal and vertical directions, so that the position information is preserved. Finally, the two generated attention maps are multiplied and fused with the original feature map.
[0042] The specific formula for the output in the horizontal direction is as follows:
[0043]
[0044] in: represents the output of the cth channel with a width of w in the horizontal direction, H represents the convolution kernel size acting in the horizontal direction is (H, 1), x c (j,w) represents the jth intermediate feature vector of the input of the cth channel with width w in the horizontal direction;
[0045] The specific formula for the output in the vertical direction is as follows:
[0046]
[0047] in: represents the output of the cth channel with a height of h in the vertical direction, W represents the convolution kernel size acting in the vertical direction is (1, W), x c (h,i) represents the i-th intermediate feature vector of the input of the c-th channel with height h in the vertical direction;
[0048] The specific formula of the Hard Swish activation function is as follows. Compared with the common ReLU6 activation function, the Hard Swish function curve is smoother and can achieve faster inference speed:
[0049]
[0050] ReLU6(x)=min(6,max(0,x))
[0051] Among them, ReLU6(x) represents the output of the nonlinear activation function ReLU6.
[0052] Step 4: Send the feature map output in step 3 to the detection head to obtain the final detection result.
[0053] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Any skilled artisan may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be as set forth in the appended claims.
Claims
1. A method for detecting occluded pedestrians based on a low-parameter attention mechanism, characterized in that: The method comprises the following steps: Step 1: Input the pedestrian image to be detected into the backbone network; Step 2: The feature map output in step 1 is fed into the strip receptive field module to filter out redundant background information and highlight the areas related to pedestrians. Step 3: The feature map output by the strip receptive field module is fed into the coordinate attention module, and different weights are assigned to each channel; Step 4: Send the feature map output by the coordinate attention module to the detection head to obtain the final detection result; Among them, the strip receptive field module in step 2 contains four parallel convolution branches. The first branch uses standard 3x3 square convolution to obtain a 3x3 receptive field. The second branch uses 3x1 strip convolution to obtain a 3x1 receptive field. The third branch uses a dilated convolution with a hole rate of (2, 1) and a size of 5x3 to obtain a 5x3 receptive field. The fourth branch combines the second and third branches, and uses the output of the second branch as the input of the third branch to obtain a 7x3 receptive field. The specific calculation formula of the receptive field size is as follows: Among them: RF n Indicates the length or width of the receptive field of the nth layer, k n Indicates the length or width of the n-th layer convolution kernel, d n Indicates the length or width of the convolutional hole rate of the nth layer, s i Represents the stride of the i-th layer convolution; The coordinate attention module in step 3 performs one-dimensional pooling on the horizontal and vertical directions of the input feature map to obtain a feature map with specific direction information. The two feature maps are then fused and sent to the Concat layer, convolution layer, batch normalization layer and activation function in sequence. Subsequently, the attention maps of the input feature map in the horizontal and vertical directions are obtained through two parallel branches containing convolution and HardSwish activation functions, so that the position information is preserved. Finally, the two generated attention maps are multiplied and fused with the original feature map.
2. The method for detecting pedestrians under occlusion based on a low-parameter attention mechanism according to claim 1, characterized in that: In step 3, the specific formula for horizontal output is as follows: in: represents the output of the cth channel with a width of w in the horizontal direction, H represents the size of the one-dimensional pooling convolution kernel acting in the horizontal direction is (H, 1), x c (j,w) represents the jth intermediate feature vector of the input of the cth channel with width w in the horizontal direction; The specific formula for the output in the vertical direction is as follows: in: represents the output of the cth channel with a height of h in the vertical direction, W represents the size of the one-dimensional pooling convolution kernel acting in the vertical direction is (1, W), x c (h,i) represents the i-th intermediate feature vector of the input of the c-th channel with height h in the vertical direction; The specific formula of the Hard Swish activation function is as follows: ReLU6(x)=min(6,max(0,x)) Among them, ReLU6(x) represents the output of the nonlinear activation function ReLU6.
Citation Information
Patent Citations
Real-time pedestrian detection method and system based on deep learning
CN110728200A
Pedestrian detection method introducing attention mechanism
CN113011308A