Road pedestrian detection method based on improved Yolo v9

Through the improved Yolo v9 algorithm and cross-stage local network, the road scene image features are extracted and processed in real time, combining significance calculation and dual-branch detection, the accuracy of vehicle pedestrian detection is solved, and the accuracy and reliability of pedestrian detection is improved.

CN120472536APending Publication Date: 2025-08-12GUANGXI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510583766.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, vehicles are prone to inaccurate pedestrian positioning, missed inspections, and missed inspections when conducting road pedestrian inspections, resulting in safety hazards for intelligent driving of vehicles.

Method used

The improved Yolo v9 algorithm combined with cross-stage local networks is used to extract the feature areas of the road scene image in real time, and perform multi-scale pooling and channel compression processing. The significance calculation, energy function processing and feature recalibration are used, and the recognition probability of pedestrian feature images is predicted and the road pedestrian detection results are determined.

Benefits of technology

It improves the accuracy of road pedestrian detection and reduces the false detection rate caused by background interference, especially in complex environments, which can accurately distinguish pedestrian targets, and improves the sensitivity of pedestrian profiles and the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472536A_ABST
    Figure CN120472536A_ABST
Patent Text Reader

Abstract

The invention discloses a road pedestrian detection method based on improved Yolo v9, which is applied to the technical field of image processing, and comprises the following steps: extracting a feature region in a road scene image in real time to obtain a to-be-detected image; processing the to-be-detected image to obtain a first feature image; splicing the to-be-detected image and the processed first feature image to obtain a second feature image; the second feature image is input into a constructed pedestrian detection model to be processed, a plurality of pedestrian feature images with different resolutions are obtained, and the pedestrian detection model is constructed by a cross-stage local network and an improved Yolo v9 algorithm; predicting the plurality of pedestrian feature images to obtain an identification probability matched with the pedestrian feature image of each pedestrian; and determining a road pedestrian detection result based on the pedestrian feature image and the recognition probability. According to the method provided by the embodiment of the invention, the detection accuracy of the pedestrians on the road can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a road pedestrian detection method based on improved Yolo v9. Background Art

[0002] Vehicle and pedestrian detection is an important research direction in the field of computer vision and can be applied to many fields such as intelligent transportation systems, autonomous driving, and intelligent monitoring.

[0003] In the existing technology, when vehicles detect pedestrians on the road, they directly identify the person information in the image. This method can easily lead to inaccurate pedestrian positioning, missed detection, and false detection when the pedestrian has similar characteristics to the surrounding environment, which in turn brings safety hazards to the vehicle's intelligent driving and is not conducive to the safe avoidance of pedestrians.

[0004] It can be seen that how to improve the accuracy of detecting pedestrians on the road during the driving of the vehicle has become a technical problem that needs to be urgently solved by those skilled in the art. Summary of the Invention

[0005] The present invention provides a road pedestrian detection method based on an improved Yolo v9 to solve the problem of inaccurate pedestrian positioning during vehicle driving, so as to improve the detection accuracy of pedestrians on the road.

[0006] In order to solve the above technical problems, an embodiment of the present invention provides a method for detecting pedestrians on a road based on an improved Yolo v9, the method comprising:

[0007] During the driving process of the vehicle, the feature area in the road scene image is extracted in real time to obtain the image to be detected;

[0008] Performing multi-scale pooling and channel compression processing on the image to be detected in sequence to obtain a first feature image;

[0009] Splicing the image to be detected and the processed first feature image to obtain a second feature image;

[0010] Inputting the second feature image into a constructed pedestrian detection model for processing to obtain a plurality of pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed using a cross-stage local network and an improved Yolo v9 algorithm, and the processing is designed to sequentially identify pedestrian contours in the image through saliency calculation, energy function processing, and feature recalibration processing;

[0011] Predicting the plurality of pedestrian feature images using a dual-branch detection method to obtain a recognition probability matching each of the pedestrian feature images;

[0012] A pedestrian detection result on the road is determined based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images.

