Vehicle-borne pedestrian detection method based on feature extraction and aggregation

Scale-sensitive features are extracted through anchor point step size adjustment, multi-parallel branch convolution blocks and context generation networks, and RoIs features are optimized through channel-aware fusion networks, which solves the problems of pedestrian scale changes and information loss in the vehicle environment, significantly improving the vehicle Pedestrian detection accuracy.

CN113989754BInactive Publication Date: 2024-09-24SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110746333.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-01
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing vehicle-mounted pedestrian detection methods have deficiencies in handling scale invariance and loss of feature information, resulting in loss of small-scale pedestrian information and reduced detection accuracy, especially in vehicle-mounted environments, which are difficult to effectively detect.

Method used

The anchor point step size adjustment strategy and multi-parallel branch convolution blocks are used to extract scale-sensitive features, combined with the context generation network to inject spatial resolution information, and the RoIs features are optimized through the channel-aware fusion network to build an efficient feature pyramid to improve detection accuracy.

Benefits of technology

It effectively alleviates the problems of insufficient backbone network sampling and loss of feature information, improves the detection capabilities and detection accuracy of pedestrians at different scales, and significantly improves the accuracy of vehicle-mounted pedestrian detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989754B
    Figure CN113989754B
Patent Text Reader

Abstract

The present invention discloses a vehicle-borne pedestrian detection method based on feature extraction and aggregation. The method comprises the following steps: inputting a single image, using a backbone network to extract the backbone features of the image stage by stage; extracting scale-sensitive features: designing an anchor point step adjustment strategy to achieve adaptive sampling, constructing a multi-parallel branch convolution block to extract multiple scale features of the backbone features, and generating scale-sensitive features with consistent characterization capabilities by element-by-element fusion with the backbone features; constructing a feature pyramid based on context enhancement; using a regional recommendation network to generate RoIs that meet the preset aspect ratio; extracting and optimizing RoIs features; using a detection subnetwork to perform vehicle-borne pedestrian detection based on the optimized RoIs features, and outputting classification confidence and position coordinates. The present invention improves the accuracy of vehicle-borne pedestrian detection by solving the problem of pedestrian scale variation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pedestrian detection, and in particular to a vehicle-mounted pedestrian detection method based on feature extraction and aggregation. Background Art

[0002] Pedestrian detection is one of the research hotspots in computer vision and an important foundation for research topics such as multi-target tracking, human pose estimation, and pedestrian re-identification. In recent years, with the rapid development of deep convolutional neural networks, CNN-based detectors have become the mainstream trend in the field of pedestrian detection. Although the most advanced detection methods have made significant progress on standard pedestrians, the performance of pedestrian detection in vehicle-mounted environments still faces bottlenecks. Unlike general detection scenarios, in vehicle-mounted environments, pedestrians are at different distances. The images captured by the camera usually contain pedestrians with a large scale range, and there are more small-scale pedestrians at long distances, which poses a major challenge to the scale invariance of convolutional neural networks. For autonomous driving applications, the accuracy and reliability of pedestrian detection are crucial. Subtle deviations may lead to serious traffic accidents and endanger personal safety. Designing a suitable vehicle-mounted pedestrian detection method has important practical significance and research value.

[0003] Existing on-board pedestrian detection frameworks generally use feature pyramids (Lin TY, Dollár P, Girshick R, et al. Feature pyramid networks for object detection[C]. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR). 2017: 2117-2125.) to address the challenge of pedestrian scale changes. This method improves the detection accuracy to a certain extent by aggregating features of different resolutions in a top-down manner, but there are the following problems: 1) Insufficient sampling of the backbone network: On the one hand, the large sampling step of the high-level feature map tends to directly skip small-scale pedestrians, resulting in the loss of small-scale pedestrian information in the deep network, causing missed detection; on the other hand, the most appropriate receptive field of the detection network is closely related to the object scale (Li Y, Chen Y, Wang N, et al. Scale-aware trident networks for object detection [C]. Proceedings of the IEEE / CVF International Conference on Computer Vision (ICCV). 2019: 6054-6063.), while most methods set the receptive field to a fixed value and lack the ability to adapt to pedestrians of different scales. These two factors lead to insufficient sampling of the backbone network, affecting the performance of the feature pyramid in the subsequent stages of the model; 2) The high-level features of the feature pyramid face information loss: During the feature aggregation process, channel normalization operations will lead to the loss of high-level feature semantic information, which is not conducive to the supplement of low-level feature semantic information; 3) In the RoIs feature extraction stage, the traditional allocation strategy of the pooling feature layer based on the RoIs size specification cannot obtain high-quality RoI features, especially in scenes with more small-scale pedestrians. This heuristic strategy has a greater impact and seriously restricts the detection accuracy. Summary of the invention

