Nighttime infrared pedestrian detection method and system based on improved YOLOv3

By improving the YOLOv3 model, using downsampling and bottleneck residual modules to extract infrared pedestrian features, and combining mean clustering and CIoU loss functions, the problem of nighttime pedestrian detection accuracy and real-time performance is solved, and efficient pedestrian detection results are achieved.

CN114332942BActive Publication Date: 2024-10-25WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111662884.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-10-25
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing technology has problems of low detection accuracy and poor real-time performance in pedestrian detection at night. Especially in harsh environments, the lack of color and insufficient texture of infrared images lead to low feature extraction capabilities of the target detection model.

Method used

The YOLOv3 model is improved by using the downsampling module and the bottleneck residual module to increase the contrast of the infrared image, extract pedestrian features, and use the mean clustering algorithm and CIoU bounding box loss function to improve the accuracy of pedestrian location information prediction.

Benefits of technology

It achieves real-time, clear and accurate pedestrian detection in dark and harsh environments at night, reduces computing costs, and is suitable for deployment on embedded systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332942B_ABST
    Figure CN114332942B_ABST
Patent Text Reader

Abstract

The invention discloses a nighttime infrared pedestrian detection method and system based on improved YOLOv3, uses a complex infrared camera to collect a complex infrared pedestrian detection data set and performs pixel value contrast enhancement processing on the data set, increases the pedestrian pixel value and reduces the background pixel value; improves and constructs a nighttime infrared pedestrian detection network model YOLOv3-SAB based on YOLOv3, introduces a stem downsampling module and asymmetric convolution to improve the network feature extraction capability and feature expression capability, introduces a bottleneck residual to reduce the calculation parameters in the model and improves the model pedestrian detection speed; uses a mean clustering algorithm to cluster and generate a specific prior aiming frame to improve the model target positioning accuracy; applies CIoU as a YOLOv3-SAB network bounding box regression loss function to accelerate model convergence and improve the prediction frame accuracy; trains the YOLOv3-SAB network to generate a nighttime infrared pedestrian detection model; and uses the nighttime infrared pedestrian detection model to perform real-time infrared pedestrian detection at night. The invention effectively improves the detection accuracy and detection speed for nighttime pedestrians.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep learning target detection, and more specifically, to a nighttime infrared pedestrian detection method and system based on an improved deep learning target detection model (YOLOv3). Background Art

[0002] As an important branch of machine vision, deep learning target detection has been widely used in the fields of automotive assisted driving and intelligent monitoring, and has become a research hotspot in the field of computer vision. Infrared images are obtained by infrared imaging systems based on the thermal radiation of objects. Infrared images have the advantages of strong anti-interference ability and are not easily affected by harsh environments. Compared with target detection using visible light, infrared target detection has higher research and application value.

[0003] In recent years, with the continuous progress and breakthroughs of deep convolutional neural networks (CNN) in the field of deep learning target detection, the related pedestrian detection technology has also developed rapidly. The target detection algorithm based on convolutional neural networks realizes end-to-end detection, extracts a large amount of feature information through multi-layer neural networks, omits the artificial feature design link, and has extremely strong robustness and generalization ability. At present, the more mainstream CNN-based target detection algorithms are divided into two categories: two-stage detection models based on candidate regions and one-stage detection models based on bounding box regression. Among them, the two-stage detection model divides target detection into two steps. First, the candidate region (Region Proposal) that may contain the target is selected in the input image, and then the candidate region is classified and the position is regressed to obtain the detection result. This type of detection algorithm includes: R-CNN, Fast R-CNN, Faster R-CNN. The one-stage detection model abandons the generation stage of the candidate region, puts feature extraction, regression and classification in the same convolutional neural network, and directly obtains the target classification and position information. This type of algorithm includes YOLO series, SSD, etc.

[0004] The double-stage detection model has high target detection accuracy, but the detection speed is slow and the real-time performance is difficult to meet; the single-stage detection model has good real-time performance and fast detection speed, but the detection accuracy is low. Pedestrian detection using visible light is greatly affected by lighting conditions and weather changes, and has great limitations under weak lighting conditions at night and in severe weather conditions. Although pedestrian detection using infrared technology is less affected by lighting and environment, infrared images have defects such as color loss and insufficient texture, which makes the target detection model have low target feature extraction and feature expression capabilities. Summary of the invention

[0005] In order to solve the above-mentioned problems faced by target detection, the present invention provides a nighttime infrared pedestrian detection method and system based on an improved deep learning target detection model (YOLOv3), which effectively improves the nighttime pedestrian detection effect.