[0013] As one preferred solution, the real-time extraction of feature areas in a road scene image to obtain an image to be detected includes:

[0014] Calibrate the road scene image to obtain a corrected scene image;

[0015] The semantic mask processing is performed on the corrected scene image to obtain the image to be detected.

[0016] As one of the preferred solutions, the step of sequentially performing multi-scale pooling and channel compression processing on the image to be detected to obtain a first feature image includes:

[0017] Performing multi-scale pooling processing on the image to be detected to obtain the image to be detected that is integrated with context information, wherein the multi-scale pooling includes at least maximum pooling, average pooling, and adaptive pooling;

[0018] The image to be detected that is fused with context information is subjected to channel compression processing to obtain the first feature image.

[0019] As one preferred solution, the step of splicing the image to be detected and the processed first feature image to obtain a second feature image includes:

[0020] Performing bilinear upsampling processing on the first feature image to obtain a first feature image with the same resolution as the image to be detected;

[0021] The image to be detected and the processed first feature image are spliced along the channel dimension to obtain a second feature image.

[0022] As one preferred solution, the processing is designed to sequentially identify pedestrian contours in an image through saliency calculation, energy function processing, and feature recalibration processing, including:

[0023] performing saliency calculation on the second feature image to obtain a sum of variances of each channel in the second feature image;

[0024] performing energy normalization processing on the sum of variances of each channel in the second feature image to obtain a salient region of the second feature image with non-parametric attention enhancement;

[0025] performing feature recalibration processing on the salient region without parameter attention enhancement in the second feature image to generate a spatial attention mask;

[0026] Based on the spatial attention mask and the second feature image, a plurality of pedestrian feature images with different resolutions are obtained.

[0027] As one preferred solution, the method of using a dual-branch detection method to predict a plurality of pedestrian feature images to obtain a recognition probability matching each pedestrian feature image includes:

[0028] Performing cross-branch feature interaction processing on the plurality of pedestrian feature images of different resolutions to obtain a cross-branch multi-scale enhanced feature map;

[0029] The cross-branch multi-scale enhanced feature map is predicted using a dual-branch detection method based on generalized intersection-over-union loss to obtain a recognition probability that matches each of the pedestrian feature images.

[0030] As one of the preferred solutions, after obtaining the recognition probability matching each of the pedestrian feature images, the road pedestrian detection method based on the improved Yolo v9 further includes:

[0031] Processing the plurality of pedestrian feature images using a target detection method to obtain a proportion of an occluded area of each pedestrian feature image;

[0032] Using a Bayesian deep learning method, each of the pedestrian feature images and the proportion of the occlusion area matching each of the pedestrian feature images are processed to obtain the uncertainty of each of the pedestrian feature images;

[0033] The recognition probability is optimized based on the uncertainty of each pedestrian feature image.

[0034] As one preferred solution, the improved Yolo v9 model includes:

[0035] A multi-scale feature fusion layer and a parameter-free attention layer are added to the Yolo v9 model to form the improved Yolo v9 model.

[0036] As one of the preferred solutions, after obtaining a number of pedestrian feature images with different resolutions, the road pedestrian detection method based on the improved Yolo v9 further includes:

[0037] A time series analysis is performed on the road scene image, and the pedestrian feature image is corrected based on the analysis result.

[0038] As one preferred solution, determining a pedestrian detection result on a road based on the pedestrian feature images and the recognition probability matching each pedestrian feature image includes:

[0039] Non-maximum suppression is used to filter high-probability pedestrian feature images to determine the road pedestrian detection results.

[0040] Compared with the prior art, the embodiments of the present invention have the following advantages:

[0041] The present invention obtains an image to be detected by extracting feature areas in a road scene image in real time during vehicle driving, and sequentially performs multi-scale pooling and channel compression processing on the image to be detected to obtain a first feature image; splicing the image to be detected and the processed first feature image to obtain a second feature image; inputting the second feature image into a constructed pedestrian detection model for processing to obtain several pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed by a cross-stage local network and an improved Yolo v9 algorithm, and the processing process is designed to sequentially identify the pedestrian contours in the image through saliency calculation, energy function processing and feature recalibration processing; using a dual-branch detection method to predict several of the pedestrian feature images to obtain a recognition probability matching each of the pedestrian feature images; and determining a road pedestrian detection result based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images. Compared with the existing technology, the present invention reduces the false detection rate caused by background interference by extracting feature areas in road scene images in real time, while retaining the continuity characteristics of pedestrian limb edges. Then, the feature separability of human body contours and rigid objects is significantly enhanced through pooling, compression and splicing processing. The obtained second feature image is input into a pedestrian detection model constructed by a convolutional neural backbone detection network and a cross-stage local network for saliency calculation, saliency calculation and feature recalibration. Through multi-stage optimization, the sensitivity to pedestrian contours is improved, especially for accurately distinguishing targets in complex environments. Then, dual-branch detection is used to predict the recognition probability matching each of the pedestrian feature images. Based on the pedestrian feature images and the recognition probability matching each pedestrian feature image, the road pedestrian detection result is determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flowchart of a method for detecting pedestrians on a road based on an improved Yolo v9 in one embodiment of the present invention;

[0043] Figure 2 is an algorithm flow chart of a road pedestrian detection algorithm in one embodiment of the present invention;

[0044] Figure 3 It is a partial flow chart of a pedestrian detection model in one embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0046] In the description of the present invention, the terms "first," "second," "third," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first," "second," "third," etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0047] In the description of the present invention, it should be noted that, unless otherwise expressly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the two components. The terms "vertical", "horizontal", "left", "right", "up", "down" and similar expressions used herein are for illustrative purposes only, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] In describing the present invention, it should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. Those skilled in the art will understand the specific meanings of the above terms in the present invention in specific circumstances.

[0049] Pedestrian detection on roads is an important research direction in the field of computer vision, and is applied in many fields such as intelligent transportation systems, autonomous driving, and intelligent monitoring.

[0050] In the existing technology, when vehicles detect pedestrians on the road, they directly identify the person information in the image. This method can easily lead to inaccurate pedestrian positioning, missed detection, and false detection when the pedestrian has similar characteristics to the surrounding environment, which in turn brings safety hazards to the vehicle's intelligent driving and is not conducive to the safe avoidance of pedestrians.

[0051] To this end, an embodiment of the present invention provides a method for detecting pedestrians on a road based on an improved Yolo v9. For details, see Figure 1 , Figure 1 The figure shows a flow chart of a method for detecting pedestrians on a road based on an improved Yolo v9 in one embodiment of the present invention, the method comprising:

[0052] S1: During the vehicle's driving process, feature areas in the road scene image are extracted in real time to obtain the image to be detected;

[0053] S2: performing multi-scale pooling and channel compression processing on the image to be detected in sequence to obtain a first feature image;

[0054] S3: performing splicing processing on the image to be detected and the processed first feature image to obtain a second feature image;

[0055] S4: Inputting the second feature image into the constructed pedestrian detection model for processing to obtain a plurality of pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed by a cross-stage local network and an improved Yolo v9 algorithm, and the processing is designed to sequentially identify pedestrian contours in the image through saliency calculation, energy function processing, and feature recalibration processing;

[0056] S5: predicting the plurality of pedestrian feature images using a dual-branch detection method to obtain a recognition probability matching each of the pedestrian feature images;

[0057] S6: Determine a pedestrian detection result on the road based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images.

[0058] In step S1, during the driving process of the vehicle, feature areas in the road scene image are extracted in real time to obtain the image to be detected, including: calibrating the road scene image to obtain a corrected scene image; and performing semantic mask processing on the corrected scene image to obtain the image to be detected.

[0059] Specifically, a camera is configured on the vehicle to capture road scene images in real time. Preferably, a forward-looking camera is arranged. The camera type can be a global shutter camera, a multispectral camera or other camera device that can capture road scene images in real time.

