Pedestrian detection method, device and computer readable storage medium

Through the brightness weight fusion and decomposition processing of far-infrared and visible light images, a total fusion image is formed, pedestrian features are extracted and the center point and scale are determined, which solves the problems of illumination changes and insufficient resolution of infrared images, and achieves high accuracy and stability pedestrian detection.

CN112465735BActive Publication Date: 2024-10-15CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011293191.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-18
Publication Date
2024-10-15
Estimated Expiration
2040-11-18

AI Technical Summary

Technical Problem

Existing pedestrian detection technology is prone to missed detections and false detections in complex environments. In particular, changes in lighting have a greater impact on pedestrian detection results, and the resolution of infrared images is poor and lacks imaging details.

Method used

By acquiring far-infrared images and visible light images, based on brightness weight fusion, they are decomposed into base-level images and detail-level images, combined with saliency maps for fusion, to form a total fused image, and pedestrian feature maps of different resolutions are extracted to determine the pedestrian center point and scale to obtain test results.

Benefits of technology

It improves the accuracy and stability of pedestrian detection under different lighting conditions, reduces the false detection rate and missed detection rate, and realizes pedestrian detection throughout the day. The fused image is more three-dimensional, realistic, and consistent with the human eye's perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112465735B_ABST
    Figure CN112465735B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and specifically discloses a pedestrian detection method, device and computer-readable storage medium. The method includes acquiring a far-infrared image and a visible light image respectively; fusing the far-infrared image and the visible light image based on brightness weight to obtain a total fused image; extracting pedestrian feature maps of different resolutions in the fused image and forming a total feature map; determining the pedestrian center point and scale in the total feature map, and obtaining pedestrian detection results based on the pedestrian center point and scale. The far-infrared image and the visible light image are simultaneously fused to make up for the limitation of visible light images for pedestrian detection under poor lighting conditions, improve the clarity of night images or images with uneven lighting during the day, and make up for the problems of poor resolution and lack of imaging details of far-infrared images. The detailed information of pedestrians can be reflected under different lighting conditions, the false detection rate and missed detection rate of pedestrian detection can be reduced, and pedestrian detection can be achieved throughout the day.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a pedestrian detection method, device and computer-readable storage medium. Background Art

[0002] With the advent of the intelligent era, smart homes, unmanned driving, and smart park monitoring systems have been widely studied, applied, and developed, among which pedestrian detection technology is a hot research direction. However, the application of vision-based pedestrian detection technology in complex environments still has certain difficulties. Because pedestrian characteristics are affected by different factors such as lighting, weather, background, clothing, posture, or occlusion, it is more difficult to detect pedestrians than general objects, and it is easy to miss or misdetect in complex environments.

[0003] Among them, the problem of illumination change is a major difficulty faced by current pedestrian detection technology. Visible light cameras play a particularly important role in visual perception and recognition, but they are very sensitive to illumination. Under dim brightness conditions, the imaging information obtained is limited, and recognition errors are prone to occur; and when the target is mixed with the background, the detection effect cannot be guaranteed. At present, infrared cameras are often used for night detection, but compared with visible light images, infrared images generally have the problem of poor resolution and lack of imaging details. There is a large gap with the visual perception effect of the human eye. In pedestrian detection applications, due to the lack of texture detail information in low-resolution images, pedestrian targets lack a sense of three-dimensionality, which also brings certain difficulties to pedestrian detection in infrared images.

[0004] Based on the above analysis, how to reduce the impact of illumination changes on pedestrian detection results is one of the problems that urgently needs to be solved in this field. Summary of the invention

[0005] Based on this, it is necessary to provide a pedestrian detection method, device and computer-readable storage medium to address the problem of how to reduce the impact of lighting changes on pedestrian detection results.

[0006] A pedestrian detection method comprises the following steps:

[0007] Acquire far-infrared images and visible light images respectively;

[0008] fusing the far-infrared image and the visible light image based on brightness weight to obtain a total fused image;

[0009] Extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map;

[0010] The pedestrian center point and scale in the overall feature map are determined, and a pedestrian detection result is obtained based on the pedestrian center point and scale.

[0011] In one embodiment, the step of fusing the far-infrared image and the visible light image based on brightness weight to obtain a total fused image comprises:

[0012] Determining a brightness weight required for fusion of the far-infrared image and the visible light image;

[0013] Decomposing the far-infrared image into a far-infrared base layer image and a far-infrared detail layer image at multiple scales, and decomposing the visible light image into a visible light base layer image and a visible light detail layer image at multiple scales;

[0014] Based on the brightness weight and the saliency map, the far-infrared base layer image and the visible light base layer image are fused to obtain a base layer fused image;

[0015] fusing the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image;

[0016] A total fused image is obtained according to the base layer fused image and the detail layer fused image.

