A method for target detection in drone scene videos based on convolutional neural networks

CN114565867BActive Publication Date: 2024-10-22DALIAN UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210085038.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2024-10-22
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

[0006]本发明旨在提供一种无人机场景视频目标检测框架,目的在于解决当前技术中无人机上嵌入式平台算力有限情况下视频目标检测推理速度缓慢,无法达到实际应用场景中的算法实时性要求的问题

Benefits of technology

[0030] (1) A good balance between accuracy and speed

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565867B_ABST
    Figure CN114565867B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of video target detection in the field of computer vision, and provides a method for detecting video targets in drone scenes based on convolutional neural networks. The framework can make full use of the information association between pedestrians in the previous and next frames of the video to reduce the search area and reduce the computational load. In view of the problem of insufficient computing power of the embedded platform, the tensorrt quantization acceleration technology is used to further accelerate the network inference speed, achieving a good balance between accuracy and speed. The present invention deploys the algorithm framework on the NVIDIA Jetson TX2 embedded platform to perform pedestrian target detection in drone scenes. The platform has the advantages of small size, low power consumption, and suitability for embedded applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of video object detection in the field of computer vision, and in particular relates to image classification, object detection and neural network quantization acceleration technology, and is specifically a method for detecting video objects in unmanned aerial vehicle scenes based on convolutional neural networks. Background Art

[0002] With the rapid development of low-cost commercial drones, video surveillance on drone scenes has attracted more and more attention. Several studies have addressed this issue from different aspects. However, few attempts have been made on embedded platforms. This work is mainly aimed at developing an effective and efficient drone-based pedestrian detection algorithm framework on the Nvdia Jetson TX2 platform.

[0003] Existing detectors can be roughly divided into two-stage (e.g., Faster-RCNN) and single-stage (e.g., YOLO and SSD) detectors. Two-stage detectors first generate region proposals and use a subnetwork to classify and correct the region proposals; while single-stage detectors directly give the final result of the detector without generating region proposals. Generally speaking, single-stage detectors are faster, while two-stage detectors are more accurate. Considering the computing power of the embedded platform, we chose the SSD detector based on MobileNet as our base model.

[0004] In drone scenarios, the image resolution is usually high, but the people in the field of view are relatively small. Therefore, how to balance the speed and accuracy of the algorithm is a difficult task. If the detector is directly applied to the high-resolution image, the computational cost will be huge for the embedded platform. But if we directly resize the image to a low resolution, some targets will not be recognized due to the very limited appearance information. In our observation, most areas in the camera have no targets. Therefore, saving the computation in these areas will greatly speed up the detection process while maintaining good performance. Specifically, we use the temporal and spatial relationship between frames to determine the detection location.

[0005] In this work, two SSD detectors based on MobileNetv1, namely HeavyDet and MiniDet, are combined. HeavyDet is a powerful global detector that detects the entire image in a sliding window manner and finds objects in the entire field. In order to fully extract the temporal-spatial information of the target video sequence, it is assumed that the target moves less in a short time, and then the results of the previous frames are used to determine the local search area in the current frame. These search areas are processed by the MiniDet model, which uses a very small input size, making this detector more efficient than the HeavyDet model. In addition, the HeavyDet and MiniDet models are dynamically interacted to achieve a good balance between accuracy and speed. Summary of the invention

[0006] The present invention aims to provide a UAV scene video target detection framework, with the aim of solving the problem that the video target detection inference speed is slow when the computing power of the embedded platform on the UAV is limited in the current technology, and the real-time requirements of the algorithm in the actual application scenario cannot be met.

[0007] The technical solution of the present invention:

[0008] A method for detecting targets in drone scene videos based on convolutional neural networks, the steps are as follows:

[0009] Step 1: Construct a convolutional neural network model, including the global HeavyDet model and the local MiniDet model, which interact dynamically;

[0010] The HeavyDet model is based on the SSD detector of MobileNet. It divides the original image into multiple sub-regions with some overlap between adjacent sub-regions. Then, all sub-regions of an image are input into the HeavyDet model as a batch. Next, the improved NMS is used to eliminate false positives caused by the appearance of targets in overlapping areas.

[0011] The improved NMS adds preprocessing operations on the basis of the traditional NMS. The specific process is as follows: before executing the traditional NMS, the position coordinates of the target bounding boxes corresponding to all sub-regions are first mapped back to the original image to obtain the target bounding boxes in the original image coordinate system, and then the traditional NMS is executed;

[0012] The MiniDet model is a MobileNet-based SSD detector that takes a search area as its input and returns the location of the target in the search area.

