Shielding pedestrian detection method based on feature focusing and information fusion
By adopting feature focus module and hierarchical feature fusion mechanism in pedestrian detection, the missed detection and misdetection problems of pedestrian detection under the occlusion problem are solved, and higher detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510030597.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-08
Smart Images

Figure CN119832600A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pedestrian detection, and in particular to a method for detecting blocked pedestrians based on feature focusing and information fusion. Background Art
[0002] Pedestrian detection is one of the important branches of target detection tasks. In recent years, pedestrian detection has important practical application value in the fields of autonomous driving, robot navigation systems, and intelligent monitoring. Its core purpose is to accurately identify all pedestrian targets in the image. However, pedestrians are often occluded by other pedestrians or objects, making it difficult to extract complete feature information, which leads to the problem of missed detection by the detector. Therefore, how to effectively solve the pedestrian occlusion problem has become a key challenge to further improve the performance of pedestrian detectors.
[0003] In recent years, researchers have explored solutions from three aspects: post-processing optimization, improvements based on specific models, and body part feature processing. First, researchers explored post-processing optimization methods, designed specific NMS improvement strategies, and penalized inaccurately positioned detection frames. Although researchers continue to optimize NMS, due to its characteristic of suppressing sample frames, positive samples with severe occlusion may still be misjudged as false positives, thus limiting its ability to solve occlusion problems. Second, with the great success of Transformer in the field of computer vision, researchers began to explore methods based on the DETR model. By adopting a one-to-one label matching strategy for prediction, they successfully avoided the shortcomings of NMS. However, the self-attention mechanism introduced by Transformer is limited by quadratic time complexity and is difficult to deploy on high-resolution feature maps. Third, in view of the fact that pedestrians' body parts are visible under occlusion, researchers further proposed a method based on the body part model. This method adopts a divide-and-conquer strategy according to the characteristics of different parts of the human body, and designs corresponding detectors for different body parts to assist in the overall detection of pedestrians.
[0004] However, the feature information of occluded pedestrian targets is often missing, and the above three methods have not fully considered the difficulties faced by the network in extracting features, such as limited network attention resources, the target area usually accounts for a small proportion of the overall image, and background pixels often occupy a large amount of space, which makes it difficult for the model to obtain sufficient feature information and is easily disturbed by background noise. Summary of the invention
[0005] The present invention proposes an occluded pedestrian detection method based on feature focusing and information fusion, which can solve the occlusion problem in pedestrian detection.
[0006] The present invention adopts the following technical solutions.
[0007] A method for detecting occluded pedestrians based on feature focusing and information fusion is disclosed. The method first uses a high-resolution network HRNet of a convolutional neural network as the backbone network to extract features from an input image, so that high-resolution features are always retained while extracting image feature information. Secondly, through a feature focusing module, the feature information of key areas is enhanced and background noise is suppressed by dynamically adjusting the importance of each channel and spatial position of the feature map, so that the backbone network focuses on the target area. Then, a hierarchical feature fusion mechanism is used to efficiently fuse high-level semantic information and location detail information. Finally, the fused feature map is passed through a detection head to generate a center point feature map, a scale feature map and a center point offset feature map, and the feature map is interpreted as a detection result, and a pedestrian area with a bounding box is output.
[0008] The method comprises the following steps:
[0009] Step S1, input image and perform feature extraction;
[0010] Step S2: design a feature focusing module to focus and enhance the features extracted by the backbone network;
[0011] Step S3, designing a hierarchical feature fusion mechanism to efficiently fuse the multiple feature maps with different resolutions output by step S2;
[0012] Step S4: using the detection head to interpret the feature map into a detection result.
[0013] In step S1, the convolutional neural network HRNet is used as the backbone network to process the input image and output four feature maps f1, f2, f3 and f4 with different resolutions, whose resolutions are 1 / 4, 1 / 8, 1 / 16 and 1 / 32 times of the input image respectively.
[0014] The backbone network HRNet adopts a parallel architecture and consists of four branches with different resolutions. When extracting image features, a high-resolution subnetwork is used for feature extraction in the initial stage, and then parallel subnetworks from high resolution to low resolution are gradually added. Specifically, in its four stages, the first stage contains only one high-resolution branch. From the second stage to the fourth stage, a parallel branch is added in each stage. The input of the latter stage comes from the output of each branch in the previous stage, and the resolution of the newly added branch is half of the lowest resolution branch in the previous stage, and the number of channels is doubled. The feature maps of the parallel branches have scales due to different resolutions, so that they can focus on targets of different scales in the original image. The backbone network fuses feature maps of different resolutions through upsampling and downsampling operations, so that information exchange between levels can be realized, thereby improving the multi-scale expression ability of the feature maps.
[0015] In the pedestrian detection task, if occlusion causes the detector to misdetect or miss detection, and relying solely on the backbone network HRNet to extract pedestrian features is no longer able to meet the accuracy requirements, the feature focusing module and hierarchical fusion strategy are used to enhance the features of the occluded pedestrians by focusing on the features and fusing the information.
[0016] In step S2, the feature focusing module refines the input feature map from two dimensions: channel attention and spatial attention;
[0017] In terms of channel attention, the feature focus module first performs global average AvgPool and maximum pooling MaxPool operations in the spatial dimension to condense two global description vectors to capture the global importance information of each channel in the entire feature map; then, the two global description vectors are learned and the channel importance weights are calculated using a small fully connected neural network FC. The results are added and normalized by the Sigmoid function to output a weight vector representing the relative importance of each channel. Finally, the weight vector Acting on the input feature map f by multiplication i , and obtain a refined feature map F i 1 , achieving feature response re-weighting; this process improves the model's sensitivity to key feature channels, helps the network dynamically focus on information-rich channels, and enhances the model's representation capabilities and detection performance;
[0018] In terms of spatial attention, the feature focus module performs global averaging AvgPool and maximum pooling MaxPool in the channel dimension, focusing on capturing the potential information of the target area, and then concatenates Concat in the channel dimension, further compresses the spatial information through 7×7 convolution Conv, and uses the Sigmoid function for normalization to generate a single-channel spatial attention map. Finally, the spatial attention map With the first refined feature map F i 1 Multiply and weight the features again to obtain the secondary refined feature map F i 2 ,Through refined spatial processing, the backbone network's sensitivity to key spatial locations is improved, making it focus ,on the target pedestrian area, ,enhancing the target perception capability of the network.
[0019] Step S2 uses the feature focusing module to dynamically adjust the importance of each channel and spatial position in the feature map to double refine the feature information, thereby guiding the neural network model to focus on the feature information of the key area and effectively suppress the interference of noise. The specific formula is expressed as:
[0020]
[0021] In the formula, f i are input feature maps of multiple different scales, where (i=1, 2, 3, 4), F i 1 f i Attention through channels The weighted refined feature map, F i 2 F i 1 Through spatial attention The output feature map after re-weighting.
[0022] In step S3, the four feature maps with different resolutions outputted from step S2 are efficiently fused through a hierarchical feature fusion mechanism; specifically, the three low-resolution feature maps containing rich contextual information are first spliced in the channel dimension to enhance the representation of deep semantic information; then, the first spliced feature map is spliced with the high-resolution feature map containing more detailed position information for a second time to achieve a comprehensive fusion of high-level semantic information and position detail information; the specific formula is expressed as:
[0023]
[0024] T=Concat[F1 2 ,U 1 / 4 (t)] (6)
[0025] In the above formula, and The pixel ratios of the corresponding feature maps and the original input images are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively;
[0026] and Indicates that the feature map is interpolated using a bilinear interpolation algorithm and Upsample to 1 / 8 scale, Concat means concatenation in the channel dimension to form a preliminary fusion feature map Then U 1 / 4 (t) The bilinear interpolation algorithm is used to upsample the feature map t to 1 / 4 times the scale, and finally combined with the high-resolution feature map F1 2 The fully fused output feature map is obtained by splicing in the channel dimension
[0027] The specific method of step S4 is as follows: a detection head is added after the spliced feature map to detect it; after the feature map for detection enters the detection head, it first passes through a 3×3 convolution kernel, and then three parallel 1×1 convolution kernels are added to generate a pedestrian center point feature map, a pedestrian scale feature map, and a center point offset feature map respectively; then, according to the corresponding scales in the center point feature map and the scale feature map, the pedestrian candidate box of the input image is automatically generated; finally, the position of the pedestrian center point is fine-tuned by predicting the center point offset;
[0028] Therefore, pedestrian detection can be expressed as:
[0029] Dets=H(φ det )={cls(φ det ),reg(φ det )} (7)
[0030] Among them, H(.) represents the detection head, φ det Represents the feature map used for detection; cls(.) is the predicted classification confidence, and reg(.) is the scale and center point offset of the predicted pedestrian.
[0031] In step S4, focal loss is used to train the objective function L for predicting the pedestrian center point position in the detection head. c :
[0032]
[0033] where p ij and α ij They are defined as formula (9) and (10) respectively:
[0034]
[0035] Where y ij represents the center point at position (i, j), p ij ∈[0,1] indicates the probability that the predicted coordinate point belongs to the center, β and γ are two hyperparameters, which are set to β=4 and γ=4. ij It is a Gaussian heat map, which aims to reduce the uncertainty of a large number of negative samples around positive samples;
[0036] Scale prediction is a regression task using SmoothL1 loss, as shown in formula (11):
[0037]
[0038] Where s k and Represents the predicted value and true value of the kth target scale;
[0039] Offset prediction is also a regression task using SmoothL1 loss, as shown in formula (12):
[0040]
[0041] Where o k and Represents the predicted value and true value of the k-th target offset;
[0042] The total loss is composed of center loss, scale loss and offset loss, which can be expressed as formula (13):
[0043] L=λ c L c +λ s L s +λ o L o (13)
[0044] Where λ c , s and λ o Set to 0.01, 1 and 0.1 respectively.
[0045] In summary, the present invention firstly extracts the features of the input image using a high-resolution network (HRNet), and retains the high-resolution features while extracting the image feature information; secondly, a feature focusing module is designed to dynamically adjust the importance of each channel and spatial position of the feature map, strengthen the feature information of the key area and suppress the background noise, so that the network focuses on the target area; then, a hierarchical feature fusion mechanism is designed to efficiently fuse high-level semantic information with location detail information; finally, the fused feature map is passed through the detection head to generate the center point feature map, scale feature map and center point offset feature map, and the feature map is interpreted as the detection result, and the pedestrian with the bounding box is output. The feature focusing module refines the input feature map from the two dimensions of channel attention and spatial attention, realizes the double refinement of feature information, thereby guiding the model to focus on the feature information of the key area and effectively suppresses the interference of noise. The hierarchical feature fusion mechanism uses a bilinear interpolation algorithm to adjust the resolution of the low-resolution feature map, performs hierarchical splicing operations in the channel dimension, realizes the hierarchical fusion of multi-scale feature maps, and obtains a fully fused output feature map. Finally, by performing convolution operation on the refined multi-scale feature map, the pedestrian detection task is simplified to a simple center point and scale prediction task; the present invention can solve the occlusion problem in pedestrian detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0047] Attached Figure 1 It is a schematic diagram of the method flow of the present invention;
[0048] Attached Figure 2 It is a schematic diagram of the overall network framework of the present invention;
[0049] Attached Figure 3 It is a schematic diagram of the structure of the feature focusing module of the present invention. DETAILED DESCRIPTION
[0050] like Figure 1 , Figure 2 As shown in the figure, a method for detecting occluded pedestrians based on feature focusing and information fusion is presented. The method first uses the high-resolution network HRNet of the convolutional neural network as the backbone network to extract features of the input image, so that the high-resolution features are always retained while extracting the image feature information; secondly, through the feature focusing module, the feature information of the key area is strengthened and the background noise is suppressed by dynamically adjusting the importance of each channel and spatial position of the feature map, so that the backbone network can focus on the target area; then, a hierarchical feature fusion mechanism is used to efficiently fuse high-level semantic information and position detail information; finally, the fused feature map is passed through the detection head to generate a center point feature map, a scale feature map and a center point offset feature map, and the feature map is interpreted as a detection result, and a pedestrian area with a bounding box is output.
[0051] The method comprises the following steps:
[0052] Step S1, input image and perform feature extraction;
[0053] Step S2: design a feature focusing module to focus and enhance the features extracted by the backbone network;
[0054] Step S3, designing a hierarchical feature fusion mechanism to efficiently fuse the multiple feature maps with different resolutions output by step S2;
[0055] Step S4: using the detection head to interpret the feature map into a detection result.
[0056] In step S1, the convolutional neural network HRNet is used as the backbone network to process the input image and output four feature maps f1, f2, f3 and f4 with different resolutions, whose resolutions are 1 / 4, 1 / 8, 1 / 16 and 1 / 32 times of the input image respectively.
[0057] The backbone network HRNet adopts a parallel architecture and consists of four branches with different resolutions. When extracting image features, a high-resolution subnetwork is used for feature extraction in the initial stage, and then parallel subnetworks from high resolution to low resolution are gradually added. Specifically, in its four stages, the first stage contains only one high-resolution branch. From the second stage to the fourth stage, a parallel branch is added in each stage. The input of the latter stage comes from the output of each branch in the previous stage, and the resolution of the newly added branch is half of the lowest resolution branch in the previous stage, and the number of channels is doubled. The feature maps of the parallel branches have scales due to different resolutions, so that they can focus on targets of different scales in the original image. The backbone network fuses feature maps of different resolutions through upsampling and downsampling operations, so that information exchange between levels can be realized, thereby improving the multi-scale expression ability of the feature maps.
[0058] In the pedestrian detection task, if occlusion causes the detector to misdetect or miss detection, and relying solely on the backbone network HRNet to extract pedestrian features is no longer able to meet the accuracy requirements, the feature focusing module and hierarchical fusion strategy are used to enhance the features of the occluded pedestrians by focusing on the features and fusing the information.
[0059] In step S2, the feature focusing module refines the input feature map from two dimensions: channel attention and spatial attention;
[0060] In terms of channel attention, the feature focus module first performs global average AvgPool and maximum pooling MaxPool operations in the spatial dimension to condense two global description vectors to capture the global importance information of each channel in the entire feature map; then, the two global description vectors are learned and the channel importance weights are calculated using a small fully connected neural network FC. The results are added and normalized by the Sigmoid function to output a weight vector representing the relative importance of each channel. Finally, the weight vector Acting on the input feature map f by multiplication i , and obtain a refined feature map F i 1 , achieving feature response re-weighting; this process improves the model's sensitivity to key feature channels, helps the network dynamically focus on information-rich channels, and enhances the model's representation capabilities and detection performance;
[0061] In terms of spatial attention, the feature focus module performs global averaging AvgPool and maximum pooling MaxPool in the channel dimension, focusing on capturing the potential information of the target area, and then concatenates Concat in the channel dimension, further compresses the spatial information through 7×7 convolution Conv, and uses the Sigmoid function for normalization to generate a single-channel spatial attention map. Finally, the spatial attention map With the first refined feature map F i 1 Multiply and weight the features again to obtain the secondary refined feature map F i 2 ,Through refined spatial processing, the backbone network's sensitivity to key spatial locations is improved, making it focus ,on the target pedestrian area, ,enhancing the target perception capability of the network.
[0062] Step S2 uses the feature focusing module to dynamically adjust the importance of each channel and spatial position in the feature map to double refine the feature information, thereby guiding the neural network model to focus on the feature information of the key area and effectively suppress the interference of noise. The specific formula is expressed as:
[0063]
[0064] In the formula, f i are input feature maps of multiple different scales, where (i=1, 2, 3, 4), F i 1 f i Attention through channels The weighted refined feature map, F i 2 F i 1 Through spatial attention The output feature map after re-weighting.
[0065] like Figure 1 As shown in the figure, this example introduces a feature focusing module in GFFIE-Net, which not only optimizes the attention distribution of the feature map, but also enhances the model's feature representation ability for occluded pedestrians, helps the model better understand the contextual information in the image, and thus achieves effective detection and recognition of occluded pedestrians.
[0066] In step S3, the four feature maps with different resolutions outputted from step S2 are efficiently fused through a hierarchical feature fusion mechanism.
[0067] like Figure 1 As shown in the feature fusion part, this example first performs a preliminary fusion of three low-resolution feature maps containing rich contextual information, and then fully fuses them with high-resolution feature maps containing more positional detail information to obtain a multi-scale feature map containing rich semantic information. Specifically, the three low-resolution feature maps containing rich contextual information are first spliced in the channel dimension to enhance the representation of deep semantic information; then, the first spliced feature map is spliced with the high-resolution feature map containing more detailed position information for the second time to achieve a comprehensive fusion of high-level semantic information and positional detail information; the specific formula is expressed as:
[0068]
[0069] T=Concat[F1 2 ,U 1 / 4 (t)] (6)
[0070] In the above formula, and The pixel ratios of the corresponding feature maps and the original input images are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively;
[0071] and Indicates that the feature map is interpolated using a bilinear interpolation algorithm and Upsample to 1 / 8 scale, Concat means concatenation in the channel dimension to form a preliminary fusion feature map Then U 1 / 4 (t) The bilinear interpolation algorithm is used to upsample the feature map t to 1 / 4 times the scale, and finally combined with the high-resolution feature map F1 2 The fully fused output feature map is obtained by splicing in the channel dimension
[0072] The specific method of step S4 is as follows: a detection head is added after the spliced feature map to detect it; after the feature map for detection enters the detection head, it first passes through a 3×3 convolution kernel, and then three parallel 1×1 convolution kernels are added to generate a pedestrian center point feature map, a pedestrian scale feature map, and a center point offset feature map respectively; then, according to the corresponding scales in the center point feature map and the scale feature map, the pedestrian candidate box of the input image is automatically generated; finally, the position of the pedestrian center point is fine-tuned by predicting the center point offset;
[0073] Therefore, pedestrian detection can be expressed as:
[0074] Dets=H(φ det )={cls(φ det ),reg(φ det )} (7)
[0075] Among them, H(.) represents the detection head, φ det Represents the feature map used for detection; cls(.) is the predicted classification confidence, and reg(.) is the scale and center point offset of the predicted pedestrian.
[0076] In step S4, focal loss is used to train the objective function L for predicting the pedestrian center point position in the detection head. c :
[0077]
[0078] where p ij and α ij They are defined as formulas (9) and (10) respectively:
[0079]
[0080] Where y ij represents the center point at position (i, j), p ij ∈[0,1] indicates the probability that the predicted coordinate point belongs to the center, β and γ are two hyperparameters, which are set to β=4 and γ=4. ij It is a Gaussian heat map, which aims to reduce the uncertainty of a large number of negative samples around positive samples;
[0081] Scale prediction is a regression task using SmoothL1 loss, as shown in formula (11):
[0082]
[0083] Where s k and Represents the predicted value and true value of the kth target scale;
[0084] Offset prediction is also a regression task using SmoothL1 loss, as shown in formula (12):
[0085]
[0086] Where o k and Represents the predicted value and true value of the k-th target offset;
[0087] The total loss is composed of center loss, scale loss and offset loss, which can be expressed as formula (13):
[0088] L=λ c L c +λ s L s +λ o L o (13)
[0089] Where λ c , s and λ o Set to 0.01, 1 and 0.1 respectively.
[0090] Example:
[0091] In order to fully verify the robustness of the method of the present invention in handling occluded pedestrians, this example conducted experiments on the challenging pedestrian dataset CityPersons.
[0092] CityPersons is a pedestrian detection dataset in traffic scenes, containing 5050 images (2975 for training, 500 for validation, and 1575 for testing). The validation subset in CityPersons is divided into four occlusion subsets according to the different target visibility rates to more fairly compare the effectiveness of methods for handling occluded pedestrians. Specifically, for targets with pixel values greater than 50, the visibility rate in the interval [0.65, 1] is divided into a reasonable occlusion subset (Reasonable), the visibility rate in the interval [0.65, 0.9] is divided into a partial occlusion subset (Partial), the visibility rate in the interval [0.9, 1] is divided into a small occlusion subset (Bare), and the visibility rate in the interval [0, 0.35] is divided into a heavy occlusion subset (Heavy). The validation of the occlusion subset can be used as an important indicator to judge the detector's performance in handling occlusion.
[0093] In order to more comprehensively evaluate the performance of the detector in pedestrian detection, this example uses the MR-FPPI evaluation curve. The missed detection rate (MR) refers to the ratio of all true positive samples (TP+FN) predicted as negative samples (FN). FPPI refers to the ratio of the number of negative samples incorrectly classified as positive samples (FP) in each of the N images to be detected. Nine log(MR) values are selected in FPPI∈[10 -2 ,10 0 ] and perform exponential operation to obtain MR -2 MR -2 The smaller the value, the better the performance of the detector. In this paper, MR is used for CityPersons. -2 As an evaluation indicator.
[0094] The hardware devices based on all experiments in this example are NVIDIA PCle A100 GPUs, and the programming languages and deep learning frameworks they rely on are Python 3.8 and Pytorch 1.11.0.
[0095] The algorithm in this example uses HRNet as the backbone network and AdamW as the optimization algorithm. In addition, image flipping, random scaling and cropping are used as data enhancement strategies during the data loading phase. The following is a detailed introduction to the detailed parameter settings on the CityPersons dataset.
[0096] In this example, the input image size is set to 640×1280 pixels. The experiment in this example uses HRNet pre-trained on ImageNet as the backbone network to train the proposed network model. During the training process, the batch size is set to 16 (4 images are set on each GPU, and a total of 4 GPUs are used), and the initial learning rate lr is set to 2×e -4 , the model is trained for 150 epochs, and the learning rate decays to 1 / 2 of the original (i.e., lr / 2) every 50 epochs.
[0097] In order to verify the effectiveness of the method of the present invention in traffic scenarios, the performance comparison of this method with some current advanced research algorithms on the occluded subset of the CityPersons dataset is shown in Table 1. It can be observed that the performance of the method of the present invention on all subsets shows very good results, especially on the Heavy subset, where the best performance is achieved. Even compared with some methods that adopt occlusion processing strategies, such as RepLoss, MB-CSP+BIA-NMS, OR-CNN, CaSe+OTP-NMS, CrowdDet+OTP-NMS and other methods, the method proposed in this article also shows considerable competitiveness. Among them, compared with the recently proposed competitive model CaSe+OTP-NMS using an additional improved NMS strategy, the detector proposed in this article achieved 4.0% MR on the Heavy subset. -2 In addition, to ensure a fair comparison with the baseline model (CSP+HRNet), this section reproduces the baseline network under the same configuration, achieving different degrees of performance gain on Reasonable, Bare, Partial, and Heavy, and even achieving 4.3% MR on the Heavy subset. -2 performance gain. On the four occlusion subsets, compared with the traditional pedestrian detector based on center point and scale prediction, the greater performance gain of the method of the present invention comes from the enhancement of pedestrian feature information in key areas, which helps the detector to effectively infer occluded pedestrians by extracting contextual information. Finally, we tested the original image of 1024×2048, and the detection speed of the method of the present invention was 0.17s / img, which is comparable to the speed of other detectors. The above experiments fully demonstrate that the method of the present invention can effectively distinguish between target and background information to handle pedestrian targets with different degrees of occlusion.
[0098] The above description is merely an embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any minor modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
[0099] Table 1 Comparative experimental results of CityPersons dataset
[0100]
[0101]
Claims
1. A method for detecting occluded pedestrians based on feature focusing and information fusion, characterized in that: The method first uses the high-resolution network HRNet of the convolutional neural network as the backbone network to extract features from the input image, so that the high-resolution features are always retained while extracting image feature information; secondly, through the feature focusing module, the feature information of the key area is strengthened and the background noise is suppressed by dynamically adjusting the importance of each channel and spatial position of the feature map, so that the backbone network can focus on the target area; then, a hierarchical feature fusion mechanism is used to efficiently fuse high-level semantic information and location detail information; finally, the fused feature map is passed through the detection head to generate a center point feature map, a scale feature map and a center point offset feature map, and the feature map is interpreted as a detection result, and a pedestrian area with a bounding box is output.
2. The method for detecting occluded pedestrians based on feature focusing and information fusion according to claim 1, characterized in that: The method comprises the following steps: Step S1, input image and perform feature extraction; Step S2: design a feature focusing module to focus and enhance the features extracted by the backbone network; Step S3, designing a hierarchical feature fusion mechanism to efficiently fuse the multiple feature maps with different resolutions output by step S2; Step S4: using the detection head to interpret the feature map into a detection result.
3. The method for detecting occluded pedestrians based on feature focusing and information fusion according to claim 2, characterized in that: In step S1, the convolutional neural network HRNet is used as the backbone network to process the input image and output four feature maps f1, f2, f3 and f4 with different resolutions, whose resolutions are 1 / 4, 1 / 8, 1 / 16 and 1 / 32 times of the input image respectively.
4. The method for detecting pedestrians under occlusion based on feature focusing and information fusion according to claim 3, characterized in that: The backbone network HRNet adopts a parallel architecture and consists of four branches with different resolutions. When extracting image features, a high-resolution subnetwork is used for feature extraction in the initial stage, and then parallel subnetworks from high resolution to low resolution are gradually added. Specifically, in its four stages, the first stage contains only one high-resolution branch. From the second stage to the fourth stage, a parallel branch is added in each stage. The input of the latter stage comes from the output of each branch in the previous stage, and the resolution of the newly added branch is half of the lowest resolution branch in the previous stage, and the number of channels is doubled. The feature maps of the parallel branches have scales due to different resolutions, so that they can focus on targets of different scales in the original image. The backbone network fuses feature maps of different resolutions through upsampling and downsampling operations, so that information exchange between levels can be realized, thereby improving the multi-scale expression ability of the feature maps.
5. The method for detecting obstructed pedestrians based on feature focusing and information fusion according to claim 3, characterized in that: In the pedestrian detection task, if occlusion causes the detector to misdetect or miss detection, and relying solely on the backbone network HRNet to extract pedestrian features is no longer able to meet the accuracy requirements, the feature focusing module and hierarchical fusion strategy are used to enhance the features of the occluded pedestrians by focusing on the features and fusing the information.
6. The method for detecting pedestrians under occlusion based on feature focusing and information fusion according to claim 3, characterized in that: In step S2, the feature focusing module refines the input feature map from two dimensions: channel attention and spatial attention; In terms of channel attention, the feature focus module first performs global average AvgPool and maximum pooling MaxPool operations in the spatial dimension to condense two global description vectors to capture the global importance information of each channel in the entire feature map; Subsequently, the two global description vectors are learned and the channel importance weights are calculated using a small fully connected neural network FC. The results are added and normalized by the Sigmoid function to output the weight vector representing the relative importance of each channel. Finally, the weight vector Acting on the input feature map f by multiplication i , and obtain a refined feature map Implement feature response reweighting; This process improves the model's sensitivity to key feature channels and helps the network dynamically focus on information-rich channels, enhancing the model's representation capabilities and detection performance; In terms of spatial attention, the feature focus module performs global averaging AvgPool and maximum pooling MaxPool in the channel dimension, focusing on capturing the potential information of the target area, and then concatenates Concat in the channel dimension, further compresses the spatial information through 7×7 convolution Conv, and uses the Sigmoid function for normalization to generate a single-channel spatial attention map. Finally, the spatial attention map With a refined feature map Multiply and weight the features again to obtain a secondary refined feature map Through spatial refinement, the backbone network’s sensitivity to key spatial locations is improved, allowing it to focus on target pedestrian areas and enhance the network’s target perception capabilities.
7. The method for detecting pedestrians under occlusion based on feature focusing and information fusion according to claim 3, characterized in that: Step S2 uses the feature focusing module to dynamically adjust the importance of each channel and spatial position in the feature map to double refine the feature information, thereby guiding the neural network model to focus on the feature information of the key area and effectively suppress the interference of noise. The specific formula is expressed as: In the formula, f i are input feature maps of multiple different scales, where (i=1, 2, 3, 4), f i Attention through channels The weighted refined feature map, for Through spatial attention The output feature map after re-weighting.
8. The method for detecting pedestrians under occlusion based on feature focusing and information fusion according to claim 3, characterized in that: In step S3, the four feature maps with different resolutions outputted from step S2 are efficiently fused through a hierarchical feature fusion mechanism; specifically, the three low-resolution feature maps containing rich contextual information are first spliced in the channel dimension to enhance the representation of deep semantic information; then, the first spliced feature map is spliced with the high-resolution feature map containing more detailed position information for a second time to achieve a comprehensive fusion of high-level semantic information and position detail information; the specific formula is expressed as: In the above formula, and The pixel ratios of the corresponding feature maps and the original input images are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively; and Indicates that the feature map is interpolated using a bilinear interpolation algorithm and Upsample to 1 / 8 scale, Concat means concatenation in the channel dimension to form a preliminary fusion feature map Then U 1 / 4 (t) The bilinear interpolation algorithm is used to upsample the feature map t to 1 / 4 times the scale and finally combined with the high-resolution feature map The fully fused output feature map is obtained by splicing in the channel dimension 9. The method for detecting pedestrians under occlusion based on feature focusing and information fusion according to claim 3, characterized in that: The specific method of step S4 is as follows: a detection head is added after the spliced feature map to detect it; after the feature map for detection enters the detection head, it first passes through a 3×3 convolution kernel, and then three parallel 1×1 convolution kernels are added to generate pedestrian center point feature map, pedestrian scale feature map and center point offset feature map respectively; then, the pedestrian candidate box of the input image is automatically generated according to the corresponding scales in the center point feature map and the scale feature map; finally, the position of the pedestrian center point is fine-tuned by predicting the center point offset; thus, pedestrian detection can be expressed as: Dets=H(φ det )={cls(φ det ),reg(φ det )} (7) Among them, H(.) represents the detection head, φ det Represents the feature map used for detection; cls(.) is the predicted classification confidence, and reg(.) is the scale and center point offset of the predicted pedestrian.
10. The method for detecting obstructed pedestrians based on feature focusing and information fusion according to claim 9, characterized in that: In step S4, focal loss is used to train the objective function L for predicting the pedestrian center point position in the detection head. c : where p ij and α ij They are defined as formula (9) and (10) respectively: Where y ij represents the center point at position (i, j), p ij ∈[0,1] indicates the probability that the predicted coordinate point belongs to the center, β and γ are two hyperparameters, which are set to β=4 and γ=4. ij It is a Gaussian heat map, which aims to reduce the uncertainty of a large number of negative samples around positive samples; Scale prediction is a regression task using SmoothL1 loss, as shown in formula (11): Where s k and Represents the predicted value and true value of the kth target scale; Offset prediction is also a regression task using SmoothL1 loss, as shown in formula (12): Where o k and Represents the predicted value and true value of the k-th target offset; The total loss is composed of center loss, scale loss and offset loss, which can be expressed as formula (13): L=λ c L c +λ s L s +λ o L o (13) Where λ c , s and λ o Set to 0.01, 1 and 0.1 respectively.
Citation Information
Patent Citations
Edge equipment-oriented pedestrian red light running shielding posture recognition method
CN113537136A
Pedestrian detection method based on improved multi-scale residual network
CN114332944A
Camouflaged object segmentation method with distraction mining
US20220230324A1
Cited By
Human body key point positioning method based on HRNet and diffusion model
CN120563613A