[0017] In one embodiment, the step of determining the brightness weight required for fusion of the far-infrared image and the visible light image comprises:

[0018] The brightness weight is determined based on the relationship between brightness and average gray value.

[0019] In one embodiment, in the step of determining the brightness weight according to the relationship between the brightness and the average gray value, the brightness weight is obtained by using the following formula:

[0020] Bw=1-log(1+e -t )

[0021] Wherein, t represents the normalized average grayscale value of the visible light image pixels, and Bw represents the brightness weight.

[0022] In one of the embodiments, in the steps of respectively decomposing the far-infrared image into a far-infrared base layer image and a far-infrared detail layer image at multiple scales, and decomposing the visible light image into a visible light base layer image and a visible light detail layer image at multiple scales, a rolling guided filtering method is used to perform multi-scale decomposition on the far-infrared image and the visible light image.

[0023] In one embodiment, the step of fusing the far-infrared base layer image and the visible light base layer image based on the brightness weight and the saliency map to obtain a base layer fused image comprises:

[0024] Determining saliency values ​​of the visible light base layer image and the far infrared base layer image, and determining saliency maps of the visible light base layer image and the far infrared base layer image according to the saliency values;

[0025] Based on the saliency maps of the visible light base layer image and the far infrared base layer image, and the brightness weight, obtaining the base layer fusion image;

[0026] In the step of obtaining the base layer fusion image based on the saliency map of the visible light base layer image and the far infrared base layer image, and the brightness weight, the base layer fusion image is obtained by the following formula:

[0027] BF=Bw·[1+(v1-v2)]·B1+(1-Bw)·[1+(v1-v2)]·B2

[0028] Among them, Bw represents the brightness weight, B1 represents the visible light base image, B2 represents the far infrared base image, v1 represents the saliency map of the visible light base image, v2 represents the saliency map of the far infrared base image, and BF represents the base fusion image.

[0029] In one of the embodiments, in the step of fusing the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image, the far-infrared detail layer image and the visible light detail layer image are fused based on the least squares method, and the expression of the detail layer fused image is as follows:

[0030]

[0031] in, Represents the j-th level detail layer pixel value of the visible light detail layer image, represents the pixel value of the jth level detail layer of the far-infrared detail layer image, δ s Represents the scale control parameter of the filter frame, R j Represents the j-th level detail layer fused image, where j is a natural number greater than or equal to 1.

[0032] In one embodiment, the step of obtaining a total fused image according to the base layer fused image and the detail layer fused image comprises:

[0033] The total fused image is obtained by the following formula:

[0034] FF=BF+R j

[0035] Among them, FF represents the total fusion image, BF represents the base fusion image, R j Represents the detail layer fused image.

[0036] In one embodiment, the step of extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map comprises:

[0037] The total fusion image is input into a feature extraction module, and pedestrian feature maps of different resolutions are extracted through multiple convolutional layers in the feature extraction module, and are combined to form a total feature map.

[0038] In one embodiment, the step of determining the center point and scale of the pedestrian in the overall feature map and obtaining the pedestrian detection result based on the center point and scale of the pedestrian includes:

[0039] The total feature map is input into a pedestrian detector module, and the total feature map is subjected to dimension reduction and convolution processing by a convolution layer in the pedestrian detector module to predict center point information and scale information;

[0040] A detection frame is automatically generated according to the center point information and the scale information, and the detection frame is mapped to the total fusion image to obtain a pedestrian detection result.

[0041] In one embodiment, after the step of respectively acquiring the far-infrared image and the visible light image, the pedestrian detection method further includes:

[0042] The far-infrared image and the visible light image are preprocessed, wherein the preprocessing method includes image grayscale, image enhancement, filtering denoising and image calibration.

[0043] A pedestrian detection device, comprising:

[0044] An image acquisition unit, used for acquiring a far-infrared image and a visible light image respectively;

[0045] An image fusion unit, configured to fuse the far-infrared image and the visible light image based on brightness weight to obtain a total fused image;

[0046] An extraction unit, used for extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map;

[0047] The detection unit is used to determine the center point and scale of the pedestrian in the overall feature map, and obtain the pedestrian detection result based on the center point and scale of the pedestrian.

[0048] A computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the pedestrian detection method as described above is implemented.