[0004] In view of the above three problems, the present invention proposes a vehicle-mounted pedestrian detection method based on feature extraction and aggregation, aiming to solve the problem that the scale change of pedestrians in the vehicle-mounted environment limits the performance of the detector. First, the problem of insufficient sampling of the backbone network is solved by combining the anchor point step adjustment strategy and the multi-parallel branch convolution block: the former captures more small-scale pedestrian information by flexibly controlling the sampling step, and the latter uses multiple convolution kernels of different sizes and dilated convolution at the tail to effectively model pedestrians of different scales and generate scale-sensitive features with consistent characterization capabilities. The two work together to improve the sampling quality while ensuring low computational overhead; secondly, a context generation network is designed to inject context information of different spatial resolutions into scale-sensitive features, alleviate the loss of high-level feature information, and construct an efficient feature pyramid; finally, in order to avoid relying on the heuristic allocation strategy in RoIs feature extraction, the generated RoIs that meet the preset aspect ratio are mapped to all levels of the feature pyramid, and the RoIs features of fixed dimensions are extracted, and the channel-aware fusion network is used to reorganize the RoIs features to improve the quality of RoIs features. The whole process can achieve end-to-end training.

[0005] The purpose of the present invention is achieved by at least one of the following technical solutions.

[0006] The vehicle-mounted pedestrian detection method based on feature extraction and aggregation includes the following steps:

[0007] S1, input a single image and use the backbone network to extract the backbone features of the image stage by stage;

[0008] S2. Extract scale-sensitive features: Design an anchor point step adjustment strategy to achieve adaptive sampling, construct multi-parallel branch convolution blocks to extract multiple scale features of the backbone features, and generate scale-sensitive features with consistent representation capabilities by element-by-element fusion with the backbone features;

[0009] S3. Construct a feature pyramid based on context enhancement: extract context features of different spatial resolutions, aggregate context features using a spatially aware fusion network, inject context information into scale-sensitive features, alleviate information loss caused by channel unification, and construct an efficient feature pyramid;

[0010] S4, use the region proposal network to generate RoIs that meet the preset aspect ratio;

[0011] S5. Extract and optimize RoI features: Map RoIs to the feature pyramid layer to extract RoI features of fixed dimensions, use the channel-aware fusion network to reorganize RoI features, and improve the quality of RoI features;

[0012] S6. Based on the optimized RoIs features, the detection subnetwork is used to perform vehicle-mounted pedestrian detection and output classification confidence and location coordinates.

[0013] Furthermore, in step S1, the backbone network is used to extract the backbone features of the image stage by stage, as follows:

[0014] φ i =f i (φ i-1 ) = f i (f i-1 (...f2(f1(I)))), i∈[1,5]; (1)

[0015] Where I represents the input image; f i (·) represents the i-th stage network of the backbone network. The backbone network includes a set of stacked convolutional layers, pooling layers, and activation function layers. The backbone network is divided into five stages. The stage division rule is that the network layers that generate feature maps of the same size belong to the same stage. i is the i-th stage feature, which represents the feature map of the i-th stage network output; the i-th stage feature φ i is a feature representation with three dimensions, namely (C i ,H i ,W i ), C i , H i and W i They respectively represent the number of channels, height and width of the i-th stage network; the backbone features include the stage features output by the 5-stage network, that is, Φ = {φ1, φ2, φ3, φ4, φ5}, where Φ represents the backbone feature; to save memory, the first stage feature φ1 is ignored in all subsequent processing.

[0016] Further, in step S2, the anchor point step adjustment strategy is designed to achieve adaptive sampling, as follows:

[0017]

[0018] Among them, the anchor point step size is defined as the reduction factor of the current feature map relative to the original image; represents the bilinear interpolation operation; S4 and S5 are the anchor point steps of the 4th stage feature φ4 and the 5th stage feature φ5 of the backbone network respectively; S represents the ideal step size; and They represent the features obtained by performing bilinear interpolation operations on the 4th stage feature φ4 and the 5th stage feature φ5 using S4 / S and S5 / S as interpolation scaling factors, respectively.

[0019] Furthermore, in step S2, the constructed multi-parallel branch convolution block includes n output branches, each of which is responsible for extracting the feature obtained by performing a bilinear interpolation operation on the fourth stage feature φ4 with S4 / S as the interpolation scaling factor The feature of a scale, the algorithm for extracting multiple scale features is as follows:

[0020]

[0021] in, Represents a multi-parallel branch convolution block; The feature obtained by bilinear interpolation of the fourth stage feature φ4 with S4 / S as the interpolation scaling factor, and its anchor point step size is flexibly adjusted; Feed into multiple parallel branch convolution blocks Get multi-scale features Respectively represent the different scale features extracted by the first output branch, the second output branch, and the nth output branch;

[0022] The construction of multi-parallel branch convolution blocks is as follows:

[0023] Each output branch consists of a standard convolution layer with different convolution kernel sizes and a dilated convolution layer with different dilation rates. Multi-scale features are generated by establishing a positive linear relationship between different convolution kernels and dilation rates, that is, the dilation rate of the dilated convolution equipped with a large convolution kernel is larger than that of the small convolution kernel. At the same time, the relationship between the dilation coefficients of multiple output branches is constrained. The algorithm is as follows:

[0024] D(r1,r2,…,r n )=1; (4)

[0025] where [r1,r2,...r n ] represents an ascending combination of n branch expansion coefficients, r n represents the expansion coefficient of the nth branch; D(·) represents the greatest common divisor of the n expansion coefficients.

[0026] Further, in step S2, the scale-sensitive features with consistent characterization capability are generated by element-by-element fusion with the backbone features, as follows:

[0027] Multi-scale features The feature obtained by bilinear interpolation of the fifth stage feature φ5 with S5 / S as the interpolation scaling factor Element-by-element fusion is performed to obtain the fused feature φ′4; bilinear interpolation is performed on the fused feature φ′4 to make its size consistent with the fifth stage feature φ5 of the backbone network; the two fused features φ′4 of the same size and the fifth stage feature φ5 of the backbone network are fused element-by-element to generate a scale-sensitive feature φ′5 with consistent representation capabilities, as follows:

[0028]

[0029] Among them, φ′5 represents the scale-sensitive feature; O e (·) indicates element-by-element fusion operation; Represents a bilinear interpolation operation.

[0030] Further, step S3 includes the following steps:

[0031] S3.1. Based on the scale-sensitive feature φ′5, a constant-scale adaptive average pooling layer is used to generate context features of multiple spatial resolutions. A set of parameters is set to constrain the ratio of the output feature map relative to the input feature map, as follows:

[0032] Ψ c ={λ1×R,λ2×R,…λ N ×R}; (6)

[0033] Among them, c Represents N context features of different resolutions; {λ1,…,λ N} is a set of constant ratio hyperparameters, λ N represents the ratio of the Nth context feature to the scale-sensitive feature φ′5; R=h×w represents the resolution of the scale-sensitive feature φ′5, where h and w are the height and width of the scale-sensitive feature φ′5, respectively;

[0034] S3.2, N context features of different resolutions Ψ c Each context feature in is input into a convolution layer with a convolution kernel size of 1×1 for channel normalization. The resolution of the channel-normalized context feature is expanded to R using a bilinear interpolation operation, expressed as C×h×w.

[0035] S3.3, use the spatial perception fusion network to aggregate context features. The specific algorithm is as follows:

[0036] The N context features after resolution expansion are concatenated according to the channel dimension to form a first feature map with N times the number of channels. The number of channels, height and width of the first feature map are NC, h and w respectively; the first feature map is sent to a convolution layer with a convolution kernel size of 1×1 to reduce its number of channels to C again; the first feature map with the number of channels reduced to C is input into a convolution layer with a convolution kernel size of 3×3 and a dimension expansion function to generate a corresponding weight feature map for the N context features after resolution expansion, which is expressed as N×(1×h×w); the N context features after resolution expansion are element-wise multiplied with the corresponding weight feature map to obtain N weighted context features; the N weighted context features are fused element-wise to generate the aggregated context feature m6;

[0037] S3.4, inject context information of different spatial resolutions into the scale-sensitive feature φ′5 to alleviate the information loss caused by channel unification, as follows:

[0038] The set Φ consisting of the second stage feature φ2, the third stage feature φ3, the fourth stage feature φ4 and the scale-sensitive feature φ′5 of the backbone network scale ={φ2,φ3,φ4,φ′5} input 1×1 convolution layer for channel normalization to keep the number of channels in each feature layer consistent, and obtain the output feature map M, where M = {m2,m3,m4,m5}, m2,m3,m4,m5 correspond to the features after φ2,φ3,φ3,φ′5 channel normalization respectively; the aggregated context feature m6 is fused element by element with the high-level feature m5, effectively alleviating the information loss of the high-level feature m5;

[0039] S3.5, gradually merge high-level features with low-level features in a top-down manner (Lin TY, Dollár P, Girshick R, et al. Feature pyramid networks for object detection [C]. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2017: 2117-2125.), and propagate feature information layer by layer. The specific algorithm is as follows:

[0040]

[0041] Among them, α is the weight parameter value of the convolution kernel with a convolution kernel size of 3×3; represents the upsampling operation; p represents the number of backbone network stages; m L Represents the L-th stage feature φ of the backbone network L Features obtained by channel normalization; Represents the L-th layer feature of the feature pyramid, and the entire feature pyramid is represented as

[0042] Furthermore, in step S4, the strategy of the region recommendation network to generate RoIs is to set the aspect ratio of the preset anchor box to {1:1, 1.5:1, 2:1, 2.5:1, 3:1} to fit the proportion of pedestrians.

[0043] Further, step S5 includes the following steps:

[0044] S5.1, map RoIs to all feature layers of the feature pyramid and perform RoI pooling to obtain RoI features of multiple fixed dimensions;

[0045] S5.2. Use the channel-aware fusion network to generate channel weights for each channel in each RoI feature; reorganize the RoIs features based on the channel weights; sequentially add multiple RoIs features weighted by the channel weights to achieve RoI-by-RoI fusion and obtain optimized RoIs features.

[0046] Furthermore, in step S5.1, the RoIs pooling algorithm is as follows:

[0047] Map the RoIs coordinate vector to the feature map and calculate the floating point coordinates of RoIs relative to the feature map; the fixed-dimensional RoIs feature is represented as C r ×k×k; divide each RoI into k sub-regions; divide each sub-region into four sampling sub-regions; use bilinear interpolation to calculate the pixel at the center of the sampling sub-region to obtain the pixels of the four sampling points; take the maximum value or average value of the pixels of the four sampling points to obtain the pixel value representing the sub-region.

[0048] Furthermore, in step S5.2, the channel-aware fusion network (Hu J, Shen L, Sun G. Squeeze-and-excitation networks[C]. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR). 2018: 7132-7141.) includes two consecutive 1×1 convolutional layers; the first 1×1 convolutional layer compresses the RoIs feature channel to 1 / 16 of the original number of channels; the second 1×1 convolutional layer restores the RoIs feature channel to the original number of channels.