[0060] The road scene image is calibrated by using the pre-stored camera intrinsic parameter matrix and distortion coefficient to obtain a corrected scene image. Preferably, the calibration method can adopt the Zhang Zhengyou calibration method, or the undistortion function (undistort) in OpenCV can be used to correct the road scene image extracted in real time.

[0061] After obtaining the corrected scene image, a lightweight segmentation model is used to classify the corrected scene image, obtaining specific mask regions such as roads, pedestrians, and vehicles, and obtaining an image to be detected, wherein only the mask regions are retained and the background is blackened. Preferably, the lightweight segmentation model is a bilateral segmentation network (BiSeNet).

[0062] After obtaining the image to be detected, multi-scale pooling and channel compression processing are performed on the image to be detected in sequence to obtain a first feature image.

[0063] Specifically, multi-scale pooling processing is performed on the image to be detected to obtain the image to be detected that is integrated with context information, wherein the multi-scale pooling includes at least maximum pooling, average pooling and adaptive pooling; channel compression processing is performed on the image to be detected that is integrated with context information to obtain the first feature image.

[0064] At least three pooling operations are performed simultaneously on the image to be detected. Maximum pooling extracts local significant features and retains texture details. Average pooling smoothes regional features and suppresses noise. Adaptive pooling dynamically adjusts the output size to adapt to inputs of different resolutions. Multi-scale pooling processing can fuse contextual information of different scales and enhance robustness to changes in the size of pedestrian targets, such as the details of nearby pedestrians and the outlines of distant pedestrians.

[0065] The image to be detected that is integrated with the context information is convolved and dimensionally reduced, and the number of channels is compressed from 256 to 128 to obtain the first feature image. At this time, the size of the first feature image remains unchanged.

[0066] By combining multi-scale pooling with channel compression, the image can retain rich contextual information while reducing the number of parameters.

[0067] After obtaining the first feature image, upsampling processing is performed on the first feature image to increase the resolution of the first feature image. Preferably, the upsampling processing is bilinear upsampling.

[0068] Input alignment processing is performed on the image to be detected and the first feature image after upsampling processing to ensure that the image to be detected and the processed first feature image can be spliced along the channel dimension to obtain a second feature image.

[0069] The second feature image is input into the constructed pedestrian detection model for processing to obtain several pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed by a cross-stage local network and an improved Yolo v9 algorithm. The processing process is designed to identify the pedestrian contours in the image through saliency calculation, energy function processing and feature recalibration processing in sequence.

[0070] The pedestrian detection model constructed using a cross-stage local network and an improved Yolo v9 algorithm can efficiently and accurately generate multi-resolution pedestrian feature images. Specifically, the improved Yolo v9 algorithm extracts multi-level abstract features from the input second feature image through stacked convolutional layers, pooling layers, multi-scale feature fusion layers, and parameter-free attention layers. Network layers of different depths correspond to different receptive fields, and strided convolution is used to reduce computational complexity and improve model efficiency. The cross-stage local network (CSPNet) splits the feature map output by the improved Yolo v9 algorithm into two parts along the channel dimension. The partial branch is directly passed to the next stage, retaining the original features. The residual branch further extracts features through convolution blocks and is then merged with the partial branch. This merging of the directly passed original features and the transformed features of the residual branch enriches feature expression and optimizes the feature transfer path. The combination of the two achieves a balance between accuracy and efficiency.

[0071] Yolo, short for "You Only Look Once," is a family of deep learning-based object detection algorithms. Due to its exceptional real-time performance and accuracy, the Yolo algorithm is widely used in various fields, such as autonomous driving, intelligent surveillance, industrial inspection, and robotic navigation.

[0072] It should be noted that the multi-scale feature fusion layer and the parameter-free attention layer are added to the Yolo v9 algorithm to form an improved Yolo v9 algorithm.

[0073] Specifically, for the input second feature image, the sum of the variance of the pixel values of each channel is calculated. The variance reflects the degree of discreteness of the pixel values in the feature image. A high variance usually means that the channel contains more significant structural information, such as edges, contours, or high-frequency textures. The variance is used to quantify the contribution of different channels to the pedestrian contour. High-variance channels correspond to key contour information, such as human body boundaries, and low-variance channels correspond to background or meaningless areas.

