A method for detecting reversing behavior at a high-speed ramp under unilateral cruising of a UAV
Through convolutional neural network and multi-objective tracking algorithm, the vehicle motion trajectory is detected and tracked, and combined with monitoring time intervals and driving distance thresholds, the problem of difficult to distinguish the vehicle's reversing behavior at the high-speed ramp when the drone is cruising is solved, and effective reversing behavior detection is achieved.
Patent Information
- Application Number
- CN202210382896.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-04-13
AI Technical Summary
At high-speed ramps, the vehicle's reversing behavior is difficult to distinguish when cruising by drones, especially due to the difficulty of detection caused by the relative movement of drones and vehicles.
The convolutional neural network is used to detect the vehicle, and the vehicle's motion trajectory is obtained through a multi-objective tracking algorithm. Combining the preset monitoring time interval and driving distance threshold, determine whether the vehicle has reversed. If there are many vehicles, calculate the average driving distance and determine whether the driving distance of any vehicle is less than the proportion threshold of the average driving distance to determine the reversing behavior.
It realizes effective detection of vehicle reversing behavior at the high-speed ramp exit under one-side cruise of the drone, solves the problem of difficult to distinguish vehicle reversing behavior, and improves the flexibility and accuracy of detection.
Smart Images

Figure CN114882450B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of unmanned aerial vehicle video reversing identification, and in particular relates to a method for detecting reversing behavior of a unmanned aerial vehicle at a high-speed ramp entrance during unilateral cruising. Background Art
[0002] The video abnormal parking discrimination algorithm is one of the current research hotspots. By detecting the reversing behavior of vehicles at the highway ramp entrance through video monitoring, corresponding measures can be taken in time to avoid major traffic incidents. At the same time, drones are gradually being used in the transportation field. Drones are used for highway cruising, which have the advantages of being less affected by terrain, strong flexibility, and a large monitoring range. However, the current high-speed ramp video vehicle reversing discrimination algorithm is still mainly for fixed cameras, which is not suitable for the scenario of drone highway cruising. Summary of the invention
[0003] The purpose of the present invention is to provide a method for detecting the reversing behavior of a vehicle at a high-speed ramp entrance during unilateral cruising of a UAV, so as to realize the identification of the reversing behavior of a vehicle at a high-speed ramp entrance during patrol by a UAV.
[0004] In order to solve the above technical problems, the technical solution of the present invention is: a method for detecting the reversing behavior of a UAV during unilateral cruising at a high-speed ramp entrance, comprising the following steps:
[0005] Step 1: Obtain the ramp road surface video image collected by the drone cruise, detect the vehicle in the image through the convolutional neural network, and record the pixel coordinates (x, y) of the vehicle center point;
[0006] Step 2: Use the multi-target tracking algorithm to obtain the motion trajectory of each vehicle and record the number of frames in which each vehicle is detected;
[0007] Step 3: Determine whether there is only one car in the current picture. If so, jump to step 4; if not, jump to step 5;
[0008] Step 4: Preset the monitoring time interval Δt and the driving distance threshold T, calculate the driving distance x of the vehicle within Δt, if the driving distance x is greater than the threshold T, jump to step 1 to continue the detection; if the driving distance x is less than the threshold T, it is determined that the vehicle is reversing;
[0009] Step 5: Calculate the driving distance x of each vehicle in the current screen at Δt i and the average distance travelled by all vehicles, s;
[0010] Step 6: Preset a ratio threshold to determine whether there is a vehicle whose driving distance is less than the average driving distance ratio threshold. If yes, it is determined as a reversing behavior. If no, jump to step 1 to continue detection.
[0011] Further, the detection algorithm used for vehicles in the video image is any one of YOLO, Faster R-CNN, or SSD.
[0012] Further, the multi-object tracking algorithm is any one of the IOU tracking method, the tracking method based on the Kalman filter, or the tracking method based on deep learning features or the Kalman filter.
[0013] Further, in step 2, it also includes the step of setting the initial driving distance value for vehicle tracking.
[0014] Further, step 4 is specifically as follows:
[0015] Step 4.1: Preset the monitoring time interval Δt and the driving distance threshold T, and the time interval Δt is set to 3 s;
[0016] Step 4.2: With a frame rate of 30 FPS, calculate the driving distance x of the vehicle every 90 frames according to the following formula;
[0017]
[0018] where, (x t , y t ) represents the detection coordinates of each vehicle per frame;
[0019] Step 4.3: If the driving distance x is still the initial driving distance value, it means that the driving time is less than 3 s, so no judgment is made, and it jumps to step 1 to continue the detection and tracking; if the driving distance x is not the initial driving distance value, it jumps to step 4.4;
[0020] Step 4.4: Set the driving distance threshold T. If the driving distance x > T, it jumps to step 1 to continue the detection; if x < T, it determines that the vehicle has a reverse driving behavior.
[0021] Further, step 5 is specifically as follows:
[0022] Step 5.1: Calculate the driving distance x of each vehicle according to step 4 i ;
[0023] Step 5.2: Record the number n of vehicles with a driving distance not equal to the initial driving distance value in the current frame and the sum sum of the driving distances of these vehicles;
[0024] Step 5.3: Calculate the average driving distance s of each vehicle:
[0025] s = sum / n
[0026] where, s represents the average driving distance of each vehicle, n represents the number of vehicles, and sum represents the sum of the driving distances of the vehicles.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention solves the problem that vehicles may back up at highway ramps, and the drone will produce relative motion when cruising, making it difficult to identify the backing behavior of the vehicle. The present invention first uses deep learning detection and multi-target tracking algorithms to obtain the pixel driving distance of the vehicle, and then adopts different identification methods to detect the backing behavior according to the current number of vehicles, which is highly flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flow chart of the method for detecting the reversing behavior of a UAV at a high-speed ramp entrance during unilateral cruising. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Please refer to Figure 1 The present invention is a method for detecting the reversing behavior of a UAV at a high-speed ramp entrance during unilateral cruising, and the steps include:
[0032] Step 1: Obtain a video image of the road surface at the ramp entrance collected by the drone cruising, detect the vehicle in the image through a convolutional neural network, and record the pixel coordinates (x, y) of the center point of the vehicle; in this embodiment, the drone cruises on one side of the highway at a constant speed in the opposite direction (that is, the drone and the vehicle are traveling in opposite directions), and any reversing behavior when passing the ramp entrance can be detected; in this embodiment, the detection algorithm used for the vehicle in the video image is any one of YOLO, Faster R-CNN or SSD.
[0033] Step 2: Use a multi-target tracking algorithm to obtain the motion trajectory of each vehicle, and at the same time, record the number of frames in which each vehicle is detected; the multi-target tracking algorithm is any one of the IOU tracking method, the tracking method based on the Kalman filter, and the tracking method based on deep learning features or the Kalman filter; specifically:
[0034] Step 2.1: Set the initial driving distance value of vehicle tracking to -10000; Initially set the driving distance to -10000, because the driving distance is detected every 3 seconds, so the vehicle has no driving distance in the first 0 to 3 seconds. After 3 seconds, its driving distance is updated to the real driving distance. When judging whether the driving distance is greater than the threshold later, if it is still -10000, it is not judged that it has not traveled for less than 3 seconds; in this embodiment, the initial driving distance value is set to -10000, because it is an impossible value to distinguish the driving distance calculated after the target is just initialized and after driving for 3 seconds, and there is no need to set the unit;
[0035] Step 2.2: Record the detection coordinates (x t , y t ) of each vehicle for each frame
[0036] Step 3: Determine whether there is only one vehicle in the current frame. If so, jump to Step 4; if not, jump to Step 5. Step 4: Preset the monitoring time interval Δt and the driving distance threshold T, calculate the driving distance x of the vehicle within Δt (i.e., 3 s). If the driving distance x is greater than the threshold T, jump to Step 1 to continue the detection; if the driving distance x is less than the threshold T, it is determined that the vehicle has a reverse driving behavior. Specifically, Step 4 is as follows:
[0037] Step 4.1: Preset the monitoring time interval Δt and the driving distance threshold T, and set the time interval Δt to 3 s;
[0038] Step 4.2: Calculate the driving distance x of the vehicle every 90 frames (calculated according to the frame rate of 30 FPS) according to the following formula;
[0039]
[0040] where, (x t , y t ) represents the detection coordinates of each vehicle for each frame;
[0041] Step 4.3: If the driving distance x is still the initial driving distance value of -10000, it means that the driving time is less than 3 s, and no judgment is made. Jump to Step 1 to continue the detection and tracking; if the driving distance x is not the initial driving distance value of -10000, jump to Step 4.4;
[0042] Step 4.4: Set an appropriate driving distance threshold T. If the driving distance x > T, jump to Step 1 to continue the detection; if x < T, it is determined that the vehicle has a reverse driving behavior. In this embodiment, when the UAV flight altitude is 30 m, the zoom is 10 times, and the driving speed is about 15 km / h, the set driving distance threshold T is 200, and the proportion threshold is set to 1 / 2. The threshold T and the proportion threshold are both related to the UAV flight altitude and the driving speed. Since the present invention first uses the detection and multi-target tracking algorithms of deep learning to obtain the pixel driving distance of the vehicle, in this embodiment, the distances in Steps 2-6 are all pixel distances in the frame, and no unit needs to be set.
[0043] Step 5: Calculate the driving distance x of each vehicle in the current frame within Δt i and the average driving distance s of all vehicles; specifically:
[0044] Step 5.1: Calculate the driving distance x of each vehicle according to Step 4 i ;
[0045] Step 5.2: Record the number n of all vehicles whose driving distance is not -10000 in the current screen and the sum of the driving distances of these vehicles;
[0046] Step 5.3: Based on the number of vehicles n in step 5.2 and the sum of the distances traveled by these vehicles, calculate the average distance traveled by each vehicle s according to the following formula:
[0047] s=sum / n (2)
[0048] Step 6: Preset a ratio threshold value. In this embodiment, the ratio threshold value is set to 1 / 2; determine whether there is a vehicle whose current driving distance is less than the ratio threshold value of the average driving distance, i.e., 1 / 2. If so, determine it as a reversing behavior; if not, jump to step 1 to continue detection.
[0049] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for detecting the reversing behavior of a UAV at a high-speed ramp entrance during unilateral cruising, characterized in that: It includes the following steps: Step 1: Obtain the ramp road surface video image collected by the drone cruise, detect the vehicles in the image through a convolutional neural network, and record the pixel coordinates (x, y) of the vehicle center point; Step 2: Use a multi-object tracking algorithm to obtain the movement trajectory of each vehicle. At the same time, record the number of frames in which each vehicle is detected; Step 2.1: Set the initial driving distance value of vehicle tracking to -10000; Initialize the driving distance to -10000 and detect the driving distance every 3s. Therefore, at the beginning, within the first 0-3s, the vehicle has no driving distance. When it exceeds 3s, its driving distance is updated to the real driving distance. When judging whether the driving distance is greater than the threshold, if the driving distance is still -10000, it means the vehicle has not driven for enough 3s and no judgment is made; Step 2.2: Record the detection coordinates (x t ,y t ); Step 4: Judge whether there is only one vehicle in the current picture. If so, jump to Step 4; if not, jump to Step 5; Step 5: Preset the monitoring time interval Δt and the driving distance threshold T, calculate the driving distance x of the vehicle within Δt. If the driving distance x is greater than the threshold T, jump to Step 1 to continue the detection; if the driving distance x is less than the threshold T, it is determined that a reverse driving behavior occurs; Step 5: Calculate the driving distance x of each vehicle in the current screen at Δt i and the average distance travelled by all vehicles, s; Step 6: Preset the proportion threshold, judge whether the proportion of the driving distance of any vehicle is less than the average driving distance proportion threshold. If so, it is determined that a reverse driving behavior occurs; if not, jump to Step 1 to continue the detection.
2. The method for detecting the reversing behavior of a UAV at a high-speed ramp entrance under unilateral cruising according to claim 1 is characterized in that: The detection algorithm used for the vehicles in the video image is any one of YOLO, Faster R-CNN or SSD.
3. The method for detecting the reversing behavior of a UAV at a high-speed ramp entrance under unilateral cruising according to claim 1 is characterized in that: The multi-object tracking algorithm is any one of the IOU tracking method, the tracking method based on the Kalman filter, and the tracking method based on deep learning features or the Kalman filter.
4. The method for detecting the reversing behavior of a UAV at a high-speed ramp entrance under unilateral cruising according to claim 1 is characterized in that: In Step 2, it also includes the step of setting the initial driving distance value of vehicle tracking.
5. The method for detecting the reversing behavior of a UAV at a high-speed ramp entrance under unilateral cruising according to claim 1 is characterized in that: The specific content of Step 4 is as follows: Step 4.1: Preset the monitoring time interval Δt and the driving distance threshold T, and set the time interval Δt to 3s; Step 4.2: With a frame rate of 30FPS, calculate the driving distance x of the vehicle every 90 frames according to the following formula; Among them, (x t ,y t ) represents the detection coordinates of each vehicle in each frame; Step 4.3: If the driving distance x is still the initial driving distance value, it means the vehicle has not driven for enough 3s and no judgment is made. Jump to Step 1 to continue the detection and tracking; if the driving distance x is not the initial driving distance value, jump to Step 4.4; Step 4.4: Set the driving distance threshold T. If the driving distance x > T, jump to Step 1 to continue the detection; if x < T, it is determined that the vehicle has a reverse driving behavior.
6. The method for detecting the reversing behavior of a UAV at a high-speed ramp entrance during unilateral cruising according to claim 1 is characterized in that: The specific content of Step 5 is as follows: Step 5.1: According to step 4, calculate the driving distance x of each vehicle i ; Step 5.2: Record the number n of vehicles with non-initial driving distance values in the current picture and the sum sum of the driving distances of these vehicles; Step 5.3: Calculate the average driving distance s of each vehicle: s = sum / n Where s represents the average driving distance of each vehicle, n represents the number of vehicles, and sum represents the sum of the driving distances of the vehicles.
Citation Information
Patent Citations
Video-based safety precaution method for vehicle merging from highway ramp
CN103236191A
Rotor unmanned aerial vehicle system for vehicle detection and tracking, and detection and tracking method
WO2021189507A1