[0049] Compared with the prior art, the present invention has the following advantages and technical effects:

[0050] 1) The present invention simultaneously considers the influence of fixed sampling step size and fixed receptive field on sampling quality, combines flexible sampling step size adjustment strategy and multi-parallel branch convolution blocks to extract scale-sensitive features, and can achieve sufficient sampling of pedestrian targets of different scales.

[0051] 2) The present invention uses a constant-scale adaptive average pooling layer to generate contextual features of multiple spatial resolutions, aggregates the contextual features based on a spatial-aware fusion method, and effectively alleviates the loss of semantic information of high-level features by injecting the aggregated contextual features into scale-sensitive features.

[0052] 3) The present invention proposes a RoI feature reorganization method to optimize RoI features and avoid relying on heuristic allocation strategies in RoI feature extraction. The channel-aware fusion network is used to guide the RoI feature reorganization, fully absorbing the effective information of each feature pyramid layer, which is beneficial to the subsequent classification and regression tasks of the pedestrian detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 Flowchart of a vehicle-mounted pedestrian detection method based on feature extraction and aggregation in an embodiment of the present invention;

[0054] Figure 2a , Figure 2b They are respectively a schematic diagram of extracting scale-sensitive features in an embodiment of the present invention and a network structure diagram of a multi-parallel branch convolution block;

[0055] Figure 3a , Figure 3b A schematic diagram of context feature generation and a spatial perception fusion network structure diagram in an embodiment of the present invention;

[0056] Figure 4 This is a network structure diagram for extracting and optimizing RoIs features in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the various embodiments of the present invention as defined by the claims and their equivalents. It includes various specific details to assist in understanding, but these are considered to be merely exemplary. Therefore, it will be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the various embodiments described herein without departing from the scope and spirit of the present invention. In addition, descriptions of well-known functions and structures may be omitted for clarity and conciseness.

[0058] The terms and words used in the following description and claims are not limited to the written meanings, but are used only by the inventor to enable a clear and consistent understanding of the present disclosure. Therefore, it should be clear to those skilled in the art that the following description of various embodiments of the present disclosure is provided for illustrative purposes only and is not intended to limit the present disclosure as defined by the appended claims and their equivalents.

[0059] The following is a further detailed description of the specific implementation of the present invention in conjunction with the embodiments. It should be noted that the following is only for example, and any symbols and processes not specifically described can be implemented by those skilled in the art with reference to the prior art.

[0060] Example:

[0061] Vehicle-mounted pedestrian detection methods based on feature extraction and aggregation, such as Figure 1 As shown, the following steps are included:

[0062] S1, input a single image and use the backbone network to extract the backbone features of the image stage by stage;

[0063] The backbone network is used to extract the backbone features of the image stage by stage, as follows:

[0064] φ i =f i (φ i-1 ) = f i (f i-1 (...f2(f1(I)))), i∈[1,5]; (1)

[0065] Where I represents the input image; f i (·) represents the i-th stage network of the backbone network. The backbone network includes a set of stacked convolutional layers, pooling layers, and activation function layers. The backbone network is divided into five stages. The stage division rule is that the network layers that generate feature maps of the same size belong to the same stage. i is the i-th stage feature, which represents the feature map of the i-th stage network output; the i-th stage feature φ i is a feature representation with three dimensions, namely (C i ,H i ,W i ), C i , H i and W i They respectively represent the number of channels, height and width of the i-th stage network; the backbone features include the stage features output by the 5-stage network, that is, Φ = {φ1, φ2, φ3, φ4, φ5}, where Φ represents the backbone feature; to save memory, the first stage feature φ1 is ignored in all subsequent processing.

[0066] In this embodiment, the input image is uniformly scaled to 1024×2048 pixels, ResNet-50 is used as the backbone network, and the sizes of the five stage features φ1~φ5 extracted from the backbone network are 512×1024, 256×512, 128×256, 64×128, and 32×64 pixels, respectively.

[0067] S2, such as Figure 2a As shown in the figure, scale-sensitive features are extracted: an anchor point step adjustment strategy is designed to achieve adaptive sampling, and multiple parallel branch convolution blocks are constructed to extract multiple scale features of the backbone features. Scale-sensitive features with consistent representation capabilities are generated by element-by-element fusion with the backbone features.

[0068] The anchor point step adjustment strategy is designed to achieve adaptive sampling, as follows:

[0069]

[0070] Among them, the anchor point step size is defined as the reduction factor of the current feature map relative to the original image; represents the bilinear interpolation operation; S4 and S5 are the anchor point steps of the 4th stage feature φ4 and the 5th stage feature φ5 of the backbone network respectively; S represents the ideal step size; and They represent the features obtained by performing bilinear interpolation operations on the 4th stage feature φ4 and the 5th stage feature φ5 using S4 / S and S5 / S as interpolation scaling factors, respectively.

[0071] In this embodiment, the anchor point step sizes of the backbone features are {2 1 ,2 2 ,2 3 ,2 4 ,2 5}, in formula (2), S4=16, S5=32, the value of S is related to the distribution of small-scale pedestrians in the pedestrian dataset, which is obtained by experimental exploration, and the default setting is S=18.

