An aerial infrared image pedestrian recognition system and method
By fusing convolutional neural networks with one-sided suppression operators, pedestrian detection in aerial infrared images is optimized, solving the problems of detection accuracy and computational complexity on embedded platforms. This achieves efficient and low-power pedestrian detection, which is suitable for UAV airborne platforms.
Patent Information
- Application Number
- CN202311737926.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-18
AI Technical Summary
Existing aerial infrared image pedestrian detection technology suffers from insufficient detection accuracy, high computational complexity, large device size, and high power consumption on embedded platforms, making it difficult to meet the low-cost, large-scale deployment requirements of UAV airborne platforms.
A convolutional neural network is fused using a one-sided inhibition operator, combined with a cross-stage hierarchical deep backbone network, a multi-scale feature fusion module, and a detection output module. The one-sided inhibition activation function simplifies the calculation, and multi-threaded processing is combined to optimize the detection process.
It achieves reduced computational load and increased detection speed while ensuring detection accuracy, meeting the low power consumption and small size requirements of UAV airborne platforms. The detection speed is increased by 40%, and the overall power consumption is reduced to 6 watts, making it suitable for embedded platform deployment.
Smart Images

Figure CN117593765B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition, and in particular to a pedestrian recognition system and method for aerial infrared images based on a one-sided inhibition operator-fused convolutional neural network. Background Technology
[0002] Artificial intelligence technology is widely used in drone aerial inspection. Traditional single visible light images produce poor imaging results under suboptimal conditions such as low light, posing challenges to subsequent inspections. Infrared cameras can capture images within the infrared spectrum, where the human body typically appears as a bright area, effectively complementing visible light images. Currently, drone-borne image processing mainly falls into two categories: remote data processing and onboard real-time processing. Remote data processing suffers from bandwidth and latency issues. In contrast, deploying convolutional neural networks on embedded platforms ensures data security, reduces data transmission and processing latency, and enables real-time processing.
[0003] Artificial intelligence technology has made progress in pedestrian detection and recognition, but challenges remain in pedestrian detection and recognition using aerial infrared images. Currently, most algorithms are deployed on servers, resulting in large size, high power consumption, and high cost. Remotely calling cloud servers for computation requires high-bandwidth data transmission links, leading to high latency and poor data security. Conversely, deploying lightweight convolutional neural networks on small embedded platforms can reduce data transmission volume and processing latency while protecting data privacy and security, enabling real-time processing. Therefore, the implementation and deployment technology of lightweight neural network models based on miniaturized embedded platforms is crucial.
[0004] CN115641606A discloses a lightweight multi-scale thermal infrared pedestrian detection method based on TIPSSD. It replaces the vgg16 in the SSD network with a lightweight backbone network Resnet50, introduces a feature pyramid to achieve multi-scale semantic information fusion, and combines it with a multi-scale training strategy. Finally, it introduces an image primary color filling strategy in the data preprocessing part to make the model lightweight, which is conducive to the deployment of the model on edge devices.
[0005] CN116012659B discloses an infrared target detection method, device, electronic device, and storage medium. It employs multiple image enhancement techniques and combines a lightweight convolutional network architecture to improve the computational speed of the algorithm. At the same time, in the candidate region extraction stage, it adopts a global threshold segmentation method to improve the speed of candidate region extraction.
[0006] CN116824630A discloses a lightweight infrared image pedestrian target detection method, which uses a lightweight backbone feature extraction network MBNet to replace the backbone network part of YOLOv5, adds a special filter to highlight pedestrian edge features, improves the loss function based on Gaussian probability density distribution and exponential distribution, and redesigns the cross-union ratio part in the loss function.
[0007] CN116469077A discloses a nighttime pedestrian detection method that uses the fusion of infrared images and radar data to detect pedestrians at night, avoiding the missed detections and false detections of pedestrians by a single sensor. At the same time, it adds an end-side neural network to the convolutional block to enhance the feature map and adds an SE attention mechanism module to improve the detection accuracy and detection speed of the model.
[0008] For example, the "Multirotor UAV Detection Algorithm Based on Improved YOLOv5 and Embedded Platform" (Cheng Jiangchuan, Wang Wei, Kang Lin, et al., Ordnance Automation) replaces the CSP-Darknet53 in YOLOv5 with the MobileNetV3 network as the backbone network for feature extraction, and optimizes and improves the feature enhancement network and the regression box loss function of the algorithm to improve the speed of algorithm recognition.
[0009] In addition, the improved YOLOv4-tiny model deployed on Jetson TX2 by the "Aerial Pedestrian Detection Based on Infrared and Visible Light" (Zhuang Zhengyi, Southwest University of Science and Technology) still requires 77ms for inference of a single 640x640 resolution image after Tensor RT acceleration, and the Jetson TX2 is running in MAX Q mode (power consumption up to 15W).
[0010] While the aforementioned existing technologies have indeed achieved lightweight deployment on the airborne side to a certain extent, they have the following shortcomings:
[0011] 1) Current recognition devices usually read camera images directly for detection, and ultimately only transmit the relative position and category of the target, which is not very user-friendly for debugging and review.
[0012] 2) Existing lightweight models often achieve their lightweighting goals by shrinking the network structure and reducing the number of network layers. For example, they may use MobileNet or other shallower feature extraction networks, or reduce the number of channels in the model to reduce computation. However, this can lead to a significant decrease in model accuracy. Aerial images often have small targets and require high detection accuracy, which cannot meet the needs of pedestrian detection in aerial infrared images.
[0013] 3) Models with high precision have computationally complex operators, such as non-linear activation functions like the Sigmoid and TanH activation functions. Using integers for calculations results in complex computations and significant precision loss, while using floating-point numbers consumes substantial storage and computational resources, leading to heavy, bulky, and power-consuming hardware, making it unsuitable for deployment on embedded platforms.
[0014] Therefore, in terms of lightweight model deployment, there is an urgent need for a detection algorithm that can ensure high detection accuracy and can be deployed on a large scale on embedded platforms. Summary of the Invention
[0015] The purpose of this invention is to provide a pedestrian recognition method for aerial infrared images based on a one-sided inhibition operator fusion convolutional neural network, addressing all or part of the aforementioned problems. This method aims to meet the requirements of low detection resource consumption, high detection speed, and small hardware size while ensuring the need for pedestrian detection in aerial infrared images.
[0016] The technical solution adopted in this invention is as follows:
[0017] A pedestrian recognition system based on aerial infrared imagery includes an infrared camera data acquisition module and a detection module, wherein:
[0018] The infrared camera data acquisition module is used to acquire video stream data from the infrared camera to obtain infrared images;
[0019] The detection module is used to detect pedestrians in the acquired infrared images; the detection module is configured with a preprocessing module and a neural network inference module, wherein:
[0020] The preprocessing module preprocesses the acquired infrared images;
[0021] The neural network inference module is configured with a one-sided inhibition operator fusion convolutional neural network model, and the network model is trained using an infrared image dataset to obtain a detection model capable of detecting pedestrians.
[0022] The operator-fused convolutional neural network model with unilateral inhibition comprises three parts: a cross-stage hierarchical deep backbone network, a multi-scale feature fusion module, and a detection output module; the cross-stage hierarchical deep backbone network and the multi-scale feature fusion module contain a convolutional fusion module, which fuses convolution and unilateral inhibition activation functions;
[0023] The cross-stage hierarchical deep backbone network extracts features from the input infrared image and outputs feature maps in three different dimensions. The multi-scale feature fusion module extracts features from the three different dimensions of the cross-stage hierarchical deep backbone network and outputs feature results at three scales. The detection output module transforms the feature results at the three scales obtained from the multi-scale feature fusion module to obtain the prediction results for each feature result.
[0024] Furthermore, the three parts of the unilateral inhibition operator-fused convolutional neural network model also include: a residual unit module, a cross-stage local network module, a fast spatial pyramid pooling module, and an output module, wherein:
[0025] The residual unit module employs two different residual components, which are applied to the cross-stage hierarchical deep backbone network and the multi-scale feature fusion module, respectively.
[0026] The cross-stage local network module is composed of the convolutional fusion module and the residual unit module. One of its input paths passes through the convolutional fusion module only, while the other path passes through the convolutional fusion module and then through the residual unit module for residual operation. After that, the two paths are superimposed, and then the convolutional fusion module extracts features again before outputting.
[0027] The fast spatial pyramid pooling module concatenates four sets of data that have undergone convolutional fusion, first pooling, second pooling, and third pooling, and then extracts features and outputs them through the convolutional fusion module.
[0028] The output module performs a convolution operation on the input data, then scales it, and then swaps its positions to obtain the prediction result.
[0029] Furthermore, in the cross-stage hierarchical deep backbone network, the input infrared image is calculated by two layers of convolutional fusion modules and one layer of single-residual cross-stage local network module. The result is then calculated by two layers of convolutional fusion modules and one layer of double-residual cross-stage local network module to obtain a first-dimensional feature map, which is then output to the multi-scale feature fusion module. Simultaneously, this first-dimensional feature map is calculated by one layer of convolutional fusion module and one layer of three-residual cross-stage local network module to obtain a second-dimensional feature map, which is then output to the multi-scale feature fusion module. This second-dimensional feature map is then calculated by one layer of convolutional fusion module, one layer of single-residual cross-stage local network module, and a fast spatial pyramid pooling module to obtain a third-dimensional feature map, which is then output to the multi-scale feature fusion module.
[0030] Furthermore, the multi-scale feature fusion module includes a three-layer feature pyramid, which obtains feature maps of three different dimensions from the cross-stage hierarchical deep backbone network. After passing through the convolutional fusion module, the cross-stage local network module, size transformation, and channel stacking, feature results of three scales are obtained.
[0031] Furthermore, the infrared camera data acquisition module also converts the acquired infrared image from a three-channel grayscale image into a single-channel grayscale image;
[0032] The preprocessing in the preprocessing module includes:
[0033] Standardize the resolution of infrared images;
[0034] The unified infrared image is expanded from a single-channel grayscale image to a three-channel grayscale image.
[0035] Furthermore, the system also includes a recognition result overlay encoding module, which overlays the prediction result with the infrared image and encodes the overlay image.
[0036] Furthermore, the recognition result is superimposed by an encoding module, and the superimposed image is hardware encoded.
[0037] Furthermore, the system also includes a multi-threaded control module, which is used to process the entire video stream data in parallel. It enables three sub-threads for the parallel operation of the infrared camera data acquisition module, the detection module, and the recognition result overlay encoding module, respectively.
[0038] Furthermore, the detection module also includes a post-processing module, which performs post-processing on the three prediction results, including removing duplicate candidate boxes and sending the prediction results to the main thread and the thread where the recognition result overlay encoding module is located.
[0039] This invention also provides a method for pedestrian recognition using aerial infrared images, which is based on the aforementioned aerial infrared image pedestrian recognition system; the method includes:
[0040] The infrared camera data acquisition module is used to acquire video stream data from the infrared camera.
[0041] The detection module is used to detect pedestrians in the acquired infrared images.
[0042] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0043] 1. The solution provided by this invention can meet the requirements for pedestrian detection in aerial infrared images, while also being fast, small in size, and low in power consumption. It meets the needs of UAV recording platforms and can be deployed and applied on a large scale at low cost.
[0044] 2. This invention utilizes the characteristics of simple operation, low resource consumption, and direct combination with convolution calculation of the one-sided inhibition activation function. It optimizes the separate calculation of traditional convolution and complex activation functions, improving the detection speed by nearly 10%. Moreover, the optimization is more targeted and more suitable for deployment and inference on artificial intelligence processors.
[0045] 3. This invention makes extensive use of fusion operators, which effectively reduces the amount of computation and increases the speed of infrared image processing while maintaining high model accuracy, thus achieving higher real-time performance.
[0046] 4. This invention uses only infrared images for identification, eliminating the need for additional radar equipment. This significantly reduces the equipment load on the UAV, making the entire system more portable, while achieving similar detection results. It is suitable for use on UAV onboard platforms. In terms of the detection algorithm, the neural network structure proposed in this invention is simpler, requires less computation, and is faster, achieving higher real-time performance.
[0047] 5. The operator fusion convolutional neural network based on one-sided inhibition proposed in this invention adopts a four-thread parallel processing method. It only takes about 46 milliseconds to infer an image at the same 640×640 resolution, which is 40% faster. The power consumption of the whole machine (including the core board and infrared camera) is only 6 watts, which is extremely energy efficient. Attached Figure Description
[0048] The present invention will be described by way of example and with reference to the accompanying drawings, wherein:
[0049] Appendix Figure 1 Aerial infrared image pedestrian recognition system architecture diagram;
[0050] Appendix Figure 2 Flowchart of pedestrian recognition method based on aerial infrared images;
[0051] Appendix Figure 3 A schematic diagram of the data flow for a pedestrian recognition system based on aerial infrared images;
[0052] Appendix Figure 4 A schematic diagram of inter-thread data transmission for a pedestrian recognition device using aerial infrared images;
[0053] Appendix Figure 5 This is a flowchart of the detection module's operation.
[0054] Appendix Figure 6The flowchart for normalization processing;
[0055] Appendix Figure 7 This is an example of an operator-fused convolutional neural network model architecture with unilateral inhibition, where a represents the basic components and b represents the architecture of the network model.
[0056] Appendix Figure 8 This is a flowchart of the post-processing process;
[0057] Appendix Figure 9 This is an example of predicting the structure of data packets;
[0058] Appendix Figure 10 The diagram shows the airborne test results of the system.
[0059] Appendix Figure 11 The system records the speed for onboard testing. Detailed Implementation
[0060] All features disclosed in this specification, or steps in all methods or processes disclosed herein, may be combined in any way, except for mutually exclusive features and / or steps.
[0061] Any feature disclosed in this specification (including any appended claims and abstract) may be replaced by other equivalent or similar features, unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features.
[0062] Drone aerial photography combined with artificial intelligence detection has become a key technology in recent years for fields such as intelligent security, disaster management, environmental protection, and monitoring. Single-spectrum image processing suffers from insufficient effective information under conditions such as low light. Infrared images can capture temperature differences between different objects, providing clearer and more reliable target information in complex backgrounds, low-light conditions, and obstructed environments. Drones equipped with artificial intelligence technology, by integrating image acquisition and deep learning algorithms, can quickly and accurately detect pedestrians.
[0063] Currently, most embedded AI devices directly read and detect images from cameras, but often only transmit the relative position and category of the identified target, which is not ideal for debugging and review. This invention separates the data return process. The detected image is transmitted via an H.264 video stream, while the detected target's position, category, and confidence level are encapsulated into a data block for transmission. The backend drone controller can selectively receive this data, thus better utilizing the transmission bandwidth between devices. Furthermore, multi-threading is used for data processing. In continuous image processing scenarios like video stream processing, multiple tasks can be performed simultaneously, ensuring the real-time performance and detection efficiency of the entire system.
[0064] Current neural network models for infrared image and video processing are large in scale, requiring significant memory and computing resources, which limits their deployment on low-computing-power, low-power, and small-size embedded platforms. Furthermore, high-performance embedded devices are expensive, heavy, and power-hungry, making them unsuitable for integration into drones. To address these issues, this invention proposes using a lightweight, one-sided inhibition-based operator-fused convolutional neural network for image recognition to reduce network size, thereby meeting the low-load, low-power, and high-real-time performance requirements of embedded processors in drone platforms.
[0065] Example 1
[0066] A pedestrian recognition system based on unilateral inhibition operator fusion convolutional neural network for aerial infrared images, such as... Figure 1 As shown, the system includes an infrared camera data acquisition module, a data distribution module, a display module, a detection module that fuses a convolutional neural network with one-sided suppression operators, a recognition result overlay encoding module, a network streaming module, a data storage module, and a multi-threaded control module. The system operation flow is as follows: Figure 2 As shown, during operation, the data flow of each module in the system is as follows: Figure 3 As shown. It should be noted that this is a description of the most complete system architecture. In practical applications, some modules can be removed to eliminate corresponding functions. For example, the system could only include an infrared camera data acquisition module and a detection module, only implementing the acquisition of infrared images and the detection of pedestrians in the infrared images using a convolutional neural network based on one-sided inhibition operators. By combining these modules, systems with different functions can be created.
[0067] The multi-threading control module controls four threads, such as... Figure 4As shown, the main thread, the first sub-thread (sub-thread 1), the second sub-thread (sub-thread 2), and the third sub-thread (sub-thread 3) correspond to the display thread, video reading thread, model inference thread, and encoding / streaming thread, respectively. The design employs a parallel processing approach with one main thread and three sub-threads, separating the visualization of prediction results, the reading of camera video, model inference, and the encoding and storage of prediction results, saving computational power and improving inference efficiency. Data transmission between multiple threads includes the read infrared image data, prediction results, and program termination notifications. The read infrared image data is sent by the video reading thread to the other three threads; the prediction results are sent by the model inference thread to the other three threads; and the program termination notification is sent by the main thread to the other three sub-threads. The read raw infrared image data and prediction results are transmitted using three separate first-in-first-out queues, each with a process lock to ensure mutual exclusion between reading and writing data. The program termination notification uses an atomic variable data format. This ensures that multiple threads operating on shared variables are not interfered with by other threads, thus avoiding race conditions and deadlocks.
[0068] The infrared camera data acquisition module is used to acquire video stream data from the infrared camera. Specifically, the infrared camera data acquisition module reads the video stream in the first sub-thread started by the multi-threaded control module. It connects to the infrared camera through a universal serial bus interface to complete the acquisition of infrared images from the infrared camera. Simultaneously, it converts the acquired infrared images into commonly used data formats for buffering. The infrared camera outputs a 640×512×3 three-channel grayscale image. Since the data in all three channels is identical, two channels are removed, converting it to a 640×512×1 single-channel grayscale image. Timestamp information is inserted to facilitate correlation with subsequent detection results, ultimately generating a data format of {640×512×1, 16}.
[0069] The data distribution module distributes the collected video stream data to the detection module, the recognition result overlay encoding module, the network streaming module, and the display module. Specifically, it uses the length of the buffer queue in each thread to determine the data processing capability of the other threads and allocates video stream data according to the optimal processing speed. For the second sub-thread, if its queue length is greater than 1, it means that the detection has not been completed and the next image cannot be detected, so the current frame image is not sent to the thread's read queue. For the queues of the display thread and the encoding / streaming thread, if the queue length is greater than 10, it means that the detection thread is not running normally, so the current frame image is not sent to the thread's read queue; if the queue length is less than 10, it means that the detection thread is running normally and the current frame image is sent to the thread's read queue.
[0070] The detection module is used in a second sub-thread started by the multi-threaded control module to detect pedestrians in the acquired infrared images using a convolutional neural network model fused with one-sided inhibition operators. The detection module includes a sub-thread starting module, a queue data reading module, a preprocessing module, a normalization module, a neural network inference module, and a post-processing module.
[0071] like Figure 5 As shown, the sub-thread starting module is used to start a second sub-thread under the control of the multi-thread control module to perform model inference and pre- and post-processing work, that is, to perform the work of the detection module.
[0072] The queue data reading module is used to obtain infrared images from the first child thread.
[0073] The preprocessing module performs preprocessing on the acquired infrared images. This includes:
[0074] Unify the resolution of irregularly sized infrared images;
[0075] The unified infrared image is expanded from a single-channel grayscale image to a three-channel grayscale image.
[0076] For example, a 640×512×1 infrared image can be transformed into a 640×640×1 infrared image by performing a letterbox operation with a fill value of 0. Then, the 640×640×1 infrared image can be copied and expanded in the third dimension to become a 640×640×3 image, where the first 640 is the image height, the second 640 is the image width, and 3 is the number of image channels.
[0077] The normalization module normalizes the preprocessed infrared image. For example... Figure 6 As shown, it includes:
[0078] First, the original pixel data distributed between 0-255 is compressed to 0-1, thus reducing the data size without changing the feature distribution, and also converting it into a data format that is easy for neural network models to process. The calculation expression is as follows:
[0079]
[0080] Where x represents the original pixel data and A represents the corresponding output data.
[0081] The mean and variance of the entire image data are changed using a normalization function, and the expression is calculated as follows:
[0082]
[0083] in The output data is normalized, with mean(A) of [0,0,0] and std(A) of [0.003921,0.003921,0.003921]. The processed data has a mean of 0 and a standard deviation of 1, achieving data standardization. Standardized data is more conducive to model inference and prediction.
[0084] Converting an HWC format image to CHW format: where C represents the number of channels, H represents the image height, and W represents the image width. The image dimensions are swapped: height is moved from the first dimension to the second, width from the second dimension to the third, and the number of channels is moved from the third dimension to the first. That is, 640×640×3 is replaced with 3×640×640, ultimately converting the HWC format image to CHW format.
[0085] The neural network inference module is configured with a convolutional neural network model fused with one-sided inhibition operators. This network model is trained using an infrared image dataset containing pedestrian labels to obtain a detection model capable of detecting pedestrians. The dataset can be obtained not only from historical video stream data, but also by partially deleting or replacing parts of the already acquired dataset, or by using image enhancement methods such as scaling, adding random noise, cropping, and stitching.
[0086] The aforementioned operator-fused convolutional neural network model with unilateral suppression comprises three parts: a cross-stage hierarchical deep backbone network, a multi-scale feature fusion module, and a detection output module. Among them:
[0087] A multi-stage, hierarchical deep backbone network extracts features from the input infrared image, outputting feature maps of three different dimensions. These maps are then transmitted to a multi-scale feature fusion module for further feature extraction. In this embodiment, the dimensions of the three feature maps are set to 128×80×80, 256×40×40, and 256×20×20, respectively.
[0088] The multi-scale feature fusion module extracts features from three different dimensions of feature maps obtained from the cross-stage hierarchical deep backbone network, and outputs feature results at three scales. Corresponding to the dimensions of the feature maps, the scales of the feature results are 128×80×80, 256×40×40, and 512×20×20, respectively.
[0089] The detection output module obtains feature results at three scales from the multi-scale feature fusion module, transforms them, and obtains the prediction results for each feature result.
[0090] Specifically, the unilateral inhibition operator-fused convolutional neural network model is obtained by combining and reusing smaller modular units, resulting in the three parts mentioned above. The network model includes a convolutional fusion module (CR in the figure), residual unit modules (Res_unit1 and Res_unit2 in the figure), cross-stage local network modules (CSPNet1_x and CSPNet2_x in the figure), a fast spatial pyramid pooling module (SSPF in the figure), and an input module (input in the figure) and an output module (output in the figure), wherein:
[0091] The convolution fusion module combines convolutions (Conv) with a one-sided suppression activation function (ReLU, or other simpler activation functions; ReLU is used as an example here). The expression for the one-sided suppression activation function is as follows:
[0092]
[0093] Where f(x) is the output of the one-sided suppression activation function, and x is the input. Its graph is a ramp; for non-negative input values, the output is equal to the input; for negative input values, the output is zero. Combining convolution and the one-sided suppression activation function forms a convolution fusion module. The module's input serves as the input to the convolution, the convolution's output serves as the input to the one-sided suppression activation function, and the one-sided suppression activation function's output serves as the module's output. The convolution operation extracts features from the input data, while the one-sided suppression activation function introduces non-linear properties into the convolution result. The expression for the convolution fusion module is as follows:
[0094] cr_out = f(conv(input))
[0095] Here, `input` represents the module input, `cr_out` represents the output of the convolutional fusion module, `f` is the one-sided suppression activation function mentioned above, and `conv` represents the convolution operation. This allows the neural network processor to perform calculations simultaneously. By combining convolution operations and the one-sided suppression activation function, the convolutional fusion module can perform feature extraction and nonlinear processing in one step, enabling the neural network to better understand complex input data. In the network model of this embodiment, the convolutional fusion module accounts for as much as 90%, thus effectively improving inference efficiency.
[0096] In the network model of this embodiment, the residual unit module employs two different residual components, such as... Figure 5 Res_unit1 and Res_unit2 are applied to the cross-stage hierarchical connection deep backbone network and the multi-scale feature fusion module, respectively, to improve the performance of the network model. The expression for the residual unit module (Res_unit1) used in the cross-stage hierarchical connection deep backbone network is as follows:
[0097] res1 = cr3(cr1(input)) + input
[0098] The expression for the residual unit module (Res_unit2) used in the multi-scale feature fusion module is as follows:
[0099] res2 = cr3(cr1(input))
[0100] Wherein, input is the module input, cr1 is a convolutional fusion module with a 1×1 kernel, and cr3 is a convolutional fusion module with a 3×3 kernel.
[0101] The cross-stage local network module is composed of a convolutional fusion module and a residual unit module. Figure 5 In the illustrated embodiment, one input path passes through the convolutional fusion module only, while the other path passes through the convolutional fusion module and then through the residual unit module for residual calculation. The two paths are then channel-overlapped, and the feature is extracted again by the convolutional fusion module before output. Since the residual unit module in this embodiment uses two different residual components, the corresponding cross-stage local network module also includes two single-residual cross-stage local network modules, as shown below... Figure 5 As shown in the diagrams, CSPNet1_x and CSPNet2_x are used, where CSPNet1_x is applied in a cross-stage hierarchical deep backbone network, and CSPNet2_x is applied in a multi-scale feature fusion module. (The diagrams provide further details.)
[0102] CSPNet1=cr(concat(cr(input),res1(cr(input))))
[0103] CSPNet2=cr(concat(cr(input),res2(cr(input))))
[0104] The input is the module input. When the module is used to connect deep backbone networks across stages, CSPNet1 is used. When the module is used to fuse multi-scale features, CSPNet2 is used. concat is the channel fusion concatenation, which concatenates N C×H×W matrices into an NC×H×W matrix.
[0105] The fast spatial pyramid pooling module concatenates four sets of data that have undergone convolutional fusion, first pooling, second pooling, and third pooling, and then extracts features through the convolutional fusion module to output the results.
[0106] maxpool1 = maxpool(cr(input))
[0107] maxpool2 = maxpool(maxpool1)
[0108] maxpool3 = maxpool(maxpool2)
[0109] SSPF=cr(concat(cr(input),maxpool1,maxpool2,maxpool3))
[0110] Wherein, input is the module input, maxpool is the maximum pooling operation with a step size of 2, maxpool1, maxpool2, and maxpool3 are the results of one-time pooling, two-time pooling, and three-time pooling, respectively, and SSPF is the output of this module.
[0111] Finally, the output module performs a convolution operation on the input data, then scales it to reduce the number of channels to the number of target classes, and then swaps the channels to obtain a standardized output, finally outputting the final prediction result.
[0112] output=Transpose(Reshape(conv(input)))
[0113] The input function is the module input, and the Reshape function is the scaling transformation function. It expands the first dimension of the three-dimensional data. For example, it divides 8n channels into n equal parts, each with 8 channels, and combines them into a four-dimensional data, transforming it from 8n×h×w to n×8×h×w, where h and w are the height and width of the feature map. The Transpose function swaps the dimensions, changing the third dimension to the fifth dimension, from n×8×h×w to n×h×w×8.
[0114] Based on the above module units, such as Figure 7In the illustrated embodiment, in the cross-stage hierarchical connection deep backbone network, the input image is processed by the convolutional fusion module (CR) of layers 2 and 3, and by the single residual cross-stage local network module (CSPNet1_1) of layer 4. The result is then processed by the convolutional fusion module of layer 5 and by the double residual cross-stage local network module (CSPNet1_2) of layer 6, resulting in a 128×80×80 (i.e., the first dimension) feature map, which is then output to the multi-scale feature fusion module. Simultaneously, this result (i.e., the first dimension feature map) is further processed by the 7th layer... The convolutional fusion module of layer 1 and the three residual cross-stage local network module (CSPNet1_3) of layer 8 calculate a 256×40×40 (i.e., the second dimension) feature map, which is then output to the multi-scale feature fusion module. This result (i.e., the second-dimensional feature map) is then calculated by the convolutional fusion module of layer 9, the single residual cross-stage local network module of layer 10, and the fast spatial pyramid pooling module of layer 11, finally yielding a 256×20×20 (i.e., the third dimension) feature map, which is then output to the multi-scale feature fusion module. The specific structure is shown in the attached figure. Figure 7 As shown in b.
[0115] The multi-scale feature fusion module comprises a three-layer feature pyramid, extracting feature maps of different dimensions from layers 6, 8, and 11 of the cross-stage hierarchical deep backbone network. These maps then pass through a convolutional fusion module, a cross-stage local network module, size transformation, and channel fusion. Finally, the enhanced feature results at three scales (128×80×80, 256×40×40, and 512×20×20) are obtained in the single residual cross-stage local network module (CSPNet2_1) at layers 19, 22, and 25. In this embodiment, its structure is shown in the attached figure. Figure 7 As shown in b.
[0116] The detection output module corresponds to three feature results, including three output modules. These modules transform the feature results from the multi-scale information fusion module into the final prediction results, namely the coordinates of each bounding box, the target type, and the confidence information. The specific structure is shown in the attached figure. Figure 7 As shown in b.
[0117] The post-processing module is used to post-process the three prediction results, including removing duplicate candidate boxes and sending the prediction results to the main thread and the encoding sub-thread. For example... Figure 8 As shown, the post-processing module is configured as follows:
[0118] The three prediction results output from layers 28, 27, and 26 are extracted, each corresponding to a large, medium, or low-level anchor box. In this embodiment, these three anchor boxes are set as [10,13,16,30,33,23][30,61,62,45,59,119][116,90,156,198,373,326], respectively, and these data are converted into prediction boxes.
[0119] The relative center coordinates of the network output are decoded using the Sigmoid activation function and multiplied by the stride of the feature map to obtain the center coordinates of the predicted bounding box. The specific formula is as follows:
[0120] decoded_x=(sigmoid(output_x)+grid_x)×stride
[0121] decoded_y=(sigmoid(output_y)+grid_y)×stride
[0122] Where output_x and output_y are the relative coordinates of the neural network output, grid_x and grid_y are the coordinates of the current target on the feature map. They are used to map relative coordinates to absolute coordinates. stride is the stride of the feature map, and the strides of the three anchor boxes are 8, 16, and 32, respectively.
[0123] Next, the relative width and height of the network output are decoded using an exponential function, and then multiplied by the corresponding anchor box width and height to obtain the absolute width and height of the predicted box. The specific formula is as follows:
[0124] decoded_width=anchor_width×exp(output_width)
[0125] decoded_height=anchor_height×exp(output_height)
[0126] Here, output_width and output_height are the relative width and height of the neural network output, and anchor_width and anchor_height are the width and height of the corresponding anchor boxes.
[0127] Then, using the decoded relative coordinate information and anchor box information, it is converted into the absolute coordinates of the predicted box, as shown in the following formula:
[0128]
[0129]
[0130]
[0131]
[0132] Where (x_min, y_min) and (x_max, y_max) are the coordinates of the top-left and bottom-right corners of the decoded prediction bounding box. Finally, it is converted into a prediction bounding box in the form of (x_min, y_min, x_max, y_max).
[0133] Simultaneously, the relative class probabilities output by the network are decoded using the Sigmoid function to obtain the class probabilities of the predicted bounding boxes. The formula for this step is as follows:
[0134] decoded_confidence=sigmoid(output_confidence)
[0135] Where output_confidence is the relative class probability, decoded_confidence is the class probability of the final predicted box, and finally the neural network output is decoded into the absolute coordinates and class probability of the final predicted box, in the form of (x_min, y_min, x_max, y_max, classic, decoded_confidence), where x_min is the x-coordinate of the top left corner of the predicted box, y_min is the y-coordinate of the top left corner of the predicted box, x_max is the x-coordinate of the bottom right corner of the predicted box, y_max is the y-coordinate of the top left corner of the predicted box, classic is the class, and decoded_confidence is the probability of the predicted box.
[0136] Non-maximum suppression (NMS) is used to remove duplicate candidate boxes. By iteratively calculating the intersection and union ratio (IoU) of the highest-scoring predicted box with its surrounding predicted boxes, the NMS removes boxes with larger IoU values, thus eliminating duplicate candidate boxes and improving accuracy.
[0137] Determine whether the display and encoding threads have finished reading the results in the cache queue. If the queue length is 0, package the prediction results and send them to the main thread and the encoding sub-thread. If the queue length is not 0, discard the frame result.
[0138] The recognition result overlay encoding module, in the third sub-thread started by the multi-threaded control module, overlays the prediction result with the infrared image of the video stream data and encodes the overlay image. In this embodiment, hardware encoding of the overlay image is selected, encoding it into H.264 format. This reduces the CPU utilization from 100% full load during software encoding / decoding to 30% during hardware encoding / decoding, leaving 70% of CPU resources available for other additional operations.
[0139] The data storage module stores the encoded video stream data in the onboard memory.
[0140] The network streaming module pushes the encoded video stream data over the network in the third sub-thread, and packages the prediction results in JSON format and sends them to the drone's main controller via the network interface. (See attached) Figure 9 As shown, the data packet uses JSON as its data format, where classic is the target category, confidence is the target confidence level, position is the target position, timestamp is the timestamp, center_x is the x-coordinate of the center point, center_y is the y-coordinate of the center point, width is the width of the target bounding box, and height is the height of the target bounding box.
[0141] The multi-threaded control module is used to process the entire video stream data in parallel. It uses one main thread and three sub-threads to process the video stream data in parallel, separating the reading of video stream data by the infrared camera data acquisition module (i.e., the first sub-thread), the identification of pedestrians by the detection module (i.e., the second sub-thread), the encoding and saving of the prediction results by the recognition result overlay encoding module (i.e., the third sub-thread), and the visualization of the inference results (i.e., the main thread). This allows multiple module tasks to be performed synchronously (in parallel) in the continuous image processing scenario of video stream data processing, ensuring the real-time performance and detection efficiency of the entire system, while maintaining the original detection accuracy.
[0142] The entire system was carried into the air via an unmanned aerial vehicle (UAV) for real-time predictive testing. The acquired images were stored in onboard memory for subsequent system performance analysis after the UAV returned to base. During real-time aerial detection, as shown in Table 1, the device achieved a pedestrian recognition confidence level greater than 75%, with most results around 80%, and virtually no false detections. For vehicle detection, the confidence level was also greater than 75%, with most results around 80%, and no false detections. (See attached table.) Figure 10 The image shown is a specific test result diagram.
[0143] Table 1 Airborne Test Results
[0144]
[0145] As shown in Table 2, the recognition speed and the time required for each step in the recognition process are as follows: the inference part takes approximately 45 milliseconds, and the overall time is approximately 77 milliseconds. The overall recognition rate reaches approximately 12 frames per second, with a peak of approximately 58 milliseconds, representing a 40% speed improvement compared to detection systems of the same accuracy. (See attached table.) Figure 11 The image shown is a specific result of the operation.
[0146] Table 2 Airborne Test Speed Table
[0147]
[0148] Example 2
[0149] This embodiment discloses a method for pedestrian recognition using aerial infrared images, which is based on the system described in Embodiment 1. The method includes:
[0150] The infrared camera data acquisition module acquires video stream data from the infrared camera; the detection module detects pedestrians in the acquired infrared images.
[0151] For more details, see Figure 2 As shown, we have:
[0152] S100: Construction Figure 3 The hardware system shown has an artificial intelligence chip that carries the recognition system described in Example 1. The configuration and function of each module in the system are described in Example 1. Figure 3 In the system shown, the infrared camera sends a 640×512 grayscale image to the AI chip via a universal serial bus; the AI chip performs image detection and encoding; the H.264 encoded video stream is stored in the onboard memory; simultaneously, the encoded video stream and JSON-formatted result data containing target category, target confidence, target location, and timestamp are pushed to the UAV main controller via the network port. If the system is already built, this step may be omitted from the execution of the method.
[0153] The system is mounted on an airborne platform, where drones collect video stream data in real time using infrared cameras.
[0154] S200: Construction Figure 4 The method execution involves four threads: the main thread, the first child thread, the second child thread, and the third child thread. The data flow configuration for each thread is detailed in Example 1 and will not be repeated here.
[0155] S300: In the first sub-thread started by the multi-threaded control module, the infrared camera data acquisition module acquires the video stream data of the infrared camera, obtains the infrared image, and converts it into a single-channel infrared image.
[0156] S400: The data distribution module distributes video stream data to the detection module, the recognition result overlay encoding module, the network streaming module, and the display module.
[0157] S500: In the second sub-thread started by the multi-threaded control module, the detection module is used to detect pedestrians in the acquired infrared image.
[0158] S600: In the third sub-thread of the multi-threaded control module, the recognition result overlay encoding module overlays and encodes the prediction result with the infrared image; the data storage module stores the encoded video stream data in the onboard memory; and the network streaming module pushes the encoded video stream data to the main thread for display via the network. Additionally, the prediction results are packaged in JSON format and sent to the UAV main controller via the network port. (See attached image) Figure 9 As shown, the data packet uses JSON as its data format, where classic is the target category, confidence is the target confidence level, position is the target position, timestamp is the timestamp, center_x is the x-coordinate of the center point, center_y is the y-coordinate of the center point, width is the width of the target bounding box, and height is the height of the target bounding box.
[0159] S700: The system is mounted on a drone and performs the above-mentioned methods in real time in the air using the drone's onboard method, and stores the collected infrared images in the onboard memory.
[0160] In this embodiment, the modules and systems involved in the execution of the method correspond to the modules and systems in Embodiment 1. That is, each module, unit, and system in Embodiment 1 is applicable to this method embodiment. Therefore, the configuration and execution methods of each module will not be described again in this embodiment.
[0161] This invention is not limited to the specific embodiments described above. The invention extends to any new feature or combination disclosed in this specification, as well as any new method or process step or combination disclosed herein.
Claims
1. A pedestrian recognition system based on aerial infrared images, characterized in that, It includes an infrared camera data acquisition module and a detection module, wherein: The infrared camera data acquisition module is used to acquire video stream data from the infrared camera to obtain infrared images; The detection module is used to detect pedestrians in the acquired infrared images; the detection module is configured with a preprocessing module and a neural network inference module, wherein: The preprocessing module preprocesses the acquired infrared images; The neural network inference module is configured with a one-sided inhibition operator fusion convolutional neural network model, and the network model is trained using an infrared image dataset to obtain a detection model capable of detecting pedestrians. The operator-fused convolutional neural network model with unilateral inhibition comprises three parts: a cross-stage hierarchical deep backbone network, a multi-scale feature fusion module, and a detection output module; the cross-stage hierarchical deep backbone network and the multi-scale feature fusion module contain a convolutional fusion module, which fuses convolution and unilateral inhibition activation functions; The cross-stage hierarchical deep backbone network extracts features from the input infrared image and outputs feature maps in three different dimensions. The multi-scale feature fusion module extracts features from the three different dimensions of the cross-stage hierarchical deep backbone network and outputs feature results at three scales. The detection output module transforms the feature results at the three scales obtained from the multi-scale feature fusion module to obtain the prediction results for each feature result.
2. The aerial infrared image pedestrian recognition system as described in claim 1, characterized in that, The three parts of the unilateral suppression operator-fused convolutional neural network model also include: a residual unit module, a cross-stage local network module, a fast spatial pyramid pooling module, and an output module, wherein: The residual unit module employs two different residual components, which are applied to the cross-stage hierarchical deep backbone network and the multi-scale feature fusion module, respectively. The cross-stage local network module is composed of the convolutional fusion module and the residual unit module. One of its input paths passes through the convolutional fusion module only, while the other path passes through the convolutional fusion module and then through the residual unit module for residual operation. After that, the two paths are superimposed, and then the convolutional fusion module extracts features again before outputting. The fast spatial pyramid pooling module concatenates four sets of data that have undergone convolutional fusion, first pooling, second pooling, and third pooling, and then extracts features and outputs them through the convolutional fusion module. The output module performs a convolution operation on the input data, then scales it, and then swaps its positions to obtain the prediction result.
3. The aerial infrared image pedestrian recognition system as described in claim 2, characterized in that, In the cross-stage hierarchical deep backbone network, the input infrared image is processed by two layers of convolutional fusion modules and one layer of single-residual cross-stage local network modules. The result is then processed by two more layers of convolutional fusion modules and one layer of double-residual cross-stage local network modules to obtain a first-dimensional feature map, which is then output to the multi-scale feature fusion module. Simultaneously, this first-dimensional feature map is processed by one more layer of convolutional fusion modules and one layer of three-residual cross-stage local network modules to obtain a second-dimensional feature map, which is then output to the multi-scale feature fusion module. This second-dimensional feature map is then processed by one more layer of convolutional fusion modules, one layer of single-residual cross-stage local network modules, and a fast spatial pyramid pooling module to obtain a third-dimensional feature map, which is then output to the multi-scale feature fusion module.
4. The aerial infrared image pedestrian recognition system as described in claim 2, characterized in that, The multi-scale feature fusion module comprises a three-layer feature pyramid, which obtains feature maps of three different dimensions from the cross-stage hierarchical deep backbone network. After passing through the convolutional fusion module, the cross-stage local network module, size transformation, and channel stacking, feature results of three scales are obtained.
5. The aerial infrared image pedestrian recognition system as described in claim 1, characterized in that, The infrared camera data acquisition module also converts the acquired infrared image from a three-channel grayscale image into a single-channel grayscale image; The preprocessing in the preprocessing module includes: Standardize the resolution of infrared images; The unified infrared image is expanded from a single-channel grayscale image to a three-channel grayscale image.
6. The aerial infrared image pedestrian recognition system as described in claim 1, characterized in that, The system also includes a recognition result overlay encoding module, which overlays the prediction result with the infrared image and encodes the overlay image.
7. The aerial infrared image pedestrian recognition system as described in claim 6, characterized in that, The recognition result is superimposed by an encoding module, which then performs hardware encoding on the superimposed image.
8. The aerial infrared image pedestrian recognition system as described in claim 6, characterized in that, The system also includes a multi-threaded control module, which is used to process the entire video stream data in parallel. It enables three sub-threads for the parallel operation of the infrared camera data acquisition module, the detection module, and the recognition result overlay encoding module, respectively.
9. The aerial infrared image pedestrian recognition system as described in claim 8, characterized in that, The detection module also includes a post-processing module, which performs post-processing on the three prediction results, including removing duplicate candidate boxes and sending the prediction results to the main thread and the thread where the recognition result overlay encoding module is located.
10. A method for pedestrian recognition using aerial infrared images, characterized in that, This method is based on the aerial infrared image pedestrian recognition system as described in any one of claims 1-9; the method includes: The infrared camera data acquisition module is used to acquire video stream data from the infrared camera. The detection module is used to detect pedestrians in the acquired infrared images.
Citation Information
Patent Citations
Multi-spectral pedestrian detection method based on cross Transform fusion
CN116580425A
Real-time gesture detection method and apparatus
WO2023174098A1