[0049] The above pedestrian detection method first obtains far-infrared images and visible light images, then fuses the far-infrared images and visible light images based on brightness weights to obtain a total fused image, then extracts pedestrian feature maps of different resolutions in the total fused image to form a total feature map, and finally determines the pedestrian center point and scale in the total feature map, and obtains pedestrian detection results based on the pedestrian center point and scale. This pedestrian detection method fuses far-infrared images and visible light images at the same time, making up for the limitations of visible light images for pedestrian detection under poor lighting conditions, improving the clarity of night images or images with uneven lighting during the day, and making up for the problems of poor resolution and lack of imaging details of far-infrared images. The fused image is used for pedestrian detection, combining the advantages of far-infrared images and visible light images, and can reflect the detailed information of pedestrians under different lighting conditions, highlight pedestrian features, reduce the false detection rate and missed detection rate of pedestrian detection, and realize pedestrian detection throughout the day. Moreover, in the process of pedestrian detection based on fused images, the pedestrian center point and scale are used to obtain pedestrian detection results, which is not restricted by the size of the traditional sliding anchor frame, and pedestrian detection is more flexible. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flowchart of a pedestrian detection method provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of step S30 in the pedestrian detection method provided in an embodiment of the present application;

[0052] Figure 3 A flowchart of step S70 in the pedestrian detection method provided in an embodiment of the present application;

[0053] Figure 4 This is the existing pedestrian detection effect diagram;

[0054] Figure 5 This is a diagram showing the pedestrian detection effect after the pedestrian detection method provided by this embodiment is adopted;

[0055] Figure 6 A schematic diagram of the structure of a pedestrian detection device provided in an embodiment of the present application;

[0056] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to understand the disclosure of the present invention more thoroughly and comprehensively.

[0058] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like 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, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0059] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein 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. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0061] As described in the background technology, the problem of illumination change is one of the daunting challenges facing current pedestrian detection technology. On the one hand, visible light cameras play a particularly important role in visual perception and recognition, but they are very sensitive to illumination. Under dim brightness conditions, the imaging information obtained is limited, and recognition errors are prone to occur. In addition, when the target is mixed with the background, the detection effect cannot be guaranteed. On the other hand, infrared cameras are often used for night detection, but compared with visible light images, infrared images generally have the problem of poor resolution, lack of imaging details, and a large gap with the visual perception effect of the human eye. In pedestrian detection applications, due to the lack of texture detail information in low-resolution images, pedestrian targets lack a sense of three-dimensionality, which also brings certain difficulties to pedestrian detection in infrared images.

[0062] There are currently some solutions to the impact of illumination changes on pedestrian detection, and image fusion is one of them. For example, a night infrared thermal imaging image is obtained, and the night infrared thermal imaging image is processed to generate a first image and a second image; the first image and the second image are separated to obtain a red channel image, a blue channel image, and a green channel image; the red channel image in the first image and the second image is extracted respectively, and the edge detection change is performed on the red channel image; the red channel after edge detection change in the first image is fused with the blue channel image and the green channel image in the first image to obtain a first fused image. By increasing the contrast between pedestrians and the background, a clearer picture is obtained to improve the accuracy of pedestrian detection. Although this solution uses infrared images to improve the night detection effect and fuses pedestrian and background images, the infrared image has a low resolution, a large difference between pedestrians and backgrounds, and lacks pedestrian detail information, resulting in low accuracy of night pedestrian detection, and low robustness for complex backgrounds, especially in various illumination change scenes. Therefore, it cannot really solve the above problems.

[0063] In order to solve the above problems, the embodiments of the present application provide a pedestrian detection method, device and computer-readable storage medium.

[0064] This embodiment provides a pedestrian detection method, which is applied in the pedestrian detection process. Figure 1 The pedestrian detection method provided in this embodiment includes the following steps:

[0065] Step S10, acquiring a far-infrared image and a visible light image respectively.

[0066] Step S30: Fusing the far-infrared image and the visible light image based on the brightness weight to obtain a total fused image.

[0067] Step S50: extract pedestrian feature maps of different resolutions from the total fused image and form a total feature map.

[0068] Step S70: determine the center point and scale of the pedestrian in the overall feature map, and obtain the pedestrian detection result based on the center point and scale of the pedestrian.

[0069] This pedestrian detection method combines far-infrared images and visible light images at the same time, making up for the limitation of visible light images for pedestrian detection under poor lighting conditions, improving the clarity of night images or images with uneven lighting during the day, and making up for the problems of poor resolution and lack of imaging details of far-infrared images. The fused images are used for pedestrian detection, combining the advantages of far-infrared images and visible light images, and can reflect the detailed information of pedestrians under different lighting conditions, highlight the characteristics of pedestrians, make pedestrians more three-dimensional and real, and more in line with the perception of the human eye, reduce the false detection rate and missed detection rate of pedestrian detection, and realize pedestrian detection throughout the day. In addition, in the process of pedestrian detection based on fused images, the pedestrian center point and scale are used to obtain pedestrian detection results, which is not limited by the size of the traditional sliding anchor frame, and pedestrian detection is more flexible.

[0070] In step S10, a far-infrared image and a visible light image captured by the camera lens may be acquired.

[0071] In one embodiment, after the far-infrared image and the visible light image are acquired, the far-infrared image and the visible light image are also preprocessed. The preprocessing method includes operations such as image graying, image enhancement, filtering denoising and image calibration. After the far-infrared image and the visible light image are grayed, image enhancement is performed to restore the target foreground to the image, which helps to improve the object recognition effect in the dark background. Then, denoising can be performed by Gaussian filtering, and finally, image calibration is performed on the denoised image.

[0072] In one embodiment, referring to Figure 2 In step S30, the step of fusing the far-infrared image and the visible light image based on the brightness weight to obtain the total fused image includes:

[0073] Step S301: Determine the brightness weight required for fusion of the far-infrared image and the visible light image.

[0074] First, according to the influence of brightness information on pedestrian detection, the brightness weight used when fusing the far-infrared image and the visible light image is determined. Among them, only the brightness weight corresponding to the visible light image can be determined, and then the brightness weight corresponding to the far-infrared image can be obtained by calculation.

[0075] Step S302: Decompose the far-infrared image into a far-infrared base layer image and a far-infrared detail layer image at multiple scales, and decompose the visible light image into a visible light base layer image and a visible light detail layer image at multiple scales.

[0076] Among them, the base layer image mainly retains the global target and contrast information of the original image, while the detail layer image retains the details and texture, reflecting the contour details of the image. There are many ways to decompose an image at multiple scales. In this embodiment, a rolling guided filtering method is preferably used to decompose far-infrared images and visible light images. The rolling guided filtering method includes Gaussian filtering and guided filtering. Gaussian filtering is used to remove small areas of the image to achieve image denoising and interference removal. Guided filtering is used for iterative edge repair to ensure the accuracy of large area boundaries when removing complex small areas in the image.

[0077] Assume that the original input image is I, and the images decomposed in each iteration are G 1 , G 2 , …, G N-1 , the rolling guidance filtering principle is simply expressed as follows:

[0078]

[0079] The initial image G 1 is the base image, N is the number of layers of image decomposition (N=3 in this invention). δs is the scale control parameter, which removes the detail structure with a scale smaller than δs in scale space theory. δr is the radius of the filter. The decomposed base layer mainly retains the overall contrast information of the image, and the detail layer retains the contour details of the target objects such as pedestrians in the image.

[0080] Step S303: Fusing the far-infrared base layer image and the visible light base layer image based on the brightness weight and the saliency map to obtain a base layer fused image.

[0081] When the brightness weight corresponding to the fusion of the visible light image and the far infrared image, as well as the far infrared base image and the visible light base image are obtained, the far infrared base image and the visible light base image can be fused according to the brightness weight and the saliency map. Among them, the saliency map corresponding to the far infrared base image and the visible light base image can be obtained first, and then the base image is fused.

[0082] Step S304: fuse the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image.

[0083] Step S305: Obtain a total fused image based on the base layer fused image and the detail layer fused image.

[0084] When the base layer fusion image and the detail layer fusion image are obtained respectively, the total fusion image can be obtained according to the base layer fusion image and the detail layer fusion image, thereby realizing image fusion.

[0085] In one embodiment, step S301, ie, the step of determining the brightness weight required for fusion of the far-infrared image and the visible light image, includes: determining the brightness weight according to the relationship between the brightness and the average gray value.

[0086] In one embodiment, in the step of determining the brightness weight according to the relationship between the brightness and the average gray value, the brightness weight is obtained by using the following formula:

[0087] Bw=1-log(1+e -t )

[0088] Among them, t represents the normalized average grayscale value of visible light image pixels, and Bw represents the brightness weight.

[0089] The brightness weight Bw increases monotonically. When the average grayscale value of the visible light image increases, the brightness weight also increases accordingly. In this embodiment, the brightness weight Bw is kept fluctuating around 0.5 to prevent one of the images from having too large a weight, ensuring that certain visible light image information can be retained in the subsequent fusion process, while also being able to add far-infrared image feature information.

[0090] In one embodiment, step S303, that is, fusing the far-infrared base layer image and the visible light base layer image based on the brightness weight and the saliency map to obtain the base layer fused image, includes:

[0091] Step S3031: Determine the saliency values ​​of the visible light base layer image and the far infrared base layer image, and determine the saliency maps of the visible light base layer image and the far infrared base layer image according to the saliency values.

[0092] Define v as the saliency map of the image, and the saliency value of pixel i in v is v(i), which is expressed as follows:

[0093]

[0094] Among them, P j is the number of pixels with pixel value j, taking the current pixel value I i The absolute value difference of the grayscale values ​​of all other pixels is summed up to obtain the saliency value of pixel i. The saliency values ​​of all pixels are calculated, and finally the total saliency map v is obtained. In this embodiment, the saliency map results of the visible light base image are v1, and the saliency map results of the far infrared base image are v2.