[0074] Among other things, this step filters out noisy or low-information feature channels.

[0075] The sum of the variances of each channel is normalized so that the sum of the weights of all channels is 1, forming an "energy distribution". This normalization does not require additional learnable parameters and only relies on the statistical characteristics of the data itself.

[0076] In this process, the variance is converted into probability distribution through normalization, which automatically strengthens the weight of important channels and weakens secondary channels. Moreover, it avoids introducing training parameters, reduces model complexity, and prevents overfitting.

[0077] The normalized channel weights are fused with the original second eigenimage to generate a two-dimensional spatial attention mask. Each position value of the mask represents the importance of the corresponding pixel area. Through the weight distribution of the mask, the model is guided to allocate different computing resources at different positions, enhancing sensitivity to local details. At the same time, key areas related to pedestrian contours in the image, such as human body edges, heads, and limbs, are highlighted, suppressing background interference.

[0078] The spatial attention mask is multiplied element-wise with the second feature image, and then a multi-scale feature pyramid operation is performed to generate pedestrian feature images of different resolutions.

[0079] During this process, mask weighting is used to ensure that features of different scales are focused on the pedestrian contour area, avoiding multi-scale noise interference. Moreover, the parameter-free attention mechanism constructed in this process improves computational efficiency and generalization.

[0080] In one embodiment, the second feature image is fed into a pedestrian detection model constructed by a convolutional neural backbone detection network and a cross-stage local network. The mean of each channel is calculated in the H×W dimension, the corresponding channel mean is subtracted from each spatial position, each element after centering is squared, and the sum is taken for all positions of each channel. The sum of variances is used to calculate the unbiased variance to improve the statistical accuracy of small sample scenarios. The unbiased variance is used to eliminate the dimensionality effect. The adjusted eigenvalue is then mapped to the (0,1) interval through an activation function to generate a spatial attention mask. The original feature map is multiplied element-by-element by the attention mask to obtain several pedestrian feature images of different resolutions.

[0081] In this embodiment, the mean of each channel is first calculated in the height and width dimensions of the second feature image to measure the degree of deviation of the eigenvalues at each position relative to the overall distribution; the mean of the corresponding channel is subtracted from the eigenvalue of each spatial position. This operation eliminates the overall brightness deviation between channels and makes all eigenvalues fluctuate around zero. A positive value indicates that the feature response at the position is higher than the channel average level, while a negative value indicates that it is lower than the average level, thereby highlighting the relative activation differences between different positions; the centered eigenvalues are squared to amplify the significance of the differences; spatial summation is to sum the squared values of all positions of each channel to obtain the sum of the channel variances; based on the calculated unbiased variance, the feature differences of high-variance channels are appropriately reduced, and the differences of low-variance channels are relatively amplified; through the forward solution of energy normalization and gradient modulation of feature recalibration, an efficient attention mechanism is realized without the need for an independent loss function, and the multiplication of the spatial attention mask and the second feature image realizes data-driven feature enhancement, simulating the information processing mechanism of the human visual system of "focusing on significant differences and ignoring uniform areas", enabling the network to focus on key semantic features more efficiently.

[0082] After obtaining a plurality of pedestrian feature images with different resolutions, a time series analysis is performed on the road scene image, and the pedestrian feature images are corrected based on the analysis results.

[0083] Predicting the plurality of pedestrian feature images using a dual-branch detection method to obtain a recognition probability matching each of the pedestrian feature images includes:

[0084] Cross-branch feature interaction processing is performed on the pedestrian feature images of different resolutions to obtain a cross-branch multi-scale enhanced feature map; the cross-branch multi-scale enhanced feature map is predicted using a dual-branch detection method constructed based on generalized intersection-over-union loss to obtain a recognition probability that matches each of the pedestrian feature images.

[0085] Pedestrian feature images of different resolutions are input into the dual-branch detection structure, and cross-branch feature interaction processing is performed through feature alignment and feature fusion to obtain cross-branch multi-scale enhanced feature maps.

