Traffic parameter acquisition system based on unmanned aerial vehicle video image
1. Traffic parameter acquisition system based on unmanned aerial vehicle video image, its characterized in that: the method comprises the following steps:
the unmanned aerial vehicle is provided with video acquisition equipment and is used for recording videos in the detection area so as to acquire video pictures, wherein the video pictures comprise multi-frame images;
the analysis server is used for extracting specified frame pictures in the video pictures according to the set interval value, and performing vehicle identification, calculation and statistics on each frame picture by adopting a trained vehicle detection neural network model so as to obtain traffic parameter information;
the storage server is used for backing up the video pictures;
the parameter viewing end is used for receiving and viewing traffic parameter information;
unmanned aerial vehicle and analysis server, storage server wireless communication are connected, analysis server, storage server look over the end communication with the parameter and are connected.
2. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 1, wherein: the vehicle detection neural network model is a yolo neural network model.
3. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 2, wherein: the training process of the vehicle detection neural network model comprises the following steps:
obtaining a vehicle image and establishing a sample set;
marking the position and type information of the vehicle in each image;
and training the vehicle pictures in the sample set by adopting a yolo algorithm based on the marked position information and the vehicle type class information of the vehicle to obtain each model parameter of the vehicle detection neural network model.
4. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 3, wherein: the vehicle detection neural network model adopts a K-means clustering algorithm to automatically generate an anchor box in a sample set.
5. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 3, wherein: the vehicle type categories include:
a1: large passenger cars (large passenger cars);
a2: tractors (heavy medium-duty full-trailer, semi-trailer);
a3: urban buses (urban buses with more than 10 people loaded);
b1: medium bus (medium bus, including city bus with more than 10 persons and less than 19 persons);
b2: large trucks (heavy medium-sized trucks, large and medium-sized special work vehicles);
c1: compact cars (compact mini passenger cars and light mini trucks: light mini special work vehicles);
c2: small-sized automatic transmission automobiles (small-sized mini-sized automatic transmission passenger automobiles and light-sized mini-sized automatic transmission cargo automobiles).
6. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 1, wherein: the traffic parameter information includes:
vehicle type: the type of motor vehicle passing through the road;
flow rate: the number of motor vehicles passing through a certain section of the road in a specified time period;
vehicle speed: the speed of a motor vehicle passing through a certain section of a road is kilometers per hour;
the headway is as follows: in a vehicle queue running on the same lane, the time interval of the head ends of two continuous vehicles passing through a certain section is the unit of second;
the following percentage: the percentage of the vehicles with the headway time distance less than or equal to the designated time to all the vehicles is designated;
the distance between the car heads: the distance between the front and rear vehicle heads of the continuous vehicles running on the same lane is measured in meters;
the time occupancy rate: on a certain section, the ratio of the vehicle passing time accumulated value to the observed time is expressed by percentage.
7. The unmanned aerial vehicle video image-based traffic parameter acquisition system of any one of claims 1-6, wherein: the step of acquiring the traffic parameters comprises the following steps:
s01: selecting a detection area and flying the unmanned aerial vehicle, and recording a video of the detection area by using video acquisition equipment installed on the unmanned aerial vehicle so as to acquire a video picture;
s02: extracting a frame of picture in the video picture according to a set interval value, and detecting the frame of picture by adopting a trained vehicle detection neural network model so as to identify the vehicle in the frame of picture and obtain the position and the type of the vehicle;
s03: comparing the vehicle position and the vehicle type information in the frame with the vehicle position and the vehicle type information in the previous frame to judge whether the frames are the same vehicle;
if the vehicles are not the same vehicle, a vehicle running track is newly established and the flow is counted according to the vehicle type;
if the vehicle is the same vehicle, updating the track of the vehicle, and calculating the vehicle speed according to the vehicle position change in the two frames of pictures and the interval time of the two frames of pictures;
s04: and calculating the time headway, the vehicle following percentage, the distance between the two locomotives and the time occupancy according to the vehicle speed, the vehicle track and the flow.
S05: repeating S02-S04.
8. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 7, wherein: in the step S03, the vehicle space coordinate projection needs to be corrected before the vehicle speed is calculated, and the correction adopts a camera imaging principle.
9. The unmanned aerial vehicle video image-based traffic parameter acquisition system of claim 1, wherein: the parameter viewing end comprises one or a combination of a PC end, a mobile end and a television wall.
Background
With the continuous development of the expressway in China, a road traffic network based on the expressway as a framework, the main road of the national and provincial trunk roads and the roads of counties and villages is formed at present. When a road traffic network is formed quickly, the number of motor vehicles in China is increased rapidly, the flow of personnel and goods is more frequent, the demand of people on road traffic is increased day by day, and great challenges are brought to the road traffic in China. The comprehensive transportation efficiency of China is low, the cost is high, data show that the proportion of Chinese logistics cost in GDP is 18%, while that of developed countries such as the United states is 8-9%, China is twice of the United states, and low-efficiency transportation becomes a main factor for restricting economic development of China. Therefore, the establishment of a robust highway network operation monitoring, coordination management and emergency disposal platform is accelerated, the stable operation of national highways, key trunk roads and important sites is guaranteed, the safety performance, the service level and the emergency disposal capability of the highway network are improved, convenient and efficient humanized and high-quality services are provided for people, and the platform becomes an urgent requirement for future traffic development.
The intelligent traffic system effectively applies advanced unmanned aerial vehicle technology, information technology, data communication transmission technology, electronic sensing technology, control technology, computer technology and the like to highway traffic management, is the best solution for meeting the application requirements, and is the development direction of future intelligent traffic. In the system, intelligent detection of traffic parameters is an important link for realizing intelligent traffic. The intelligent monitoring and acquisition of traffic parameters can obtain the parameter information of road traffic in time, and provide basis and basis for road planning and traffic guidance through intelligent analysis of data.
The intelligent transportation is a strategic target of the informatization development of transportation, the informatization is an important means for realizing the intelligent transportation, the multi-dimensional information extraction of people, vehicles, roads and the like is covered, and the rapid and accurate extraction of the traffic parameter information is the premise and guarantee of the normal operation of the intelligent transportation system. The traditional traffic parameter extraction is mainly used for sensor equipment such as radars, sound waves, lasers, ground induction coils and the like, and is limited by factors such as equipment installation, maintenance, cost-effectiveness ratio and the like, so that the traditional parameter extraction equipment is difficult to popularize in a large range. The current unmanned aerial vehicle video inspection is widely applied to the field of transportation, which not only provides convenience for traffic management departments to know road conditions, but also provides an effective way for extracting traffic parameters based on monitoring videos.
Disclosure of Invention
The invention aims to provide a traffic parameter acquisition system based on unmanned aerial vehicle video images, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
traffic parameter acquisition system based on unmanned aerial vehicle video image includes:
the unmanned aerial vehicle is provided with video acquisition equipment and is used for recording videos in the detection area so as to acquire video pictures, wherein the video pictures comprise multi-frame images;
the analysis server is used for extracting specified frame pictures in the video pictures according to the set interval value, and performing vehicle identification, calculation and statistics on each frame picture by adopting a trained vehicle detection neural network model so as to obtain traffic parameter information;
the storage server is used for backing up the video pictures;
the parameter viewing end is used for receiving and viewing traffic parameter information;
unmanned aerial vehicle and analysis server, storage server wireless communication are connected, analysis server, storage server look over the end communication with the parameter and are connected.
As a further scheme of the invention: the vehicle detection neural network model is a yolo neural network model.
As a further scheme of the invention: the training process of the vehicle detection neural network model comprises the following steps:
obtaining a vehicle image and establishing a sample set;
marking the position and type information of the vehicle in each image;
and training the vehicle pictures in the sample set by adopting a yolo algorithm based on the marked position information and the vehicle type class information of the vehicle to obtain each model parameter of the vehicle detection neural network model.
As a further scheme of the invention: the vehicle detection neural network model adopts a K-means clustering algorithm to automatically generate an anchor box in a sample set.
As a further scheme of the invention: the vehicle type categories include:
a1: large passenger cars (large passenger cars);
a2: tractors (heavy medium-duty full-trailer, semi-trailer);
a3: urban buses (urban buses with more than 10 people loaded);
b1: medium bus (medium bus, including city bus with more than 10 persons and less than 19 persons);
b2: large trucks (heavy medium-sized trucks, large and medium-sized special work vehicles);
c1: compact cars (compact mini passenger cars and light mini trucks: light mini special work vehicles);
c2: small-sized automatic transmission automobiles (small-sized mini-sized automatic transmission passenger automobiles and light-sized mini-sized automatic transmission cargo automobiles).
As a further scheme of the invention: the traffic parameter information includes:
vehicle type: the type of motor vehicle passing through the road;
flow rate: the number of motor vehicles passing through a certain section of the road in a specified time period;
vehicle speed: the speed of a motor vehicle passing through a certain section of a road is kilometers per hour;
the headway is as follows: in a vehicle queue running on the same lane, the time interval of the head ends of two continuous vehicles passing through a certain section is the unit of second;
the following percentage: the percentage of the vehicles with the headway time distance less than or equal to the designated time to all the vehicles is designated;
the distance between the car heads: the distance between the front and rear vehicle heads of the continuous vehicles running on the same lane is measured in meters;
the time occupancy rate: on a certain section, the ratio of the vehicle passing time accumulated value to the observed time is expressed by percentage.
As a further scheme of the invention: the step of acquiring the traffic parameters comprises the following steps:
s01: selecting a detection area, flying the unmanned aerial vehicle, and recording a video of the detection area by using video acquisition equipment installed on the unmanned aerial vehicle so as to acquire a video picture;
s02: extracting a frame of picture in the video picture according to a set interval value, and detecting the frame of picture by adopting a trained vehicle detection neural network model so as to identify the vehicle in the frame of picture and obtain the position and the type of the vehicle;
s03: comparing the vehicle position and the vehicle type information in the frame with the vehicle position and the vehicle type information in the previous frame to judge whether the frames are the same vehicle;
if the vehicles are not the same vehicle, a vehicle running track is newly established and the flow is counted according to the vehicle type;
if the vehicle is the same vehicle, updating the track of the vehicle, and calculating the vehicle speed according to the vehicle position change in the two frames of pictures and the interval time of the two frames of pictures;
s04: and calculating the time headway, the vehicle following percentage, the distance between the two locomotives and the time occupancy according to the vehicle speed, the vehicle track and the flow.
S05: repeating S02-S04.
As a further scheme of the invention: in the step S03, the vehicle space coordinate projection needs to be corrected before the vehicle speed is calculated, and the correction adopts a camera imaging principle.
As a still further scheme of the invention: the parameter viewing end comprises one or a combination of a PC end, a mobile end and a television wall.
Compared with the prior art, the invention has the beneficial effects that:
1. by arranging the unmanned aerial vehicle provided with the video acquisition equipment, the invention can fully utilize the portability and high degree of freedom of the unmanned aerial vehicle to realize real-time monitoring of road traffic states of different places at different time intervals, extract appointed frame pictures in the video pictures according to set interval values by utilizing an analysis server, and perform vehicle identification, calculation and statistics on each frame picture by adopting a trained vehicle detection neural network model to obtain traffic parameter information, realize background-based traffic parameter acquisition, improve the monitoring and management efficiency of road network operation, and provide reliable support for analysis and application of large running data of the road network.
2. According to the invention, the neural network model based on the yolo algorithm is adopted to identify the vehicle information in the video image, and the K-means clustering algorithm is adopted to automatically generate the anchor box in the training set, so that the positioning accuracy of the network model is improved, the detection speed is accelerated, and meanwhile, the method of frame extraction at intervals is adopted, compared with the method of frame-by-frame analysis in the conventional means, the requirement on equipment hardware can be effectively reduced while the effective acquisition of traffic parameters is ensured, and the cost of system hardware is saved.
Drawings
Fig. 1 is a structural block diagram of a traffic parameter acquisition system based on unmanned aerial vehicle video images.
Fig. 2 is a flowchart of the work flow of the analysis server in the traffic parameter acquisition system based on the video image of the unmanned aerial vehicle.
Fig. 3 is a parameter acquisition flow chart of the traffic parameter acquisition system based on the video image of the unmanned aerial vehicle.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more apparent, the present invention will be further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or be indirectly connected to the other element.
It will be understood that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships that are based on the orientations or positional relationships shown in the drawings, are used merely to facilitate description of the present invention and to simplify description, and do not indicate or imply that the referenced devices or elements must have the particular orientations, configurations and operations described in the specification, and therefore are not to be considered limiting.
Furthermore, the terms "first", "second", "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Referring to fig. 1 to 3, in the embodiment of the present invention, a traffic parameter collecting system based on an unmanned aerial vehicle video image includes:
the unmanned aerial vehicle is provided with video acquisition equipment and is used for recording videos in the detection area so as to acquire video pictures, wherein the video pictures comprise multi-frame images;
the analysis server is used for extracting specified frame pictures in the video pictures according to the set interval value, and performing vehicle identification, calculation and statistics on each frame picture by adopting a trained vehicle detection neural network model so as to obtain traffic parameter information;
the storage server is used for backing up the video pictures;
the parameter viewing end is used for receiving and viewing traffic parameter information;
unmanned aerial vehicle and analysis server, storage server wireless communication are connected, analysis server, storage server look over the end communication with the parameter and are connected.
The vehicle detection neural network model is a yolo neural network model.
The training process of the vehicle detection neural network model comprises the following steps:
obtaining a vehicle image and establishing a sample set;
marking the position and type information of the vehicle in each image;
and training the vehicle pictures in the sample set by adopting a yolo algorithm based on the marked position information and the vehicle type class information of the vehicle to obtain each model parameter of the vehicle detection neural network model.
The vehicle detection neural network model adopts a K-means clustering algorithm to automatically generate an anchor box in a sample set, and the specific method comprises the following steps:
the first step is as follows: using a rectangular frame to perform labeling and frame selection on the position and vehicle type category information of the vehicle in each image in the sample set, wherein the number of the frame selection information can be two or more;
the second step is that: calculating all the width and height data of the rectangular frame in the previous step, wherein the calculation method comprises the following steps: the length is the horizontal coordinate of the lower right corner of the rectangular frame-the horizontal coordinate of the upper left corner of the rectangular frame, and the width is the vertical coordinate of the lower right corner of the rectangular frame-the vertical coordinate of the upper left corner of the rectangular frame;
the third step: initializing n anchor boxes, and randomly selecting n values from all rectangular boxes to serve as initial values of the n anchor boxes;
the fourth step: calculating an iou value of each bounding box and each rectangular box, wherein the iou value is a decision value in the yolo algorithm.
The vehicle type categories include:
a1: large passenger cars (large passenger cars);
a2: tractors (heavy medium-duty full-trailer, semi-trailer);
a3: urban buses (urban buses with more than 10 people loaded);
b1: medium bus (medium bus, including city bus with more than 10 persons and less than 19 persons);
b2: large trucks (heavy medium-sized trucks, large and medium-sized special work vehicles);
c1: compact cars (compact mini passenger cars and light mini trucks: light mini special work vehicles);
c2: small-sized automatic transmission automobiles (small-sized micro automatic transmission passenger automobiles and light-sized micro automatic transmission cargo automobiles);
by adopting the primary classification of the motor vehicle types, the classification and the statistics of the vehicle type categories can be better carried out.
The traffic parameter information includes:
vehicle type: the type of motor vehicle passing through the road;
flow rate: the number of motor vehicles passing through a certain section of the road in a specified time period;
vehicle speed: the speed of a motor vehicle passing through a certain section of a road is kilometers per hour;
the headway is as follows: in a vehicle queue running on the same lane, the time interval of the head ends of two continuous vehicles passing through a certain section is the unit of second;
the following percentage: the percentage of the vehicles with the headway time distance less than or equal to the designated time to all the vehicles is designated;
the distance between the car heads: the distance between the front and rear vehicle heads of the continuous vehicles running on the same lane is measured in meters;
the time occupancy rate: on a certain section, the ratio of the vehicle passing time accumulated value to the observed time is expressed by percentage.
The step of acquiring the traffic parameters comprises the following steps:
s01: selecting a detection area and flying the unmanned aerial vehicle, and recording a video of the detection area by using video acquisition equipment installed on the unmanned aerial vehicle so as to acquire a video picture;
s02: extracting a frame of picture in the video picture according to a set interval value, and detecting the frame of picture by adopting a trained vehicle detection neural network model so as to identify the vehicle in the frame of picture and obtain the position and the type of the vehicle; specifically, one frame of picture in the video pictures is extracted according to a set interval value, for example, 30fps and 1080K video pictures, one frame of picture is extracted every 5 frames, namely, the 5 frames of video pictures are extracted every minute, and by using the interval frame extraction method, compared with a method of analyzing frames one by one in the conventional means, the method can effectively reduce the requirements on equipment hardware while ensuring the effective acquisition of traffic parameters, and further save the cost of system hardware;
s03: comparing the vehicle position and the vehicle type information in the frame with the vehicle position and the vehicle type information in the previous frame to judge whether the frames are the same vehicle;
if the vehicles are not the same vehicle, a vehicle running track is newly established and the flow is counted according to the vehicle type;
if the vehicle is the same vehicle, updating the track of the vehicle, and calculating the vehicle speed according to the vehicle position change in the two frames of pictures and the interval time of the two frames of pictures;
s04: and calculating the time headway, the vehicle following percentage, the distance between the two locomotives and the time occupancy according to the vehicle speed, the vehicle track and the flow.
S05: repeating S02-S04.
In the step S03, the vehicle space coordinate projection needs to be corrected before the vehicle speed is calculated, and the correction adopts a camera imaging principle.
The parameter viewing end comprises one or a combination of a PC end, a mobile end and a television wall.
By arranging the unmanned aerial vehicle provided with the video acquisition equipment, the invention can fully utilize the portability and high degree of freedom of the unmanned aerial vehicle to realize real-time monitoring of road traffic states of different places at different time intervals, extract appointed frame pictures in the video pictures according to set interval values by utilizing an analysis server, and perform vehicle identification, calculation and statistics on each frame picture by adopting a trained vehicle detection neural network model to obtain traffic parameter information, realize background-based traffic parameter acquisition, improve the monitoring and management efficiency of road network operation, and provide reliable support for analysis and application of large running data of the road network.
According to the invention, the neural network model based on the yolo algorithm is adopted to identify the vehicle information in the video image, and the K-means clustering algorithm is adopted to automatically generate the anchor box in the training set, so that the positioning accuracy of the network model is improved, the detection speed is accelerated, and meanwhile, the method of frame extraction at intervals is adopted, compared with the method of frame-by-frame analysis in the conventional means, the requirement on equipment hardware can be effectively reduced while the effective acquisition of traffic parameters is ensured, and the cost of system hardware is saved.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and/or modifications of the invention can be made, and equivalents and modifications of some features of the invention can be made without departing from the spirit and scope of the invention.