[0006] The technical solution adopted by the method of the present invention is: a nighttime infrared pedestrian detection method based on improved YOLOv3, comprising the following steps:

[0007] Step 1: Build a deep learning target detection network YOLOv3-SAB to extract pedestrian appearance features and contour features of pedestrian heads, bodies, and limbs;

[0008] The deep learning target detection network YOLOv3-SAB is an improved network based on the YOLOv3 neural network;

[0009] Wherein, a downsampling module stem is used to replace the downsampling convolution with a convolution kernel of 3×3 and a stride of 2 in the feature extraction network part of the YOLOv3 neural network; the stem module is composed of two branches connected in parallel, one branch performs a convolution operation of 1×1 with a stride of 1 and 3×3 with a stride of 2 on the features outputted last time, and the other branch performs a maximum pooling operation of 2×2 with a stride of 2 on the features outputted last time, and the feature maps outputted by the two branches are added while keeping the number of channels unchanged to obtain a fused feature map;

[0010] A bottleneck residual module is used to replace the residual module in the feature extraction network part of the YOLOv3 neural network, and the 3×3 convolution with a stride of 1 in the bottleneck residual module is replaced by an asymmetric convolution; the bottleneck residual module is composed of two branches connected in parallel, one branch first uses a 1×1 convolution with a stride of 1 to compress the number of channels, and then uses an asymmetric convolution to extract features, keeping the number of channels unchanged, and finally restores the number of channels by performing a 1×1 convolution with a stride of 1, and the other branch is short-circuited, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain a fused feature map;

[0011] Asymmetric convolution is used to replace the 3×3 convolution with a stride of 1 in the bottleneck residual module. The asymmetric convolution performs convolution operations and normalization processing with convolution kernel scales of 3×3, 3×1, and 1×3 on the feature map of the previous output, and then fuses the three feature maps after the above three convolution operations and normalization processing while keeping the number of channels unchanged. Finally, the ReLU activation function is used for activation;

[0012] Step 2: Train the deep learning target detection network YOLOv3-SAB;

[0013] It includes the following sub-steps:

[0014] Step 2.1: Use a plurality of infrared cameras to collect infrared video data of multiple pedestrians at different viewing angles and scenes, extract the infrared video data of multiple pedestrians frame by frame into multiple infrared picture data, and select the multiple infrared picture data to make an infrared pedestrian detection data set; enhance the multiple infrared picture data, increase the gray value of pedestrians and reduce the gray value of background, and annotate the position information, size information and category information of pedestrian targets in the multiple infrared picture data, wherein the pedestrian category information is classified based on the appearance information, contour information and size information of pedestrians;

[0015] Step 2.2: cluster the sizes of pedestrians annotated in the image using a mean clustering algorithm, obtain a priori aiming frame size for nighttime infrared pedestrian detection through clustering, and replace the original prior frame size in the deep learning target detection network YOLOv3-SAB with the prior aiming frame size obtained through clustering;

[0016] Step 2.3: According to the infrared pedestrian detection data set collected in step 2.1, the data set is allocated into a training data set and a test data set according to a predetermined ratio; the deep learning target detection network YOLOv3-SAB is trained using the training data set, and during the training process, the deep learning target detection network YOLOv3-SAB generates and saves a model weight file for each round of iteration until the deep learning target detection network YOLOv3-SAB reaches a convergence state and stops training; the deep learning target detection network YOLOv3-SAB uses the model weight file as the pedestrian detection weight to detect all the complex infrared image data in the test data set, and detects and saves all the pedestrian information in the test data set, and compares and calculates the detection accuracy based on the detection result and the real pedestrian information marked in step 2.1, and selects the model weight file with the highest test accuracy as the model weight of the deep learning target detection network YOLOv3-SAB;

[0017] Step 3: Input the real-time acquired complex infrared video images into the deep learning target detection network YOLOv3-SAB, and use the model weight file described in step 2.3 as the pedestrian detection weight to perform real-time pedestrian detection on the video data.

[0018] The technical solution adopted by the system of the present invention is: a nighttime infrared pedestrian detection system based on improved YOLOv3, comprising the following modules:

[0019] Module 1 is used to build the deep learning target detection network YOLOv3-SAB, which is responsible for extracting the appearance features of pedestrians and the contour features of their heads, bodies, and limbs;

[0020] The deep learning target detection network YOLOv3-SAB is an improved network based on the YOLOv3 neural network;