[0013] Step 2: Obtain the video sequence to be detected, including a video sequence of several pedestrians in the drone scene. The input of the convolutional neural network model is an image of any frame in the above video sequence;

[0014] Step 3: Use the convolutional neural network model to detect pedestrians in the drone scene in the video sequence and obtain the detection results;

[0015] Each frame of the video sequence obtained in step 2 is used as the input of the convolutional neural network model constructed in step 1, and then the convolutional neural network model is used to predict the positions of all pedestrians in the input image;

[0016] The HeavyDet model is responsible for finely detecting pedestrians in the entire image and then expanding the detection results into a search area; the MiniDet model is responsible for frame-by-frame correction in the search area; the HeavyDet model and the MiniDet model are executed alternately;

[0017] When predicting the position of pedestrians, the HeavyDet model searches the entire image to preliminarily locate the target position, and then expands the area 1.5 times around the geometric center of the target bounding box detected by the HeavyDet model as the search area for MiniDet; the MiniDet model is applied to the search area to obtain the bounding box about the target, which will be further expanded 1.5 times as the search area for the next frame; until the HeavyDet model detects the entire image again to improve the results of the MiniDet model and initialize new targets entering the area;

[0018] When the MiniDet model fails to find any object in a search area, the bounding box of the object is kept in the last frame and its score is reduced; the position of the search area is updated only when some objects are detected in the search area or the HeavyDet model is started; the extension of the detection bounding box may cover neighboring objects, which may lead to repeated detection. The following two methods are used to solve the problem of repeated detection: the first method is to ignore objects that are only partially visible during the training phase; the other method is to perform improved NMS when collecting the results of MiniDet;

[0019] Step 4: Output the above detection results. Based on the above detection results, visualize the bounding boxes of all pedestrians.

[0020] Step 5: Obtain the convolutional neural network model, including:

[0021] Build a convolutional neural network model to be trained;

[0022] Get training data set, test data set and validation data set;

[0023] Using the training data set to train the aforementioned convolutional neural network model, and obtaining the weights of the trained convolutional neural network model;

[0024] Use TensorRT to quantize and accelerate the trained convolutional neural network model.

[0025] The obtaining of the training data set, the test data set and the verification data set includes:

[0026] Get the pedestrian detection dataset in drone scenes;

[0027] Manually label all data in the test dataset;

[0028] The labeled dataset is split into training dataset, test dataset and validation dataset.

[0029] Beneficial effects of the present invention:

[0030] (1) A good balance between accuracy and speed

[0031] This paper proposes an effective and efficient pedestrian detection framework using HeavyDet and MiniDet models. The framework can make full use of the information association between the previous and next frames of the video to narrow the search area and reduce the computational load. In view of the problem of insufficient computing power of the embedded platform, the tensorrt quantization acceleration technology is used to further accelerate the network inference speed, achieving a good balance between accuracy and speed. The algorithm framework achieves satisfactory performance on the Nvdia Jetson TX2 platform, exceeding 5fps.

[0032] (2) Wider applicability and easy deployment on embedded platforms

[0033] The algorithm framework is deployed on the NVIDIA Jetson TX2 embedded platform to perform pedestrian target detection in UAV scenarios. The platform has the advantages of small size, low power consumption, and suitability for embedded applications.

[0034] Tensor RT is a tool for optimizing the algorithm deployment end, and it has good support for most mainstream deep learning applications. The present invention uses Tensor RT to quickly infer the model with FP16 optimized accuracy, thereby greatly reducing latency, ensuring the best model inference performance, and meeting the stringent latency and throughput requirements on embedded platforms with relatively tight computing power. In addition, the present invention packages the program and dependencies into a lightweight, portable Docker container, and then deploys it to NVIDIA Jetson TX2. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 The overall framework of the detection algorithm. HeavyDet and MiniDet work alternately to detect pedestrians in video sequences.

[0036] Figure 2This is an example of the sliding window strategy of HeavyDet. The original image is segmented into overlapping sub-regions, which are input into HeavyDet as a batch.

[0037] Figure 3 An example of expanding the detected target region. The target region detected in the previous frame is expanded in both horizontal and vertical directions as the local search area of ​​MiniDet.

[0038] Figure 4 An example of regressing the refined position of an object in the expanded search region. MiniDet processes the given search region to update the position of the object.

[0039] Figure 5 Some visualization results of the method in this paper. DETAILED DESCRIPTION

[0040] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings and technical solutions.

[0041] A method for detecting targets in drone scene videos based on convolutional neural networks, the steps are as follows:

[0042] Step 1. Obtain a convolutional neural network model, which includes a powerful global HeavyDet model and a fast local MiniDet model. The former carefully detects pedestrians on the entire image through a series of sliding windows; the latter performs local searches around previous detection results. The HeavyDet and MiniDet models interact dynamically.

[0043] The HeavyDet model is an SSD detector based on MobileNet. In pursuit of high accuracy, the input size of the image should be set as large as possible. But if the entire image (1920×1080) is used as input, the memory of the Nvdia JetsonTX2 is not enough. To solve this problem, the original image is divided into many sub-regions, and these sub-regions are input into the HeavyDet model as a batch. This approach not only greatly reduces the algorithm's requirements for running memory, but also helps to improve detection performance, because for small images, the regression of the target bounding box is much easier, especially when the target is relatively small. Dividing the original image into multiple sub-regions will cause the targets on the edges of each region to be cut apart, resulting in the target bounding box being cut in half or causing false negatives. Therefore, in the implementation of this framework, adjacent sub-regions are overlapped. In addition, we also use an improved version of NMS (Non-Maximum Suppression (NMS)) to eliminate false positives caused by targets appearing in overlapping areas.

[0044] Traditional NMS is mainly used to extract high-confidence bounding boxes in an image during target detection, while suppressing low-confidence false positive boxes. Generally speaking, the model outputs a large number of target bounding boxes, the specific number of which is determined by the number of anchors. There will be many repeated boxes located on the same target, and NMS is used to remove these repeated boxes to obtain the true target bounding box. In this method, the original image is first split into multiple sub-regions with overlapping areas. Traditional NMS cannot eliminate false positive boxes that are repeatedly detected between multiple sub-regions. Therefore, the traditional NMS is improved and preprocessing operations are added. The specific method is that before executing the traditional NMS, the position coordinates of the target bounding boxes corresponding to all sub-regions are first mapped back to the original image to obtain the target bounding box in the original image coordinate system, and then the traditional NMS is executed.

[0045] The MiniDet model is also a MobileNet-based SSD detector that takes a small search region as its input and returns the location of the object in the search region. These search regions are obtained by expanding the bounding boxes of the previously detected objects. The size is 1.5 times the size of the bounding boxes of the detected objects, and the center positions coincide. Since people usually move slowly, the search region will tend to cover all the previously detected objects. When MiniDet is used to process images, many areas without objects are ignored. Therefore, the computational load is reduced and the speed of the detector is also improved.

[0046] Step 2: Obtain a video sequence to be detected; wherein the video sequence is a video sequence containing several pedestrians in a drone scene, and the video sequence can be a recorded video or a video obtained online in real time by an image recording device such as a video recorder, which is not strictly required here. The input of the aforementioned convolutional neural network is an image of any frame in the aforementioned video sequence.

[0047] Step 3: Use the above convolutional neural network model to detect pedestrians in the drone scene in the above video sequence to obtain the detection results;

[0048] Each frame image in the video sequence is used as the input of the convolutional neural network, and then the convolutional neural network is used to predict the positions of all pedestrians in the input image;

[0049] The object detection algorithm of this method consists of HeavyDet and MiniDet, both of which are based on the SSD object detection algorithm. The HeavyDet model is responsible for finely detecting pedestrians in the entire image, and then expanding the detection result into a small search area. The MiniDet model is responsible for frame-by-frame correction in the search area. The HeavyDet model and the MiniDet model are executed alternately to achieve a balance between speed and accuracy.

[0050] Specifically, when predicting the location of pedestrians, the HeavyDet model carefully searches the entire image to preliminarily locate the target location, and then expands the HeavyDet detection results by 1.5 times as the search area for MiniDet. The MiniDet model is applied to the search area to obtain a bounding box about the target, which will be further expanded by 1.5 times as the search area for the next frame. After processing several frames, HeavyDet detects the entire image again to refine the results of MiniDet and initialize new targets entering the area. HeavyDet and MiniDet are dynamically used alternately in this way, achieving a good balance between accuracy and speed.

[0051] It can be noted that the MiniDet model may fail during its lifetime. If MiniDet misses an object, the corresponding search region disappears so that the object will not be recognized again in the following frames until it is detected by the next HeavyDet. To correct this, these search regions are kept for a while so that even if an object is not detected for a period of time, its trajectory will not stop immediately. Specifically, when MiniDet fails to find any object in a search region, we keep the object box in the last frame and reduce its score. The position of the search region is only updated when some objects are detected in the search region or HeavyDet is launched. It is worth noting that the expansion of the detection bounding box may cover neighboring objects, which in turn leads to duplicate detections. The following two methods are adopted to deal with this problem. The first method is to ignore partially visible objects during the training stage, which makes the model more sensitive to complete people rather than cropped people. The other method is to perform NMS when collecting the results of MiniDet, which is a conventional way to deal with duplicate detections.

[0052] In addition, when the camera moves quickly, the position of objects in the scene changes drastically. It is very difficult for MiniDet to detect objects continuously. In our algorithm framework, the number of search areas where no objects were detected is analyzed. If the proportion of search areas where no objects were detected is high enough, HeavyDet is restarted to search the entire image again. It is not necessary to start HeavyDet frequently. Our algorithm framework reviews the number of detected objects, and if the number is stable, HeavyDet is started less frequently.

[0053] Step 4: Output the above detection results, including: Based on the above detection results, visualize and output the bounding boxes of all pedestrians.

[0054] Step 5, obtaining a convolutional neural network model, includes:

[0055] Build a convolutional neural network model to be trained;

[0056] Get training data set, test data set and validation data set;

[0057] The convolutional neural network model is trained using the training data set to obtain the weights of the trained convolutional neural network model.

[0058] Use tensorrt to quantize and accelerate the previously trained convolutional neural network model;

[0059] Step 6: The above-mentioned acquisition of training data set, test data set and verification data set includes:

[0060] Get the pedestrian detection dataset in drone scenes;

[0061] Manually label all data in the aforementioned test dataset;

[0062] The labeled dataset is split into training dataset, test dataset and validation dataset.

[0063] An embodiment of the present invention provides a method for target detection in drone scene videos based on convolutional neural networks, which consists of two detectors, namely HeavyDet and MiniDet. The HeavyDet model carefully searches the entire image to preliminarily locate the target position, and then uses the result of HeavyDet as the search area for MiniDet. The MiniDet model is applied to the search area to obtain a bounding box about the target, which will be further expanded as the search area for the next frame. After processing for a period of time, HeavyDet detects the entire image again to improve the results of MiniDet and initialize new targets entering the area. Figure 1 Table 1 shows the overall framework process of the method.

[0064] Table 1 Detection steps of HeavyDet and MiniDet

[0065]

[0066]

[0067] The overall algorithm framework uses 5 frames as a cycle. The first frame at the beginning of each cycle is detected using HeacyDet, and then MiniDet is used for detection. When the scene changes greatly or the target displacement is large, the search area of ​​MiniDet may not keep up with the movement of the target, resulting in the target being lost and unable to be detected. In response to this situation, a target loss threshold is set. When the search area where the target is not detected is greater than 40% of the total search area, HeacyDet is started to detect the next 3 frames of images. When the target loss percentage is less than the target loss threshold, the detection process returns to normal. The following is an example to illustrate the method flow in detail.

[0068] First, by Figure 1 As shown in Table 1, firstly, a video frame sequence needs to be obtained. The frame sequence can be a recorded video or a video obtained online in real time by an image recording device such as a video recorder. No strict requirement is made here. Figure 1 The input image in is an example input.

[0069] Second, if the current stage (every 5 frames is a stage) ends or fast movement occurs, the first frame of the current stage is processed according to Figure 2 The method shown divides the overlapping areas into blocks, and inputs all the sub-images after the blocks into a batch into the HeacyDet model. The detection results of the HeacyDet model are obtained.

[0070] When the camera moves quickly, the position of objects in the scene changes drastically. It is very difficult for MiniDet to detect objects continuously. In the algorithm framework of this paper, the number of search areas where no objects are detected is analyzed. If the proportion of search areas where no objects are detected is high enough, HeavyDet will be restarted to search the entire image again. It is not necessary to start HeavyDet frequently. The algorithm framework of this paper reviews the number of detected objects, and if the number is stable, the frequency of starting HeavyDet will be reduced.

[0071] An improved version of NMS is used to eliminate the false positives in the detection results of the HeacyDet model caused by the targets appearing in the overlapping areas. The detection results without false positive targets are obtained.

[0072] Fourth, for the last four frames of the current stage, use Figure 3 The method shown enlarges the bounding boxes of all targets in the third step detection results by 1.5 times as the search area of ​​the MiniDet model. Figure 3 The solid line box in the middle is the target bounding box detected by the HeacyDet model, and the dotted line box is obtained by expanding the detected target bounding box. Its size is 1.5 times the size of the detected target bounding box, and the center positions of the two coincide.

[0073] Fifth, all the search areas in the fourth step are input into the MiniDet model as a batch, and the positions of the targets in the search areas corrected by MiniDet are output.

[0074] Note that the MiniDet model may fail during its lifetime. If MiniDet misses an object, the corresponding search region disappears so that the object will not be recognized again in the following frames until it is detected by the next HeavyDet. To correct this, these search regions are kept for a while so that even if an object is not detected for a period of time, its trajectory will not stop immediately. Specifically, when MiniDet fails to find any object in a search region, we keep the object box in the last frame and reduce its score. The position of the search region is only updated when some objects are detected in the search region or HeavyDet is launched. It is worth noting that the expansion of the detection bounding box may cover neighboring objects, which in turn leads to duplicate detections. The following two methods are adopted to deal with this problem. The first method is to ignore partially visible objects during the training stage, which makes the model more sensitive to complete people rather than cropped people. The other method is to perform NMS when collecting the results of MiniDet, which is a conventional way to deal with duplicate detections.

[0075] Sixth, enter the next stage and repeat all the above steps until the video frame ends.

[0076] The final output detection effect is as follows Figure 5 As shown in the figure, it can be seen that the video target detection framework of the present invention can still maintain a good detection effect when the scene is complex, there are many people, and the target is small.

Claims

1. A method for detecting target in drone scene video based on convolutional neural network, characterized in that: Here are the steps: Step 1: Construct a convolutional neural network model, including a global HeavyDet model and a local MiniDet model, which interact dynamically. The HeavyDet model is based on the SSD detector of MobileNet. It divides the original image into multiple sub-regions with some overlap between adjacent sub-regions. Then, all sub-regions of an image are input into the HeavyDet model as a batch. Next, an improved NMS is used to eliminate false positives caused by targets appearing in overlapping areas; The improved NMS adds preprocessing operations on the basis of the traditional NMS. The specific process is as follows: before executing the traditional NMS, the position coordinates of the target bounding boxes corresponding to all sub-regions are first mapped back to the original image to obtain the target bounding boxes in the original image coordinate system, and then the traditional NMS is executed; The MiniDet model is a MobileNet-based SSD detector that takes a search area as its input and returns the location of the target in the search area. Step 2: Obtain the video sequence to be detected, which contains several pedestrian video sequences in the drone scene. The input of the convolutional neural network model is an image of any frame in the above video sequence. Step 3: Use the convolutional neural network model to detect pedestrians in the drone scene in the video sequence and obtain the detection results; Each frame of the video sequence obtained in step 2 is used as the input of the convolutional neural network model constructed in step 1, and then the convolutional neural network model is used to predict the positions of all pedestrians in the input image; The HeavyDet model is responsible for fine-grained detection of pedestrians in the entire image, and then expands the detected target bounding box into a search area; the MiniDet model is responsible for frame-by-frame correction in the search area; The HeavyDet model and the MiniDet model are executed alternately; When predicting the position of pedestrians, the HeavyDet model searches the entire image to preliminarily locate the target position, and then uses the geometric center of the target bounding box detected by the HeavyDet model as the center to expand the area 1.5 times as the search area of ​​MiniDet; the MiniDet model is applied to the search area to obtain the bounding box about the target, and the bounding box will be further expanded 1.5 times as the search area of ​​the next frame; until the HeavyDet model detects the entire image again to improve the results of the MiniDet model and initialize new targets entering the area; When the MiniDet model fails to find any object in a search area, the bounding box of the object is retained in the last frame and its score is reduced; the position of the search area is updated only when some objects are detected in the search area or the HeavyDet model is started; the expansion of the detection bounding box may cover neighboring objects, resulting in repeated detection. The following two methods are used to solve the problem of repeated detection: the first method is to ignore objects that are only partially visible during the training phase; Another approach is to perform improved NMS when collecting the results of MiniDet; Step 4: Output the above detection results. Based on the above detection results, visualize the bounding boxes of all pedestrians. Step 5: Obtain the convolutional neural network model, including: Build a convolutional neural network model to be trained; Get training data set, test data set and validation data set; Using the training data set to train the aforementioned convolutional neural network model, and obtaining the weights of the trained convolutional neural network model; Use TensorRT to quantize and accelerate the trained convolutional neural network model.

2. The method for detecting target in drone scene video according to claim 1, characterized in that: The obtaining of the training data set, the test data set and the verification data set includes: Get the pedestrian detection dataset in drone scenes; Manually label all data in the test dataset; The labeled dataset is split into training dataset, test dataset and validation dataset.

Citation Information

Patent Citations

  • Garbage throwing behavior real-time detection methods

    CN111178182A

  • Pedestrian volume detection method based on deep learning

    CN112270381A

  • Vehicle-mounted video target detection method based on deep learning

    WO2020181685A1