[0086] Specifically, the dual-branch architecture typically consists of two parallel detection branches: a localization branch and a classification branch. The localization branch predicts the bounding box coordinates of the feature map, optimizing localization accuracy using the generalized intersection-over-union (GIoU) loss. The classification branch predicts the presence probability of a pedestrian, i.e., the recognition probability. The generalized intersection-over-union (GIoU) loss introduces a penalty term to the traditional loss function, overcoming the vanishing gradient problem of traditional loss functions in non-overlapping regions and improving pedestrian localization accuracy.

[0087] For the cross-branch multi-scale enhanced feature map, after the two branches output the positioning and classification results respectively, non-maximum suppression (NMS) is used to filter out high-probability pedestrian features.

[0088] Preferably, after obtaining the recognition probability matching each of the pedestrian feature images, the target detection method is used to process several of the pedestrian feature images to obtain the proportion of the occluded area of each of the pedestrian feature images; the Bayesian deep learning method is used to process each of the pedestrian feature images and the proportion of the occluded area matching each of the pedestrian feature images to obtain the uncertainty of each of the pedestrian feature images; based on the uncertainty of each of the pedestrian feature images, the recognition probability is optimized.

[0089] Specifically, a pre-trained target detection model or occlusion perception detection module is used to perform pixel-level segmentation on pedestrian feature images to distinguish between visible areas and occluded areas of pedestrians. A Bayesian Neural Network (BNN) or Monte Carlo Dropout method is used to take the pedestrian feature image and the proportion of the occluded area as joint input. Through multiple forward propagation sampling, the probability distribution of the prediction result is calculated, the original recognition probability is combined with the uncertainty, and the output is adjusted through the probability calibration formula.

[0090] Through this process, the system can generate more reliable recognition probabilities in complex occlusion environments.

[0091] A pedestrian detection result on the road is determined based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images.

[0092] Another embodiment of the present invention provides a method for detecting pedestrians on a road based on an improved Yolo v9. For details, see Figure 2-3 , Figure 2 FIG. 1 is an algorithm flow chart of a road pedestrian detection algorithm in one embodiment of the present invention. Figure 3 FIG. 1 is a partial flow diagram of a pedestrian detection model in one embodiment of the present invention, including:

[0093] Considering that the existing road pedestrian detection is not accurate in pedestrian positioning during vehicle driving, in order to improve the accuracy of detection, this method proposes a road pedestrian detection algorithm, which includes:

[0094] Spatial pyramid pooling expansion layer, upsampling layer and multi-scale feature fourth layer (P4 layer) splicing processing, parameter-free attention layer, multi-scale feature fusion layer, sampling layer and multi-scale feature third layer (P3 layer) splicing processing, multi-scale feature fusion layer, downsampling and multi-scale feature fourth layer (P4 layer) splicing processing, multi-scale feature fusion layer, downsampling and multi-scale feature fifth layer (P5) splicing processing, multi-scale feature fusion layer, dual-branch detection layer.

[0095] Specifically, the original feature map is input into the spatial pyramid pooling expansion layer, and multi-scale context information is fused through pooling operations at different scales. At the same time, the number of channels is compressed from 256 to 128, and the output feature map size remains unchanged.

[0096] In the splicing process of the upsampling layer and the fourth layer (P4 layer) of the multi-scale feature, the feature map output by the spatial pyramid pooling expansion layer is upsampled by 2 times to expand the feature map resolution. The upsampled feature map (channel 128) is spliced with the feature map (channel 192) of the third layer (P4 layer) of the multi-scale feature along the channel dimension to generate a first feature map of 40×40×320 (128+192=320).

[0097] The non-parametric attention layer is used to enhance the salient area response of the first feature map, and the number of feature map channels is increased to 1024 through channel expansion to obtain the second feature map.

[0098] The multi-scale feature fusion layer is used to fuse local and global features of the second feature map to improve the feature expression ability and obtain the third feature map.

[0099] After upsampling the third feature map, it is concatenated with the third layer of multi-scale features to fuse shallow detail information to obtain the fourth feature map.