[0021] Wherein, a downsampling module stem is used to replace the downsampling convolution with a convolution kernel of 3×3 and a stride of 2 in the feature extraction network part of the YOLOv3 neural network; the stem module is composed of two branches connected in parallel, one branch performs a convolution operation of 1×1 with a stride of 1 and 3×3 with a stride of 2 on the features of the last output, and the other branch performs a maximum pooling operation of 2×2 with a stride of 2 on the features of the last output, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion;

[0022] A bottleneck residual module is used to replace the residual module in the feature extraction network part of the YOLOv3 neural network, and the 3×3 convolution with a stride of 1 in the bottleneck residual module is replaced by an asymmetric convolution; the bottleneck residual module is composed of two branches connected in parallel, one branch first uses a 1×1 convolution with a stride of 1 to compress the number of channels, and then uses an asymmetric convolution to extract features, keeping the number of channels unchanged, and finally restores the number of channels by performing a 1×1 convolution with a stride of 1, and the other branch is short-circuited, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion;

[0023] Asymmetric convolution is used to replace the 3×3 convolution with a stride of 1 in the bottleneck residual module. The asymmetric convolution performs convolution operations and normalization processing on the feature map of the previous output with convolution kernel scales of 3×3, 3×1 and 1×3 respectively. The three feature maps after the above three convolution operations and normalization processing are added and the number of channels is kept unchanged. Finally, the ReLU activation function is used for activation;

[0024] Module 2, used to train the deep learning target detection network YOLOv3-SAB;

[0025] Specifically includes the following sub-modules:

[0026] Module 2.1 is used to use a plurality of infrared cameras to collect infrared video data of multiple pedestrians at different viewing angles and scenes, extract the infrared video data of multiple pedestrians frame by frame into multiple infrared picture data, select the multiple infrared picture data to make an infrared pedestrian detection data set; enhance the multiple infrared picture data, increase the gray value of pedestrians and reduce the gray value of background, and annotate the position information, size information and category information of pedestrian targets in the multiple infrared picture data, wherein the pedestrian category information is classified based on the appearance information, contour information and size information of pedestrians;

[0027] Module 2.2 is used to cluster the sizes of pedestrians annotated in the image using a mean clustering algorithm, cluster to obtain a priori aiming frame size for nighttime infrared pedestrian detection, and replace the original prior frame size in the deep learning target detection network YOLOv3-SAB with the prior aiming frame size obtained by clustering;

[0028] Module 2.3 is used to allocate the infrared pedestrian detection data set collected in module 2.1 into a training data set and a test data set according to a predetermined ratio; use the training data set to train the deep learning target detection network YOLOv3-SAB, and during the training process, the deep learning target detection network YOLOv3-SAB generates and saves a model weight file for each round of iteration until the deep learning target detection network YOLOv3-SAB reaches a convergence state and stops training; the deep learning target detection network YOLOv3-SAB uses the model weight file as a pedestrian detection weight to detect all complex infrared image data in the test data set, detects all pedestrian information in the test data set and saves it, compares the detection result with the real pedestrian information marked in module 2.1 to calculate the detection accuracy, and selects the model weight file with the highest test accuracy as the deep learning target detection network YOLOv3-SAB model weight;

[0029] Module 3 is used to input the real-time acquired complex infrared video images into the deep learning target detection network YOLOv3-SAB, and use the model weight file described in module 2.3 as the pedestrian detection weight of the deep learning target detection network YOLOv3-SAB to perform real-time pedestrian detection on the video data.

[0030] The beneficial effects of the present invention are:

[0031] (1) In the present invention, a nighttime infrared pedestrian detection method based on an improved deep learning target detection model (YOLOv3) is invented. The method is applied to the fields of nighttime pedestrian detection and rescue in the absence of light, complex background, harsh environment and climate, where visible light and ordinary digital night vision devices cannot cope with it. The method can realize real-time, clear, accurate and efficient pedestrian detection in scenarios such as autonomous driving, intelligent monitoring and field rescue.

[0032] (2) A nighttime infrared pedestrian detection method based on an improved deep learning target detection model (YOLOv3) uses a piecewise linear transformation method to increase the contrast of infrared images, increase pedestrian pixel values ​​and reduce background pixel values, enrich pedestrian feature information and reduce background feature information; uses a stem downsampling module and an asymmetric convolution module to improve the feature extraction and feature expression capabilities of the deep learning target detection model (YOLOv3); uses a priori aiming box and CIoU bounding box loss function for nighttime infrared pedestrian detection to improve the accuracy of pedestrian position information prediction.