[0072] The constructed multi-parallel branch convolution block includes n output branches. In this embodiment, n=4. Each output branch is responsible for extracting the feature obtained by performing a bilinear interpolation operation on the fourth stage feature φ4 with S4 / S as the interpolation scaling factor. The feature of a scale, the algorithm for extracting multiple scale features is as follows:

[0073]

[0074] in, Represents a multi-parallel branch convolution block; The feature obtained by bilinear interpolation of the fourth stage feature φ4 with S4 / S as the interpolation scaling factor, and its anchor point step size is flexibly adjusted; Feed into multiple parallel branch convolution blocks Get multi-scale features Respectively represent the different scale features extracted by the first output branch, the second output branch, and the nth output branch;

[0075] like Figure 2b As shown in Figure 2, the construction of the multi-parallel branch convolution block is as follows:

[0076] Each output branch consists of a standard convolution layer with different convolution kernel sizes and a dilated convolution layer with different dilation rates. Multi-scale features are generated by establishing a positive linear relationship between different convolution kernels and dilation rates, that is, the dilation rate of the dilated convolution equipped with a large convolution kernel is larger than that of the small convolution kernel. At the same time, the relationship between the dilation coefficients of multiple output branches is constrained. The algorithm is as follows:

[0077] D(r1,r2,…,rn )=1; (4)

[0078] where [r1,r2,...r n ] represents an ascending combination of n branch expansion coefficients, r n represents the expansion coefficient of the nth branch; D(·) represents the greatest common divisor of the n expansion coefficients.

[0079] In this embodiment, the specific parameters of the multi-parallel branch convolution block are: the convolution kernel is [1×1, 3×3, 5×5, 7×7], the expansion rate is [1, 3, 6, 10], the number of channels is 1024, and finally 4 scale features are obtained; in the specific implementation, the 5×5 and 7×7 convolutions are decomposed into two and three consecutive 3×3 convolutions to improve the calculation speed.

[0080] The scale-sensitive features with consistent representation capabilities are generated by element-by-element fusion with the backbone features, as follows:

[0081] Multi-scale features The feature obtained by bilinear interpolation of the fifth stage feature φ5 with S5 / S as the interpolation scaling factor Element-by-element fusion is performed to obtain the fused feature φ′4; bilinear interpolation is performed on the fused feature φ′4 to make its size consistent with the fifth stage feature φ5 of the backbone network; the two fused features φ′4 of the same size and the fifth stage feature φ5 of the backbone network are fused element-by-element to generate a scale-sensitive feature φ′5 with consistent representation capabilities, as follows:

[0082]

[0083] Among them, φ′5 represents the scale-sensitive feature; O e (·) indicates element-by-element fusion operation; Represents a bilinear interpolation operation.

[0084] In this embodiment, the dimension of φ′5 is expressed as 2048×32×64.

[0085] S3. Construct a feature pyramid based on context enhancement: extract context features of different spatial resolutions, aggregate context features using a spatially aware fusion network, inject context information into scale-sensitive features, alleviate information loss caused by channel unification, and construct an efficient feature pyramid, including the following steps:

[0086] S3.1, if Figure 3a As shown in Figure 1, a scale-sensitive feature φ′5 is used to generate context features of multiple spatial resolutions using a constant-scale adaptive average pooling layer. A set of parameters is set to constrain the ratio of the output feature map relative to the input feature map, as follows:

[0087] Ψc ={λ1×R,λ2×R,…λ N ×R}; (6)

[0088] Among them, c Represents N context features of different resolutions; {λ1,…,λ N} is a set of constant ratio hyperparameters, λ N represents the ratio of the Nth context feature to the scale-sensitive feature φ′5; R=h×w represents the resolution of the scale-sensitive feature φ′5, where h and w are the height and width of the scale-sensitive feature φ′5, respectively;

[0089] In this embodiment, N=3, the constant ratio is set to {λ1=0.1, λ2=0.2, λ3=0.3}, R=32×64, and the number of context feature channels is 2048.

[0090] S3.2, N context features of different resolutions Ψ c Each context feature in is input into a convolution layer with a convolution kernel size of 1×1 for channel normalization; the resolution of the context feature after channel normalization is expanded to R using a bilinear interpolation operation, expressed as C×h×w; in this embodiment, the number of channels C=256;

[0091] S3.3, if Figure 3b As shown in Figure 1, a spatial-aware fusion network is used to aggregate context features. The specific algorithm is as follows:

[0092] The N context features after resolution expansion are spliced ​​according to the channel dimension to form a first feature map with a channel number that is N times the original number. The number of channels, height and width of the first feature map are NC, h and w respectively; the first feature map is sent to a convolution layer with a convolution kernel size of 1×1, and its channel number is reduced to C again; the first feature map with the channel number reduced to C is input into a convolution layer with a convolution kernel size of 3×3 and a dimension expansion function to generate a corresponding weight feature map for the N context features after resolution expansion, which is expressed as N×(1×h×w); the N context features after resolution expansion are element-wise multiplied with the corresponding weight feature map to obtain N weighted context features; the N weighted context features are fused element-by-element to generate an aggregated context feature m6. In this embodiment, the dimension of m6 is expressed as 256×32×64;