[0095] Step S3032: Obtain a base layer fusion image based on the saliency maps of the visible light base layer image and the far infrared base layer image, as well as the brightness weights.

[0096] When the saliency maps of the visible light base layer image and the far infrared base layer image, as well as the brightness weights, are obtained, a base layer fusion image can be obtained. In one embodiment, the base layer fusion image is obtained by the following formula:

[0097] BF=Bw·[1+(v1-v2)]·B1+(1-Bw)·[1+(v1-v2)]·B2

[0098] Among them, Bw represents the brightness weight, B1 represents the visible light base image, B2 represents the far infrared base image, v1 represents the saliency map of the visible light base image, v2 represents the saliency map of the far infrared base image, and BF represents the base fusion image.

[0099] In one of the embodiments, in step S304, i.e., the step of fusing the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image, the far-infrared detail layer image and the visible light detail layer image are fused based on the least squares method.

[0100] The fusion of detail layer images adopts the traditional absolute maximum rule, that is, the value of each pixel is determined by the larger pixel value of the two images when comparing the detail layer images of each level. For the places with more contour information of the detail layer image, the fusion coefficient is 1, otherwise it is 0. In order to reduce image noise, appropriate Gaussian filtering is performed during fusion. Suppose the scale control parameter δ of the filter frame is s =2. For the j-th level detail layer, the expression of the detail layer fusion image is as follows:

[0101]

[0102] in, Represents the j-th level detail layer pixel value of the visible light detail layer image, represents the pixel value of the jth level detail layer of the far-infrared detail layer image, δ s Represents the scale control parameter of the filter frame, R j Represents the j-th level detail layer fused image, where j is a natural number greater than or equal to 1.

[0103] In one embodiment, step S305, i.e., the step of obtaining a total fused image according to the base layer fused image and the detail layer fused image, comprises:

[0104] The total fused image is obtained by the following formula:

[0105] FF=BF+R j

[0106] Among them, FF represents the total fusion image, BF represents the base fusion image, R j Represents the detail layer fused image.

[0107] The fusion of visible light images and far-infrared images in complex lighting environments retains the overall appearance and contrast information in the original images and highlights pedestrian targets, which is conducive to improving the stability of pedestrian detection under various lighting conditions.

[0108] In one embodiment, step S50, i.e., extracting pedestrian feature maps of different resolutions in the total fused image and forming a total feature map, comprises:

[0109] The total fused image is input into the feature extraction module, and pedestrian feature maps of different resolutions are extracted through multiple convolutional layers in the feature extraction module and merged to form a total feature map.

[0110] The feature extraction module contains multiple convolutional layers, which extract features from the total fusion image and merge them to obtain a total feature map. The target pedestrian is abstracted into high-level semantics, and features such as pedestrian center points are used to replace traditional underlying feature point extraction. Among them, the shallow convolutional layer retains richer image detail features and more accurate location information, and the deep convolutional layer presents more abstract semantic information. Combining the advantages of the two, the feature maps extracted at different resolutions are connected in series to form a total feature map.

[0111] Among them, regularization is performed before concatenating the feature maps, and deconvolution is used to convert feature maps of different dimensions to the same size.

[0112] In one embodiment, referring to Figure 3 Step S70, i.e. determining the pedestrian center point and scale in the total feature map, and obtaining the pedestrian detection result based on the pedestrian center point and scale, comprises:

[0113] Step S701: input the total feature map into the pedestrian detector module, perform dimension reduction and convolution processing on the total feature map through the convolution layer in the pedestrian detector module, and predict the center point information and scale information.

[0114] Step S702: automatically generate a detection frame according to the center point information and the scale information, and map the detection frame to the total fusion image to obtain a pedestrian detection result.

[0115] After feature extraction, the pedestrian detector module can first reduce the dimension through a 3x3x256 convolution layer to reduce the number of channels of the total feature map to 256, and then use two 1x1 convolution layers to perform parallel convolution operations to predict a center point heat map and a scale map respectively. Then, the center point coordinates and scale results are used to automatically generate a detection box and map it to the original image.

[0116] Among them, the center point position prediction is a binary classification problem, that is, the pedestrian center pixel point is taken as a positive sample. If the probability of the location being the center point is high, it is marked as "+" (positive); the other negative sample points are marked as "-" (negative). In addition, in order to improve the accuracy of center point calculation, this application also considers points near the center point. If a certain position is not a positive sample, but is relatively close to the positive sample point, the Gaussian heat map M is used to calculate the center point. ij Reflects the distance from the center point.

[0117] In order to optimize the prediction results of the center point during training and testing, the cross entropy is used as the loss function L of the center point position. center , as follows:

[0118]