[0033] (3) Based on the night infrared pedestrian detection method of the improved deep learning target detection model (YOLOv3), the bottleneck residual module is used to reduce the model calculation parameters by reducing the number of convolution channels. After using the bottleneck residual module, the model calculation amount is reduced by 3.48 times of the original model, which greatly reduces the calculation cost. The model weight file size of the improved deep learning target detection model (YOLOv3-SAB) is 133MB, which is 113MB smaller than the YOLOv3 model weight file. The YOLOv3-SAB model weight file is suitable for deployment on embedded systems and edge computing units such as NVIDIA or Raspberry Pi, meeting real-time detection requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of the structure of the deep learning target detection network YOLOv3-SAB in an embodiment of the present invention;

[0036] Figure 3 Schematic diagram of the structure of a downsampling module (stem module) in an embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram of the bottleneck residual module structure in an embodiment of the present invention;

[0038] Figure 5 Schematic diagram of an asymmetric convolution structure in an embodiment of the present invention;

[0039] Figure 6 A flowchart of a priori aiming frame for designing K-means clustering in an embodiment of the present invention;

[0040] Figure 7 It is a PR curve diagram of the detection accuracy test result in the embodiment of the present invention;

[0041] Figure 8 This is a diagram showing the effect of infrared pedestrian detection at night in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0043] Please see Figure 1 The present invention provides a nighttime infrared pedestrian detection method based on improved YOLOv3, comprising the following steps:

[0044] Step 1: Build a deep learning target detection network YOLOv3-SAB;

[0045] Please see Figure 2 In this embodiment, a deep learning target detection network YOLOv3-SAB is constructed based on the YOLOv3 neural network algorithm in deep learning, and the pedestrian feature extraction algorithm in the YOLOv3 neural network algorithm is improved to obtain a new deep learning target detection model (deep learning target detection network YOLOv3-SAB), wherein the improved deep learning target detection network YOLOv3-SAB feature extraction algorithm is responsible for extracting pedestrian appearance features and contour features of pedestrian heads, bodies and limbs.

[0046] Please see Figure 3 In this embodiment, a downsampling module (stem module) is used to replace the downsampling convolution with a convolution kernel of 3×3 and a stride of 2 in the feature extraction algorithm (Darknet53 network algorithm) in the deep learning target detection model (YOLOv3). The stem module is composed of two branches connected in parallel, one branch performs 1×1 convolution operations with a stride of 1 and 3×3 convolution operations with a stride of 2 on the features of the previous output, and the other branch performs a maximum pooling operation of 2×2 with a stride of 2 on the features of the previous output. The feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion.

[0047] Please see Figure 4 In this embodiment, the residual module in the feature extraction algorithm (Darknet53 network algorithm) of the deep learning target detection model (YOLOv3) is replaced by the bottleneck residual module, and the bottleneck residual module is used to reduce the model calculation parameters, and the 3×3 convolution with a stride of 1 in the bottleneck residual is replaced by an asymmetric convolution. The bottleneck residual is composed of two branches connected in parallel. One branch first uses a 1×1 convolution with a stride of 1 to compress the number of channels, and then uses an asymmetric convolution to extract features, keeping the number of channels unchanged. Finally, the number of channels is restored by performing a 1×1 convolution with a stride of 1. The other branch is short-circuited, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion.

[0048] Please see Figure 5 In this embodiment, asymmetric convolution is used to replace the 3×3 convolution with a stride of 1 in the bottleneck residual. The asymmetric convolution performs convolution operations and normalization (batch normalization) with convolution kernel scales of 3×3, 3×1, and 1×3 on the feature map output last time. The three feature maps after the above three convolution operations and normalization are added and the number of channels is kept unchanged. Finally, the Relu activation function is used for activation.

[0049] Step 2: Train the deep learning target detection network YOLOv3-SAB;

[0050] It includes the following sub-steps:

[0051] Step 2.1: Use a complex infrared camera to collect multiple pedestrian infrared video data at different viewing angles and scenes, extract the multiple pedestrian infrared video data frame by frame into multiple infrared image data, and select 10,000 multiple infrared image data to make an infrared pedestrian detection dataset; enhance the multiple infrared image data, increase the gray value of pedestrians and reduce the gray value of the background, and then use LabelImg software to annotate the location information, size information and category information of pedestrian targets in the multiple infrared image data, where the pedestrian category information is classified based on the appearance information, contour information and size information of pedestrians; after each image is annotated, it is generated and saved as an xml file.

[0052] In this embodiment, the grayscale value of the complex infrared image data is transformed according to the piecewise linear function shown in the following formula (1);

