CN116403412A - Vehicle congestion detection method and terminal - Google Patents

Vehicle congestion detection method and terminal Download PDF

Info

Publication number
CN116403412A
CN116403412A CN202310672135.1A CN202310672135A CN116403412A CN 116403412 A CN116403412 A CN 116403412A CN 202310672135 A CN202310672135 A CN 202310672135A CN 116403412 A CN116403412 A CN 116403412A
Authority
CN
China
Prior art keywords
area
vehicle
congestion
vehicle congestion
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310672135.1A
Other languages
Chinese (zh)
Other versions
CN116403412B (en
Inventor
吴荣琛
张宇
李文蒙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Santachi Video Technology Shenzhen Co ltd
Original Assignee
Santachi Video Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Santachi Video Technology Shenzhen Co ltd filed Critical Santachi Video Technology Shenzhen Co ltd
Priority to CN202310672135.1A priority Critical patent/CN116403412B/en
Publication of CN116403412A publication Critical patent/CN116403412A/en
Application granted granted Critical
Publication of CN116403412B publication Critical patent/CN116403412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Traffic Control Systems (AREA)

Abstract

According to the vehicle congestion detection method and the terminal, the corresponding video information is acquired in turn by distinguishing the target area from the preset area, so that the video monitoring area can be more concentrated, the definition of the video information is ensured, and the analysis and processing effects of the deep learning algorithm are improved. The video information of the corresponding area is analyzed through a deep learning algorithm to obtain the congestion rate and the vehicle speed of the corresponding area, and only the video information of the target area is required to be obtained when the vehicle is not congested, so that the processing object is single, and the real-time effectiveness of the detection algorithm is ensured; after the congestion condition of the target area occurs, video information of the preset area is acquired, so that the vehicle congestion condition of the continuous road section comprising the target area and the preset area is summarized, the whole congestion state of the monitoring area is ensured in this way, and the problem of false alarm caused by calculating the congestion rate of a single area is avoided.

Description

Vehicle congestion detection method and terminal
Technical Field
The invention relates to the field of video image processing, in particular to a vehicle congestion detection method and a terminal.
Background
The high-speed toll station has serious vehicle congestion queuing phenomenon in the peak periods such as holidays, the congestion detection equipment used by the current toll station is generally a video detection camera, but due to the complexity of the toll station scene, the traditional video detection camera cannot cover and monitor the whole toll plaza, and the video detection camera has false alarm condition when carrying out congestion detection of a single area, so that the detection device cannot accurately acquire the whole congestion state of the toll plaza, and the camera monitoring of a single picture is fuzzy due to the long distance, and the collected video cannot accurately identify the vehicles in the picture.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the vehicle congestion detection method and the terminal are provided, the problem of false alarm caused by calculating the congestion rate in a single area is avoided, and the accuracy of vehicle congestion detection is improved.
In order to solve the technical problems, the invention adopts the following technical scheme:
a vehicle congestion detection method, comprising:
acquiring video information of a target area, and analyzing the video information of the target area through a deep learning algorithm to obtain vehicle congestion information of the target area; the vehicle congestion information comprises a congestion rate and a vehicle speed;
judging whether the congestion rate of the target area exceeds a preset threshold value, if so, acquiring video information of a preset area corresponding to the target area, and analyzing the video information of the preset area through a deep learning algorithm to acquire vehicle congestion information of the preset area;
and acquiring the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area.
In order to solve the technical problems, the invention adopts another technical scheme that:
the vehicle congestion detection terminal comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes each step in the vehicle congestion detection method when executing the computer program.
The invention has the beneficial effects that: the corresponding video information is obtained by distinguishing the target area and the preset area in turn, so that the video monitoring area can be more concentrated, the definition of the video information is ensured, and the analysis and processing effects of the deep learning algorithm are improved. The video information of the corresponding area is analyzed through a deep learning algorithm to obtain the congestion rate and the vehicle speed of the corresponding area, and only the video information of the target area is required to be obtained when the vehicle is not congested, so that the processing object is single, and the real-time effectiveness of the detection algorithm is ensured; after the congestion condition of the target area occurs, video information of the preset area is acquired, so that the vehicle congestion condition of the continuous road section comprising the target area and the preset area is summarized, the whole congestion state of the monitoring area is ensured in this way, and the problem of false alarm caused by calculating the congestion rate of a single area is avoided.
Drawings
FIG. 1 is a flow chart of a vehicle congestion detection method disclosed in the present invention;
FIG. 2 is a regional distribution diagram provided by an embodiment of the present invention;
FIG. 3 is a real-time road condition map provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a vehicle congestion detection terminal disclosed in the present invention;
fig. 5 is a schematic structural diagram of a vehicle congestion detection terminal according to an embodiment of the present invention;
description of the reference numerals:
201. a memory; 202. a processor; 2011. a first memory; 2021. a first processor; 2012. a second memory; 2022. a second processor; 2013. a third memory; 2023. and a third processor.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for detecting vehicle congestion, including:
acquiring video information of a target area, and analyzing the video information of the target area through a deep learning algorithm to obtain vehicle congestion information of the target area; the vehicle congestion information comprises a congestion rate and a vehicle speed;
judging whether the congestion rate of the target area exceeds a preset threshold value, if so, acquiring video information of a preset area corresponding to the target area, and analyzing the video information of the preset area through a deep learning algorithm to acquire vehicle congestion information of the preset area;
and acquiring the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area.
From the above description, the beneficial effects of the invention are as follows: the corresponding video information is obtained by distinguishing the target area and the preset area in turn, so that the video monitoring area can be more concentrated, the definition of the video information is ensured, and the analysis and processing effects of the deep learning algorithm are improved. The video information of the corresponding area is analyzed through a deep learning algorithm to obtain the congestion rate and the vehicle speed of the corresponding area, and only the video information of the target area is required to be obtained when the vehicle is not congested, so that the processing object is single, and the real-time effectiveness of the detection algorithm is ensured; after the congestion condition of the target area occurs, video information of the preset area is acquired, so that the vehicle congestion condition of the continuous road section comprising the target area and the preset area is summarized, the whole congestion state of the monitoring area is ensured in this way, and the problem of false alarm caused by calculating the congestion rate of a single area is avoided.
Further, the analyzing the video information of the target area by the deep learning algorithm to obtain the vehicle congestion information of the target area, or the analyzing the video information of the preset area by the deep learning algorithm to obtain the vehicle congestion information of the preset area includes:
analyzing the video information of the corresponding area through a YOLOv4 model to obtain the number of vehicles and the sum of the areas of the vehicles in the corresponding area; the corresponding area is a target area or a preset area;
obtaining a vehicle occupancy rate according to the maximum number of vehicles in the corresponding area and the number of vehicles;
obtaining an area occupancy rate according to the area of the corresponding area and the sum of the areas of the vehicles;
obtaining the minimum value in the vehicle occupancy and the area occupancy to obtain the congestion rate of the corresponding area;
acquiring target video information of the identified vehicles in the corresponding areas in a preset time period, and acquiring the vehicle speeds of the corresponding areas according to the target video information;
and obtaining the vehicle congestion information of the corresponding area according to the congestion rate and the vehicle speed.
As can be seen from the above description, the use of the deep learning YOLOv4 model frame as the image analysis algorithm has the advantages that the YOLOv4 model is used as one-stage algorithm, the generation selection area of the traditional two-stage first stage is skipped, the category probability and the position coordinate value of the object are directly generated, the final detection result is directly obtained through single detection, the speed is higher, and the requirement of analyzing real-time video in the application scene of the invention can be met. The vehicle number and the vehicle area sum in the corresponding area are obtained through a deep learning algorithm, the vehicle occupancy and the area occupancy of the corresponding area are calculated in two modes respectively, then the vehicle occupancy or the area occupancy is used as the congestion rate of the corresponding area, and the vehicle occupancy or the area occupancy and the congestion rate are checked mutually, so that the situation that errors exist in calculation of the congestion rate in a single area is avoided. And meanwhile, the vehicle speed in the corresponding area is acquired, so that the judgment of the overall congestion condition of the continuous road section comprising the target area and the preset area is facilitated, and the accuracy of overall detection is improved.
Further, the preset region comprises a plurality of continuous sub-regions;
the obtaining the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area comprises the following steps:
the target area is obtained to be used as a first area to be detected, and the first area to be detected is marked as an upstream area;
judging whether a subarea adjacent to the first area to be detected exists in the preset area or not in the preset direction, if so, acquiring the subarea as a second area to be detected, and marking the second area to be detected as a downstream area; judging the vehicle congestion condition of the upstream area according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area, acquiring the downstream area as a first area to be detected, and executing the step of marking the first area to be detected as the upstream area;
otherwise, judging whether the congestion rate of the first area to be detected exceeds the preset threshold according to the preset conditions to obtain the target area and the vehicle congestion condition of each sub-area;
and determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the target area and the vehicle congestion condition of each sub-area.
From the above description, it can be seen that whether the upstream area is congested is determined by the continuous relationship between the adjacent monitoring areas, so that traffic conditions in the continuous road section can be effectively measured, misinformation of congestion detection caused by independent determination between the areas is avoided, and the accuracy of detection is improved.
Further, the determining the vehicle congestion condition of the upstream area according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area specifically includes:
judging whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area meet a first condition:
Figure SMS_1
if the first condition is met, judging whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area meet a second condition:
Figure SMS_2
if the second condition is met, indicating that the vehicle congestion condition of the upstream area is congestion;
wherein R is 1 Is the congestion rate of the upstream area; r is R 2 Congestion rate for downstream area; v (V) 1 Vehicle speed for the downstream zone; v (V) 2 Vehicle speed for the downstream zone; n is n 1 The number of vehicles in the upstream area; n is n 2 The number of vehicles in the downstream area; l (L) 1 Is the length of the upstream zone; l (L) 2 Is the length of the downstream zone; k (K) 1 Is a preset first threshold value; k (K) 2 Is a preset second threshold value.
According to the above description, the congestion judgment is performed on each adjacent area through the improved California algorithm, so that the congestion condition of the continuous road section is measured, the false report of the congestion condition caused by independent judgment between the upstream area and the downstream area is avoided, and the accuracy of the overall detection of the monitoring area is improved.
Further, the determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the target area and the vehicle congestion condition of each sub-area specifically includes:
determining the vehicle congestion level in the continuous road section according to the target area and the number of areas with congestion in the subareas;
and determining the vehicle congestion length in the continuous road section according to the number and the length of the areas with congestion in the subareas.
According to the above description, the vehicle congestion condition of the monitoring area is embodied into the corresponding congestion level and length according to the number of the areas with congestion in the target area and the subareas, so that the monitoring personnel can more intuitively know the vehicle congestion problem of the current monitoring area.
Further, the obtaining the vehicle congestion information of the target area includes:
acquiring first image information of a latest frame in video information of the target area;
the step of obtaining the vehicle congestion information of the preset area comprises the following steps:
acquiring second image information of the latest frame in the video information of the preset area;
the step of obtaining the vehicle congestion condition in the continuous road section corresponding to the target area comprises the following steps:
and generating a real-time road condition map in the continuous road section corresponding to the target area according to the first image information and the second image information.
According to the above description, after the corresponding vehicle congestion condition is obtained, the real-time road condition map in the continuous road section is synchronously generated, so that the monitoring personnel can more intuitively and effectively obtain the vehicle congestion state of the current monitoring area.
Further, the method further comprises the following steps: and if the congestion rate of the target area does not exceed the preset threshold value, returning to the step of acquiring the video information of the target area.
As can be seen from the above description, when no congestion occurs in the target area, it means that no congestion occurs in the monitoring whole area, so that no further detection is required for the preset area, and thus unnecessary congestion detection and identification are reduced, thereby reducing energy consumption of monitoring detection and reducing detection operation cost.
Further, the obtaining the vehicle occupancy according to the maximum number of vehicles in the corresponding area and the number of vehicles specifically includes:
Figure SMS_3
wherein n is g The number of vehicles in the corresponding area; m is the maximum number of vehicles in the corresponding area;
the area occupation ratio obtained according to the area of the corresponding area and the sum of the areas of the vehicles is specifically:
Figure SMS_4
wherein a is g The sum of the areas of the vehicles in the corresponding areas; a is the area of the corresponding region.
As can be seen from the above description, the vehicle occupancy in the current corresponding region is obtained by the ratio of the number of vehicles in the corresponding region to the maximum number of vehicles; meanwhile, the area occupation ratio in the corresponding area is obtained through the ratio of the sum of the vehicle areas and the area of the corresponding area, wherein the vehicle side area is larger than the actual projection area due to the fact that the vehicle identification frame reacts in the deep learning algorithm, and therefore the sum of the vehicle areas is required to be reduced to be in corresponding proportion. And the congestion rate of the corresponding area is respectively verified in two ways, so that the accuracy of congestion detection is improved.
Further, the obtaining the video information of the preset area corresponding to the target area, and analyzing the video information of the preset area through a deep learning algorithm to obtain the vehicle congestion information of the preset area specifically includes:
acquiring video information of a preset frame number in the preset area, and analyzing the video information of each frame through a deep learning algorithm to obtain vehicle congestion information of the video information of each frame;
and calculating average vehicle congestion information of the preset area according to the vehicle congestion information of each frame of video information, and taking the average vehicle congestion information of the preset area as the vehicle congestion information of the preset area.
As can be seen from the above description, since the preset area includes a plurality of sub-areas, in order to ensure monitoring and detecting efficiency, the video information acquired by each sub-area needs to be limited in duration, so as to avoid the problem that the monitoring time of a single area is too long, and the overall congestion condition changes in real time and cannot be estimated accurately.
Referring to fig. 4, another embodiment of the present invention provides a vehicle congestion detection terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the steps in the above-mentioned vehicle congestion detection method are implemented when the processor executes the computer program.
The embodiment of the invention provides a vehicle congestion detection method and a terminal, which can be applied to traffic road sections with larger occupied areas such as high-speed toll stations, realize the vehicle congestion detection of the road sections, avoid the problem of false alarm caused by calculating the congestion rate in a single area, and improve the accuracy of the vehicle congestion detection, and the following is explained by a specific embodiment:
referring to fig. 1, a first embodiment of the present invention is as follows:
a vehicle congestion detection method, comprising:
s1, acquiring video information of a target area, and analyzing the video information of the target area through a deep learning algorithm to obtain vehicle congestion information of the target area. Wherein the vehicle congestion information includes a congestion rate and a vehicle speed.
The vehicle speed is an average pixel speed of the entire vehicle in the video information.
S2, judging whether the congestion rate of the target area exceeds a preset threshold value, and if so, executing a step S3; otherwise, returning to the step S1;
s3, acquiring video information of a preset area corresponding to the target area, and analyzing the video information of the preset area through a deep learning algorithm to obtain vehicle congestion information of the preset area.
The step S3 is specifically as follows:
s31, obtaining video information of a preset frame number in the preset area, and analyzing the video information of each frame through a deep learning algorithm to obtain vehicle congestion information of the video information of each frame.
S32, calculating average vehicle congestion information of the preset area according to the vehicle congestion information of each frame of video information, and taking the average vehicle congestion information of the preset area as the vehicle congestion information of the preset area.
The target area is a monitoring area of the video acquisition device used in the method in daily operation, namely, when no vehicle congestion occurs in a continuous road section, the video acquisition device only monitors the target area; the preset area is a road section adjacent to the target area in the preset direction, and when the target area is in a vehicle congestion condition, the video acquisition device monitors the preset area corresponding to the target area in a training monitoring mode.
Specifically, the S1 or the S3 includes:
s601, analyzing video information of a corresponding area through a YOLOv4 model to obtain the number of vehicles and the sum of vehicle areas in the corresponding area; the corresponding area is a target area or a preset area;
s602, obtaining a vehicle occupancy rate according to the maximum number of vehicles in the corresponding area;
the step S602 specifically includes:
Figure SMS_5
wherein n is g The number of vehicles in the corresponding area; m is the maximum number of vehicles in the corresponding area;
s603, obtaining an area occupancy rate according to the area of the corresponding area and the sum of the areas of the vehicles;
the step S603 specifically includes:
Figure SMS_6
wherein a is g The sum of the areas of the vehicles in the corresponding areas; a is the area of the corresponding region.
S604, acquiring the minimum value in the vehicle occupancy and the area occupancy to obtain the congestion rate of the corresponding area;
s605, acquiring target video information of the identified vehicles in the corresponding areas in a preset time period, and acquiring the vehicle speeds of the corresponding areas according to the target video information;
and S606, obtaining the vehicle congestion information of the corresponding area according to the congestion rate and the vehicle speed.
And S4, acquiring the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area. Wherein the preset area comprises a plurality of continuous sub-areas.
Specifically, the step S4 includes:
s41, acquiring the target area as a first area to be detected, and marking the first area to be detected as an upstream area.
S42, judging whether a subarea adjacent to the first area to be detected exists in the preset direction of the preset area, if yes, executing a step S43; if not, step S45 is performed.
S43, acquiring the subarea as a second area to be detected, and marking the second area to be detected as a downstream area.
And S44, judging the vehicle congestion condition of the upstream area according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area, acquiring the downstream area as a first area to be detected, and executing the step of marking the first area to be detected as the upstream area in S41.
In S44, the determining, according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area, the vehicle congestion condition of the upstream area specifically includes:
s441, determining whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area satisfy a first condition:
Figure SMS_7
s442, if the first condition is satisfied, determining whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area satisfy a second condition:
Figure SMS_8
if the second condition is met, indicating that the vehicle congestion condition of the upstream area is congestion;
wherein R is 1 Is the congestion rate of the upstream area; r is R 2 Congestion rate for downstream area; v (V) 1 Vehicle speed for the downstream zone; v (V) 2 Vehicle speed for the downstream zone; n is n 1 The number of vehicles in the upstream area; n is n 2 The number of vehicles in the downstream area; l (L) 1 Is the length of the upstream zone; l (L) 2 Is the length of the downstream zone; k (K) 1 Is a preset first threshold value; k (K) 2 Is a preset second threshold value.
The K is 1 K is as follows 2 Is obtained according to the empirical value of artificial measurement and calculation. If the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area do not satisfy the second condition, the vehicle congestion condition of the upstream area is expressed asNo congestion occurs.
S45, judging whether the congestion rate of the first area to be detected exceeds the preset threshold value, and obtaining the vehicle congestion conditions of the target area and each sub-area.
It should be noted that, if the congestion rate of the first area to be detected exceeds the preset threshold, it indicates that the vehicle congestion condition of the first area to be detected is congestion; if the congestion rate of the first area to be detected does not exceed the preset threshold, the vehicle congestion condition of the first area to be detected is indicated to be that congestion does not occur.
And S46, determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the target area and the vehicle congestion condition of each sub-area.
The step S46 specifically includes:
s461, determining the vehicle congestion level in the continuous road section according to the target area and the number of areas with congestion in the subareas.
In some embodiments, the vehicle congestion at the target area is taken as the lowest vehicle congestion level.
S462, determining the vehicle congestion length in the continuous road section according to the number and the length of the areas with congestion in the subareas.
In some embodiments, the target area and the sub-area are marked with corresponding distance lines for illustrating the interval length between each area, so as to facilitate determining the vehicle congestion length.
Specifically, the step S1 includes:
s101, acquiring first image information of a latest frame in video information of the target area.
The step S3 includes:
s201, acquiring second image information of the latest frame in the video information of the preset area.
The step S4 includes:
s401, generating a real-time road condition map in the continuous road section corresponding to the target area according to the first image information and the second image information.
Referring to fig. 1 to 3, a second embodiment of the present invention is as follows:
the vehicle congestion detection method described in the first embodiment is applied to an actual scene; for example: the method for realizing the vehicle congestion detection in the high-speed toll plaza comprises the following steps:
and D1, dividing a toll plaza of the high-speed toll station into guard positions and preset areas.
Specifically, referring to fig. 2, the preset directions of the toll station include an entry high-speed direction and an exit high-speed direction. The area closest to the toll station in the high-speed entering direction is marked as a guard position 1, namely a target area 1; the area closest to the toll station in the high-speed exit direction is marked as a guard position 2, namely a target area 2. Dividing a continuous road section corresponding to the guard bit 1 into a subarea 1, a subarea 2 and a subarea 3 in the high-speed entering direction; the continuous road section corresponding to the guard bit 2 is divided into a subarea 4, a subarea 5 and a subarea 6 in the high-speed driving-out direction. Meanwhile, the maximum number of vehicles M and the area A of each area are set according to the divided areas, namely, the maximum number of vehicles M and the area A of each area are the same. Finally, 50m, 100m, 150m and 200m distance lines are respectively marked at the corresponding positions of each region.
And D2, acquiring video information of the guard bit 1 and the guard bit 2, and respectively analyzing the video information of the guard bit 1 and the guard bit 2 through a deep learning algorithm to obtain vehicle congestion information of the guard bit 1 and the guard bit 2.
Specifically, D11, firstly acquiring video information of a guard bit 1, and acquiring real-time high-definition video of a target area.
D12, respectively analyzing the video information of the guard position 1 through the YOLOv4 model to obtain the number n of vehicles of the guard position 1 g1 Sum of vehicle areas a of guard 1 g1
D13, according to the maximum number M of vehicles and the number n of vehicles in the guard position 1 g1 Obtain the vehicle occupancy R of the guard position 1 n1
Figure SMS_9
D14 root and rootArea a of guard 1 and vehicle area sum a g1 Obtain the area occupation ratio R of the guard position 1 a1
Figure SMS_10
D15, obtain the occupancy R of the vehicle n1 Area occupancy R a1 The minimum value of (1) is used for obtaining the congestion rate R of the guard bit 1 g1
R g1 =min(R n1 , R a1 )。
D16, acquiring target video information of the identified vehicles in the guard position 1 within 1 minute, namely tracking and monitoring the identified vehicles, and obtaining the vehicle speed V of the guard position 1 according to the target video information g1
And D17, acquiring the first image information of the latest frame in the video information of the guard bit 1.
And D18, switching a monitoring area of the video acquisition device to be the guard position 2, acquiring video information of the guard position 2, and acquiring real-time high-definition video of the target area. Based on the steps D12-D17, the number n of vehicles in the guard position 2 is obtained in the same way g2 Sum of vehicle areas a of guard position 2 g2 Congestion Rate R of gatekeeper bit 2 g2
R g2 =min(R n2 , R a2 )。
D3, judging whether the congestion rates of the guard bit 1 and the guard bit 2 exceed a preset threshold value, if so, indicating that the corresponding area is likely to have congestion, and executing the step D4; otherwise, the step D2 is executed.
And D4, acquiring the first image information of the latest frame in the video information of the guard bit 1, and storing the first image information.
And D5, acquiring video information of a preset area (subarea 1-6) corresponding to the guard bit 1, and analyzing the video information of the preset area (subarea 1-6) through a deep learning algorithm to obtain vehicle congestion information of the preset area (subarea 1-6).
Specifically, the monitoring area of the switching video acquisition device is a subarea 1, the monitoring area is amplified to a specified multiplying power, 1 frame of real-time high-definition video information is obtained, and 1 frame of high-definition video information of the subarea 1 is analyzed through a YOLOv4 model to obtain the number n of vehicles and the total area a of the vehicles of the 1 frame of high-definition video information.
And D52, repeatedly acquiring 125 frames of high-definition video information (the video duration is about 5 seconds) of the subarea 1, and executing the step D51 to obtain the number n of vehicles and the sum a of the vehicle areas in each 1 frame of high-definition video information.
D53, calculating the average vehicle number n of 125 frames of high-definition video information a1 Sum of average vehicle areas a r1 Obtaining the number n of vehicles in the subarea 1 a1 Sum of vehicle areas a r1
D54, based on the steps D13-D16, obtaining the congestion rate R of the subarea 1 a1 And average vehicle speed V a1
D55, based on the steps D51-D53, obtaining the number n of vehicles in the subarea 2 a2 Sum of vehicle areas a r2 Number of vehicles n in subregion 3 a3 Sum of vehicle areas a r3 Number of vehicles n in subregion 4 a4 Sum of vehicle areas a r4 Number of vehicles n in subregion 5 a5 Sum of vehicle areas a r5 Number of vehicles n in subregion 6 a6 Sum of vehicle areas a r6
D56, based on the steps D13-D16, obtaining the congestion rate R of the subarea 2 a2 And average vehicle speed V a2 Congestion ratio R of sub-area 3 a3 And average vehicle speed V a3 Congestion ratio R of sub-area 4 a4 And average vehicle speed V a4 Congestion ratio R of sub-area 5 a5 And average vehicle speed V a5 Congestion ratio R of subregion 6 a6 And average vehicle speed V a6
Before each switching of the monitoring area of the video acquisition device, acquiring second image information of the latest frame in the video information of the current monitoring area, and storing the second image information; for example: before the monitoring area of the video acquisition device is switched to be the subarea 2, second image information of the latest frame in the video information of the subarea 1 is acquired. In addition, whether the guard bit 1 or the guard bit 2 is congested, the sub-areas 1-6 need to execute the step D5 to generate a real-time road condition map.
And D6, acquiring the vehicle congestion conditions in the continuous road sections corresponding to the guard bit 1 and the guard bit 1 according to the vehicle congestion information of the guard bit 1 and the vehicle congestion information of the preset area (sub-areas 1-6).
Specifically, D61, first, the guard bit 1 is acquired as a first area to be measured, and the first area to be measured is marked as an upstream area.
D62, judging whether a subarea adjacent to the first area to be detected (guard bit 1) exists in the subarea 1-6 in the high-speed entering direction, if so, executing a step D63; if not, go to step D65.
In this embodiment, referring to fig. 2, the sub-area adjacent to the guard bit 1 is sub-area 1; the subarea adjacent to the guard bit 2 is subarea 4; the sub-area 3 has no adjacent sub-area in the high-speed direction, and the sub-area 6 has no adjacent sub-area in the high-speed direction.
D63, acquiring the subarea 1 as a second area to be measured, and marking the second area to be measured (subarea 1) as a downstream area.
D64, judging the vehicle congestion situation of the upstream area (guard bit 1) according to the vehicle congestion information of the upstream area (guard bit 1) and the vehicle congestion information of the downstream area (sub area 1).
Specifically, D641, determining whether the vehicle congestion information of the upstream area (guard bit 1) and the vehicle congestion information of the downstream area (sub area 1) satisfy the first condition:
Figure SMS_11
d642, if the first condition is satisfied, determining whether the vehicle congestion information of the upstream area (guard bit 1) and the vehicle congestion information of the downstream area (sub area 1) satisfy a second condition:
Figure SMS_12
if the second condition is satisfied, it indicates that the vehicle congestion in the upstream area (guard bit 1) is congestion.
D65, acquiring the downstream area (sub-area 1) as the first area to be measured, and executing the steps D61 to mark the first area to be measured as the upstream area and D62.
And D66, judging whether the congestion rate of the first area to be detected (the subarea 3 or the subarea 6) exceeds the preset threshold value, and obtaining the vehicle congestion conditions of the guard bit 1, the guard bit 2 and the subareas 1-6.
And D67, determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the vehicle congestion conditions of the guard bit 1, the guard bit 2 and the subareas 1-6.
Specifically, vehicle congestion condition 1: if the guard bit 1 (guard bit 2) is that congestion occurs and the sub-areas 1 (sub-area 4), 2 (sub-area 5) and 3 (sub-area 6) are that no congestion occurs, it is determined that the congestion level of the vehicle entering the high-speed direction (exiting the high-speed direction) is level 1 and the queuing length is 50m.
Vehicle congestion situation 2: if the guard bit 1 (guard bit 2) and the subarea 1 (subarea 4) are congested and the subarea 2 (subarea 5) and the subarea 3 (subarea 6) are not congested, the vehicle congestion level entering the high-speed direction (exiting the high-speed direction) is judged to be level 2, and the queuing length is judged to be 100m.
Vehicle congestion situation 3: the guard bit 1 (guard bit 2), the subarea 1 (subarea 4) and the subarea 2 (subarea 5) are in congestion, the subarea 3 (subarea 6) is not in congestion, and the vehicle congestion level entering the high-speed direction (exiting the high-speed direction) is judged to be level 3, and the queuing length is 150m.
Vehicle congestion situation 4: if the guard bit 1 (guard bit 2), the sub-region 1 (sub-region 4), the sub-region 2 (sub-region 5) and the sub-region 3 (sub-region 6) are congestion, it is determined that the congestion level of the vehicle entering the high speed direction (exiting the high speed direction) is level 4, and the queuing length is 200m.
Referring to fig. 3D 7, the first image information of the guard bit 1 and the guard bit 2 and the second image information of the sub-areas 1-6 are combined into an overall real-time road condition map, and the real-time road condition map, the vehicle congestion level and the vehicle congestion length are reported to the detection information management center.
Referring to fig. 4 to 5, a third embodiment of the present invention is as follows:
the vehicle congestion detection terminal includes a memory 201, a processor 202, and a computer program stored in the memory 201 and running on the processor 202, where the processor 202 implements the steps in the vehicle congestion detection methods described in the first and second embodiments when executing the computer program.
In some embodiments, referring to fig. 5, the vehicle congestion detection terminal includes a video acquisition unit, a deep learning analysis unit, and a data processing unit;
the video capturing unit comprises a first memory 2011, a first processor 2021 and a computer program stored on the first memory 2011 and running on the first processor 2021, wherein the first processor 2021 implements the following steps when executing the computer program:
acquiring video information of a target area;
and acquiring video information of a preset area corresponding to the target area.
The depth analysis unit comprises a second memory 2012, a second processor 2022 and a computer program stored on the second memory 2012 and running on the second processor 2022, the second processor 2022 implementing the following steps when executing the computer program:
analyzing the video information of the target area through a deep learning algorithm to obtain vehicle congestion information of the target area;
and analyzing the video information of the preset area through a deep learning algorithm to obtain the vehicle congestion information of the preset area.
The data processing unit comprises a third memory 2013, a third processor 2023 and a computer program stored on the third memory 2013 and running on the third processor 2023, which third processor 2023 when executing the computer program implements the steps of:
and acquiring the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area.
In summary, according to the vehicle congestion detection method and the terminal provided by the invention, the corresponding video information is obtained in turn by distinguishing the target area and the preset area, so that the video monitoring area can be more concentrated, the definition of the video information is ensured, and the analysis processing effect of the deep learning algorithm is improved. In addition, a plurality of subareas are divided in a preset area, so that the video monitoring range can cover the whole toll station square. The video information of the corresponding area is analyzed through the YOLOv4 model, so that the congestion rate and the vehicle speed of the corresponding area are obtained, and only the video information of the target area is required to be obtained under the non-congestion condition, so that the processing object is single, the real-time effectiveness of a detection algorithm is ensured, the power consumption of a video acquisition device is reduced, and the cost is reduced; after the congestion condition occurs in the target area, video information of the continuous subareas is acquired, so that the vehicle congestion condition of the continuous road section comprising the target area is summarized, the whole congestion condition and the congestion length are acquired in real time in this way, and the problem of false alarm caused by calculating the congestion rate in a single area is avoided. Meanwhile, by means of three different data presentation modes of the congestion level, the congestion length and the real-time road condition map, monitoring staff can more intuitively and effectively acquire the vehicle congestion condition of the current monitoring area, so that vehicles can be drained in time, and the vehicle congestion level is reduced.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.

Claims (10)

1. A vehicle congestion detection method, characterized by comprising:
acquiring video information of a target area, and analyzing the video information of the target area through a deep learning algorithm to obtain vehicle congestion information of the target area; the vehicle congestion information comprises a congestion rate and a vehicle speed;
judging whether the congestion rate of the target area exceeds a preset threshold value, if so, acquiring video information of a preset area corresponding to the target area, and analyzing the video information of the preset area through a deep learning algorithm to acquire vehicle congestion information of the preset area;
and acquiring the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area.
2. The vehicle congestion detection method according to claim 1, wherein the analyzing the video information of the target area by the deep learning algorithm to obtain the vehicle congestion information of the target area or the analyzing the video information of the preset area by the deep learning algorithm to obtain the vehicle congestion information of the preset area includes:
analyzing the video information of the corresponding area through a YOLOv4 model to obtain the number of vehicles and the sum of the areas of the vehicles in the corresponding area; the corresponding area is a target area or a preset area;
obtaining a vehicle occupancy rate according to the maximum number of vehicles in the corresponding area and the number of vehicles;
obtaining an area occupancy rate according to the area of the corresponding area and the sum of the areas of the vehicles;
obtaining the minimum value in the vehicle occupancy and the area occupancy to obtain the congestion rate of the corresponding area;
acquiring target video information of the identified vehicles in the corresponding areas in a preset time period, and acquiring the vehicle speeds of the corresponding areas according to the target video information;
and obtaining the vehicle congestion information of the corresponding area according to the congestion rate and the vehicle speed.
3. A vehicle congestion detection method according to claim 1, wherein the preset area includes a plurality of sub-areas in succession;
the obtaining the vehicle congestion condition in the continuous road section corresponding to the target area according to the vehicle congestion information of the target area and the vehicle congestion information of the preset area comprises the following steps:
the target area is obtained to be used as a first area to be detected, and the first area to be detected is marked as an upstream area;
judging whether a subarea adjacent to the first area to be detected exists in the preset area or not in the preset direction, if so, acquiring the subarea as a second area to be detected, and marking the second area to be detected as a downstream area; judging the vehicle congestion condition of the upstream area according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area, acquiring the downstream area as a first area to be detected, and executing the step of marking the first area to be detected as the upstream area;
otherwise, judging whether the congestion rate of the first region to be detected exceeds the preset threshold value, and obtaining the vehicle congestion conditions of the target region and each sub-region;
and determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the target area and the vehicle congestion condition of each sub-area.
4. The method for detecting vehicle congestion according to claim 3, wherein the determining the vehicle congestion condition of the upstream area according to the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area specifically includes:
judging whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area meet a first condition:
Figure QLYQS_1
if the first condition is met, judging whether the vehicle congestion information of the upstream area and the vehicle congestion information of the downstream area meet a second condition:
Figure QLYQS_2
if the second condition is met, indicating that the vehicle congestion condition of the upstream area is congestion;
wherein R is 1 Is the congestion rate of the upstream area; r is R 2 Congestion rate for downstream area; v (V) 1 Vehicle speed for the downstream zone; v (V) 2 Vehicle speed for the downstream zone; n is n 1 The number of vehicles in the upstream area; n is n 2 The number of vehicles in the downstream area; l (L) 1 Is the length of the upstream zone; l (L) 2 Is the length of the downstream zone; k (K) 1 Is a preset first threshold value; k (K) 2 Is a preset second threshold value.
5. A vehicle congestion detection method according to claim 3, wherein the determining the vehicle congestion level and the vehicle congestion length in the continuous road section according to the vehicle congestion condition of the target area and each of the sub-areas specifically includes:
determining the vehicle congestion level in the continuous road section according to the target area and the number of areas with congestion in the subareas;
and determining the vehicle congestion length in the continuous road section according to the number and the length of the areas with congestion in the subareas.
6. The method for detecting vehicle congestion according to claim 1, wherein the obtaining the vehicle congestion information of the target area includes:
acquiring first image information of a latest frame in video information of the target area;
the step of obtaining the vehicle congestion information of the preset area comprises the following steps:
acquiring second image information of the latest frame in the video information of the preset area;
the step of obtaining the vehicle congestion condition in the continuous road section corresponding to the target area comprises the following steps:
and generating a real-time road condition map in the continuous road section corresponding to the target area according to the first image information and the second image information.
7. The vehicle congestion detection method according to claim 1, further comprising: and if the congestion rate of the target area does not exceed the preset threshold value, returning to the step of acquiring the video information of the target area.
8. The method for detecting vehicle congestion according to claim 2, wherein the obtaining the vehicle occupancy according to the maximum number of vehicles in the corresponding area and the number of vehicles is specifically:
Figure QLYQS_3
wherein n is g The number of vehicles in the corresponding area; m is the maximum number of vehicles in the corresponding area;
the area occupation ratio obtained according to the area of the corresponding area and the sum of the areas of the vehicles is specifically:
Figure QLYQS_4
wherein a is g The sum of the areas of the vehicles in the corresponding areas; a is the area of the corresponding region.
9. The method for detecting vehicle congestion according to claim 1, wherein the obtaining the video information of the preset area corresponding to the target area, and analyzing the video information of the preset area by a deep learning algorithm to obtain the vehicle congestion information of the preset area specifically includes:
acquiring video information of a preset frame number in the preset area, and analyzing the video information of each frame through a deep learning algorithm to obtain vehicle congestion information of the video information of each frame;
and calculating average vehicle congestion information of the preset area according to the vehicle congestion information of each frame of video information, and taking the average vehicle congestion information of the preset area as the vehicle congestion information of the preset area.
10. A vehicle congestion detection terminal comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor, when executing the computer program, carries out the steps of a vehicle congestion detection method according to any of claims 1-9.
CN202310672135.1A 2023-06-08 2023-06-08 Vehicle congestion detection method and terminal Active CN116403412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310672135.1A CN116403412B (en) 2023-06-08 2023-06-08 Vehicle congestion detection method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310672135.1A CN116403412B (en) 2023-06-08 2023-06-08 Vehicle congestion detection method and terminal

Publications (2)

Publication Number Publication Date
CN116403412A true CN116403412A (en) 2023-07-07
CN116403412B CN116403412B (en) 2023-09-19

Family

ID=87010920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310672135.1A Active CN116403412B (en) 2023-06-08 2023-06-08 Vehicle congestion detection method and terminal

Country Status (1)

Country Link
CN (1) CN116403412B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101982844A (en) * 2010-11-03 2011-03-02 北京世纪高通科技有限公司 Method and device for identifying road congestion conditions
US20150081196A1 (en) * 2013-09-18 2015-03-19 Iteris, Inc Traffic bottleneck detection and classification on a transportation network graph
CN109241938A (en) * 2018-09-27 2019-01-18 深圳金三立视频科技股份有限公司 Congestion in road detection method and terminal
CN111915876A (en) * 2019-05-08 2020-11-10 储诚茗 Road traffic control system and control method thereof
CN112215435A (en) * 2020-11-02 2021-01-12 银江股份有限公司 Urban congestion propagation mode prediction method based on cyclic autoregressive model
WO2021232387A1 (en) * 2020-05-22 2021-11-25 南京云创大数据科技股份有限公司 Multifunctional intelligent signal control system
US20220215747A1 (en) * 2021-09-22 2022-07-07 Beijing Baidu Netcom Science Technology Co., Ltd. Road congestion detection method and device, and electronic device
CN114822019A (en) * 2022-03-31 2022-07-29 阿里巴巴(中国)有限公司 Traffic information processing method and device
US20230154312A1 (en) * 2020-04-21 2023-05-18 Nippon Telegraph And Telephone Corporation State estimation method, state estimation apparatus and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101982844A (en) * 2010-11-03 2011-03-02 北京世纪高通科技有限公司 Method and device for identifying road congestion conditions
US20150081196A1 (en) * 2013-09-18 2015-03-19 Iteris, Inc Traffic bottleneck detection and classification on a transportation network graph
CN109241938A (en) * 2018-09-27 2019-01-18 深圳金三立视频科技股份有限公司 Congestion in road detection method and terminal
CN111915876A (en) * 2019-05-08 2020-11-10 储诚茗 Road traffic control system and control method thereof
US20230154312A1 (en) * 2020-04-21 2023-05-18 Nippon Telegraph And Telephone Corporation State estimation method, state estimation apparatus and program
WO2021232387A1 (en) * 2020-05-22 2021-11-25 南京云创大数据科技股份有限公司 Multifunctional intelligent signal control system
CN112215435A (en) * 2020-11-02 2021-01-12 银江股份有限公司 Urban congestion propagation mode prediction method based on cyclic autoregressive model
US20220215747A1 (en) * 2021-09-22 2022-07-07 Beijing Baidu Netcom Science Technology Co., Ltd. Road congestion detection method and device, and electronic device
CN114822019A (en) * 2022-03-31 2022-07-29 阿里巴巴(中国)有限公司 Traffic information processing method and device

Also Published As

Publication number Publication date
CN116403412B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
Osman et al. Intelligent traffic management system for cross section of roads using computer vision
CN108389421B (en) Parking lot accurate induction system and method based on image re-identification
WO2022052446A1 (en) Road traffic flow determination method, device and apparatus, storage medium, and program
CN101577054A (en) Control method of traffic signal lamp and system
CN113936458B (en) Method, device, equipment and medium for judging congestion of expressway
CN112132071A (en) Processing method, device and equipment for identifying traffic jam and storage medium
CN111325048A (en) Personnel gathering detection method and device
JP2020013206A (en) Device for detecting two-wheeled vehicle from moving image/camera, program, and system
CN110046212A (en) Road condition change information determines method, apparatus, computer equipment and storage medium
CN110713082B (en) Elevator control method, system, device and storage medium
CN116403412B (en) Vehicle congestion detection method and terminal
CN117496745B (en) Parking space guidance data analysis system and method based on artificial intelligence
TW202121332A (en) Method of acquiring detection zone in image and method of determining zone usage
WO2023125843A1 (en) Road congestion detection method and apparatus, and electronic device and storage medium
CN116153067A (en) Video round-robin system for traffic event
CN105678268A (en) Dual-learning-based method for counting pedestrians at subway station scene
CN113393352B (en) Smart city system based on digital twin technology
JP7203277B2 (en) Method and apparatus for monitoring vehicle license plate recognition rate and computer readable storage medium
CN114724093A (en) Vehicle illegal parking identification method and related equipment
CN108549865A (en) A kind of people streams in public places amount adjusting householder method and system based on deep learning
CN115116033A (en) Processing method and computing device for parking space range
Perkasa et al. Video-based system development for automatic traffic monitoring
CN113963310A (en) People flow detection method and device for bus station and electronic equipment
CN110765820B (en) Method, device, equipment and system for controlling walking space of bidirectional channel
CN116978234B (en) Road condition data dynamic acquisition method and system based on automobile data recorder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant