CN112530159A - Self-calibration type multi-lane-level traffic flow detection method and electronic equipment - Google Patents

Self-calibration type multi-lane-level traffic flow detection method and electronic equipment Download PDF

Info

Publication number
CN112530159A
CN112530159A CN202011266928.6A CN202011266928A CN112530159A CN 112530159 A CN112530159 A CN 112530159A CN 202011266928 A CN202011266928 A CN 202011266928A CN 112530159 A CN112530159 A CN 112530159A
Authority
CN
China
Prior art keywords
track
lane
historical
traffic
flow detection
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
CN202011266928.6A
Other languages
Chinese (zh)
Other versions
CN112530159B (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.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202011266928.6A priority Critical patent/CN112530159B/en
Publication of CN112530159A publication Critical patent/CN112530159A/en
Application granted granted Critical
Publication of CN112530159B publication Critical patent/CN112530159B/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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
    • 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
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Analytical Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a self-calibration type multi-lane-level traffic flow detection method and electronic equipment, wherein the method comprises the following steps: acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos; clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters; extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one. The invention can simultaneously detect the traffic flow of motor vehicles, non-motor vehicles and pedestrians, does not need to manually assist to calibrate the lane, can still normally detect the traffic flow when abnormal conditions occur, and has robustness to external interference.

Description

Self-calibration type multi-lane-level traffic flow detection method and electronic equipment
Technical Field
The invention relates to the technical field of traffic, in particular to a self-calibration type multi-lane traffic flow detection method and electronic equipment.
Background
The traffic flow refers to the data of traffic entities passing through a certain place, a certain section or a certain lane in a unit time period, is a key index for measuring the traffic jam condition, and is also the main basis of road classification. Traffic entities include automotive, non-automotive and pedestrian traffic, and thus traffic flow may be divided into automotive traffic flow, non-automotive traffic flow and pedestrian traffic flow. The traffic flow detection technology is an important component of an intelligent traffic system. The real-time and accurate traffic flow detection can provide reliable reference for traffic management and control departments to take traffic guidance measures, select a proper travel route for drivers, and effectively improve traffic efficiency and safety.
According to the thickness granularity division of the detection area, the traffic flow can be divided into a road section level traffic flow and a lane level traffic flow. The existing traffic flow detection methods mainly focus on road section level flow or single lane level flow, and the multi-lane level flow detection methods are less in research. Although some existing single-lane-level traffic flow detection schemes based on machine vision can be expanded to a multi-lane scene, road calibration needs to be manually completed on a video picture, external disturbance is not robust, road calibration needs to be performed again once abnormal conditions occur, such as change of pose of a monitoring camera, road change and the like, and difficulty is brought to deployment and maintenance of a detection device.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a self-calibration type multi-lane traffic flow detection method and an electronic device, aiming at solving the problems that the multi-lane detection method based on machine vision in the prior art needs to manually complete road calibration on a video picture and is not robust to external interference.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a self-calibration type multi-lane-level traffic flow detection method, where the method includes:
acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos;
clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters;
extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of clustering historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters:
simplifying the historical motion trail by adopting a dynamic programming method, resampling the simplified historical motion trail, and dividing the historical motion trail into a plurality of line segments;
and determining the theme of each line segment in the historical motion track by adopting a Gibbs sampling method, and clustering the historical motion track according to the theme of each line segment to obtain a plurality of historical track clusters.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of:
calculating a representative track corresponding to each historical track cluster in the plurality of historical track clusters;
and determining a lane model according to each historical track cluster and the corresponding representative track thereof.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of determining a lane model according to each historical track cluster and the corresponding representative track thereof:
acquiring the position distribution of each historical track cluster on the corresponding representative track, and determining the cross-section width of each lane in the lane model according to the position distribution;
and determining a lane model according to the representative track corresponding to each historical track cluster and the cross section width of each lane.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of:
acquiring a real-time road traffic video, and extracting a real-time motion track of each traffic body from the real-time road traffic video;
matching the real-time motion track of each traffic body with the lane model to determine a lane matched with each traffic body;
and updating the flow count value of each lane according to the lanes matched with each traffic body.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of matching the real-time motion trajectory of each traffic body with the lane model, and determining the lane matched with each traffic body, wherein the steps further comprise:
matching the real-time motion track of each traffic body with the lane model to obtain the intersection times of each traffic body and each lane;
and determining the lanes matched with the traffic bodies according to the intersection times of the traffic bodies and the lanes.
The self-calibration type multi-lane-level traffic flow detection method further comprises the following steps:
when the track number accumulated by the real-time motion track is larger than a preset threshold value, attenuating the historical motion track to obtain an attenuated historical motion track;
and updating the lane model according to the attenuated historical motion track and the real-time motion track.
The self-calibration type multi-lane-level traffic flow detection method comprises the following steps of updating a lane model according to a decayed historical motion track and a real-time motion track:
clustering the attenuated historical motion track and the real-time motion track through a track clustering algorithm to obtain a plurality of updated track clusters;
calculating a representative track corresponding to each updating track cluster in the plurality of updating track clusters, matching the representative track corresponding to each updating track cluster with the representative track corresponding to each lane model, and updating the lane model according to the matching result.
In a second aspect, the present invention also provides an intelligent terminal, which includes a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors includes a processor configured to execute the self-calibration multi-lane traffic flow detection method described in any one of the above.
In a third aspect, embodiments of the present invention further provide a non-transitory computer-readable storage medium, where instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the self-calibration type multi-lane traffic flow detection method described in any one of the above.
The invention has the beneficial effects that: the method comprises the steps of firstly obtaining historical road traffic videos, extracting historical motion tracks of all traffic bodies from the historical road traffic videos, and then clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters. Then, a lane model is extracted from the plurality of historical track clusters. And finally, carrying out traffic flow detection based on the lane model. In the embodiment, the lane model is established according to the historical motion track of each traffic body, the traffic flow detection is carried out according to the lane model, the traffic flow of motor vehicles, non-motor vehicles and pedestrians can be detected simultaneously, manual auxiliary lane calibration is not needed, the traffic flow detection can still be normally carried out under the abnormal condition, and the robustness to external interference is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a self-calibration multi-lane-level traffic flow detection method according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of an embodiment of a self-calibration multi-lane traffic flow detection method according to the present invention.
Fig. 3 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. 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 should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
The multi-lane traffic flow detection can not only reflect the running state of each lane, but also provide data support for new technologies such as lane-level map navigation and automatic driving, so that the accurate and stable multi-lane traffic flow detection has wide application prospect. In recent years, with the rapid development of computer vision and artificial intelligence, the video multi-target detection and tracking technology makes breakthrough progress, and provides a foundation for accurate traffic flow detection. In the existing traffic flow detection method, such as lane trip line detection, motion track and lane matching and the like, on one hand, an interested area, a start-stop area or a coordinate point sequence of a lane needs to be manually marked in a video picture, on the other hand, the method is not robust to external disturbance, if the pose of a deployed camera changes, the statistical accuracy is greatly influenced, and the deployment and maintenance of the device are increased.
In order to solve the problems in the prior art, the embodiment provides a self-calibration type multi-lane traffic flow detection method, by which traffic flows of motor vehicles, non-motor vehicles and pedestrians can be detected simultaneously, lane calibration is not required to be assisted manually, traffic flow detection can still be performed normally when an abnormal condition occurs, and robustness is provided for external interference. In specific implementation, a historical road traffic video is obtained, historical motion tracks of all traffic bodies are extracted from the historical road traffic video, and then the historical motion tracks are clustered through a track clustering algorithm to obtain a plurality of historical track clusters. Then, a lane model is extracted from the plurality of historical track clusters. And finally, carrying out traffic flow detection based on the lane model, so that the lane model is established according to the historical motion track of each traffic body, the traffic flow detection is carried out according to the lane model, the lane is not required to be calibrated by artificial assistance, the flow detection can still be normally carried out when abnormal conditions occur, and the robustness is provided for external interference.
Exemplary method
The embodiment provides a self-calibration type multi-lane traffic flow detection method, which can be applied to an intelligent terminal. As shown in fig. 1 and 2 in particular, the method includes:
and S100, acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos.
Specifically, the traffic body comprises motor vehicles, non-motor vehicles and pedestrians, the historical road traffic video can be acquired through existing equipment with a camera shooting function, such as a camera, a mobile phone, a tablet personal computer and the like, and when the historical road traffic video is acquired, the road traffic video can be shot for a period of time long enough, so that each lane has more track coverage. And then, acquiring the historical motion trail of each traffic body in the historical road traffic video by using the conventional multi-target tracking method such as the YOLOv4+ Deepsort multi-target tracking method, wherein the historical motion trail of each traffic body is a time sequence of image coordinate points, and each image coordinate point represents the middle point of the lower edge of the 2D frame of the traffic body at the corresponding moment.
And S200, clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters.
The traffic body moves in different lanes, and the historical movement track of the traffic body corresponds to different lanes. In this embodiment, after the historical movement tracks of the traffic bodies are extracted, the historical movement tracks are clustered through a track clustering algorithm, and the historical movement tracks of similar types are divided into a track cluster to form a plurality of historical track clusters. In order to extract lane models from historical track clusters more quickly in the subsequent steps, in the embodiment, a track number threshold is preset, after a plurality of historical track clusters are formed, the historical motion track number in each historical track cluster is compared with the preset track number threshold, when the historical motion track number in each historical track cluster is smaller than the preset historical track threshold, the historical track cluster is considered to be an abnormal track cluster, and the historical track cluster is removed from the historical track clusters.
In an embodiment, the step S200 specifically includes:
s210, simplifying the historical motion trail by adopting a dynamic planning method, resampling the simplified historical motion trail, and dividing the historical motion trail into a plurality of line segments;
and S220, determining the theme of each line segment in the historical motion track by adopting a Gibbs sampling method, and clustering the historical motion track according to the theme of each line segment to obtain a plurality of historical track clusters.
Specifically, after the historical movement tracks of the traffic bodies are obtained, a dynamic planning method is first adopted to select a plurality of points with a fixed number from each historical movement track, and simplify the historical movement tracks of the traffic bodies, for example, 21 points are selected from each historical movement track to simplify the historical movement tracks of the traffic bodies. When a plurality of points with a fixed number are selected to simplify the historical motion trail, the spatial similarity between the simplified historical motion trail and the historical motion trail before simplification needs to be ensured to be larger than a preset similarity threshold value.
After simplifying the historical motion trail, resampling the simplified historical motion trail, and firstly sampling a plurality of pairs of start and stop points along the simplified historical motion trail, wherein the routes of each pair of start and stop points along the simplified historical motion trail are the same, and the route of the overlapped part between the adjacent pairs of start and stop points accounts for 1/3 of the route segment formed by each pair of start and stop points. Then, a plurality of points are uniformly collected on the line segment formed by each pair of start and stop points. For example, 10 pairs of start and stop points are sampled along the simplified historical motion trail, and 8 points are uniformly collected on a line segment formed by each pair of start and stop points.
After resampling the simplified historical motion trail, firstly quantizing the resampled historical motion trail according to the position and the motion direction of the resampled historical motion trail to form a codebook containing a plurality of polynomial distributions, and then describing data distributions in the codebook by using a topic model so that each topic corresponds to one polynomial distribution on the codebook. And then determining the subject to which each line segment in the simplified historical motion track belongs by adopting a Gibbs sampling method, namely obtaining the distribution of the historical motion track on different subjects. And finally, clustering the historical motion tracks according to the distribution of the historical motion tracks on different subjects, and dividing the historical motion tracks into a plurality of historical track clusters according to clustering results.
Step S300, extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one.
Specifically, each historical track cluster corresponds to one lane or one motion form, and after a plurality of historical track clusters are obtained, a lane model is extracted from the historical track clusters, wherein the lane model comprises a plurality of lanes, and the lanes correspond to the historical track clusters one by one. And then acquiring the real-time motion track of each traffic body, matching the real-time motion track of each traffic body with the lane model, and acquiring the lanes matched with each traffic body in real time, namely performing real-time statistics on the flow of each traffic body on each lane. The flow detection method is simple, can realize the self-calibration of the whole lane, does not need manual auxiliary lane calibration, can still perform normal flow detection when abnormal conditions occur, and has robustness to external interference.
In a specific embodiment, the step of extracting the lane model from the plurality of historical track clusters in step S300 includes:
step S310, calculating a representative track corresponding to each historical track cluster in the plurality of historical track clusters;
and step S320, determining a lane model according to each historical track cluster and the corresponding representative track thereof.
Specifically, when extracting the lane model from the plurality of historical track clusters, in this embodiment, an average track, that is, a representative track, corresponding to each historical track cluster is first calculated according to the plurality of historical track clusters, and then the lane model is determined according to each historical track cluster and the representative track corresponding to the historical track cluster. The steps of calculating the representative track according to the historical track cluster are as follows: (1) according to the distribution of the historical track clusters in the image picture, searching pixel points with the maximum density as anchor points; (2) traversing all points with the distance from the anchor point being less than a preset first distance threshold belonging to the set of line segments along the track motion direction to form a line segment set; (3) scanning the line segments along the main direction by taking the average direction of the line segment set as the main direction, and determining the number of intersection points of each line segment and a vertical line in the main direction; (4) and comparing the intersection number with a preset intersection number threshold, and if the intersection number is smaller than a preset intersection data threshold, taking the intersection of each determined line segment and the perpendicular line of the main direction as a representative track. Otherwise, obtaining an average value point and a variance of the intersection point, updating the preset first distance threshold value epsilon according to the variance, judging whether the Euclidean distance between the average value point and the anchor point is larger than a preset second distance threshold value, if so, taking the average value point as the anchor point, and repeatedly executing the steps (2) to (4); if not, repeating the steps (2) to (4) according to the direction opposite to the motion of the anchor point along the track in the step (1).
In a specific embodiment, the step S320 specifically includes:
s321, acquiring position distribution of each historical track cluster on the corresponding representative track, and determining the cross section width of each lane in the lane model according to the position distribution;
and step S322, acquiring the position distribution of each historical track cluster on the corresponding representative track, and determining the cross section width of each lane in the lane model according to the position distribution.
Specifically, when determining the lane model, first obtaining a standard deviation of the position distribution of each historical track cluster on the corresponding representative track, and then determining the cross-section width of each lane in the lane model according to the standard deviation of the position distribution, wherein the cross-section width of each lane can be represented as-3 σi~3σiWherein σ isiAnd the standard deviation of the position distribution of the ith coordinate point on the corresponding representative track of the historical track cluster is shown. And determining a lane model according to the representative track corresponding to each historical track cluster and the cross section width of each lane.
In a specific embodiment, the step of performing traffic flow detection based on the lane model in step S300 includes:
s330, acquiring a real-time road traffic video, and extracting a real-time motion track of each traffic body from the real-time road traffic video;
step S340, matching the real-time motion track of each traffic body with the lane model, and determining a lane matched with each traffic body;
and step S350, updating the flow count value of each lane according to the lanes matched with each traffic volume.
Specifically, the real-time road traffic video is obtained in a manner similar to the historical road traffic video, and can be obtained in real time through equipment with a camera shooting function, and the real-time motion trajectory of each traffic body in the real-time road traffic video is obtained by using the existing multi-target tracking method, such as the YOLOv4+ deep sort multi-target tracking method. And then matching the real-time motion track of each traffic body with the lane model, determining lanes matched with each traffic body, and updating the flow count value of each lane according to the lanes matched with each traffic body. For example, if the lane matching the vehicle o is captured as the lane l at a certain time, the flow meter value of the lane l is increased by one.
In an embodiment, step S340 specifically includes:
step S341, matching the real-time motion track of each traffic body with the lane model to obtain the intersection times of each traffic body and each lane;
and step S342, determining lanes matched with each traffic body according to the intersection frequency of each traffic body and each lane.
When the lanes matched with the traffic bodies are determined, each traffic body is endowed with a unique ID, the intersection times of the traffic bodies and the cross sections of the lanes are calculated according to the real-time tracks of the traffic bodies, and the intersection times are accumulated to the intersection times of the traffic bodies and the lanes. For example, when the number of times of intersection of the traffic o between the current frame, i.e., the t frame, and the lane l is calculated, it may be determined whether the motion vector of the traffic o between the t-1 frame and the t frame intersects with the lane l, and the number of times of intersection is added to the number of times of intersection C of the traffic o on the lane lolThe above.
After the accumulated intersection number value of each vehicle and each lane is updated, the intersection number of each vehicle and each lane is also obtained in real time in this embodiment, for example, the intersection number of the vehicle o on each lane is obtained
Figure BDA0002776437140000101
Wherein lnIndicating the nth lane. Then arranging the intersection times of the traffic bodies on the lanes according to a descending order, acquiring the intersection times arranged on a first position and a second position, namely acquiring the maximum intersection time and the second maximum intersection time of the traffic bodies on the lanes, judging whether the difference value between the maximum intersection time and the second maximum intersection time is greater than a preset counting threshold value, and matching the traffic bodies to the lanes corresponding to the maximum intersection time if the difference value is greater than the preset counting threshold value; if not, continuing to acquire the intersection times of the traffic body and each lane until the difference value between the maximum intersection time of the traffic body and each lane and the second maximum intersection time is greater than a preset counting threshold value.
In order to avoid ID switching caused by blocking or the like of the traffic body, in the embodiment, a traffic body pair which may have ID switching is detected in real time in the traffic flow detection process, that is, suspicious ID pair detection is performed, where the suspicious ID pair includes two traffic body IDs, one is a traffic body ID which is in a lost state and has completed lane matching, and the other is a traffic body ID which is in a tracking state. And when judging whether the ID pair is a suspicious ID pair, firstly, acquiring a lane with the maximum number of intersections corresponding to two traffic bodies in the ID pair, if the lanes with the maximum number of intersections corresponding to the two traffic bodies are the same, judging that the position relation of the ID pair meets the motion constraint of the traffic body through short-time track prediction counting, judging that the ID pair belongs to the suspicious ID pair, and otherwise, judging that the ID pair is not the suspicious ID pair. For the suspicious ID pairs, in this embodiment, a pedestrian re-identification model (deep ReID model) based on deep learning is used to extract visual features of the traffic, similarity of the traffic is calculated based on the visual features of the traffic, target re-identification is performed, and for ID pairs with successful re-identification, merging tracks and updating of counting and tracking states are performed.
In a specific embodiment, the method further comprises:
step S410, when the track number accumulated by the real-time motion track is larger than a preset threshold value, attenuating the historical motion track to obtain an attenuated historical motion track;
and step S420, updating the lane model according to the attenuated historical motion track and the real-time motion track.
In order to improve the robustness of the lane model, in this embodiment, after the real-time motion trajectory is obtained, the number of trajectories accumulated in the real-time motion trajectory is compared with a preset threshold, and when the number of trajectories corresponding to the real-time motion trajectory is less than or equal to the preset threshold, the real-time motion trajectory is continuously obtained; and when the number of tracks corresponding to the real-time motion track is greater than a preset threshold value, attenuating the historical motion track by adopting a preset attenuation rate to obtain an attenuated historical motion track, and updating the lane model based on the attenuated historical motion track and the real-time motion track.
While attenuating the historical motion profileFirstly, the track number corresponding to the historical motion track in each historical track cluster is obtained, and then the historical motion track number needing to be deleted in each historical track cluster is determined according to the track number corresponding to the historical motion track in each historical track cluster. The calculation formula of the number of the historical motion tracks needing to be deleted in each track cluster is as follows:
Figure BDA0002776437140000121
wherein D isiThe number of historical motion tracks needing to be deleted in the ith track cluster is shown, eta is a preset attenuation rate, eta is more than 0 and less than 1, and NiThe number of the historical motion tracks in the ith track cluster. When deleting the historical motion tracks in each track cluster, the historical motion tracks are deleted from the historical motion track with the earliest end time, and when the number of the historical motion tracks needing to be deleted in the ith track cluster is more than or equal to the number of the historical motion tracks in the ith track cluster, namely Ni≤DiAnd if so, deleting the lane corresponding to the track cluster from the lane model.
In a specific embodiment, the step S420 specifically includes:
step S421, clustering the attenuated historical motion track and the real-time motion track through a track clustering algorithm to obtain a plurality of updated track clusters;
step S422, calculating a representative track corresponding to each of the plurality of updated track clusters, matching the representative track corresponding to each updated track cluster with the representative track corresponding to each lane model, and updating the lane model according to the matching result.
Specifically, in this embodiment, after obtaining the attenuated historical motion trajectory, clustering the attenuated historical motion trajectory and the real-time motion trajectory by using a trajectory clustering algorithm to obtain a plurality of updated trajectory clusters. Then calculating a representative track corresponding to each updating track cluster in the plurality of updating track clusters, matching the obtained representative track with the representative tracks of the current lanes based on the Frenster distance and Hungary matching algorithm, and if the representative track is successfully matched with the representative tracks of the current lanes, updating the track clusters corresponding to the lanes according to the representative tracks; and if the matching fails, determining a new lane according to the representative track, and adding the new lane into the lane model. The step of clustering the attenuated historical motion trajectory and the real-time motion trajectory is the same as the step of clustering the historical motion trajectory, and the step of calculating the representative trajectory corresponding to each of the plurality of update trajectory clusters is also the same as the step of calculating the representative trajectory corresponding to each of the historical trajectory clusters according to the historical trajectory clusters, which is not repeated herein in this embodiment.
Exemplary device
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 3. The intelligent terminal comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to realize a self-calibration type multi-lane traffic flow detection method. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is arranged inside the intelligent terminal in advance and used for detecting the operating temperature of internal equipment.
It will be understood by those skilled in the art that the block diagram shown in fig. 3 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
In one embodiment, an intelligent terminal is provided that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos;
clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters;
extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a self-calibration type multi-lane traffic flow detection method and an electronic device, wherein the method comprises: acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos; clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters; extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one. The invention can simultaneously detect the traffic flow of motor vehicles, non-motor vehicles and pedestrians, does not need to manually assist to calibrate the lane, can still normally detect the traffic flow when abnormal conditions occur, and has robustness to external interference.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. A self-calibration type multi-lane-level traffic flow detection method is characterized by comprising the following steps:
acquiring historical road traffic videos, and extracting historical motion tracks of all traffic bodies from the historical road traffic videos;
clustering the historical motion tracks through a track clustering algorithm to obtain a plurality of historical track clusters;
extracting lane models from the plurality of historical track clusters, and carrying out traffic flow detection based on the lane models; the lane model comprises a plurality of lanes, and the lanes correspond to the plurality of historical track clusters one by one.
2. The self-calibration type multi-lane-level traffic flow detection method according to claim 1, wherein the step of clustering the historical motion trajectories by a trajectory clustering algorithm to obtain a plurality of historical trajectory clusters comprises:
simplifying the historical motion trail by adopting a dynamic programming method, resampling the simplified historical motion trail, and dividing the historical motion trail into a plurality of line segments;
and determining the theme of each line segment in the historical motion track by adopting a Gibbs sampling method, and clustering the historical motion track according to the theme of each line segment to obtain a plurality of historical track clusters.
3. The self-calibrated multi-lane-level traffic flow detection method according to claim 1, wherein the step of extracting the lane model from the plurality of historical trajectory clusters comprises:
calculating a representative track corresponding to each historical track cluster in the plurality of historical track clusters;
and determining a lane model according to each historical track cluster and the corresponding representative track thereof.
4. The self-calibration type multi-lane-level traffic flow detection method according to claim 3, wherein the step of determining the lane model according to each historical track cluster and the corresponding representative track thereof comprises:
acquiring the position distribution of each historical track cluster on the corresponding representative track, and determining the cross-section width of each lane in the lane model according to the position distribution;
and determining a lane model according to the representative track corresponding to each historical track cluster and the cross section width of each lane.
5. The self-calibration type multi-lane-level traffic flow detection method according to claim 1, wherein the step of performing traffic flow detection based on the lane model comprises:
acquiring a real-time road traffic video, and extracting a real-time motion track of each traffic body from the real-time road traffic video;
matching the real-time motion track of each traffic body with the lane model to determine a lane matched with each traffic body;
and updating the flow count value of each lane according to the lanes matched with each traffic body.
6. The self-calibration type multi-lane-level traffic flow detection method according to claim 5, wherein the step of matching the real-time motion trajectory of each traffic body with the lane model and determining the lane matched with each traffic body further comprises:
matching the real-time motion track of each traffic body with the lane model to obtain the intersection times of each traffic body and each lane;
and determining the lanes matched with the traffic bodies according to the intersection times of the traffic bodies and the lanes.
7. The self-calibration type multi-lane-level traffic flow detection method according to claim 5, further comprising:
when the track number accumulated by the real-time motion track is larger than a preset threshold value, attenuating the historical motion track to obtain an attenuated historical motion track;
and updating the lane model according to the attenuated historical motion track and the real-time motion track.
8. The self-calibration type multi-lane-level traffic flow detection method according to claim 7, wherein the step of updating the lane model according to the attenuated historical motion trajectory and the real-time motion trajectory comprises:
clustering the attenuated historical motion track and the real-time motion track through a track clustering algorithm to obtain a plurality of updated track clusters;
calculating a representative track corresponding to each updating track cluster in the plurality of updating track clusters, matching the representative track corresponding to each updating track cluster with the representative track corresponding to each lane model, and updating the lane model according to the matching result.
9. An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs being configured to be executed by the one or more processors comprises instructions for performing the method of any of claims 1-8.
10. A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-8.
CN202011266928.6A 2020-11-13 2020-11-13 Self-calibration type multi-lane-level traffic flow detection method and electronic equipment Active CN112530159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011266928.6A CN112530159B (en) 2020-11-13 2020-11-13 Self-calibration type multi-lane-level traffic flow detection method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011266928.6A CN112530159B (en) 2020-11-13 2020-11-13 Self-calibration type multi-lane-level traffic flow detection method and electronic equipment

Publications (2)

Publication Number Publication Date
CN112530159A true CN112530159A (en) 2021-03-19
CN112530159B CN112530159B (en) 2022-06-07

Family

ID=74982379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011266928.6A Active CN112530159B (en) 2020-11-13 2020-11-13 Self-calibration type multi-lane-level traffic flow detection method and electronic equipment

Country Status (1)

Country Link
CN (1) CN112530159B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113221677A (en) * 2021-04-26 2021-08-06 阿波罗智联(北京)科技有限公司 Track abnormity detection method and device, road side equipment and cloud control platform
CN116504068A (en) * 2023-06-26 2023-07-28 创辉达设计股份有限公司江苏分公司 Statistical method, device, computer equipment and storage medium for lane-level traffic flow
CN117994987A (en) * 2024-04-07 2024-05-07 东南大学 Traffic parameter extraction method and related device based on target detection technology

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160075280A1 (en) * 2014-09-12 2016-03-17 Hyundai Motor Company System for estimating lane and method thereof
WO2017105320A1 (en) * 2015-12-17 2017-06-22 Scania Cv Ab Method and system for following a trail of a vehicle along a road
WO2017105319A1 (en) * 2015-12-17 2017-06-22 Scania Cv Ab Method and system for facilitating following a leader vehicle along a road
CA3052251A1 (en) * 2017-02-02 2018-08-09 Nissan Motor Co., Ltd. Travel history storage method, method for producing travel path model, method for estimating local position, and travel history storage device
CN111301427A (en) * 2018-11-23 2020-06-19 宝马股份公司 Method and driver assistance system for determining a lane and vehicle
CN111537990A (en) * 2020-04-27 2020-08-14 西安象德信息技术有限公司 Lane calibration method and device and electronic equipment
CN111553309A (en) * 2020-05-11 2020-08-18 潍柴动力股份有限公司 Lane line identification method and device
CN111738207A (en) * 2020-07-13 2020-10-02 腾讯科技(深圳)有限公司 Lane line detection method and device, electronic device and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160075280A1 (en) * 2014-09-12 2016-03-17 Hyundai Motor Company System for estimating lane and method thereof
WO2017105320A1 (en) * 2015-12-17 2017-06-22 Scania Cv Ab Method and system for following a trail of a vehicle along a road
WO2017105319A1 (en) * 2015-12-17 2017-06-22 Scania Cv Ab Method and system for facilitating following a leader vehicle along a road
CA3052251A1 (en) * 2017-02-02 2018-08-09 Nissan Motor Co., Ltd. Travel history storage method, method for producing travel path model, method for estimating local position, and travel history storage device
CN111301427A (en) * 2018-11-23 2020-06-19 宝马股份公司 Method and driver assistance system for determining a lane and vehicle
CN111537990A (en) * 2020-04-27 2020-08-14 西安象德信息技术有限公司 Lane calibration method and device and electronic equipment
CN111553309A (en) * 2020-05-11 2020-08-18 潍柴动力股份有限公司 Lane line identification method and device
CN111738207A (en) * 2020-07-13 2020-10-02 腾讯科技(深圳)有限公司 Lane line detection method and device, electronic device and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
史颖等: "基于视频检测的车辆变道轨迹识别方法研究", 《交通科技与经济》, no. 03, 5 June 2017 (2017-06-05), pages 51 - 56 *
张海基: "基于环境约束的不确定车辆轨迹预测方法", 《软件导刊》, no. 01, 15 January 2018 (2018-01-15), pages 48 - 49 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113221677A (en) * 2021-04-26 2021-08-06 阿波罗智联(北京)科技有限公司 Track abnormity detection method and device, road side equipment and cloud control platform
CN113221677B (en) * 2021-04-26 2024-04-16 阿波罗智联(北京)科技有限公司 Track abnormality detection method and device, road side equipment and cloud control platform
CN116504068A (en) * 2023-06-26 2023-07-28 创辉达设计股份有限公司江苏分公司 Statistical method, device, computer equipment and storage medium for lane-level traffic flow
CN117994987A (en) * 2024-04-07 2024-05-07 东南大学 Traffic parameter extraction method and related device based on target detection technology
CN117994987B (en) * 2024-04-07 2024-06-11 东南大学 Traffic parameter extraction method and related device based on target detection technology

Also Published As

Publication number Publication date
CN112530159B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN112530159B (en) Self-calibration type multi-lane-level traffic flow detection method and electronic equipment
CN111652912B (en) Vehicle counting method and system, data processing equipment and intelligent shooting equipment
CN112069944B (en) Road congestion level determining method
US8620032B2 (en) System and method for traffic signal detection
WO2023124383A1 (en) Vehicle speed measurement method, collision early-warning method, and electronic device
WO2022222095A1 (en) Trajectory prediction method and apparatus, and computer device and storage medium
US11734783B2 (en) System and method for detecting on-street parking violations
CN109241938B (en) Road congestion detection method and terminal
Chang et al. Video analytics in smart transportation for the AIC'18 challenge
CN113313763B (en) Monocular camera pose optimization method and device based on neural network
WO2021208110A1 (en) Method for determining lane line recognition abnormal event, and lane line recognition apparatus and system
CN111898491B (en) Identification method and device for reverse driving of vehicle and electronic equipment
CN113298053B (en) Multi-target unmanned aerial vehicle tracking identification method and device, electronic equipment and storage medium
EP4020428A1 (en) Method and apparatus for recognizing lane, and computing device
Zhang et al. Vehicle re-identification for lane-level travel time estimations on congested urban road networks using video images
CN111753639A (en) Perception map generation method and device, computer equipment and storage medium
CN111524350B (en) Method, system, terminal device and medium for detecting abnormal driving condition of vehicle and road cooperation
CN113799793A (en) System for realizing automatic iteration of prediction model based on data driving
CN116894855A (en) Intersection multi-target cross-domain tracking method based on overlapping view
CN114360261B (en) Vehicle reverse running identification method and device, big data analysis platform and medium
CN114220040A (en) Parking method, terminal and computer readable storage medium
CN114694078A (en) Traffic behavior judgment method based on multi-target tracking
CN112562315B (en) Method, terminal and storage medium for acquiring traffic flow information
CN112800841B (en) Pedestrian counting method, device and system and computer readable storage medium
CN114663804A (en) Driving area detection method, device, mobile equipment and storage medium

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