[0053]

[0054] Wherein, r represents the grayscale value of the complex infrared image data before conversion, and R represents the grayscale value of the complex infrared image data after conversion.

[0055] Step 2.2: Use the mean clustering algorithm to cluster the sizes of pedestrians annotated in the image, and cluster to obtain the prior aiming frame size for night infrared pedestrian detection. Replace the original prior frame size in the deep learning target detection network YOLOv3-SAB with the clustered prior aiming frame size;

[0056] Please see Figure 7 In this embodiment, the mean value clustering algorithm is used to cluster the sizes of pedestrians annotated in the image, and the specific implementation includes the following sub-steps:

[0057] Step 2.2.1: In the image annotated data set, randomly select K annotation boxes as the initial prior anchor boxes. The K initial prior anchor boxes are the K clustering centers of the cluster.

[0058] Step 2.2.2: Use the intersection over union (IoU) of the annotation box and the prior aiming box to measure the distance, and assign the annotation box closest to the initial aiming box to the cluster where the initial aiming box is located;

[0059] Step 2.2.3: Calculate the mean of the width and height of all aiming frames in each cluster, and update the width and height of the cluster center in each cluster according to the mean of the width and height of all aiming frames in each cluster;

[0060] Step 2.2.4: Repeat steps 2.2.2 and 2.2.3 until the width and height of the cluster center no longer change. The size of the cluster center obtained at this time is used as the prior aiming frame size for infrared detection of pedestrians at night in the present invention.

[0061] In this embodiment, the CIoU target detection bounding box regression loss function is used to replace the original IoU bounding box regression loss function in the YOLOv3 neural network as the bounding box regression loss function of the deep learning target detection network YOLOv3-SAB;

[0062] Among them, the bounding box regression loss function of the deep learning target detection network YOLOv3-SAB is:

[0063]

[0064]

[0065]

[0066] In the above formula, α represents the weight parameter, ν represents the aspect ratio consistency parameter; h gt and w gt represents the height and width of the real box; w and h represent the height and width of the predicted box; b and b gt represents the center point of the predicted box and the real box, ρ() represents the Euclidean distance, and c represents the center point of the predicted box b and the real box b gt The diagonal distance of the minimum circumscribed matrix; 1-IoU represents the intersection over union ratio of the annotation box and the prior aiming box.

[0067] Step 2.3: According to the infrared pedestrian detection data set collected in step 2.1, the data set is allocated into a training data set and a test data set in an 8:2 ratio; the deep learning target detection network YOLOv3-SAB is trained using the training data set. During the training process, the deep learning target detection network YOLOv3-SAB generates and saves a model weight file for each round of iteration until the deep learning target detection network YOLOv3-SAB reaches a convergence state and stops training; the deep learning target detection network YOLOv3-SAB uses the model weight file as the pedestrian detection weight to detect all complex infrared image data in the test data set, and detects and saves all pedestrian information in the test data set. The detection accuracy is calculated by comparing the detection result with the real pedestrian information marked in step 2.1, and the model weight file with the highest test accuracy is selected as the deep learning target detection network YOLOv3-SAB model weight;

[0068] In this embodiment, the detection accuracy is calculated by comparing the detection result with the real pedestrian information marked in step 2.1. The calculation contents mainly include: precision rate Precision, recall rate Recall, average accuracy rate AP and detection frame rate per second FPS;

[0069]

[0070]

[0071]

[0072] Where TP represents the number of correctly detected pedestrians in all nighttime infrared pedestrian images in the test data set, FP represents the number of falsely detected pedestrians in all nighttime infrared pedestrian images in the test data set, and FN represents the number of undetected pedestrians in all nighttime infrared pedestrian images in the test data set. In formula (7), P represents the precision rate, and R represents the recall rate.

[0073] Step 3: Embed the deep learning target detection network YOLOv3-SAB into an embedded development system such as NVIDIA or Raspberry Pi. In the embedded development system, the deep learning target detection network YOLOv3-SAB uses the model weight file to perform real-time pedestrian detection on the complex infrared video images collected by the complex infrared image acquisition device in real time. The real-time collected complex infrared video images are input into the deep learning target detection network YOLOv3-SAB, and the deep learning target detection network YOLOv3-SAB uses the model weight file in step 2.3 as the pedestrian detection weight to perform real-time pedestrian detection on the video data.

[0074] In this embodiment, the deep learning target detection network YOLOv3-SAB uses the model weight file described in step 2.3 as the weight for pedestrian detection, classifies and regresses pedestrians in the video data, and annotates the classified and regressed pedestrian information in the form of an annotation box in the video data, and outputs the detected video data to obtain the final pedestrian detection result.