[0093] S3.4, inject context information of different spatial resolutions into the scale-sensitive feature φ′5 to alleviate the information loss caused by channel unification, as follows:

[0094] The set Φ consisting of the second stage feature φ2, the third stage feature φ3, the fourth stage feature φ4 and the scale-sensitive feature φ′5 of the backbone network scale={φ2,φ3,φ4,φ′5} input 1×1 convolution layer for channel normalization to keep the number of channels in each feature layer consistent, and obtain the output feature map M, where M={m2,m3,m4,m5}, m2,m3,m4,m5 correspond to the features after φ2,φ3,φ3,φ′5 channel normalization respectively; the aggregated context feature m6 is fused element by element with the high-level feature m5 to effectively alleviate the information loss of the high-level feature m5. In this embodiment, the number of channels obtained after channel normalization is 256;

[0095] S3.5, gradually merge high-level features with low-level features in a top-down manner (Lin TY, Dollár P, Girshick R, et al. Feature pyramid networks for object detection [C]. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2017: 2117-2125.), and propagate feature information layer by layer. The specific algorithm is as follows:

[0096]

[0097] Among them, α is the weight parameter value of the convolution kernel with a convolution kernel size of 3×3; represents the upsampling operation; p represents the number of backbone network stages; m L Represents the L-th stage feature φ of the backbone network L Features obtained by channel normalization; Represents the L-th layer feature of the feature pyramid, and the entire feature pyramid is represented as

[0098] S4, use the region proposal network to generate RoIs that meet the preset aspect ratio;

[0099] The strategy of the region recommendation network to generate RoIs is to set the aspect ratio of the preset anchor box to {1∶1, 1.5∶1, 2∶1, 2.5∶1, 3∶1} to fit the proportion of pedestrians.

[0100] In this embodiment, the feature pyramid The layers are processed in size {32 2 ,64 2 ,128 2 ,256 2}RoIs in the high-level feature pyramid The maximum pooling with a step size of 2 is used to obtain φ6, whose dimension is 256×16×32, which is responsible for processing the size of 512 2RoIs.

[0101] S5, such as Figure 4 As shown, extract and optimize RoIs features: map RoIs to the feature pyramid layer to extract RoIs features of fixed dimensions, use the channel-aware fusion network to reorganize RoIs features, and improve the quality of RoIs features, including the following steps:

[0102] S5.1, map RoIs to all feature layers of the feature pyramid and perform RoI pooling to obtain RoI features of multiple fixed dimensions;

[0103] The RoIs pooling algorithm is as follows:

[0104] Map the RoIs coordinate vector to the feature map and calculate the floating point coordinates of RoIs relative to the feature map; the fixed-dimensional RoIs feature is represented as C r ×k×k; divide each RoI into k sub-regions; divide each sub-region into four sampling sub-regions; use bilinear interpolation to calculate the pixel at the center of the sampling sub-region to obtain the pixels of the four sampling points; take the maximum value or average value of the pixels of the four sampling points to obtain the pixel value representing the sub-region;

[0105] In this embodiment, C r =512, k=7, map each RoIs to 4 feature pyramid layers: Four RoIs features are obtained, and their dimensions are represented as 512×7×7.

[0106] S5.2. Use a channel-aware fusion network to generate channel weights for each channel in each RoI feature; reorganize RoI features based on the channel weights; sequentially add multiple RoI features weighted by channel weights to achieve RoI-by-RoI fusion and obtain optimized RoI features;

[0107] The channel-aware fusion network (Hu J, Shen L, Sun G. Squeeze-and-excitation networks [C]. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2018: 7132-7141.) includes two consecutive 1×1 convolutional layers; the first 1×1 convolutional layer compresses the RoIs feature channel to 1 / 16 of the original number of channels; the second 1×1 convolutional layer restores the RoIs feature channel to the original number of channels. In this embodiment, the original number of channels is 512.

[0108] S6. Based on the optimized RoIs features, the detection subnetwork is used to perform vehicle-mounted pedestrian detection and output classification confidence and location coordinates.

[0109] This example is trained and validated on the CityPersons dataset. Four GPUs are used for training and testing. During the training phase, the model is trained for 12 epochs and the initial learning rate is set to 1×10 -2 , and decays to 1×10 after 8 epochs with a factor of 10 -3 , applied to the remaining 4 epochs, setting the mini-batch to 1 image per GPU; in the inference phase, the input image size is unified to 1024×2048. This example uses the general evaluation index MR for pedestrian detection -2 (log-average miss rate) to evaluate model performance.