[0119] Among them, P ij ∈[0,1] is the probability prediction value of whether there is a center point at position (i,j). ij 1 or 0 indicates that the location is a positive sample or a negative sample. If the location is not a positive sample, but is close to the positive sample point, then M ij The value of allows points near the center point to participate in the calculation, while other points farther away are 0. β = 4, γ = 2 are the hyper parameters of the loss function.

[0120] In the pedestrian scale prediction, the present invention sets a fixed pedestrian aspect ratio Ratio = 0.37, and only needs to predict the pedestrian height h to obtain the size of the recognition box. The loss function of scale prediction adopts SmoothL1 loss, as shown in the following formula:

[0121]

[0122] Among them, s k and t k Represent the scales of the predicted results and the true values ​​respectively.

[0123] Combining the loss functions of the center point and scale prediction, the total loss function is as follows:

[0124] Loss = λ center L center +λ scale L scale

[0125] The hyperparameter λ center =0.01,λ scale =1.

[0126] The above pedestrian detection technology reduces the complexity of traditional anchor frame parameter setting and the limitations of anchor frame size, while also improving the pedestrian occlusion problem.

[0127] Here is a specific example:

[0128] Figure 4 The pedestrian detection results of the existing pedestrian detection methods are shown in Figure 2, including the pedestrian detection results based on far-infrared images and visible light images under two brightness conditions: daytime and nighttime. Figure 4 It can be seen that both far-infrared and visible light images can perform basic recognition during the day and at night, but each has its own advantages and disadvantages. In the same scene during the day, the effect of far-infrared is slightly worse than that of visible light. Since far-infrared images do not contain enough information and lack imaging details, they are prone to missed detections and many false detections. At night, the recognition effects of using visible light cameras and far-infrared cameras alone are relatively poor, but relatively speaking, pedestrians and vehicles are more obvious in far-infrared images, and the effect is better than that of visible light images.

[0129] Figure 5 The pedestrian detection effect of the pedestrian detection method provided by this embodiment is shown in FIG. Figure 5 It can be seen that the recognition effect of the fused image is significantly improved compared to that of a single image. It can detect pedestrians that cannot be recognized by visible light, and also reduces the false detection rate of a single far-infrared image. In bright daytime environments, the pedestrian features of far-infrared images are less clear, resulting in a relatively low pedestrian detection rate. The detection accuracy of fused images and visible light images is higher. However, in the case of shadows, the detection effect of fused images is better than that of visible light images. Due to the lack of sufficient light brightness, the pedestrian detection effect of visible light images at night is not ideal, and the pedestrian features of far-infrared images and fused images are more obvious. Since the fused image contains more detailed information, the image is more three-dimensional, and the prediction of the position and size of the recognition frame is also better.

[0130] In another embodiment, this embodiment provides a pedestrian detection device, which is applied in a pedestrian detection process. Figure 6 The pedestrian detection device provided in this embodiment includes an image acquisition unit 20, an image fusion unit 21, an extraction unit 22 and a detection unit 23.

[0131] The image acquisition unit 20 is used to acquire far-infrared images and visible light images respectively.

[0132] The image fusion unit 21 is used to fuse the far-infrared image and the visible light image based on the brightness weight to obtain a total fused image.

[0133] The extraction unit 22 is used to extract pedestrian feature maps of different resolutions from the total fusion image and form a total feature map.

[0134] The detection unit 23 is used to determine the center point and scale of the pedestrian in the overall feature map, and obtain the pedestrian detection result based on the center point and scale of the pedestrian.

[0135] In the process of pedestrian detection by the above-mentioned pedestrian detection device, far-infrared images and visible light images are fused at the same time, which makes up for the limitation of visible light images for pedestrian detection under poor lighting conditions, improves the clarity of night images or images with uneven lighting during the day, and makes up for the problems of poor resolution and lack of imaging details of far-infrared images. The fused images are used for pedestrian detection, which combines the advantages of far-infrared images and visible light images, and can reflect the detailed information of pedestrians under different lighting conditions, highlight the characteristics of pedestrians, make pedestrians more three-dimensional and real, and more in line with the perception of the human eye, reduce the false detection rate and missed detection rate of pedestrian detection, and realize pedestrian detection throughout the day. In addition, in the process of pedestrian detection based on fused images, the pedestrian center point and scale are used to obtain pedestrian detection results, which is not limited by the size of the traditional sliding anchor frame, and pedestrian detection is more flexible.

[0136] The pedestrian detection device provided in this embodiment and the pedestrian detection method described above belong to the same inventive concept. For the specific content of the pedestrian detection device, please refer to the specific description of the pedestrian detection method described above, which will not be repeated here.