[0075] The effect of this embodiment is further described below through specific implementation.

[0076] The software environment selected in this embodiment is: ubuntu18.04 operating system, GPU acceleration software CUDA11.1 and CUDNN8.2, Pytorch deep learning framework, and programming language is Python; hardware environment: the processor is Intel Core i9-10850K, and the graphics card is NVIDIA GeForce RTX 3080.

[0077] In this embodiment, the data set prepared in step 2.1 is allocated as a training data set and a test data set in a ratio of 8:2. During the training process, the initial learning rate is set to 0.001, the momentum is set to 0.9, the image input pixel value size is 416×416, and small batch training is performed with 6 images as a batch until all images in the training data set are trained once and a round of iteration is completed. A total of 300 rounds of iterations are performed on the improved deep learning target detection network YOLOv3-SAB. After each round of iteration, a model weight file is generated and saved, and the model weight file is used for model testing.

[0078] This example compares the test results of the improved deep learning target detection network (YOLOv3-SAB) with the performance of the currently popular deep learning target detection models (YOLOv3, SSD and Faster R-CNN). The performance comparison of different models is shown in Table 1. The PR curves of different models are plotted as shown in Table 1. Figure 7 As shown in Table 1 and Figure 7 It can be seen that the detection accuracy (AP value) of the YOLOv3-SAB model reaches 94.78%, which is higher than the YOLOv3, SSD and Faster R-CNN models. The detection speed (FPS) of the YOLOv3-SAB model reaches 44.27 frames / s, which is higher than the SSD and Faster R-CNN models. The weight of the YOLOv3-SAB model is 131MB, which is about half of the weight of the YOLOv3 model. It is suitable for deployment on edge computing embedded devices such as NVIDIA or Raspberry Pi.

[0079] Table 1 Performance comparison of various models

[0080]

[0081] This embodiment uses the improved deep learning target detection network (YOLOv3-SAB) and the model weight file described in step 2.3 as the pedestrian detection weight. In the night scene, pedestrians in the real-time acquired complex infrared video data are classified and regressed, and the classified and regressed pedestrian information is annotated in the video data in the form of a label box. The detected video data is output to obtain the pedestrian detection result. The pedestrian detection result is as follows: Figure 8 As shown in the figure, it can be seen from the test results that the detection accuracy is high and there is no false detection or missed detection.

[0082] It should be understood that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0083] The present specification uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A nighttime infrared pedestrian detection method based on improved YOLOv3, characterized in that: The following steps are involved: Step 1: Build a deep learning target detection network YOLOv3-SAB to extract pedestrian appearance features and contour features of pedestrian heads, bodies, and limbs; The deep learning target detection network YOLOv3-SAB is an improved network based on the YOLOv3 neural network; Wherein, a downsampling module stem is used to replace the downsampling convolution with a convolution kernel of 3×3 and a stride of 2 in the feature extraction network part of the YOLOv3 neural network; the stem module is composed of two branches connected in parallel, one branch performs a convolution operation of 1×1 with a stride of 1 and 3×3 with a stride of 2 on the features outputted last time, and the other branch performs a maximum pooling operation of 2×2 with a stride of 2 on the features outputted last time, and the feature maps outputted by the two branches are added while keeping the number of channels unchanged to obtain a fused feature map; A bottleneck residual module is used to replace the residual module in the feature extraction network part of the YOLOv3 neural network, and the 3×3 convolution with a stride of 1 in the bottleneck residual module is replaced by an asymmetric convolution; the bottleneck residual module is composed of two branches connected in parallel, one branch first uses a 1×1 convolution with a stride of 1 to compress the number of channels, and then uses an asymmetric convolution to extract features, keeping the number of channels unchanged, and finally restores the number of channels by performing a 1×1 convolution with a stride of 1, and the other branch is short-circuited, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain a fused feature map; Asymmetric convolution is used to replace the 3×3 convolution with a stride of 1 in the bottleneck residual module. The asymmetric convolution performs convolution operations and normalization processing with convolution kernel scales of 3×3, 3×1, and 1×3 on the feature map of the previous output, and then fuses the three feature maps after the above three convolution operations and normalization processing while keeping the number of channels unchanged. Finally, the ReLU activation function is used for activation; Step 2: Train the deep learning target detection network YOLOv3-SAB; It includes the following sub-steps: Step 2.1: Use a plurality of infrared cameras to collect infrared video data of multiple pedestrians at different viewing angles and scenes, extract the infrared video data of multiple pedestrians frame by frame into multiple infrared picture data, and select the multiple infrared picture data to make an infrared pedestrian detection data set; enhance the multiple infrared picture data, increase the gray value of pedestrians and reduce the gray value of background, and annotate the position information, size information and category information of pedestrian targets in the multiple infrared picture data, wherein the pedestrian category information is classified based on the appearance information, contour information and size information of pedestrians; Step 2.2: cluster the sizes of pedestrians annotated in the image using a mean clustering algorithm, obtain a priori aiming frame size for nighttime infrared pedestrian detection through clustering, and replace the original prior frame size in the deep learning target detection network YOLOv3-SAB with the prior aiming frame size obtained through clustering; Step 2.3: According to the infrared pedestrian detection data set collected in step 2.1, the data set is allocated into a training data set and a test data set according to a predetermined ratio; the deep learning target detection network YOLOv3-SAB is trained using the training data set, and during the training process, the deep learning target detection network YOLOv3-SAB generates and saves a model weight file for each round of iteration until the deep learning target detection network YOLOv3-SAB reaches a convergence state and stops training; the deep learning target detection network YOLOv3-SAB uses the model weight file as the pedestrian detection weight to detect all the complex infrared image data in the test data set, and detects and saves all the pedestrian information in the test data set, and compares and calculates the detection accuracy based on the detection result and the real pedestrian information marked in step 2.1, and selects the model weight file with the highest test accuracy as the model weight of the deep learning target detection network YOLOv3-SAB; Step 3: Input the real-time acquired complex infrared video images into the deep learning target detection network YOLOv3-SAB, and use the model weight file described in step 2.3 as the pedestrian detection weight to perform real-time pedestrian detection on the video data.