[0110] Table 1 shows the ablation experiment results of adding three solutions to the baseline method Faster R-CNN: extracting scale-sensitive features, building a feature pyramid based on context enhancement, and extracting and optimizing RoIs features. -2 The results are analyzed. Reasonable is a widely used evaluation subset, which indicates pedestrians with visibility greater than 65% and height greater than 50 pixels. Method I represents the detection results of Faster R-CNN. Methods II, III, and IV represent the experimental results of adding only one improvement scheme to Faster R-CNN, among which method II adds a scale-sensitive feature extraction scheme, method III adds a context-enhanced feature pyramid scheme, and method III adds a RoIs feature extraction and optimization scheme. The results are improved by 1.6%, 1.9%, and 1.5% respectively compared with the baseline method. Further, any two of the above three schemes are combined, as shown in methods V, VI, and VII in Table 1. Compared with the baseline method, the combined method improves MR by 1.6%, 1.9%, and 1.5%, respectively. -2 The reduction was 2.4%, 2.2%, and 2.3%, which is more than the gain brought by a single solution, indicating that these solutions are complementary. Method VIII represents the method proposed by the present invention, which builds a vehicle-mounted pedestrian detection model by adding three solutions on the basis of Faster R-CNN and obtains 11.9% MR -2 , which is 3.7% better than the baseline method. Experiments show that the present invention can effectively solve the problem of pedestrian scale variation and significantly improve the accuracy of vehicle-mounted pedestrian detection.

[0111] Table 1 Ablation test results of three schemes on CityPersons validation set

[0112]

[0113] The above content is a detailed description of the present invention in combination with specific implementation methods, but it cannot be determined that the specific implementation of the present invention is limited to this content. For ordinary technicians in the technical field to which the present invention belongs, these implementations can also be adjusted, modified, replaced and / or modified without departing from the principle and spirit of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A vehicle-mounted pedestrian detection method based on feature extraction and aggregation, characterized in that: The following steps are involved: S1, input a single image and use the backbone network to extract the backbone features of the image stage by stage; S2. Extract scale-sensitive features: Design an anchor point step adjustment strategy to achieve adaptive sampling, construct multi-parallel branch convolution blocks to extract multiple scale features of the backbone features, and generate scale-sensitive features with consistent representation capabilities by element-by-element fusion with the backbone features; S3. Construct a feature pyramid based on context enhancement: extract context features of different spatial resolutions, aggregate context features using a spatially aware fusion network, inject context information into scale-sensitive features, alleviate information loss caused by channel unification, and construct an efficient feature pyramid, including the following steps: S3.