[0100] The multi-scale feature fusion layer is used to fuse local and global features of the fourth feature map to improve the feature expression ability and obtain the fifth feature map.

[0101] The fifth feature map is downsampled and concatenated with the fourth multi-scale feature layer (P4 layer) to obtain the sixth feature map.

[0102] The multi-scale feature fusion layer is used to fuse local and global features of the sixth feature map to improve the feature expression capability and obtain the seventh feature map.

[0103] The seventh feature map is down-sampled and concatenated with the fifth multi-scale feature layer (P5) to obtain the eighth feature map.

[0104] The multi-scale feature fusion layer is used to fuse local and global features of the eighth feature map to improve the feature expression capability and obtain the ninth feature map.

[0105] The double-branch detection layer is used to predict the ninth feature map to obtain the pedestrian detection result.

[0106] Specifically, the non-parametric attention layer is used to enhance the salient region response of the first feature map, and the number of feature map channels is increased to 1024 by channel expansion to obtain the second feature map. The specific process is as follows: Figure 3 Shown, including:

[0107] First, the mean of each channel is calculated in the height and width dimensions of the second feature image to measure the degree of deviation of the eigenvalues at each position relative to the overall distribution; the eigenvalue of each spatial position is subtracted from the mean of the corresponding channel. This operation eliminates the overall brightness deviation between channels and makes all eigenvalues fluctuate around zero. A positive value indicates that the feature response at the position is higher than the average level of the channel, and a negative value indicates that it is lower than the average level, thereby highlighting the relative activation differences between different positions; the centered eigenvalue is squared to amplify the significance of the difference; spatial summation is to sum the squared values of all positions of each channel to obtain the sum of the variances of the channels; the sum of the variances is used to calculate the unbiased variance. Based on the calculated unbiased variance, the feature differences of high-variance channels are appropriately reduced, and the differences of low-variance channels are relatively amplified; the adjusted eigenvalues are then mapped to the (0,1) interval through the activation function to generate a spatial attention mask. The original feature map is multiplied element-by-element by the attention mask to obtain the second feature map.

[0108] Compared with the prior art, the embodiments of the present invention have the following advantages:

[0109] The present invention obtains an image to be detected by extracting feature areas in a road scene image in real time during vehicle driving, and sequentially performs multi-scale pooling and channel compression processing on the image to be detected to obtain a first feature image; splicing the image to be detected and the processed first feature image to obtain a second feature image; inputting the second feature image into a constructed pedestrian detection model for processing to obtain several pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed by a cross-stage local network and an improved Yolo v9 algorithm, and the processing process is designed to sequentially identify the pedestrian contours in the image through saliency calculation, energy function processing and feature recalibration processing; using a dual-branch detection method to predict several of the pedestrian feature images to obtain a recognition probability matching each of the pedestrian feature images; and determining a road pedestrian detection result based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images. Compared with the existing technology, the present invention reduces the false detection rate caused by background interference by extracting feature areas in road scene images in real time, while retaining the continuity characteristics of pedestrian limb edges. Then, the feature separability of human body contours and rigid objects is significantly enhanced through pooling, compression and splicing processing. The obtained second feature image is input into a pedestrian detection model constructed by a convolutional neural backbone detection network and a cross-stage local network for saliency calculation, saliency calculation and feature recalibration. Through multi-stage optimization, the sensitivity to pedestrian contours is improved, especially for accurately distinguishing targets in complex environments. Then, dual-branch detection is used to predict the recognition probability matching each of the pedestrian feature images. Based on the pedestrian feature images and the recognition probability matching each pedestrian feature image, the road pedestrian detection result is determined.