2. The nighttime infrared pedestrian detection method based on improved YOLOv3 according to claim 1 is characterized in that: In step 2.1, the grayscale value of the complex infrared image data is transformed according to the piecewise linear function shown in the following formula (1); Wherein, r represents the grayscale value of the complex infrared image data before conversion, and R represents the grayscale value of the complex infrared image data after conversion.

3. The nighttime infrared pedestrian detection method based on improved YOLOv3 according to claim 1 is characterized in that: In step 2.2, the mean clustering algorithm is used to cluster the sizes of pedestrians annotated in the image, and the specific implementation includes the following sub-steps: Step 2.2.1: In the image annotated data set, randomly select K annotated boxes as initial a priori aiming boxes, and the K initial a priori aiming boxes are the K clustering centers of the cluster; Step 2.2.2: Use the intersection over union (IoU) of the annotation box and the prior aiming box to measure the distance, and assign the annotation box closest to the initial aiming box to the cluster where the initial aiming box is located; Step 2.2.3: Calculate the mean of the width and height of all aiming frames in each cluster, and update the width and height of the cluster center in each cluster according to the mean of the width and height of all aiming frames in each cluster; Step 2.2.4: Repeat steps 2.2.2 and 2.2.3 until the width and height of the cluster center no longer change. The size of the cluster center obtained at this time is used as the prior aiming frame size for nighttime pedestrian infrared detection.

4. The nighttime infrared pedestrian detection method based on improved YOLOv3 according to claim 1 is characterized in that: In step 2.2, the CIoU target detection bounding box regression loss function is used to replace the original IoU bounding box regression loss function in the YOLOv3 neural network as the bounding box regression loss function of the deep learning target detection network YOLOv3-SAB; The bounding box regression loss function of the deep learning target detection network YOLOv3-SAB is: Among them, α represents the weight parameter, ν represents the aspect ratio consistency parameter; h gt 、w gt represents the height and width of the real box; h and w represent the height and width of the predicted box; b and b gt represents the center point of the predicted box and the real box, ρ() represents the Euclidean distance, and c represents the center point of the predicted box b and the real box b gt The diagonal distance of the minimum circumscribed matrix; 1-IoU represents the intersection over union ratio of the annotation box and the prior aiming box.

5. The nighttime infrared pedestrian detection method based on improved YOLOv3 according to claim 1 is characterized in that: In step 2.3, the detection accuracy is calculated by comparing the detection result with the real pedestrian information marked in step 2.

1. The calculation contents mainly include: precision rate Precision, recall rate Recall, average accuracy rate AP and detection frame rate per second FPS; Where TP represents the number of correctly detected pedestrians in all nighttime infrared pedestrian images in the test data set, FP represents the number of falsely detected pedestrians in all nighttime infrared pedestrian images in the test data set, and FN represents the number of undetected pedestrians in all nighttime infrared pedestrian images in the test data set. In formula (7), P represents the precision rate, and R represents the recall rate.