[0137] In another embodiment, the present application also provides an electronic device, such as Figure 7 As shown, the electronic device includes a memory 100 and a processor 200. The memory 100 and the processor 200 are connected to each other in a communication manner and may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0138] The processor 200 may be a central processing unit (CPU). The processor 200 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0139] The memory 100 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions corresponding to the pedestrian detection method in the embodiment of the present invention. The processor 200 executes various functional applications and data processing of the processor 200 by running the non-transitory software programs, instructions and modules stored in the memory 100, that is, implementing the pedestrian detection method.

[0140] The memory 100 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 200, etc. In addition, the memory 100 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 100 may optionally include a memory remotely arranged relative to the processor 200, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0142] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A pedestrian detection method, It is characterized in that The following steps are involved: Acquire far-infrared images and visible light images respectively; fusing the far-infrared image and the visible light image based on brightness weight to obtain a total fused image; Extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map; Determine the center point and scale of the pedestrian in the overall feature map, and obtain a pedestrian detection result based on the center point and scale of the pedestrian; The step of fusing the far-infrared image and the visible light image based on brightness weight to obtain a total fused image comprises: Determining a brightness weight required for fusion of the far-infrared image and the visible light image; Decomposing the far-infrared image into a far-infrared base layer image and a far-infrared detail layer image at multiple scales, and decomposing the visible light image into a visible light base layer image and a visible light detail layer image at multiple scales; Based on the brightness weight and the saliency map, the far-infrared base layer image and the visible light base layer image are fused to obtain a base layer fused image; fusing the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image; Obtaining a total fused image according to the base layer fused image and the detail layer fused image; In the steps of multi-scale decomposing the far-infrared image into a far-infrared base image and a far-infrared detail layer image, and multi-scale decomposing the visible light image into a visible light base image and a visible light detail layer image, a rolling guided filtering method is used to perform multi-scale decomposition on the far-infrared image and the visible light image; assuming that the original input image is I, and the images decomposed in each iteration are G 1 , G 2 , …, G N-1 , the principle of rolling guided filtering is as follows: Among them, the initial image G 1 is the base image, N is the number of layers of image decomposition, δs is the scale control parameter, which removes the detail structure with a scale smaller than δs in the scale space theory, and δr is the radius of the filter; The step of determining the pedestrian center point and scale in the overall feature map and obtaining the pedestrian detection result based on the pedestrian center point and scale includes: The total feature map is input into a pedestrian detector module, and the total feature map is subjected to dimension reduction and convolution processing by a convolution layer in the pedestrian detector module to predict the center point information and scale information; wherein the center point position is predicted by a binary classification problem; and automatically generating a detection frame according to the center point information and the scale information, mapping the detection frame to the total fusion image, and obtaining a pedestrian detection result; Among them, in the process of obtaining the prediction processing of the center point position, a total loss function is set for the binary classification problem of the center point position prediction, and the total loss function is determined in the following way: Loss=λ center L center +λ scale L scale Among them, the hyperparameter λ center =0.01,λ scale =1,L center Indicates the use of cross entropy as the loss function of the center point position, L scale represents the loss function for size prediction; Use cross entropy as the loss function L of the center point position center , as follows: Among them, P ij ∈[0,1] is the probability prediction value of whether the position (i,j) has a center point, y ij 1 or 0 indicates that the location is a positive sample or a negative sample, β = 4, γ = 2 are the hyper parameters of the loss function; The loss function for scale prediction uses SmoothL1 loss, as shown below: Among them, s k and t k Represent the scales of the predicted results and true values ​​respectively; Set a fixed pedestrian aspect ratio Ratio = 0.

37.

2. The pedestrian detection method according to claim 1, It is characterized in that The step of determining the brightness weight required for the fusion of the far-infrared image and the visible light image comprises: The brightness weight is determined based on the relationship between brightness and average gray value.

3. The pedestrian detection method according to claim 2, It is characterized in that In the step of determining the brightness weight according to the relationship between the brightness and the average gray value, the brightness weight is obtained by using the following formula: Bw=1-log(1+e -t ) Wherein, t represents the normalized average grayscale value of the visible light image pixels, and Bw represents the brightness weight.

4. The pedestrian detection method according to claim 1, It is characterized in that The step of fusing the far-infrared base layer image and the visible light base layer image based on the brightness weight and the saliency map to obtain a base layer fused image comprises: Determining saliency values ​​of the visible light base layer image and the far infrared base layer image, and determining saliency maps of the visible light base layer image and the far infrared base layer image according to the saliency values; Based on the saliency maps of the visible light base layer image and the far infrared base layer image, and the brightness weight, obtaining the base layer fusion image; In the step of obtaining the base layer fusion image based on the saliency map of the visible light base layer image and the far infrared base layer image, and the brightness weight, the base layer fusion image is obtained by the following formula: BF=Bw·[1+(v 1 -v 2 )]·B 1 +(1-Bw)·[1+(v 1 -v 2 )]·B 2 Among them, Bw represents the brightness weight, B 1 represents the visible light base image, B 2 represents the far-infrared base image, v 1 Represents the saliency map of the visible light base image, v 2 represents the saliency map of the far-infrared base image, and BF represents the base fusion image.

