Lightweight infrared image pedestrian target detection method
By improving the YOLOv5 network structure, adopting the lightweight backbone feature extraction network MBNet and CBAM attention mechanism, and combining the Gaussian distribution to design the loss function, the problems of large parameters and low recognition rate in the infrared image pedestrian target detection algorithm are solved, achieving more efficient and faster detection results.
Patent Information
- Application Number
- CN202310681618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-06-09
AI Technical Summary
Existing infrared image pedestrian target detection algorithms have large parameters, high computational complexity, high deployment cost, and low recognition rate, especially when the infrared pedestrian target is far away, has weak energy, and low contrast.
The lightweight backbone feature extraction network MBNet is used to replace the backbone part of YOLOv5, and a LOG filter is added to the CBAM attention mechanism. The CIoU loss function is improved. The weights are designed through Gaussian and exponential distributions. Combined with the Mosaic data enhancement training dataset, the detection accuracy and speed are improved.
Without reducing the accuracy, the number of parameters and calculations is significantly reduced, and the detection speed and accuracy are improved. The detection time is reduced by 48.4%, the number of parameters is reduced by 54.4%, the number of weight files is reduced by 52.8%, the accuracy is increased by 4.2%, and the mAP50 reaches 98.9%.
Smart Images

Figure CN116824630B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of infrared image pedestrian target detection, and particularly relates to a lightweight infrared image pedestrian target detection method. BACKGROUND
[0002] Infrared imaging has strong anti-interference ability, is less affected by light and bad weather, has long detection distance, and is suitable for all-weather target detection. Target detection using infrared images has an irreplaceable position in many fields. Infrared image target detection algorithms can be divided into two categories: traditional algorithms and deep learning-based algorithms. Traditional algorithms usually detect and recognize according to the gray value of the target itself, the neighborhood background information and other features. These algorithms mostly select features based on manual selection, so the feature parameters considered in the algorithm design are always limited. Deep learning can extract deep features in the data through training to represent the target and improve the robustness of target detection. The single-stage YOLOv5 target detection model has high precision, flexibility, strong ease of use and other characteristics, and is widely used. However, YOLOv5 has a large number of parameters, high computational complexity, slow model training speed and high deployment cost. Only high-end graphics processing units can ensure its performance. In addition, due to the problems of long distance, weak energy, low contrast and low resolution of infrared pedestrian targets, the recognition rate of pedestrian target detection is low. SUMMARY
[0003] The present application provides a lightweight infrared image pedestrian target detection method to solve the problems of large algorithm parameter quantity, high computational complexity, high deployment cost and low recognition rate mentioned in the background art.
[0004] The present application is implemented by the following technical solutions:
[0005] The lightweight infrared image pedestrian target detection method provided by the present application comprises the following steps:
[0006] Step 1, constructing an improved lightweight YOLOv5 network model:
[0007] Step 1.1: selecting a lightweight backbone feature extraction network MBNet to replace the backbone part of YOLOv5;
[0008] Step 1.2: adding a LOG filter in the CBAM attention mechanism to highlight the edge features of pedestrians in the attention module;
[0009] Step 1.3: introducing the CBAM attention mechanism with the added LOG filter into the backbone feature extraction network MBNet to strengthen the extraction of pedestrian target features in the infrared image during the backbone feature extraction process;
[0010] Step 1.4: Based on the Gaussian probability density distribution and the exponential distribution, the loss function is improved to assign weights to each pixel point in the image, and the IoU part in the CIoU loss function is redesigned;
[0011] Step 2: Obtain an infrared image pedestrian dataset;
[0012] Step 3: Train the improved YOLOv5 network model;
[0013] Step 4: Perform pedestrian detection in the infrared image using the trained model;
[0014] In the above method, the MBNet network of step 1.1 is composed of 1 CBH module and 11 Hblock basic modules, wherein the CBH module includes a convolution layer with parameters (1, 16, 3, 2), batch normalization and Hardwish activation function.
[0015] In the above method, the Hblock basic module has three types, including 1 Hblock_1 module, 2 Hblock_2 modules and 8 Hblock_3 modules.
[0016] In the above method, the CBH module, Hblock_1 module, Hblock_2 module and Hblock_3 module are connected in sequence to form an improved yolov5 backbone layer, namely the MBNet network.
[0017] In the above method, the Hblock_1 module is composed of a DW convolution layer with a convolution kernel of 3*3, an improved CBAM attention mechanism and a convolution layer with a convolution kernel of 1*1; the Hblock_2 module is composed of a convolution layer with a convolution kernel of 1*1, a DW convolution layer with a convolution kernel of 3*3, and a convolution layer with a convolution kernel of 1*1 connected in sequence; the Hblock_3 module is composed of a convolution layer with a convolution kernel of 1*1, a DW convolution layer with a convolution kernel of 3*3, an improved CBAM attention mechanism, and a convolution layer with a convolution kernel of 1*1. In addition, residual structures are added in the Hblock_1 module, Hblock_2 module and Hblock_3 module, and the residual structure is run only when the channel number of the input and output feature maps is consistent.
[0018] In the above method, the CBAM attention mechanism with the added LOG filter in step 1.3 is divided into three parts, including the following steps:
[0019] Step 1.3.1: Make the input feature map pass through the channel attention module of CBAM to obtain a weighted feature map F';
[0020] Step 1.3.2: The feature map F' is fused with the filtered map through the LOG filter to obtain a feature map F1;
[0021] Step 1.3.3: The feature map F1 passes through the spatial attention module of CBAM to obtain a feature map F2.
[0022] In the above method, the CIoU loss function based on the probability density function is improved in step 1.4. The main improvement is the IoU, which is redesigned based on Gaussian probability density distribution and exponential distribution. The specific steps are as follows:
[0023] Step 1.4.1: Establish an image probability distribution model. Establish a coordinate system model with the upper left corner of the image as the origin, where the vertical axis direction is positive downward, and normalize the length and width to the coordinates (0, 1). The y coordinate in the range (0, 0.5) adopts an exponential distribution function, and the range (0.5, 1) adopts a Gaussian probability density distribution function.
[0024] Step 1.4.2: Through multiple comparative experiments, the mean of the Gaussian probability distribution model is taken as 0.5, the variance is taken as 0.3, and the expectation of the exponential distribution is taken as 1.33 to obtain the probability distribution model f(y) as shown in formula (1-1).
[0025]
[0026] In the formula: y c is the mean of the pedestrian distribution in the vertical axis direction, σ is the variance, λ is the exponential coefficient, and y is the pedestrian distribution coordinate, i.e. the pixel coordinate of each row of pixels occupied by the pedestrian in the vertical axis direction;
[0027] Step 1.4.3: For an image, use the obtained probability density distribution model f(y) to integrate the upper and lower limits to obtain the weight of each row of pixels.
[0028] Step 1.4.4: Multiply the weight of each row of pixels in the predicted box and the real box by the area of the row and sum them up to obtain the weighted areas A' and B' of the predicted box and the real box shown in formulas 1-2, 1-3, 1-4 and IoU', including:
[0029]
[0030]
[0031]
[0032] Wherein, A, B are the areas of the predicted frame and the real frame respectively; n1 is the number of rows of pixels in the predicted frame, and n2 is the number of rows of pixels in the real frame; A' is the improved weighted area of the predicted frame, and B' is the improved weighted area of the real frame; y i is the coordinate of the i-th row of pixels; f(y) is the probability distribution function value; IoU' is the ratio of the intersection area to the union area of the improved predicted frame and the real frame, also known as the intersection-over-union ratio;
[0033] Step 1.4.5: The improved loss function is represented by formula 1-5:
[0034]
[0035] Wherein, b, b gt represent the center points of the predicted frame and the real frame respectively, and p represents the Euclidean distance between the two rectangular frames; c represents the distance of the diagonal line of the closure area of the two rectangular frames; ω gt and h gt represent the width and height of the real frame, and ω and h represent the width and height of the predicted frame; u is the similarity of the width-to-height ratio of the predicted frame and the real frame; alpha is the influence factor of u; IoU' is the ratio of the intersection area to the union area of the improved predicted frame and the real frame, also known as the intersection-over-union ratio.
[0036] In the above method, the public data set KAIST can be used, and the training set, the verification set and the test set are divided by 6:2:2, and data cleaning and Mosaic data enhancement are performed.
[0037] In the above method, when training the improved YOLOv5 network model, the training parameters are set, the random optimization algorithm Adam is used for training, the training batch is set to Batch=64, the initial weight uses the weight of yolov5s, the learning rate is set to Ir=0.001, and the training iteration number is set to Epoch=300.
[0038] The method provided by the application is used for detecting pedestrian targets in infrared images or infrared videos.
[0039] Compared with the prior art, the application has the following main beneficial effects:
[0040] Firstly, since the lightweight backbone feature extraction network MBNet is used to replace the backbone part of YOLOv5 in the application, the parameter amount and the calculation amount are greatly reduced under the premise that the accuracy is basically unchanged, the model training speed is improved, and the model deployment cost is reduced.
[0041] Secondly, since the LOG filter is added in the CBAM attention mechanism of the application, the edge features of the pedestrians are highlighted, the original image is fused with the image after the LOG filter, the contour edge of the original image is clearer and has higher contrast, and the detection accuracy is increased;
[0042] Thirdly, since the improved CBAM attention mechanism is introduced in the backbone feature extraction network MBNet of the application, the pedestrian target is weighted and fused from the channel and spatial dimensions, and the network is forced to pay attention to the targets of different scales in the infrared pedestrian image, so that the robustness and distinguishability features are better learned.
[0043] Fourthly, compared with the YOLOv5 infrared pedestrian image target detection, the detection speed, network parameters, weight file and the like are greatly improved, the detection accuracy is slightly improved by about 4.2% and the mAP50 reaches 98.9% due to the high accuracy of YOLOv5 itself, the network parameter of the improved YOLOv5 is 3206178, which is reduced by about 54.4% compared with the original parameter 7027720 of YOLOv5, the detection time is reduced by about 48.4%, the calculation amount is reduced by 61.25%, and the weight file is reduced by 52.8%. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 A flowchart of a lightweight infrared image pedestrian target detection method provided for an embodiment of the application is shown in the figure;
[0045] Figure 2 A Hblock structure diagram provided for an embodiment of the application is shown in the figure;
[0046] Figure 3 An improved YOLOv5 network structure diagram provided for an embodiment of the application is shown in the figure. DETAILED DESCRIPTION
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed to be used in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0048] The lightweight infrared image pedestrian target detection method of the application, please refer to Figure 1 , including:
[0049] Step 1: build an improved lightweight YOLOv5 network model:
[0050] Firstly, the neck layer of the YOLOv5 target detection model adopts the PANet structure, which can fuse features of different levels of feature maps, including shallow, middle and deep feature maps. This multi-scale feature fusion can improve the model's recognition ability of targets, so that the model can handle targets of different sizes and adapt to different scenes.
[0051] Secondly, the YOLOv5 target detection model has high precision, flexibility, and strong usability, which has a strong advantage in the rapid deployment of the model.
[0052] Finally, in view of the problems of low recognition rate and high false alarm rate of pedestrian target detection caused by long distance, weak energy, low contrast and low resolution of infrared pedestrian target, the YOLOv5 target detection model is selected for improvement. The improved YOLOv5-based infrared pedestrian target detection deep learning model includes: using a lightweight backbone feature extraction network MBNet to replace the backbone part of YOLOv5, which greatly reduces the parameter quantity and computational quantity under the premise of basically unchanged accuracy, and improves the model training speed; introducing CBAM attention mechanism to strengthen the extraction of infrared pedestrian target features; adding LOG filter to highlight the edge features of pedestrians in the attention module; improving the loss function to improve the prediction accuracy of the model.
[0053] The improved YOLOv5-based infrared pedestrian detection deep network model is as shown in Figure 3 , specifically:
[0054] Step 1.1: Use a lightweight backbone feature extraction network MBNet to replace the backbone part of YOLOv5, which greatly reduces the parameter quantity and computational quantity under the premise of basically unchanged accuracy; the MBNet network is composed of 1 CBH module and 11 Hblock basic modules. Among them, the CBH module includes a convolution layer with parameters (1, 16, 3, 2), batch normalization and Hardswish activation function. The Hblock basic network has three types, including 1 Hblock_1, 2 Hblock_2 and 8 Hblock_3. The input infrared image is sequentially passed through the CBH module, the Hblock_1 module, the Hblock_2 module and the Hblock_3 module to obtain feature maps of different sizes, realizing the full extraction of fine-grained features of shallow information and high-level semantic information of deep information, and performing feature fusion in the neck layer. The Hblock basic module has three types, including 1 Hblock_1 module, 2 Hblock_2 modules and 8 Hblock_3 modules.
[0055] The Hblock_1 module is composed of a DW convolutional layer with a convolution kernel of 3*3, an improved CBAM attention mechanism, and a convolutional layer with a convolution kernel of 1*1; the Hblock_2 module is composed of a convolutional layer with a convolution kernel of 1*1, a DW convolutional layer with a convolution kernel of 3*3, and a convolutional layer with a convolution kernel of 1*1 connected in sequence; and the Hblock_3 module is composed of a convolutional layer with a convolution kernel of 1*1, a DW convolutional layer with a convolution kernel of 3*3, an improved CBAM attention mechanism, and a convolutional layer with a convolution kernel of 1*1. In addition, residual structures are added in the Hblock_1 module, the Hblock_2 module, and the Hblock_3 module, and the residual structures are operated only when the number of channels of the input and output feature maps is consistent. As shown in Figure 3 CBH, Hblock_1, Hblock_2, and Hblock_3 are connected in sequence to form the improved yolov5 backbone layer.
[0056] Figure 2 Hblock_3 module, and the Hblock_1 module is obtained by removing a convolutional layer with a convolution kernel of 1*1 from the Hblock_3 module, and the Hblock_2 module is obtained by removing an improved CBAM attention mechanism from the Hblock_3 module.
[0057] Step 1.2: A LOG filter, i.e., a Gaussian-Laplacian filter, is added to the CBAM attention mechanism to highlight the edge features of pedestrians in the attention module; the feature maps that have not undergone the LOG filter are fused with the feature maps that have undergone the LOG filter, so that the image contour edge is clearer and has higher contrast, and the detection accuracy is increased.
[0058] Step 1.3: The CBAM attention mechanism with the added LOG filter is introduced into the backbone feature extraction network MBNet, as shown in Figure 2 The CBAM attention mechanism is a lightweight module that can be directly embedded into the network, and it can adaptively adjust the structure by obtaining different receptive field information, and has strong generalization ability. It will be beneficial to the detection of pedestrians in infrared images, and only a small amount of calculation burden is required to achieve systematic improvement.
[0059] The improved CBAM attention mechanism is divided into three parts, and the specific steps include the following steps:
[0060] Step 1.3.1: First, the feature map generated in step 1.2.1 is passed through the channel attention module of CBAM to obtain a weighted feature map F'.
[0061] Step 1.3.2: Then, the feature map F' is fused with the filtered map through the LOG filter to obtain the feature map F1.
[0062] Step 1.3.3: Then, the feature map F1 is passed through the spatial attention module of CBAM to obtain the feature map F2.
[0063] Step 1.4: Improve the loss function, improve the CIoU loss function based on the probability density function, the main improvement part is IoU, redesign IoU part based on Gaussian probability density distribution and exponential distribution, the specific steps are as follows:
[0064] Step 1.4.1: Establish an image probability distribution model, by statistical analysis of the distribution of pedestrians in a group of training samples (i.e. multiple images), it is found that the distribution of pedestrians in the horizontal axis direction has no obvious difference, while the difference in the vertical axis direction is larger, among which pedestrians are mainly concentrated in the center area and the lower area of the image, in addition, the upper 1 / 3 of the image is mostly background, and the probability of appearing pedestrians is very small. Therefore, we establish a coordinate system model with the upper left corner of the image as the origin, the vertical axis direction is positive downward, and the length and width are normalized to (0, 1), where the y coordinate in the range of (0, 0.5) adopts exponential distribution function, and in the range of (0.5, 1) adopts Gaussian probability density distribution function.
[0065] Step 1.4.2: Through multiple comparative experiments, this paper takes the mean of Gaussian probability distribution model as 0.5, the variance as 0.3, and the expectation of exponential distribution as 1.33, to obtain the probability distribution model f(y) as shown in formula (1-1).
[0066]
[0067] In the formula: y c is the mean of pedestrian distribution in the vertical axis direction, σ is the variance, λ is the exponential coefficient, and y is the pedestrian distribution coordinate, i.e. the pixel coordinate of each row of pixels occupied by pedestrians in the vertical axis direction.
[0068] Step 1.4.3: For an image, use the obtained probability density distribution model f(y) to integrate on the upper and lower limits to obtain the weight of each row of pixels.
[0069] Step 1.4.4: In the prediction box and the real box, multiply the area of each row of pixels by the weight of each row of pixels and sum them up to obtain the weighted area A' of the prediction box and the weighted area B' of the real box, and the improved intersection over union IoU', as shown in formulas 1-2, 1-3, and 1-4.
[0070]
[0071]
[0072]
[0073] wherein A, B are the area of the predicted box and the real box respectively; n1 is the number of rows of pixels in the predicted box, n2 is the number of rows of pixels in the real box; A' is the improved weighted area of the predicted box, B' is the improved weighted area of the real box; y i is the coordinate of the i-th row of pixels; f(y i ) is the probability distribution function value corresponding to each row of pixels.
[0074] Step 1.4.5: the improved loss function is shown in formula 1-5;
[0075]
[0076] wherein b, b gt represent the center points of the predicted box and the real box respectively, p represents the Euclidean distance between the two rectangular boxes, c represents the distance of the diagonal of the closure region of the two rectangular boxes; ω gt and h gt represent the width and height of the real box, and ω and h represent the width and height of the predicted box; υ is the similarity of the width-height ratio of the predicted box and the real box; a is the influence factor of υ; IoU' is the ratio of the intersection area and the union area of the improved predicted box and the real box, also known as the intersection-over-union.
[0077] Step 2, establish an infrared pedestrian detection data set, specifically:
[0078] Step 2.1: select the public dataset KAIST, first clean the data in the public dataset KAIST, because this dataset is taken from video continuous frame pictures, the adjacent pictures are not much different, so take one picture every 2 pictures, that is, take one picture every 3 pictures. And remove all pictures that do not contain any pedestrians (there are many negative samples in the dataset), select at least one target in the selected pictures, and eliminate pictures in which pedestrians are severely occluded. Finally, divide the obtained pictures into training set, validation set and test set according to the ratio of 6:2:2.
[0079] Step 2.2: data augmentation is performed on the established dataset:
[0080] The Mosaic algorithm is used to realize data enhancement of infrared pedestrian data, the Mosaic algorithm randomly selects four pictures in the training set, performs random scaling, random cutting, random arrangement, and then splices them into one picture as a training sample, which enriches the background and small targets of the detected object, and when calculating the batch normalization, the data of four pictures is calculated at a time, so that the minibatch size does not need to be very large to achieve good results, and the diverse target samples make the trained model have stronger generalization ability.
[0081] Step 3: training the improved YOLOv5 network through the infrared pedestrian training set. Specifically:
[0082] Step 3.1: the infrared image pedestrian detection training set and the verification set after preprocessing in step 2.2 are sent into the infrared image pedestrian target detection deep learning model based on the improved YOLOv5 constructed in step 1;
[0083] Step 3.2: adaptively scale the picture size, and realize adaptive scaling of the infrared image pedestrian detection training set and the verification set picture according to the input picture size set by the network;
[0084] Step 3.3: set the training parameters, train by using the random optimization algorithm Adam, set the training batch as Batch=64, use the weight of yolov5s as the initial weight, and set the training iteration number as Epoch=300;
[0085] Step 3.4: according to the learning rate and iteration number determined in step 3.4, the training of the infrared image pedestrian target detection deep learning model based on the improved YOLOv5 is completed, and the infrared image pedestrian target detection deep learning model based on the improved YOLOv5 with good convergence is obtained.
[0086] Step 4: infrared image pedestrian detection is performed through the trained model. The trained improved yolov5 model is used for pedestrian target detection in infrared images or infrared videos.
[0087] The method of the application provides a resource-efficient, real-time, easy-to-deploy and practical application solution. By reducing the computing load and memory occupation, it can efficiently run under limited resources, quickly and accurately detect pedestrian targets, realize real-time response and low energy consumption. With the help of the method of the application, the unmanned driving system can well detect pedestrian targets in infrared images or infrared videos, can more reliably perceive and respond to pedestrian targets when driving at night, thereby greatly improving traffic safety and passenger protection level, and providing strong support for practical application of unmanned driving technology.
Claims
1. A lightweight infrared image pedestrian target detection method, characterized in that, The method comprises the following steps: Step 1, constructing an improved lightweight YOLOv5 network model: Step 1.1: selecting a lightweight backbone feature extraction network MBNet to replace the backbone part of YOLOv5, the MBNet network is composed of 1 CBH module and 11 Hblock basic modules, wherein the CBH module includes convolution layers with parameters of 1, 16, 3 and 2, batch normalization and Hardwish activation function; the Hblock_1 module in the Hblock basic module is composed of 1 DW convolution layer with a convolution kernel of 3*3, an improved CBAM attention mechanism and a convolution layer with a convolution kernel of 1*1; the Hblock_2 module is composed of 1 convolution layer with a convolution kernel of 1*1, 1 DW convolution layer with a convolution kernel of 3*3, and a convolution layer with a convolution kernel of 1*1 connected in sequence; the Hblock_3 module is composed of 1 convolution layer with a convolution kernel of 1*1, 1 DW convolution layer with a convolution kernel of 3*3, an improved CBAM attention mechanism, and a convolution layer with a convolution kernel of 1*1; the residual structure is added in the Hblock_1 module, the Hblock_2 module and the Hblock_3 module, and the residual structure is run only when the channel number of the input and the output feature map is consistent; Step 1.2: adding a LOG filter in the CBAM attention mechanism to highlight the edge features of pedestrians in the attention module; Step 1.3: introducing the CBAM attention mechanism with the added LOG filter in the backbone feature extraction network MBNet to strengthen the extraction of pedestrian target features in the infrared image during the backbone feature network extraction process; Step 1.4: Based on the Gaussian probability density distribution and the exponential distribution, the loss function is improved to assign weights to each pixel in the image, and the formula is redesigned The loss function in the Part; in each row of pixels in the predicted frame and the real frame, multiply the area of the row by the area of the row, and then sum up to get the weighted area of the predicted frame and the real frame shown in formulas 1-2, 1-3, 1-4 And And , comprising: , wherein, , are the areas of the predicted and true boxes, respectively; is the number of rows of pixels in the predicted box, is the number of rows of pixels in the true box; is the weighted area of the improved predicted box, is the weighted area of the improved true box; is the first row of pixels; is the probability distribution function value; is the ratio of the intersection area to the union area of the improved predicted and true boxes, also known as the intersection over union; Step 2: obtaining an infrared image pedestrian dataset; Step 3: training the improved YOLOv5 network model; Step 4: using the trained model to detect pedestrians in the infrared image.
2. The lightweight infrared image pedestrian target detection method according to claim 1, wherein: There are three kinds of Hblock basic modules, including 1 Hblock_1 module, 2 Hblock_2 modules and 8 Hblock_3 modules.
3. The lightweight infrared image pedestrian target detection method according to claim 1, wherein: The CBH module, the Hblock_1 module, the Hblock_2 module and the Hblock_3 module are connected in sequence to form an improved yolov5 backbone layer, namely the MBNet network.
4. The lightweight infrared image pedestrian target detection method according to claim 1, characterized in that: The CBAM attention mechanism with the added LOG filter introduced in step 1.3 is divided into three parts, including the following steps: Step 1.3.1: passing the input feature map through the channel attention module of CBAM to obtain a weighted feature map ; Step 1.3.2: Fuse the feature maps F1 and F2 to get the feature map F1. with the filtered map to get the feature map F1. Step 1.3.3: make the feature map F1 pass through the spatial attention module of CBAM to obtain the feature map F2.
5. The lightweight infrared image pedestrian target detection method according to claim 1, wherein: Step 1.4: Improvement of the probability density function based loss function, the improved part of which is based on a Gaussian probability density distribution and an exponential distribution redesign The specific steps are as follows: Step 1.4.1: Establishing the image probability distribution model, establishing a coordinate system model with the upper left corner of the image as the origin, where the vertical axis direction is positive downward, and normalizing the length and width to the coordinates (0, 1), where The coordinates in the range (0, 0.5) adopt an exponential distribution function, and in the range (0.5, 1) adopt a Gaussian probability density distribution function; Step 1.4.2: Through multiple comparative experiments, this paper takes the mean of the Gaussian probability distribution model as 0.5, the variance as 0.3, and the expectation of the exponential distribution as 1.33 to obtain the probability distribution model As shown in equation (1-1), , In the formula: is the mean value of the coordinates of the pedestrian distribution in the longitudinal direction, and σ is the variance, is the exponential coefficient, is the coordinate of the pedestrian distribution, i.e. the pixel coordinate of each row of pixels occupied by the pedestrian in the longitudinal direction. Step 1.4.3: For one image, use the resulting probability density distribution model Integrate over the upper and lower limits to get the weight of each row of pixels; Step 1.4.4: the improved loss function is represented by formulas 1-5: , wherein, , respectively represent the center points of the predicted and ground truth boxes, represents the Euclidean distance between two rectangular boxes, represents the distance of the diagonal of the closure area of two rectangular boxes; and represent the width and height of the ground truth box, and represent the width and height of the predicted box; is the width-height ratio similarity of the predicted and ground truth boxes; is the influence factor of is the ratio of the intersection area and the union area of the improved predicted and ground truth boxes, also known as the intersection-over-union. 6. The lightweight infrared image pedestrian target detection method according to claim 1, wherein, The public dataset KAIST is used, and the training set, the verification set and the test set are divided by 6:2:2, and data cleaning and Mosaic data enhancement are performed.
7. The lightweight infrared image pedestrian target detection method according to claim 1, wherein, When training the improved YOLOv5 network model, the training parameters are set, the random optimization algorithm Adam is used for training, the training batch is set to Batch = 64, the initial weight uses the weight of yolov5s, the learning rate is set to Ir=0.001, and the training iteration number is set to Epoch=300.
Citation Information
Patent Citations
Multi-modal pedestrian detection method based on improved YOLO model
CN111767882A
Infrared image pedestrian target detection method based on improved YOLOv5
CN113688723A