6. The nighttime infrared pedestrian detection method based on improved YOLOv3 according to any one of claims 1 to 5, characterized in that: In step 3, the model weight file described in step 2.3 is used as the pedestrian detection weight to perform real-time pedestrian detection on the video data. The deep learning target detection network YOLOv3-SAB uses the model weight file described in step 2.3 as the weight for pedestrian detection, classifies and regresses pedestrians in the video data, and annotates the classified and regressed pedestrian information in the form of an annotation box in the video data, and outputs the detected video data to obtain the final pedestrian detection result.

7. A nighttime infrared pedestrian detection system based on improved YOLOv3, characterized in that: Includes the following modules: Module 1 is used to build the deep learning target detection network YOLOv3-SAB, which is responsible for extracting the appearance features of pedestrians and the contour features of their heads, bodies, and limbs; The deep learning target detection network YOLOv3-SAB is an improved network based on the YOLOv3 neural network; Wherein, a downsampling module stem is used to replace the downsampling convolution with a convolution kernel of 3×3 and a stride of 2 in the feature extraction network part of the YOLOv3 neural network; the stem module is composed of two branches connected in parallel, one branch performs a convolution operation of 1×1 with a stride of 1 and 3×3 with a stride of 2 on the features of the last output, and the other branch performs a maximum pooling operation of 2×2 with a stride of 2 on the features of the last output, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion; A bottleneck residual module is used to replace the residual module in the feature extraction network part of the YOLOv3 neural network, and the 3×3 convolution with a stride of 1 in the bottleneck residual module is replaced by an asymmetric convolution; the bottleneck residual module is composed of two branches connected in parallel, one branch first uses a 1×1 convolution with a stride of 1 to compress the number of channels, and then uses an asymmetric convolution to extract features, keeping the number of channels unchanged, and finally restores the number of channels by performing a 1×1 convolution with a stride of 1, and the other branch is short-circuited, and the feature maps output by the two branches are added while keeping the number of channels unchanged to obtain the feature map after addition and fusion; Asymmetric convolution is used to replace the 3×3 convolution with a stride of 1 in the bottleneck residual module. The asymmetric convolution performs convolution operations and normalization processing on the feature map of the previous output with convolution kernel scales of 3×3, 3×1 and 1×3 respectively. The three feature maps after the above three convolution operations and normalization processing are added and the number of channels is kept unchanged. Finally, the ReLU activation function is used for activation; Module 2, used to train the deep learning target detection network YOLOv3-SAB; It includes the following sub-modules: Module 2.1 is used to use a plurality of infrared cameras to collect infrared video data of multiple pedestrians at different viewing angles and scenes, extract the infrared video data of multiple pedestrians frame by frame into multiple infrared picture data, select the multiple infrared picture data to make an infrared pedestrian detection data set; enhance the multiple infrared picture data, increase the gray value of pedestrians and reduce the gray value of background, and annotate the position information, size information and category information of pedestrian targets in the multiple infrared picture data, wherein the pedestrian category information is classified based on the appearance information, contour information and size information of pedestrians; Module 2.2 is used to cluster the sizes of pedestrians annotated in the image using a mean clustering algorithm, cluster to obtain a priori aiming frame size for nighttime infrared pedestrian detection, and replace the original prior frame size in the deep learning target detection network YOLOv3-SAB with the prior aiming frame size obtained by clustering; Module 2.3 is used to allocate the infrared pedestrian detection data set collected in module 2.1 into a training data set and a test data set according to a predetermined ratio; use the training data set to train the deep learning target detection network YOLOv3-SAB, and during the training process, the deep learning target detection network YOLOv3-SAB generates and saves a model weight file for each round of iteration until the deep learning target detection network YOLOv3-SAB reaches a convergence state and stops training; the deep learning target detection network YOLOv3-SAB uses the model weight file as a pedestrian detection weight to detect all complex infrared image data in the test data set, detects all pedestrian information in the test data set and saves it, compares the detection result with the real pedestrian information marked in module 2.1 to calculate the detection accuracy, and selects the model weight file with the highest test accuracy as the deep learning target detection network YOLOv3-SAB model weight; Module 3 is used to input the real-time acquired complex infrared video images into the deep learning target detection network YOLOv3-SAB, and use the model weight file described in module 2.3 as the pedestrian detection weight of the deep learning target detection network YOLOv3-SAB to perform real-time pedestrian detection on the video data.