5. The pedestrian detection method according to claim 1, It is characterized in that In the step of fusing the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fused image, the far-infrared detail layer image and the visible light detail layer image are fused based on the least squares method, and the expression of the detail layer fused image is as follows: in, Represents the j-th level detail layer pixel value of the visible light detail layer image, represents the pixel value of the jth level detail layer of the far-infrared detail layer image, δ s Represents the scale control parameter of the filter frame, R j Represents the j-th level detail layer fused image, where j is a natural number greater than or equal to 1.

6. The pedestrian detection method according to claim 1, It is characterized in that The step of obtaining a total fused image according to the base layer fused image and the detail layer fused image comprises: The total fused image is obtained by the following formula: FF=BF+R j Among them, FF represents the total fusion image, BF represents the base fusion image, R j Represents the detail layer fused image.

7. The pedestrian detection method according to claim 1, It is characterized in that The step of extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map comprises: The total fusion image is input into a feature extraction module, and pedestrian feature maps of different resolutions are extracted through multiple convolutional layers in the feature extraction module, and are combined to form a total feature map.

8. The pedestrian detection method according to claim 1, It is characterized in that After the steps of respectively acquiring the far-infrared image and the visible light image, the pedestrian detection method further comprises: The far-infrared image and the visible light image are preprocessed, wherein the preprocessing method includes image grayscale, image enhancement, filtering denoising and image calibration.

9. A pedestrian detection device, It is characterized in that include: An image acquisition unit, used for acquiring a far-infrared image and a visible light image respectively; An image fusion unit, configured to fuse the far-infrared image and the visible light image based on brightness weight to obtain a total fused image; An extraction unit, used for extracting pedestrian feature maps of different resolutions from the total fused image and forming a total feature map; The method is also used to determine the brightness weight required for the fusion of the far-infrared image and the visible light image; respectively decompose the far-infrared image into a far-infrared base image and a far-infrared detail layer image at multiple scales, and decompose the visible light image into a visible light base image and a visible light detail layer image at multiple scales; fuse the far-infrared base image and the visible light base image based on the brightness weight and the saliency map to obtain a base fusion image; fuse the far-infrared detail layer image and the visible light detail layer image to obtain a detail layer fusion image; obtain a total fusion image based on the base fusion image and the detail layer fusion image; in the steps of respectively decomposing the far-infrared image into a far-infrared base image and a far-infrared detail layer image at multiple scales, and decomposing the visible light image into a visible light base image and a visible light detail layer image at multiple scales, a rolling guided filtering method is used to perform multi-scale decomposition on the far-infrared image and the visible light image; let the original input image be I, and the images decomposed in each iteration be G respectively. 1 , G 2 , …, G N-1 , the principle of rolling guided filtering is as follows: Among them, the initial image G 1 is the base image, N is the number of layers of image decomposition, δs is the scale control parameter, which removes the detail structure with a scale smaller than δs in the scale space theory, and δr is the radius of the filter; A detection unit, used to determine the center point and scale of the pedestrian in the total feature map, and obtain the pedestrian detection result based on the pedestrian center point and scale; and also used to input the total feature map into the pedestrian detector module, perform dimensionality reduction and convolution processing on the total feature map through the convolution layer in the pedestrian detector module, and predict the center point information and scale information; wherein the center point position is predicted through a binary classification problem; and a detection frame is automatically generated according to the center point information and the scale information, and the detection frame is mapped to the total fusion image to obtain the pedestrian detection result; Among them, in the process of obtaining the prediction processing of the center point position, a total loss function is set for the binary classification problem of the center point position prediction, and the total loss function is determined in the following way: Loss=λ center L center +λ scale L scale Among them, the hyperparameter λ center =0.01,λ scale =1,L center Indicates the use of cross entropy as the loss function of the center point position, L scale represents the loss function for size prediction; Use cross entropy as the loss function L of the center point position center , as follows: Among them, P ij ∈[0,1] is the probability prediction value of whether the position (i,j) has a center point, y ij 1 or 0 indicates that the location is a positive sample or a negative sample, β = 4, γ = 2 are the hyper parameters of the loss function; The loss function for scale prediction uses SmoothL1 loss, as shown below: Among them, s k and t k Represent the scales of the predicted results and true values ​​respectively; Set a fixed pedestrian aspect ratio Ratio = 0.

37.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the pedestrian detection method according to any one of claims 1 to 8 is implemented.