1. Based on the scale-sensitive feature φ'5, a constant-scale adaptive average pooling layer is used to generate context features of multiple spatial resolutions. A set of parameters is set to constrain the ratio of the output feature map relative to the input feature map, as follows: P c ={λ1×R,λ2×R,…λ N ×R}; (6) Among them, c Represents N context features of different resolutions; {λ1,…,λ N } is a set of constant ratio hyperparameters, λ N represents the ratio of the Nth context feature to the scale-sensitive feature φ'5; R = h × w represents the resolution of the scale-sensitive feature φ'5, where h and w are the height and width of the scale-sensitive feature φ'5, respectively; S3.2, N context features of different resolutions Ψ c Each context feature in is input into a convolution layer with a convolution kernel size of 1×1 for channel normalization. The resolution of the channel-normalized context feature is expanded to R using a bilinear interpolation operation, expressed as C×h×w. S3.3, use the spatial perception fusion network to aggregate context features. The specific algorithm is as follows: The N context features after resolution expansion are concatenated according to the channel dimension to form a first feature map with N times the number of channels. The number of channels, height and width of the first feature map are NC, h and w respectively; the first feature map is sent to a convolution layer with a convolution kernel size of 1×1 to reduce its number of channels to C again; the first feature map with the number of channels reduced to C is input into a convolution layer with a convolution kernel size of 3×3 and a dimension expansion function to generate a corresponding weight feature map for the N context features after resolution expansion, which is expressed as N×(1×h×w); the N context features after resolution expansion are element-wise multiplied with the corresponding weight feature map to obtain N weighted context features; the N weighted context features are fused element-wise to generate the aggregated context feature m6; S3.4, inject context information of different spatial resolutions into the scale-sensitive feature φ'5 to alleviate the information loss caused by channel unification, as follows: The set Φ consisting of the second stage feature φ2, the third stage feature φ3, the fourth stage feature φ4 and the scale-sensitive feature φ'5 of the backbone network scale ={φ2,φ3,φ4,φ'5} input 1×1 convolution layer for channel normalization to keep the number of channels in each feature layer consistent, and obtain the output feature map M, where M = {m2,m3,m4,m5}, m2,m3,m4,m5 correspond to the features after φ2,φ3,φ4,φ'5 channel normalization respectively; the aggregated context feature m6 is fused element by element with the high-level feature m5; S3.5, gradually merge high-level features with low-level features in a top-down manner, and propagate feature information layer by layer. The specific algorithm is as follows: Among them, α is the weight parameter value of the convolution kernel with a convolution kernel size of 3×3; represents the upsampling operation; p represents the number of backbone network stages; m L Represents the L-th stage feature φ of the backbone network L Features obtained by channel normalization; Represents the L-th layer feature of the feature pyramid, and the entire feature pyramid is represented as S4, use the region proposal network to generate RoIs that meet the preset aspect ratio; S5. Extract and optimize RoI features: Map RoIs to the feature pyramid layer to extract RoI features of fixed dimensions, use the channel-aware fusion network to reorganize RoI features, and improve the quality of RoI features; S6. Based on the optimized RoIs features, the detection subnetwork is used to perform vehicle-mounted pedestrian detection and output classification confidence and location coordinates.

2. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 1 is characterized in that: In step S1, the backbone network is used to extract the backbone features of the image stage by stage, as follows: φ i =f i (φ i-1 )=f i (f i-1 (…f2(f1(I)))),i∈[1,5]; (1) Where I represents the input image; f i (·) represents the i-th stage network of the backbone network. The backbone network includes a set of stacked convolutional layers, pooling layers, and activation function layers. The backbone network is divided into five stages. The stage division rule is that the network layers that generate feature maps of the same size belong to the same stage. i is the i-th stage feature, which represents the feature map of the i-th stage network output; the i-th stage feature φ i is a feature representation with three dimensions, namely (C i ,H i ,W i ), C i , H i and W i They respectively represent the number of channels, height and width of the i-th stage network; the backbone features include the stage features output by the 5-stage network, that is, Φ = {φ1, φ2, φ3, φ4, φ5}, where Φ represents the backbone feature; to save memory, the first stage feature φ1 is ignored in all subsequent processing.

3. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 2 is characterized in that: In step S2, the anchor point step adjustment strategy is designed to achieve adaptive sampling, as follows: Among them, the anchor point step size is defined as the reduction factor of the current feature map relative to the original image; represents the bilinear interpolation operation; S4 and S5 are the anchor point steps of the 4th stage feature φ4 and the 5th stage feature φ5 of the backbone network respectively; S represents the ideal step size; and They represent the features obtained by performing bilinear interpolation operations on the 4th stage feature φ4 and the 5th stage feature φ5 using S4 / S and S5 / S as interpolation scaling factors, respectively.

4. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 3 is characterized in that: In step S2, the constructed multi-parallel branch convolution block includes n output branches, each of which is responsible for extracting the feature obtained by bilinear interpolation of the fourth stage feature φ4 with S4 / S as the interpolation scaling factor The feature of a scale, the algorithm for extracting multiple scale features is as follows: in, Represents a multi-parallel branch convolution block; The feature obtained by bilinear interpolation of the fourth stage feature φ4 with S4 / S as the interpolation scaling factor, and its anchor point step size is flexibly adjusted; Feed into multiple parallel branch convolution blocks Get multi-scale features Respectively represent the different scale features extracted by the first output branch, the second output branch, and the nth output branch; The construction of multi-parallel branch convolution blocks is as follows: Each output branch consists of a standard convolution layer with different convolution kernel sizes and a dilated convolution layer with different dilation rates. Multi-scale features are generated by establishing a positive linear relationship between different convolution kernels and dilation rates, that is, the dilation rate of the dilated convolution equipped with a large convolution kernel is larger than that of the small convolution kernel. At the same time, the relationship between the dilation coefficients of multiple output branches is constrained. The algorithm is as follows: D(r1,r2,…,r n )=1; (4) where [r1,r2,...r n ] represents an ascending combination of n branch expansion coefficients, r n represents the expansion coefficient of the nth branch; D(·) represents the greatest common divisor of the n expansion coefficients.

5. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 4 is characterized in that: In step S2, the scale-sensitive features with consistent characterization capabilities are generated by element-by-element fusion with the backbone features, as follows: Multi-scale features The feature obtained by bilinear interpolation of the fifth stage feature φ5 with S5 / S as the interpolation scaling factor Element-by-element fusion is performed to obtain the fused feature φ'4; bilinear interpolation is performed on the fused feature φ'4 to make its size consistent with the fifth-stage feature φ5 of the backbone network; the two fused features φ'4 of the same size and the fifth-stage feature φ5 of the backbone network are fused element-by-element to generate a scale-sensitive feature φ'5 with consistent representation capabilities, as follows: Among them, φ'5 represents the scale-sensitive feature; O e (·) indicates element-by-element fusion operation; Represents a bilinear interpolation operation.

6. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 1 is characterized in that: In step S4, the strategy of the region recommendation network to generate RoIs is to set the aspect ratio of the preset anchor box to {1:1, 1.5:1, 2:1, 2.5:1, 3:1} to fit the proportion of pedestrians.

7. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 6 is characterized in that: Step S5 includes the following steps: S5.1, map RoIs to all feature layers of the feature pyramid and perform RoI pooling to obtain RoI features of multiple fixed dimensions; S5.

2. Use the channel-aware fusion network to generate channel weights for each channel in each RoI feature; reorganize the RoIs features based on the channel weights; sequentially add multiple RoIs features weighted by the channel weights to achieve RoI-by-RoI fusion and obtain optimized RoIs features.

8. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 7 is characterized in that: In step S5.1, the RoIs pooling algorithm is as follows: Map the RoIs coordinate vector to the feature map and calculate the floating point coordinates of RoIs relative to the feature map; the fixed-dimensional RoIs feature is represented as C r ×k×k; divide each RoI into k sub-regions; divide each sub-region into four sampling sub-regions; use bilinear interpolation to calculate the pixel at the center of the sampling sub-region to obtain the pixels of the four sampling points; take the maximum value or average value of the pixels of the four sampling points to obtain the pixel value representing the sub-region.

9. The vehicle-mounted pedestrian detection method based on feature extraction and aggregation according to claim 8, characterized in that: In step S5.2, the channel-aware fusion network includes two consecutive 1×1 convolutional layers; the first 1×1 convolutional layer compresses the RoIs feature channel to 1 / 16 of the original number of channels; and the second 1×1 convolutional layer restores the RoIs feature channel to the original number of channels.