[0110] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A road pedestrian detection method based on improved Yolo v9, characterized in that: include: During the driving process of the vehicle, the feature area in the road scene image is extracted in real time to obtain the image to be detected; Performing multi-scale pooling and channel compression processing on the image to be detected in sequence to obtain a first feature image; Splicing the image to be detected and the processed first feature image to obtain a second feature image; Inputting the second feature image into a constructed pedestrian detection model for processing to obtain a plurality of pedestrian feature images of different resolutions, wherein the pedestrian detection model is constructed using a cross-stage local network and an improved Yolo v9 algorithm, and the processing is designed to sequentially identify pedestrian contours in the image through saliency calculation, energy function processing, and feature recalibration processing; Predicting the plurality of pedestrian feature images using a dual-branch detection method to obtain a recognition probability matching each of the pedestrian feature images; A pedestrian detection result on the road is determined based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images.

2. The method for detecting pedestrians on a road based on the improved Yolo v9 as claimed in claim 1, characterized in that: The real-time extraction of feature areas in the road scene image to obtain the image to be detected includes: Calibrate the road scene image to obtain a corrected scene image; The semantic mask processing is performed on the corrected scene image to obtain the image to be detected.

3. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: The step of sequentially performing multi-scale pooling and channel compression processing on the image to be detected to obtain a first feature image includes: Performing multi-scale pooling processing on the image to be detected to obtain the image to be detected that is integrated with context information, wherein the multi-scale pooling includes at least maximum pooling, average pooling, and adaptive pooling; The image to be detected that is fused with context information is subjected to channel compression processing to obtain the first feature image.

4. The method for detecting pedestrians on a road based on the improved Yolo v9 as claimed in claim 1, characterized in that: The step of splicing the image to be detected and the processed first feature image to obtain a second feature image includes: Performing bilinear upsampling processing on the first feature image to obtain a first feature image with the same resolution as the image to be detected; The image to be detected and the processed first feature image are spliced along the channel dimension to obtain a second feature image.

5. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: The processing is designed to identify pedestrian contours in an image through saliency calculation, energy function processing, and feature recalibration processing, including: performing saliency calculation on the second feature image to obtain a sum of variances of each channel in the second feature image; performing energy normalization processing on the sum of variances of each channel in the second feature image to obtain a salient region of the second feature image with non-parametric attention enhancement; performing feature recalibration processing on the salient region without parameter attention enhancement in the second feature image to generate a spatial attention mask; Based on the spatial attention mask and the second feature image, a plurality of pedestrian feature images with different resolutions are obtained.

6. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: The method of using the dual-branch detection method to predict the plurality of pedestrian feature images to obtain a recognition probability matching each of the pedestrian feature images includes: Performing cross-branch feature interaction processing on the plurality of pedestrian feature images of different resolutions to obtain a cross-branch multi-scale enhanced feature map; The cross-branch multi-scale enhanced feature map is predicted using a dual-branch detection method based on generalized intersection-over-union loss to obtain a recognition probability that matches each of the pedestrian feature images.

7. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: After obtaining the recognition probability matching each of the pedestrian feature images, the road pedestrian detection method based on the improved Yolo v9 further includes: Processing the plurality of pedestrian feature images using a target detection method to obtain a proportion of an occluded area of each pedestrian feature image; Using a Bayesian deep learning method, each of the pedestrian feature images and the proportion of the occlusion area matching each of the pedestrian feature images are processed to obtain the uncertainty of each of the pedestrian feature images; The recognition probability is optimized based on the uncertainty of each pedestrian feature image.

8. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: The improved Yolo v9 algorithm includes: A multi-scale feature fusion layer and a parameter-free attention layer are added to the Yolo v9 algorithm to form the improved Yolo v9 algorithm.

9. The method for detecting pedestrians on a road based on improved Yolo v9 as claimed in claim 1, characterized in that: After obtaining a number of pedestrian feature images of different resolutions, the road pedestrian detection method based on the improved Yolo v9 further includes: A time series analysis is performed on the road scene image, and the pedestrian feature image is corrected based on the analysis result.

10. The method for detecting pedestrians on a road based on improved Yolo v9 according to claim 1, wherein: Determining a pedestrian detection result on the road based on the pedestrian feature images and the recognition probability matching each of the pedestrian feature images includes: Non-maximum suppression is used to filter high-probability pedestrian feature images to determine the road pedestrian detection results.