WO2023005258A1 - 交通路口检测方法、装置、电子设备及存储介质 - Google Patents

交通路口检测方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023005258A1
WO2023005258A1 PCT/CN2022/086272 CN2022086272W WO2023005258A1 WO 2023005258 A1 WO2023005258 A1 WO 2023005258A1 CN 2022086272 W CN2022086272 W CN 2022086272W WO 2023005258 A1 WO2023005258 A1 WO 2023005258A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
vehicle
traffic
traffic intersection
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.)
Ceased
Application number
PCT/CN2022/086272
Other languages
English (en)
French (fr)
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.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology 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 Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Publication of WO2023005258A1 publication Critical patent/WO2023005258A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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
    • 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/0133Traffic data processing for classifying traffic situation

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a traffic intersection detection method, device, electronic equipment, and storage medium.
  • the present disclosure provides a traffic intersection detection method, including: acquiring a video frame sequence of a traffic intersection; performing vehicle detection on video frames in the video frame sequence to obtain vehicle detection information; based on the vehicle detection information , determine the traffic signal information of the traffic intersection; determine the congestion state of the traffic intersection based on the traffic signal information of the traffic intersection and the vehicle detection information.
  • the present disclosure provides a traffic intersection detection device, including: an acquisition module, configured to acquire a video frame sequence of a traffic intersection; a detection module, configured to perform vehicle detection on video frames in the video frame sequence, to obtain Vehicle detection information; a first determination module, configured to determine traffic signal information of the traffic intersection based on the vehicle detection information; a second determination module, configured to determine traffic signal information based on the traffic intersection and the vehicle detection information , to determine the congestion state of the traffic intersection.
  • the present disclosure provides an electronic device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the The memory communicates with each other through a bus, and when the machine-readable instructions are executed by the processor, the steps of the traffic intersection detection method as described in the first aspect or any implementation manner described above are executed.
  • the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the traffic as described in the first aspect or any implementation mode above is executed. Intersection detection method.
  • the present disclosure provides a computer program product, including a computer program stored in a memory, and when the computer program instructions are executed by a processor, the traffic intersection detection method as described in the first aspect or any implementation mode above is realized .
  • FIG. 1 shows a schematic flow diagram of a traffic intersection detection method provided by an embodiment of the present disclosure
  • FIG. 2 shows a schematic flowchart of a method for determining traffic signal information at a traffic intersection based on vehicle detection information provided by an embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a traffic intersection including a parking reference line provided by an embodiment of the present disclosure
  • Fig. 4 shows a schematic diagram of a video frame provided by an embodiment of the present disclosure
  • Fig. 5 shows a schematic diagram of the architecture of a traffic intersection detection device provided by an embodiment of the present disclosure
  • Fig. 6 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the method of detecting traffic roads by installing coils has the following problems: first, it will cause certain damage to the road surface; second, it will lead to higher installation costs and operation and maintenance costs; third, the installation of coils The location is limited, which reduces the efficiency of road detection.
  • embodiments of the present disclosure provide a traffic intersection detection method, device, electronic device, and storage medium.
  • the execution subject of the traffic intersection detection method provided by the embodiments of the present disclosure is generally a computer device with certain computing capabilities, such as a computer device including: a terminal device or a server or other processing devices, and the terminal device may include a user equipment (User Equipment, UE ), mobile devices, cellular phones, cordless phones, personal digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, automotive devices, wearable devices, etc.
  • the traffic intersection detection method may be implemented by a processor calling computer-readable instructions stored in a memory.
  • FIG. 1 is a schematic flowchart of a traffic intersection detection method provided by an embodiment of the present disclosure, the method includes S101-S104.
  • S102 Perform vehicle detection on video frames in the video frame sequence to obtain vehicle detection information.
  • S104 Determine the congestion state of the traffic intersection based on the traffic signal information and the vehicle detection information of the traffic intersection.
  • the vehicle detection information is determined by performing vehicle detection on the acquired video frame sequence, and based on the vehicle detection information, the traffic signal information of the traffic intersection is determined in real time, without manual acquisition of traffic signal information, and the determination of traffic signal information is improved. efficiency. Furthermore, the congestion state of the traffic intersection can be determined based on the traffic signal information and the vehicle detection information of the traffic intersection, and the automatic determination of the congestion state of the traffic intersection is realized, and the determination efficiency of the congestion state is high. At the same time, since the video frame sequence contains relatively accurate vehicle information, the congestion state of the traffic intersection can be determined more accurately by using the video frame sequence.
  • the camera set at the traffic intersection can collect the road video corresponding to the traffic intersection, and obtain multiple frames of continuous video images (video frames) from the collected road video as a video frame sequence.
  • video frames For example, a frame of video image may be collected from the road video at intervals of one second to obtain a sequence of video frames.
  • Vehicle detection can be performed on video frames in the video sequence to obtain vehicle detection information.
  • performing vehicle detection on video frames in the video frame sequence to obtain vehicle detection information includes: detecting each video frame in the video frame sequence (for example, tracking detection) to obtain the detection frame information of the detection object in the video frame and the category information of the detection object; based on the category information of the detection object, the detection frame information of the vehicle is screened out from the detection frame information of the detection object; wherein, the detection The frame information includes identification information for distinguishing different vehicles, and the identification information of the same vehicle in different video frames of the video frame sequence is the same.
  • the vehicle detection information includes detection frame information of the vehicle.
  • the detection frame information contains the identification information used to distinguish different vehicles
  • the identification information of the same vehicle in different video frames of the video frame sequence is the same, which realizes the tracking of the same vehicle and provides information for the subsequent determination of traffic signal information based on vehicle detection information. data support.
  • use the category information of the detection object to filter out the detection frame information of the vehicle from the detection frame information of the detection object, and avoid the detection frame information of other types of detection objects except vehicles from interfering with the traffic signal information, thereby improving Determine the accuracy of traffic signal information.
  • each video frame in the video frame sequence can be input into the trained first neural network, each video frame is detected, the detection frame information of the detection object included in each video frame is determined, and The detection frames corresponding to the same detection object in different video frames are associated (for example, the same identification information can be set for the same detection object in different video frames).
  • the detection frame information may include the position information, size information, confidence degree, identification information, etc. of the detection frame corresponding to the detection object.
  • the detection frame information may include the position information of the center point of the detection frame, and the size of the detection frame, The position information of the four vertices of the detection frame, etc.
  • each video frame in the video frame sequence can be detected based on Faster RCNN, a fast convolutional neural network.
  • a deep convolutional network can be used to extract features from each video frame, and based on the feature data obtained by feature extraction, the candidate target area can be extracted through the region extraction layer Region Proposal Layer; and then based on the obtained candidate target area, the feature can be sensed ROI Pooling in the area of interest, category classification and coordinate regression, to obtain the confidence of the detected object and the position information of the detection frame.
  • the detection frames whose intersection ratio is greater than the threshold are combined to obtain the detection frame information of the detection object in the video frame.
  • the trained second neural network can be used to detect each video frame in the sequence of video frames, and determine the category information of the detected object in the video frame.
  • the category information can be set according to needs, for example, the category information can include motor vehicles, bicycles, pedestrians, animals, etc.; or, the category information can also include bicycles, pedestrians, cars, vans, small trucks, large Trucks, SUVs, buses and more.
  • each video frame can be input into the second neural network respectively, and the backbone network (for example, the backbone network can be resnet18) included in the second neural network is used to extract features from the video frame, which can be based on feature extraction After obtaining the feature data, use a two-layer fully connected full-connection network to predict the category information of the detected object included in the video frame.
  • the backbone network for example, the backbone network can be resnet18
  • the detection frame information of the vehicle can be filtered out from the detection frame information of the detection object based on the category information of the detection object, and the The detection frame information of other detection objects is deleted to obtain the vehicle detection information included in the video frame sequence.
  • the category information may be the detection frame information of non-motor vehicles, the detection frame information of pedestrians, and other detection frame information.
  • the detection frame information of the filtered vehicles may include identification information for distinguishing different vehicles, and the identification information of the same vehicle in different video frames of the video frame sequence is the same. By setting identification information to distinguish different vehicles, the tracking of the same vehicle is realized.
  • the identification information can be text information, color information, etc.
  • an identity number (Identity document, ID) can be set for the same vehicle, and different vehicles correspond to different IDs, or the color of the detection frame of the same vehicle can also be set to Set to the same color, the color of the detection frame corresponding to different vehicles is different.
  • traffic lights include red lights, yellow lights, and green lights
  • the traffic signal information may include the cycle duration C corresponding to the traffic lights, the green signal duration T green , the red signal duration T red and the yellow signal duration T yellow .
  • the cycle duration is equal to the sum of the duration of the green light signal, the red light signal duration and the yellow light signal duration.
  • the duration of the yellow light signal at the traffic intersection may be determined according to traffic regulations, for example, the duration of the yellow light signal at the traffic intersection may be 3 seconds.
  • traffic signal information at a traffic intersection is determined, including steps S201 - S203.
  • S203 Determine the duration of the green signal based on the cycle duration of the traffic lights at the intersection and the duration of the red signal.
  • the processor can determine the period length of the traffic signal light and the duration of the red light signal, and the duration of the green light signal according to the vehicle detection information, the position information of the parking reference line, and the acquisition time of the video frame, so as to realize the automatic determination of the traffic signal information , compared with the way of manually determining the traffic signal information, the determination efficiency of the traffic signal information is improved.
  • the user can perform a line drawing operation in the video frame to obtain the parking reference line in the video frame, and determine the parking reference line in the video frame in response to the line drawing operation triggered by the user; or, a detection algorithm can be used to analyze the video The frame is detected and the parking baseline is determined in the video frame.
  • Fig. 3 shows a schematic diagram of a traffic intersection including parking reference lines. 3 includes a zebra crossing 32 and a parking reference line 31 in front of the zebra crossing.
  • the cycle duration C and the red light signal duration T red corresponding to the traffic lights at the intersection can be determined.
  • the duration of the red light signal T red can be subtracted from the cycle duration C, and the obtained difference can be subtracted from the duration of the yellow light signal T yellow to obtain the duration of the green light signal T green .
  • S202 based on the parking reference line, vehicle detection information, and the acquisition time corresponding to each video frame, determine the period length corresponding to the traffic lights at the intersection, including steps A1 and A2.
  • Step A1 based on the parking reference line, vehicle detection information, and the acquisition time corresponding to each video frame, determine the time when multiple key vehicles pass the parking reference line; wherein, any of the multiple key vehicles is at a traffic intersection Every time the green light is turned on, the first vehicle to pass the parking reference line on the target lane.
  • Step A2 based on the time when the plurality of key vehicles respectively pass the parking reference line, determine the cycle duration corresponding to the traffic signal lights at the traffic intersection.
  • any one of the multiple key vehicles is the first vehicle passing the parking reference line when the green light at the traffic intersection is turned on each time; Based on the time when the plurality of key vehicles respectively pass the parking reference line, the cycle duration corresponding to the traffic signal light at the traffic intersection is determined, and data support is provided for subsequent determination of the congestion state of the traffic intersection.
  • a plurality of key vehicles included in the sequence of video frames may be determined first, and then based on the parking reference line, vehicle detection information, and the acquisition time corresponding to each video frame, it is determined that the plurality of key vehicles respectively pass the parking reference line line time.
  • the key vehicle is the first vehicle passing the parking reference line when the green light at the traffic intersection is turned on; when the number of lanes corresponding to the traffic intersection is multiple, the key vehicle can be the vehicle on the target lane when the green light at the traffic intersection is turned on.
  • the target lane can be any lane on the selected traffic intersection. Or, each lane can also be used as the target lane respectively, and the key vehicles on each target lane can be determined.
  • the key vehicle may be determined according to the following steps B1 to B4.
  • Step B1 based on the parking reference line, vehicle detection information, and the acquisition time of multiple video frames, determine the target moment when each vehicle passes the parking reference line.
  • Step B2 for each vehicle in the vehicle detection information, based on the target time corresponding to the vehicle and the target time when the previous vehicle before the vehicle passed the parking reference line, determine the difference between the vehicle and the previous vehicle The crossing time difference.
  • Step B3. Determine the first intersection ratio of the detection frame of the vehicle in the video frame at the target time and the previous video frame, wherein the previous video frame is a video frame with a preset time interval from the target time ;
  • Step B4 In response to the fact that the line crossing time difference is greater than the first threshold and the first cross-over-join ratio is greater than the second threshold, it is determined that the vehicle is a key vehicle.
  • the target moment when each vehicle passes the parking reference line may be determined according to the parking reference line, vehicle detection information, and the acquisition time of multiple video frames.
  • the vehicle detection frame information included in the vehicle detection information can be presented in each video frame.
  • the acquisition time corresponding to the video frame is determined as the vehicle passing through The moment of the parking baseline.
  • the acquisition time corresponding to the last video frame that intersects with the parking reference line is determined as the target moment when the vehicle passes the parking reference line.
  • step B2 for each vehicle, the previous vehicle passing the parking reference line before the vehicle may be determined.
  • the target time corresponding to the previous vehicle that is in the same lane and passed the parking reference line last time may be determined.
  • the line-crossing time difference between the vehicle and the previous vehicle may be determined based on the target time when the vehicle passes the parking reference line and the target time when the previous vehicle corresponding to the vehicle passes the parking reference line. According to the formula (1), determine the time difference corresponding to the vehicle crossing the line:
  • step B3 two video frames containing the same vehicle that are separated by a preset duration can be determined, that is, the first video frame and the second video frame separated by a preset duration (for example, 1 second); wherein, the first video frame It may be a video frame at the target time, and the second video frame may be a video frame before the target time and at a preset time interval from the target time.
  • a first intersection over union (IOU) of the detection frame of the vehicle i is determined.
  • the first intersection and union ratio can be determined according to formula (2):
  • Fig. 4 shows the schematic diagram of video frame;
  • step B4 when the line-crossing time difference is greater than the first threshold and the first cross-over-combination ratio is greater than the second threshold, it is determined that the current vehicle is a key vehicle; when the line-crossing time difference is less than or equal to the first threshold, or the first intersection When the ratio is less than or equal to the second threshold, it is determined that the current vehicle does not belong to the key vehicle.
  • the setting of the first threshold is related to the duration of the red light signal, for example, the first threshold may be any value smaller than the duration of the red light signal.
  • the first threshold and the second threshold can be set according to actual needs, for example, the first threshold can be 30 seconds, and the second threshold can be 0.5.
  • the crossing time difference there are two situations when the crossing time difference is large: in the first case, after the first vehicle passes the parking reference line, the second vehicle encounters a red light and cannot pass the parking reference line in a short period of time, The time difference between the first vehicle and the second vehicle is relatively large; in the second case, the driving distance between the first vehicle and the second vehicle is relatively long, so that the distance between the first vehicle and the second vehicle The time difference of crossing the line is relatively large; therefore, in order to screen out the second situation and determine the key vehicles more accurately, the first cross-merge ratio corresponding to the vehicles can be judged.
  • the vehicle When the line-crossing time difference is greater than the first threshold, if the first intersection is relatively large, it is determined that the vehicle is moving slowly, and the vehicle may correspond to the first situation, that is, the vehicle is a key vehicle; If it is determined that the vehicle is moving faster, then the vehicle may correspond to the second case, and the vehicle is not a critical vehicle at this time.
  • the time t-1 can be determined as the parking time t_stop i of the vehicle i;
  • the second threshold that is, when , it means that the key vehicle starts from the parking reference line, and the time t′ can be determined as the starting time t_start i of the key vehicle i; then the corresponding parking time and starting time of each key vehicle can be obtained.
  • the traffic signal information may also include the time when the green light is turned on, and the start time corresponding to any one of the multiple key vehicles may be determined as the time when the green light is turned on T green_begin .
  • the key vehicle when the key vehicle is the green light, the first vehicle passing the parking reference line, it can be known that the key vehicle has the following characteristics: the time difference between the key vehicle and the previous vehicle passing the parking reference line will be relatively large, and the key The first cross-over-union ratio of the vehicle in two video frames with a preset time interval will be larger. Therefore, when the line crossing time difference is greater than the first threshold and the first cross-merge ratio is greater than the second threshold, the key vehicle can be determined more accurately.
  • the video frame sequence of the collected traffic intersection may not include images of traffic lights, but the key vehicles can be determined by performing steps B1 to B4, and the moment of turning on the green light can be further deduced according to the start time of the key vehicles.
  • the cycle duration corresponding to the traffic signal light at the traffic intersection can be determined based on the time when the plurality of key vehicles respectively pass the parking reference line. For example, multiple key vehicles on the same lane can be sorted from morning to night according to the time of passing the parking baseline. For the key vehicles on the same lane, when the number of key vehicles is two, the first key vehicle can be calculated The first time difference between the time when the second key vehicle passes the parking reference line, and the average value of the first time difference corresponding to each lane is determined as the cycle duration C corresponding to the traffic signal light at the traffic intersection.
  • the first time difference between the time when the first key vehicle and the second key vehicle respectively pass the parking reference line can be calculated , and calculate the first time difference between the time when the second key vehicle and the third key vehicle respectively pass the parking reference line, and so on, average the obtained first time differences, that is, get the lane corresponding to The first time difference average value; and the average value obtained by averaging the first time difference average values corresponding to each lane respectively is determined as the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • n-1 first time differences can be obtained, and the n-1 first time differences can be averaged to obtain the first time difference corresponding to the first lane Average value
  • m-1 first time differences can be obtained, and the m-1 first time differences can be averaged to obtain the first time difference corresponding to the second lane
  • An average time difference, the first average time difference of the first lane and the first average time difference of the second lane are averaged to obtain the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • the period lengths of the traffic lights corresponding to each lane can also be calculated separately.
  • step A2 based on the time when multiple key vehicles respectively pass the parking reference line, determine the cycle duration corresponding to the traffic lights at the intersection, including steps C1 to C3.
  • Step C1 when the traffic signal light at the traffic intersection turns green each time, determine the first time difference between two key vehicles with adjacent green lights passing the parking reference line, so as to obtain a plurality of first time differences.
  • Step C2 clustering the multiple first time differences to obtain at least one clustered first set.
  • Step C3 based on the first time difference in the at least one first set after clustering, determine the cycle duration corresponding to the traffic lights at the intersection.
  • the determined multiple first time differences can be calculated.
  • Clustering obtaining at least one first set after clustering, and determining the cycle duration corresponding to the traffic lights at the traffic intersection based on the first time difference in the at least one first set after clustering.
  • each first time difference in the first set containing the largest number of first time differences is used to determine the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • the multiple key vehicles may be sorted from early to late based on the time when the multiple key vehicles pass the parking reference line respectively. For example, the time when the first key vehicle passes the parking reference line is 10:10:10, the time when the second key vehicle passes the parking reference line is 10:10:30, and the time when the third key vehicle passes the parking reference line is 10:10 : 52, then the ordering of key vehicles is the first key vehicle, the second key vehicle, the third key vehicle, and the first key vehicle and the second key vehicle are determined to be the corresponding two key vehicles when the adjacent green lights are turned on; The second key vehicle and the third key vehicle are determined as the corresponding two key vehicles when the adjacent green lights are turned on. A first time difference between the first key vehicle and the second key vehicle, and a first time difference between the second key vehicle and the third key vehicle may be calculated.
  • step C2 the multiple first time differences obtained in step C1 may be clustered to obtain at least one clustered first set, and each first set includes at least one first time difference.
  • the clustering algorithm for clustering the first moment may be any density clustering algorithm, for example, the density clustering method DBSCAN may be used to cluster multiple first time differences.
  • step C3 from at least one first set, the first set containing the largest number of first time differences may be determined; and based on each first moment in the first set containing the largest number of first time differences Poor, determine the cycle duration corresponding to the traffic lights at the intersection. For example, each first time difference in the first set containing the largest number of first time differences may be averaged, and the obtained average value may be determined as the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • step C3 based on the first time difference in at least one first set after clustering, determine the cycle duration corresponding to the traffic lights at the intersection, including steps D1-D3.
  • Step D1 obtaining the first silhouette coefficient of the cluster; wherein, the first silhouette coefficient is used to characterize the credibility of the clustering result.
  • Step D2 in response to the first silhouette coefficient being greater than the first coefficient threshold, determine the largest first set containing the largest number of first time differences in the at least one first set; based on each first moment in the largest first set Poor, determine the cycle duration corresponding to the traffic lights at the intersection.
  • Step D3 in response to the first contour coefficient being less than or equal to the first coefficient threshold, according to the time sequence of a plurality of key vehicles passing the parking reference line, delete the first number of key vehicles; determine the second number of key vehicles passing the parking reference line time; based on the time when the remaining key vehicles of the first quantity are deleted from the plurality of key vehicles and pass the parking reference line, and the time when the second number of key vehicles pass the parking reference line after the remaining key vehicles, determine the corresponding traffic lights at the traffic intersection cycle time.
  • the first silhouette coefficient of the cluster can be obtained, and when the first silhouette coefficient is greater than the first coefficient threshold, step D2 is performed; when the first silhouette coefficient is less than or equal to the first coefficient threshold, step D3 is performed.
  • the first silhouette coefficient can be an index for judging the clustering effect output by the clustering algorithm. When the first silhouette coefficient is larger, the clustering effect of the cluster is better, that is, the clustering result of this time is Conversely, when the first silhouette coefficient is small, the clustering effect of this clustering is poor, that is, the credibility of the clustering result is low.
  • step D2 when the first silhouette coefficient is greater than the first coefficient threshold, the largest first set containing the largest number of first time differences may be determined in the at least one first set, and each of the largest first set The first time difference is averaged, and the average value is rounded, and the rounded average value is determined as the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • the first quantity is less than the quantity of the plurality of key vehicles, and the values of the first quantity and the second quantity may be the same or different.
  • the values of the first quantity and the second quantity can be set as required; or, the first quantity and the second quantity can also be determined based on the ratio of the quantity of a plurality of key vehicles and the setting, for example, the first quantity can be more than One-third of the number of key vehicles; the second number can be one-half of the number of multiple key vehicles.
  • the number of key vehicles can pass by The chronological order of the parking baseline from early to late, delete 10 key vehicles from the 20 key vehicles; then determine the time when the second number of key vehicles pass the parking baseline; and delete the first number based on multiple key vehicles
  • the time when the remaining key vehicles pass the parking reference line, and the time when 15 new key vehicles pass the parking reference line after the remaining key vehicles determine the period length corresponding to the traffic lights at the intersection. That is, based on the time when 25 key vehicles pass the parking reference line, determine the cycle duration corresponding to the traffic lights at the intersection.
  • the process of determining the cycle duration corresponding to the traffic lights at the intersection based on the time when the 25 key vehicles pass the parking reference line can refer to steps C1 to C3, and will not be described in detail here.
  • the first silhouette coefficient can be used to characterize the credibility of the clustering results, when the first silhouette coefficient is greater than the first coefficient threshold, the credibility of the current clustering result is higher, so it can be based on the included first Each of the first time differences in the largest first set with the largest number of time differences more accurately determines the cycle duration corresponding to the traffic signal lights at the intersection.
  • the reliability of the current clustering result is low, so it is necessary to determine the time when the second number of key vehicles pass the parking reference line. Based on the time of deleting the first number of remaining key vehicles passing the parking reference line among the plurality of key vehicles, and the time of the second number of key vehicles passing the parking reference line after the remaining key vehicles, the traffic intersection can be more accurately determined The cycle time corresponding to the traffic signal light.
  • the following describes the process of determining the duration of a red light signal at a traffic intersection based on the parking baseline, vehicle detection information, and the acquisition time corresponding to each video frame.
  • the duration of the red light signal at the traffic intersection is determined, including steps E1 to E4.
  • Step E1 based on the parking reference line, vehicle detection information, and the acquisition time corresponding to each video frame, determine the parking time and start time of the key vehicle; the key vehicle is the first one to pass the parking reference line when the green light at the traffic intersection is turned on
  • the parking time is the moment when the key vehicle stops at the parking reference line position
  • the start time is the moment when the key vehicle starts at the parking reference line position.
  • Step E2 for each of the plurality of key vehicles, based on the parking time and start time of the key vehicle, determine the second time difference corresponding to the key vehicle, so as to obtain a plurality of second time differences for the plurality of key vehicles Two time difference.
  • Step E3 clustering the plurality of second time differences to obtain at least one clustered second set.
  • Step E4 based on the second time difference in the second set after clustering, determine the duration of the red light signal at the traffic intersection.
  • the determined plurality of second time differences can be clustered to obtain at least one second set after clustering; based on each first set in the second set after clustering Two time difference, determine the duration of the red light signal at the traffic intersection.
  • the key vehicles included in the video frame sequence, and the corresponding stop time t_stop i and start time t_start i of each key vehicle can be determined.
  • the parking moment is the moment when the key vehicle stops at the parking reference line position
  • the start time is the moment when the key vehicle starts at the parking reference line position.
  • the calculated second time difference between the start time t_start i and the stop time t_stop i of the key vehicle can be determined as the duration of the red light signal at the traffic intersection.
  • the second moment difference between the start moment t_start i and the stop moment t_stop i of each key vehicle can be calculated, and the corresponding start moment t_start i of each key vehicle and the stop moment t_stop i
  • the difference between The second time difference is averaged, and the obtained second time difference average value is determined as the duration of the red light signal at the traffic intersection.
  • a clustering algorithm is used to cluster the plurality of second time differences to obtain at least one clustered second set, and each second set includes at least one second time difference.
  • the clustering algorithm for clustering at the second moment may be any density clustering algorithm, for example, it may be the density clustering method DBSCAN.
  • a second set may be randomly selected from a plurality of second sets obtained after clustering, an average value of each second time difference in the selected second set is determined, and the average value is determined as a red light signal at a traffic intersection duration.
  • the second set containing the largest number of second time differences may be determined; and based on each second set in the second set containing the largest number of second time differences Time difference, determine the duration of the red light signal at the traffic intersection. For example, each second time difference in the second set containing the largest number of second time differences may be averaged, and the obtained average value corresponding to each second time difference is determined as the duration of the red light signal at the traffic intersection.
  • step Ea1 to step Ea3 may also be included.
  • Step Ea1 Obtain the second silhouette coefficient of the cluster for the second time difference; wherein, the second silhouette coefficient is used to characterize the credibility of the clustering result;
  • Step Ea2 in response to the second silhouette coefficient being greater than the second
  • the coefficient threshold is based on each second time difference in the second set containing the largest number of second time differences to determine the duration of the red light signal at the traffic intersection.
  • Step Ea3 in response to the second contour coefficient being less than or equal to the second coefficient threshold value, according to the time sequence of the multiple key vehicles passing the parking reference line from early to late, delete the fourth number of critical vehicles from the multiple critical vehicles, and Determining the parking moment and starting moment corresponding to the fifth number of key vehicles; based on deleting the fourth number of remaining key vehicles among the plurality of key vehicles, and after the remaining key vehicles, among the fifth number of key vehicles, each key The corresponding parking time and starting time of the vehicle determine the duration of the red light signal corresponding to the traffic light at the intersection.
  • step Ea1, step Ea2, and step Ea3 reference may be made to the process of steps D1-D3, which will not be described in detail here.
  • the congestion state of the traffic intersection can include smooth flow, mild congestion, moderate congestion, severe congestion, etc.; or, the congestion state of the traffic intersection can include smooth flow, first-level congestion, second-level congestion, third-level congestion, etc. .
  • the congestion status can be set as required.
  • the congestion state of the traffic intersection is determined based on the traffic signal information and the vehicle detection information of the traffic intersection, which may include S1041 to S1042.
  • the congestion parameter information includes at least one of the following: from The utilization rate of the green light between the time when the green light signal is turned on and the time when the red light signal is turned on, the space occupancy rate of the preset area within the preset time period from the end time of the green light signal, the time between the end time of the green light signal and the end time of the red light signal The preset area filling time, or the number of target vehicles passing the parking reference line between the time when the green light signal is turned on and the time when the red light signal is turned on.
  • the congestion state of the traffic intersection can be determined more flexibly and accurately.
  • determining the congestion parameter information corresponding to the traffic intersection may include steps F1 and Step F2.
  • Step F1 based on the traffic signal information and vehicle detection information of the traffic intersection, determine the third number of vehicles passing the stop reference line between the time when the green light signal is turned on and the time when the red light signal is turned on.
  • Step F2 Determine the green light utilization rate based on the third quantity, the saturated headway, and the time period from when the green light signal is turned on to when the red light signal is turned on, wherein the saturated headway is used to represent the passage of adjacent vehicles The shortest time difference from the parking baseline.
  • the third number of vehicles passing the parking reference line between the time when the green light signal is turned on ie, the time when the green light is turned on
  • the time when the red light signal is turned on can be determined.
  • a third number of vehicles passing the parking reference line between [T green_begin , T green_begin +T green +T yellow ] may be determined.
  • T green_begin is the time when the green light signal is turned on
  • T green_begin + T green + T yellow is the time when the red light signal is turned on.
  • the red signal start time T green_begin is 12:00:00
  • the cycle duration C is 53 seconds
  • the red signal duration T red is 20 seconds
  • the green signal duration T green is 30 seconds
  • the yellow signal duration T yellow is 3 seconds
  • the red light signal is turned on at 12:00:33, and the third number of vehicles passing the parking reference line between 12:00:00 and 12:00:33 can be determined.
  • Green use can be determined according to the following formula (3):
  • Num green is the third quantity of vehicles passing through the parking reference line from the moment when the green light signal is turned on to the moment when the red light signal is turned on; headway saturation is the saturated headway, wherein the value of the saturated headway can be based on multiple vehicles The time difference passing through the parking reference line is determined. For example, within a continuous green light signal time, the saturated headway of a steady and continuous traffic flow can be 2 seconds; the value of T green_end - T green_begin is the sum of the green light signal duration plus the yellow light signal duration.
  • the congestion state of the traffic intersection can be determined based on the utilization rate of the green light. For example, a utilization threshold may be set, and in response to the green light utilization being greater than the utilization threshold, it is determined that the traffic intersection is congested; in response to the green light utilization being less than or equal to the utilization threshold, it is determined that the traffic intersection is unblocked.
  • the green light utilization rate may be determined by using the third number of vehicles passing the parking reference line between the time when the green light signal is turned on and the time when the red light signal is turned on.
  • the green light utilization rate can be the ratio between the number of vehicles passing through the intersection after the green light is turned on and the maximum number of vehicles that can pass, which provides data support for subsequent determination of the congestion status of the intersection.
  • determining the congestion parameter information corresponding to the traffic intersection based on the traffic signal information and vehicle detection information at the traffic intersection may include the steps G1 to step G3.
  • Step G1 From the video frame sequence, extract a part of the video frame sequence within a preset duration from the end of the green light signal.
  • Step G2 For each video frame in the partial sequence of video frames, determine the number of vehicles in the preset area in the video frame to determine the average number of vehicles contained in the preset area in the partial sequence of video frames.
  • Step G3 based on the average number and the maximum number of vehicles that can be accommodated in the preset area, determine the space occupancy rate of the preset area.
  • the preset duration can be set as required. For example, if the preset duration can be 3 seconds, then part of the video frame sequence within the preset duration from the end of the green light signal can be extracted from the video frame sequence; for example, determine [T green_begin +T green , T green_begin +T green +3] part of the sequence of video frames between. For example, if the end time of the green light signal is 12:00:30, and the preset duration can be 3 seconds, then part of the video whose collection time is between 12:00:30-12:00:33 can be extracted from the video frame sequence sequence of frames.
  • the number of vehicles located in a preset area in each video frame in the partial video frame sequence is determined.
  • the average number of vehicles located in the preset area in each video frame in the partial video frame sequence is obtained to obtain the average number of vehicles contained in the preset area of each video frame.
  • the preset area may be a road area within a certain distance (for example, 30 meters) before the parking reference line.
  • the preset region can be any set region of interest (region of interest, ROI).
  • the preset area in response to the area determination operation, can be determined in the video frame. Based on the location information of the preset area, the number of vehicles located in the preset area in each video frame in the partial video frame sequence can be determined.
  • the space occupancy Space use of the preset area can be determined according to the following formula (4):
  • ROI max is the maximum number of vehicles that can be accommodated in the preset area
  • ROI max can be determined according to the determined preset area. For example, if the end time of the green light signal is 12:00:30 and the preset duration is 3 seconds, then part of the video frame sequence whose collection time is between 12:00:30-12:00:33 can be extracted from the video frame sequence , the preset area is the road area within 30 meters before the parking reference line, the partial video frame sequence within 3 seconds includes 3 video frames, the preset area of the first video frame contains 1 vehicle, and the second video frame 3 vehicles are contained in the preset area of , and 5 vehicles are contained in the preset area of the third video frame, then the average number of vehicles contained in the preset area in some video frame sequences is 3, and the corresponding maximum accommodating number of vehicles ROI max in the preset area is 8, then the space occupancy rate Space use of the preset area is 37.5%.
  • the congestion state of the traffic intersection can be determined based on the space occupancy rate of the preset area. For example, an occupancy threshold may be set, and if the space occupancy of the preset area is greater than the occupancy threshold, it is determined that the traffic intersection is congested;
  • Step H1 based on the sequence of video frames, determine the shortest time period for the number of vehicles contained in the preset area corresponding to the traffic intersection to reach the target number between the end of the green light signal and the end of the red light signal.
  • Step H2. Determine the shortest duration as the preset area filling duration.
  • the end time of the green light signal (T green_begin +T green ) to the end time of the red light signal (T green_begin +T green +T yellow +T red ) can be [T green_begin +T green , T green_begin +T green +T yellow +T red ]. That is, based on the sequence of video frames, the shortest time period for the number of vehicles contained in the preset area of the traffic intersection to reach the target number can be determined between the end time of the green light signal and the end time of the red light signal.
  • the target number can be set according to needs, for example, the target number can be the maximum number of vehicles that can be parked corresponding to the preset area.
  • the filling time at which the number of vehicles contained in the preset area of the traffic intersection reaches the target number can be determined, and the filling time is subtracted from the end time of the green light signal to obtain The shortest duration, in other words, the preset region filling duration t roi_fill .
  • the duration T red of the red light signal can be determined as the filling time of the preset area.
  • the congestion state of the traffic intersection can be determined based on the preset area filling time. For example, a filling time threshold can be set, and if the filling time of the preset area is less than the filling time threshold, it is determined that the traffic intersection is congested; in response to the filling time of the preset area being greater than or equal to the filling time threshold, it is determined that the traffic intersection is unblocked.
  • determining the congestion parameter information corresponding to the traffic intersection based on traffic signal information and vehicle detection information at the intersection includes steps J1 to J2.
  • Step J1 for each vehicle included in the preset area corresponding to the traffic intersection, determine the moment when the vehicle passes the parking reference line;
  • Step J2 determine the third time difference between the time when the vehicle passes the parking reference line and the time when the previous vehicle of the vehicle passes the parking reference line, based on the determined multiple third time differences, determine a plurality of third time differences The number of target vehicles that are continuously less than the time threshold.
  • the third time difference is the headway between the current vehicle and the previous vehicle, and based on each third time difference, determine the target number of vehicles Num queue whose third time difference is continuously smaller than the time threshold.
  • the time threshold is related to the saturated headway, for example, 1.2 times of the saturated headway may be determined as the time threshold.
  • the number of target vehicles is determined to be M.
  • the number of target vehicles can represent the number of target vehicles belonging to the same fleet from the time when the green light signal is turned on to the time when the red light signal is turned on, and the vehicles in the same fleet are the head time between vehicle i and the previous vehicle i-1. Vehicles whose distance is less than the time threshold.
  • the third time differences between the M vehicles and the previous vehicle can be determined, wherein the third time differences from the first vehicle to the Nth consecutive vehicles are all less than the time threshold, and the N+th vehicle If the third time difference of one vehicle is greater than or equal to the time threshold, it is determined that the number of target vehicles is N, where N is less than M.
  • the congestion state of the traffic intersection can be determined. For example, a number threshold can be set, and when the determined number of target vehicles is less than the number threshold and the number of target vehicles is not zero, it is determined that the traffic intersection is congested; when the determined number of target vehicles is greater than or equal to the set number threshold, it is determined that the traffic intersection is unblocked.
  • the number of target vehicles is 0, the third time difference representing any two adjacent vehicles is greater than or equal to the time threshold, then the distance between the two adjacent vehicles is longer, there are fewer vehicles on this road section, and the traffic intersection is relatively smooth.
  • the congestion parameter information including the utilization rate of the green light, the space occupancy rate of the preset area, the filling time of the preset area and the number of target vehicles
  • the utilization rate of the green light is greater than the first parameter threshold, the preset area
  • the maximum queuing time is determined based on the number of target vehicles and the cycle time indicated by the traffic signal information at the intersection; Based on the maximum queuing time, the congestion state of the traffic intersection is determined.
  • the space occupancy rate of the preset area is greater than the second parameter threshold, and the filling time of the preset area is less than the third parameter threshold, based on the number of target vehicles and the traffic intersection Determine the maximum queuing time according to the cycle duration indicated by the traffic signal information; determine the congestion state of the traffic intersection based on the maximum queuing time.
  • the congestion parameter information includes the preset area filling time t roi_fill , the space occupancy rate Space use of the preset area, and the green light utilization rate Green use
  • the first parameter threshold K 1 corresponding to the green light utilization rate can be set
  • the second parameter threshold K 2 corresponding to the space occupancy rate of the preset area can be set
  • the third parameter threshold K 3 corresponding to the filling time of the preset area when Green use >K 1 , Space use >K 2 , and t roi_fill ⁇ K At 3 o'clock, determine the maximum queuing time, and determine the congestion state of the traffic intersection based on the maximum queuing time.
  • the third parameter threshold is related to the target number N m , and the target number may be the maximum number of vehicles that can be parked in the preset area.
  • the third parameter threshold K 3 may be determined according to the following formula (5):
  • K 3 a 1 ⁇ N m ⁇ headway saturation +T s ; (5)
  • a 1 is a set first amplification factor, for example, a 1 may be 1.2, and headway saturation is a saturated headway; T s is a safety threshold, for example, T s may be 3 seconds.
  • the maximum queuing time T queue can be determined according to formula (6):
  • T queue C+a 2 ⁇ headway saturation ⁇ Num queue ; (6)
  • headway saturation is the saturated headway
  • Num queue is the number of target vehicles whose third time difference is continuously smaller than the time threshold
  • a 2 is the second amplification factor set, for example, a 2 can be 1.2
  • C is the traffic signal corresponding to cycle time.
  • the congestion state of the traffic intersection can be determined based on the maximum queuing time and the queuing time range corresponding to each congestion level included in the congestion state. For example, if the congestion status of a traffic intersection includes smooth, mild congestion, moderate congestion, and severe congestion, the queuing time range corresponding to smooth traffic is [0, 40 seconds); the queuing time range corresponding to mild congestion is [40 seconds, 75 seconds seconds); the range of queuing time corresponding to moderate congestion is [75 seconds, 105 seconds), and the range of queuing time corresponding to severe congestion is more than 105 seconds, including 105 seconds; then when the determined maximum queuing time is 50 seconds, determine the traffic The congestion state at the intersection is mild congestion; if the determined maximum queuing time is 120 seconds, then it is determined that the congestion state at the traffic intersection is severe congestion.
  • the congestion state of the traffic intersection can be determined more accurately. For example, when the maximum queuing time is large, the traffic intersection is relatively congested.
  • determining the congestion state of the traffic intersection may include: determining the maximum queuing index representing the congestion state based on the maximum queuing time and the cycle duration indicated by the traffic signal information; , to determine the traffic congestion level of the traffic intersection.
  • the maximum queuing index QTI max can be determined according to the following formula (7):
  • C is the cycle time corresponding to the traffic signal light
  • T queue is the maximum queuing time
  • the traffic congestion level of the traffic intersection may be determined based on the maximum queuing index and the queuing index range corresponding to each traffic congestion level included in the congestion state. For example, if the traffic congestion level at a traffic intersection includes congestion level IV (smooth congestion), congestion level III (mild congestion), congestion level II (moderate congestion), and congestion level I (severe congestion), the queuing index corresponding to congestion level IV The range is [0, 0.8); the range of queuing index corresponding to congestion level III is [0.8, 1.5); the range of queuing index corresponding to congestion level II is [1.5, 2.1), and the range of queuing index corresponding to congestion level I is above 2.1. Including 2.1. For example, if the determined maximum queuing index is 2, it is determined that the congestion state of the traffic intersection is moderate congestion, and the traffic congestion level is congestion level II.
  • the maximum queuing index can be determined, and different maximum queuing indexes correspond to different traffic congestion levels. Through the maximum queuing index, the traffic congestion level of the traffic intersection can be determined more accurately.
  • the method further includes: based on the congestion state of the traffic intersection, generating early warning information matching the congestion state, and/or generating a relief strategy matching the congestion state.
  • the early warning information may be text information, voice information, image information, color information, etc.
  • different congestion states may correspond to different early warning information. For example, if the traffic congestion at the intersection is severe, the generated warning message can be "Attention, serious congestion occurs on xx section".
  • the diversion strategy can be flexibly set according to the congestion state.
  • the generated congestion strategy may include controlling the evacuation personnel to evacuate the vehicles on the spot, or controlling other vehicles to avoid driving on the congested road section.
  • a congestion reminder can be sent to vehicles on the congested road section.
  • early warning information matching the congestion state can be generated, and/or, a diversion strategy matching the congestion state can be generated, so as to use the early warning information to give early warning to other vehicles, or to use
  • the generated dredging strategy is used to dredge the congested road sections to ensure the traffic efficiency of the traffic road.
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • the embodiment of the present disclosure also provides a traffic intersection detection device, as shown in FIG. A determination module 503 and a second determination module 504 .
  • the acquisition module 501 is configured to acquire video frame sequences of traffic intersections.
  • the detection module 502 is configured to perform vehicle detection on the video frames in the video frame sequence to obtain vehicle detection information.
  • the first determining module 503 is configured to determine traffic signal information of the traffic intersection based on the vehicle detection information.
  • the second determining module 504 is configured to determine the congestion state of the traffic intersection based on the traffic signal information of the traffic intersection and the vehicle detection information.
  • the detection module 502 is further configured to: detect each video frame in the sequence of video frames, and obtain the detection frame information of the detection object in the video frame and Category information of the detection object; based on the category information of the detection object, filter out the detection frame information of the vehicle from the detection frame information of the detection object; wherein, the detection frame information includes identification information for distinguishing different vehicles , the identification information of the same vehicle in different video frames of the sequence of video frames is the same.
  • the first determining module 503 is further configured to: determine a parking reference line in a video frame in the video frame sequence; based on the parking reference line, the vehicle detection information, and each According to the acquisition time corresponding to each of the video frames, determine the cycle duration and the red light signal duration corresponding to the traffic lights at the traffic intersection; determine the green light signal based on the cycle duration and the red light signal duration of the traffic lights at the traffic intersection. duration.
  • the first determination module 503 is further configured to: determine a plurality of key vehicles based on the parking reference line, the vehicle detection information, and the acquisition time corresponding to each video frame The time of passing through the parking reference line respectively; any one of the plurality of key vehicles is the first vehicle passing the parking reference line on the target lane when the green light at the traffic intersection is turned on each time; based on the Determine the cycle duration corresponding to the traffic signal lights at the traffic intersection by determining the time when the plurality of key vehicles respectively pass the parking reference line.
  • the first determining module 503 is further configured to: determine that two key vehicles with adjacent green lights pass the first stop reference line when the traffic signal light at the intersection turns green. A time difference to obtain a plurality of first time differences; clustering the plurality of first time differences to obtain at least one first set after clustering; based on the at least one first time difference after clustering The first time difference in the set determines the cycle duration corresponding to the traffic signal light at the traffic intersection.
  • the first determination module 503 is further configured to: obtain a first silhouette coefficient of the cluster; wherein the first silhouette coefficient is used to characterize the credibility of the clustering result; In response to the first silhouette coefficient being greater than a first coefficient threshold, determining the largest first set containing the largest number of first time differences in the at least one first set; based on each of the largest first sets The first time difference is to determine the cycle duration corresponding to the traffic signal lights at the traffic intersection.
  • the first determination module 503 further includes: in response to the first contour coefficient being less than or equal to the first coefficient threshold, according to the plurality of key vehicles passing the parking reference line chronological order, delete the key vehicles of the first quantity; determine the time when the key vehicles of the second quantity pass through the parking reference line; delete the remaining key vehicles of the first quantity based on the plurality of key vehicles and pass the parking reference line and the time when the second number of key vehicles pass the parking reference line after the remaining key vehicles, determine the cycle duration corresponding to the traffic signal lights at the traffic intersection.
  • the first determination module 503 is further configured to: determine a plurality of key vehicles based on the parking reference line, the vehicle detection information, and the acquisition time corresponding to each video frame The parking moment and starting moment of each key vehicle in the above; any one of the multiple key vehicles is the first vehicle on the target lane that passes through the parking reference line when the green light at the traffic intersection is turned on each time, so The parking moment is the moment when the key vehicle stops at the parking reference line position, and the starting moment is the moment when the key vehicle starts at the parking reference line position; for each of the plurality of key vehicles , based on the parking moment and the starting moment of the key vehicle, determine the second time difference corresponding to the key vehicle, so as to obtain a plurality of second time differences for the plurality of key vehicles; clustering to obtain at least one second set after clustering; based on the second time difference in the at least one second set after clustering, determine the duration of the red light signal at the traffic intersection.
  • the device further includes a third determining module 505, configured to determine the key vehicle according to the following steps: for each vehicle in the vehicle detection information, based on the parking reference line, the Based on the vehicle detection information and the acquisition time of each video frame in the video frame sequence, determine the target moment when the vehicle passes the parking reference line; The vehicle passes through the target moment of the parking reference line, determining the line-crossing time difference between the vehicle and the previous vehicle; and determining the first intersection of the vehicle's detection frame in the target moment video frame and the previous video frame ratio, wherein the previous video frame is a video frame with a preset time interval from the target time; in response to the time difference between crossing the line being greater than a first threshold and the first cross-over-combination ratio greater than a second threshold, it is determined that the The vehicle is the key vehicle.
  • a third determining module 505 configured to determine the key vehicle according to the following steps: for each vehicle in the vehicle detection information, based on the parking reference line, the Based on the vehicle detection information and the acquisition time of each video
  • the second determining module 504 is further configured to: determine congestion parameter information corresponding to the traffic intersection based on the traffic signal information and the vehicle detection information of the traffic intersection; wherein , the traffic signal information includes a green light signal and a red light signal, and the congestion parameter information includes at least one of the following: the utilization rate of the green light from the time when the green light signal is turned on to the time when the red light signal is turned on, the time when the green light signal ends The space occupancy rate of the preset area within the preset time from the beginning, the filling time of the preset area from the end time of the green light signal to the end time of the red light signal, or the time elapsed from the time when the green light signal is turned on to the time when the red light signal is turned on The set target vehicle number of the parking reference line; based on the congestion parameter information corresponding to the traffic intersection, determine the congestion state of the traffic intersection.
  • the second determination module 504 is further configured to: based on the traffic signal information of the traffic intersection and the Vehicle detection information, determining the third number of vehicles passing the parking reference line between the time when the green light signal is turned on and the time when the red light signal is turned on; The time length between the time when the light signal is turned on is used to determine the utilization rate of the green light, wherein the saturated headway is used to characterize the shortest time difference for adjacent vehicles to pass the parking reference line.
  • the second determination module 504 is further configured to: extract the A sequence of partial video frames within a preset duration from the end of the green light signal; for each video frame in the sequence of partial video frames, determine the number of vehicles in the video frame that are located in a preset area to determine the partial video frame The average number of vehicles contained in the preset area in the sequence; based on the average number and the maximum number of vehicles that can be accommodated in the preset area, the space occupancy rate of the preset area is determined.
  • the second determining module 504 is further configured to: based on the video frame sequence, Between time and the end of the red light signal, the shortest time period for the number of vehicles contained in the preset area corresponding to the traffic intersection reaches the target number; the shortest time length is determined as the filling time of the preset area.
  • the second determination module 504 is further configured to: for each vehicle included in the preset area corresponding to the traffic intersection , determine the time when the vehicle passes the parking reference line; determine the third time difference between the time when the vehicle passes the parking reference line and the time when the previous vehicle of the vehicle passes the parking reference line, based on the determined multiple third The time difference is to determine the number of target vehicles whose multiple third time differences are continuously smaller than the set time threshold.
  • the The second determination module 504 is further configured to: when at least one of the following conditions is met: the utilization rate of the green light is greater than a first parameter threshold, the space occupancy rate of the preset area is greater than a second parameter threshold, and the preset Set the area filling duration to be less than the third parameter threshold, determine the maximum queuing time based on the fourth quantity and the cycle duration indicated by the traffic signal information of the traffic intersection; determine the maximum queuing time based on the maximum queuing time of the traffic intersection Congested state.
  • the second determining module 504 is further configured to: determine a maximum queuing index representing the congestion state based on the maximum queuing time and the cycle duration indicated by the traffic signal information; The maximum queuing index is used to determine the traffic congestion level of the traffic intersection.
  • the device further includes: a generation module 506, configured to: generate warning information matching the congestion state based on the congestion state of the traffic intersection, and/or generate The grooming strategy for congestion state matching is described.
  • a generation module 506 configured to: generate warning information matching the congestion state based on the congestion state of the traffic intersection, and/or generate The grooming strategy for congestion state matching is described.
  • the functions of the device provided by the embodiments of the present disclosure or the included templates can be used to execute the methods described in the above method embodiments, and its specific implementation can refer to the description of the above method embodiments. For brevity, here No longer.
  • an embodiment of the present disclosure also provides an electronic device.
  • FIG. 6 it is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure, including a processor 601 , a memory 602 , and a bus 603 .
  • the memory 602 is used to store execution instructions, including a memory 6021 and an external memory 6022; the memory 6021 here is also called an internal memory, and is used to temporarily store calculation data in the processor 601 and exchange data with an external memory 6022 such as a hard disk.
  • the processor 601 exchanges data with the external memory 6022 through the memory 6021.
  • the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 executes the following instructions: acquire the video frame sequence of the traffic intersection Carrying out vehicle detection on the video frames in the video frame sequence to obtain vehicle detection information; based on the vehicle detection information, determining traffic signal information at the traffic intersection; based on the traffic signal information at the traffic intersection and the vehicle Detect information to determine the congestion state of the traffic intersection.
  • an embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for detecting a traffic intersection described in the above-mentioned method embodiment is executed. step.
  • the storage medium may be a volatile or non-volatile computer-readable storage medium.
  • the embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the traffic intersection detection method described in the above method embodiment, for details, please refer to the above The method embodiment will not be repeated here.
  • the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK
  • the working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
  • the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

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

Abstract

本公开提供了一种交通路口检测方法、装置、电子设备及存储介质,该方法包括:获取交通路口的视频帧序列;对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;基于所述车辆检测信息,确定所述交通路口的交通信号信息;基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。

Description

交通路口检测方法、装置、电子设备及存储介质
相关申请交叉引用
本申请主张申请号为202110844382.6、申请日为2021年7月26日的中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像处理技术领域,具体而言,涉及一种交通路口检测方法、装置、电子设备及存储介质。
背景技术
随着我国综合实力和国民收入水平的不断提高,机动车保有量迅速增加,由于城市道路资源有限,且机动车保有量的迅速增加,导致城市道路拥堵不断加剧,交通效率下降,给人们的生活和工作造成了巨大的影响。
因此提出一种对交通路口进行检测的方法尤为重要。
发明内容
第一方面,本公开提供了一种交通路口检测方法,包括:获取交通路口的视频帧序列;对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;基于所述车辆检测信息,确定所述交通路口的交通信号信息;基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
第二方面,本公开提供了一种交通路口检测装置,包括:获取模块,用于获取交通路口的视频帧序列;检测模块,用于对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;第一确定模块,用于基于所述车辆检测信息,确定所述交通路口的交通信号信息;第二确定模块,用于基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
第三方面,本公开提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如上述第一方面或任一实施方式所述的交通路口检测方法的步骤。
第四方面,本公开提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如上述第一方面或任一实施方式所述的交通路口检测方法。
第五方面,本公开提供一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机程序指令被处理器执行时实现如上述第一方面或任一实施方式所述的交通路口检测方法。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举一些实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开实施例所提供的一种交通路口检测方法的流程示意图;
图2示出了本公开实施例所提供的基于车辆检测信息确定交通路口的交通信号信息的方法的流程示意图;
图3示出了本公开实施例所提供的包括停车基准线的交通路口的示意图;
图4示出了本公开实施例所提供的视频帧的示意图;
图5示出了本公开实施例所提供的一种交通路口检测装置的架构示意图;
图6示出了本公开实施例所提供的一种电子设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的一些实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
经研究,可以在道路的交叉口各个进口道上安装线圈(例如用于检测车辆经过的地感线圈),获取交叉口流量和车流饱和度等信息,并基于交叉口流量和车流饱和度等信息,确定车均延误等指标,进而判断交通道路是否拥堵。但是通过安装线圈的方式对交通道路进行检测的方式存在以下几个问题:第一,会对路面造成一定的破坏;第二,会导致安装成本和运维成本较高;第三,线圈的安装位置有限,降低了道路检测的效率。
还可以通过浮动车技术估计最大排队时间等指标,并根据最大排队时间等指标,判断交通道路是否拥堵,但是该方法容易受样本抽样率的影响,使得道路检测的精度和鲁棒性较差。为了解决上述问题,本公开实施例提供了一种交通路口检测方法、装置、电子设备以及存储介质。
针对以上方案所存在的缺陷,均是发明人在经过实践并仔细研究后得出的结果,因此,上述问题的发现过程以及下文中本公开针对上述问题所提出的解决方案,都应该是发明人在本公开过程中对本公开做出的贡献。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
为便于对本公开实施例进行理解,首先对本公开实施例所公开的一种交通路口检测方法进行详细介绍。本公开实施例所提供的交通路口检测方法的执行主体一般为具有一定计算能力的计算机设备,该计算机设备例如包括:终端设备或服务器或其它处理设备,终端设备可以包括用户设备(User Equipment,UE)、移动设备、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该交通路口检测方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
参见图1所示,为本公开实施例所提供的交通路口检测方法的流程示意图,该方法包括S101-S104。
S101,获取交通路口的视频帧序列。
S102,对视频帧序列中的视频帧进行车辆检测,得到车辆检测信息。
S103,基于车辆检测信息,确定交通路口的交通信号信息。
S104,基于交通路口的交通信号信息和车辆检测信息,确定交通路口的拥堵状态。
上述方法中,通过对获取的视频帧序列进行车辆检测,确定车辆检测信息,并基于车辆检测信息,实时地确定交通路口的交通信号信息,无需人工获取交通信号信息,提高了交通信号信息的确定效率。进而,可以基于交通路口的交通信号信息和车辆检测信息,确定交通路口的拥堵状态,实现了交通路口拥堵状态的自动确定,拥堵状态的确定效率较高。同时,由于视频帧序列中包含有较准确的车辆信息,故使用视频帧序列,可以较准确的确定交通路口的拥堵状态。
下述针对S101-S104进行说明。
针对S101和S102,可以通过交通路口设置的摄像头采集交通路口对应的道路视频,并从采集的道路视频中获取多帧连续的视频图像(视频帧),作为视频帧序列。比如, 可以每间隔一秒从道路视频中采集一帧视频图像,得到视频帧序列。可以对视频序列中的视频帧进行车辆检测,得到车辆检测信息。
一种可选实施方式中,在S102中,对视频帧序列中的视频帧进行车辆检测,得到车辆检测信息,包括:针对视频帧序列中的各个视频帧,对该视频帧进行检测(例如,跟踪检测),得到该视频帧中的检测对象的检测框信息以及检测对象的类别信息;基于检测对象的类别信息,从检测对象的检测框信息中,筛选出车辆的检测框信息;其中,检测框信息包括用于区分不同车辆的标识信息,同一车辆在视频帧序列的不同视频帧中的标识信息相同。该车辆检测信息中包括车辆的检测框信息。
由于检测框信息包含用于区分不同车辆的标识信息,同一车辆在视频帧序列的不同视频帧中的标识信息相同,实现了对同一车辆的追踪,为后续基于车辆检测信息,确定交通信号信息提供了数据支持。以及使用检测对象的类别信息,从检测对象的检测框信息中,筛选出车辆的检测框信息,避免除车辆之外的其他类型的检测对象的检测框信息对交通信号信息产生干扰,从而可以提高确定交通信号信息的准确性。
在一些实施例中,可以将视频帧序列中的各个视频帧输入至训练后的第一神经网络中,对各个视频帧进行检测,确定每个视频帧中包括的检测对象的检测框信息,并将不同视频帧中对应同一检测对象的检测框进行关联(比如,可以为不同视频帧中的对应同一检测对象设置相同的标识信息)。其中,检测框信息中可以包括检测对象对应的检测框的位置信息、尺寸信息、置信度、标识信息等,比如,检测框信息可以包括检测框的中心点的位置信息、和检测框的尺寸、检测框的四个顶点的位置信息等。
示例性的,可以基于快速卷积神经网络Faster RCNN对视频帧序列中的各个视频帧进行检测。比如可以先使用深度卷积网络,对各个视频帧进行特征提取,并基于特征提取得到的特征数据,通过区域提取层Region Proposal Layer提取候选目标区域;再基于得到的候选目标区域,对特征进行感兴趣区域池化ROI Pooling,进行类别分类和坐标回归,得到检测对象的置信度和检测框的位置信息。最后通过极大值抑制算法,将交并比大于阈值的检测框进行合并,得到视频帧中的检测对象的检测框信息。
可以使用训练后的第二神经网络,对视频帧序列中的每个视频帧进行检测,确定视频帧中的检测对象的类别信息。其中,类别信息可以根据需要进行设置,比如,类别信息可以包括机动车、非机动车、行人、动物等;或者,类别信息也可以包括非机动车、行人、小汽车、面包车、小卡车、大卡车、SUV、巴士等。
示例性的,可以将每个视频帧分别输入至第二神经网络中,利用第二神经网络中包括的骨干网络(比如,该骨干网络可以为resnet18)对视频帧进行提取特征,可以基于特征提取后得到的特征数据,使用两层全连接full-connection网络预测该视频帧中包括的检测对象的类别信息。
在得到视频帧中的检测对象的检测框信息以及检测对象的类别信息之后,可以基于检测对象的类别信息,从检测对象的检测框信息中,筛选出车辆的检测框信息,将除车辆之外的其他检测对象的检测框信息删除,得到视频帧序列中包括的车辆检测信息。比如,可以将类别信息为非机动车的检测框信息、行人的检测框信息、其他检测框信息删除。
其中,筛选后车辆的检测框信息中可以包括用于区分不同车辆的标识信息,且同一车辆在视频帧序列的不同视频帧中的标识信息相同。通过设置标识信息以实现对不同车辆进行区分,实现了对同一车辆的追踪。
其中,标识信息可以为文字信息、颜色信息等,比如,可以为同一车辆设置一个身份标识号(Identity document,ID),不同车辆对应不同的ID,或者,还可以将同一车辆的检测框的颜色设置为同一颜色,不同车辆对应的检测框的颜色不同。
针对S103:交通信号灯包括红灯、黄灯、绿灯,交通信号信息可以包括交通信号灯对应的周期时长C、绿灯信号时长T green、红灯信号时长T red和黄灯信号时长T yellow。 其中,周期时长等于绿灯信号时长、红灯信号时长和黄灯信号时长的时长之和。其中,交通路口的黄灯信号时长可以根据交通规定进行确定,比如,交通路口的黄灯信号时长可以为3秒。
在一种可选实施方式中,参见图2,在S103中,基于车辆检测信息,确定交通路口的交通信号信息,包括步骤S201-步骤S203。
S201,在视频帧序列的频帧中确定停车基准线。
S202,基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的交通信号灯对应的周期时长和红灯信号时长。
S203,基于交通路口的交通信号灯的周期时长和红灯信号时长,确定绿灯信号时长。
这里,处理器可以根据车辆检测信息、停车基准线的位置信息、和视频帧的采集时间,确定交通信号灯的周期时长和红灯信号时长,以及可以确定绿灯信号时长,实现交通信号信息的自动确定,与使用人工确定交通信号信息的方式相比,提高了交通信号信息的确定效率。
在S201中,用户可以在视频帧中进行划线操作,得到视频帧中的停车基准线,响应于用户触发的划线操作,在视频帧中确定停车基准线;或者,可以使用检测算法对视频帧进行检测,在视频帧中确定停车基准线。
由于交通路口设置的摄像头的安装位置和安装角度一般不会发生改变,故停车基准线在各个视频帧中的位置信息不会发生改变,因此可以基于视频帧序列的任一视频帧,在该视频帧中确定停车基准线。
图3示出了包括停车基准线的交通路口的示意图。该图3中包括斑马线32,以及位于斑马线前的停车基准线31。
在S202中,可以基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的交通信号灯对应的周期时长C、和红灯信号时长T red。在S203中,可以使用周期时长C减去红灯信号时长T red,将得到的差值减去黄灯信号时长T yellow,得到绿灯信号时长T green
首先对基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的交通信号灯对应的周期时长的过程进行说明。
一种可选实施方式中,在S202中,基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的交通信号灯对应的周期时长,包括步骤A1和步骤A2。
步骤A1,基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定多个关键车辆分别经过停车基准线的时间;其中,所述多个关键车辆中任一为在交通路口的绿灯每次开启时,第一个经过目标车道上的停车基准线的车辆。
步骤A2,基于所述多个关键车辆分别经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长。
上述方法中,可以确定多个关键车辆分别经过停车基准线的时间,所述多个关键车辆中的任一为在交通路口的绿灯每次开启时,第一个经过停车基准线的车辆;通过基于所述多个关键车辆分别经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长,为后续确定交通路口的拥堵状态提供数据支持。
在步骤A1中,可以先确定视频帧序列中包括的多个关键车辆,再基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定所述多个关键车辆分别经过停车基准线的时间。其中,关键车辆为在交通路口的绿灯开启时,第一个经过停车基准线的车辆;在交通路口对应的车道数为多个时,关键车辆可以为在交通路口的绿灯开启时,目标车道上第一个经过停车基准线的车辆。该目标车道可以为选择的交通路口上的任一车道。或者,也可以分别将每个车道分别作为目标车道,确定各个目标车道上的关键车 辆。
一种可选实施方式中,可以根据以下步骤B1至步骤B4确定关键车辆。
步骤B1、基于停车基准线、车辆检测信息、以及多个视频帧的采集时间,确定每一车辆经过停车基准线的目标时刻。
步骤B2、针对所述车辆检测信息中的每个车辆,基于该车辆对应的所述目标时刻、和该车辆之前的前一车辆经过所述停车基准线的目标时刻,确定该车辆与前一车辆的过线时刻差。
步骤B3、确定该车辆在所述目标时刻视频帧和前一视频帧中的检测框的第一交并比,其中,所述前一视频帧为与所述目标时刻间隔预设时长的视频帧;
步骤B4、响应于过线时刻差大于第一阈值、且第一交并比大于第二阈值,确定该车辆为关键车辆。
在步骤B1中,可以根据停车基准线、车辆检测信息、以及多个视频帧的采集时间,确定每一车辆经过停车基准线的目标时刻。例如,车辆检测信息包括的车辆检测框信息可以呈现在每个视频帧中,当检测到车辆检测框与停车基准线有交集的视频帧,将该视频帧所对应的采集时间确定为该车辆经过停车基准线的时刻。当同一辆车辆的检测框与停车基准线有交集的视频帧的数量大于1时,将最后与停车基准线有交集的视频帧对应的采集时间确定为该车辆经过停车基准线的目标时刻。
在步骤B2中,针对每个车辆,可以确定在该车辆之前经过停车基准线的前一车辆。在车道数为多个时,可以确定与该车辆处于同一车道内、最近一次经过停车基准线的前一车辆对应的目标时刻。可以基于该车辆经过停车基准线的目标时刻、和与该车辆对应的前一车辆经过停车基准线的目标时刻,确定该车辆与前一车辆的过线时刻差。根据公式(1)确定该车辆对应的过线时刻差:
Figure PCTCN2022086272-appb-000001
其中,
Figure PCTCN2022086272-appb-000002
为处于车道n(目标车道)上的车辆i的过线时刻差,即车辆i的车头时距;
Figure PCTCN2022086272-appb-000003
为车道n上的车辆i经过停车基准线的目标时刻;
Figure PCTCN2022086272-appb-000004
为车道n上的前一车辆i-1经过停车基准线的目标时刻。
在步骤B3中,可以确定相隔预设时长的、包含有相同车辆的两帧视频帧,即相隔预设时长(例如1秒)的第一视频帧和第二视频帧;其中,第一视频帧可以为目标时刻视频帧,第二视频帧可以为目标时刻之前的、与目标时刻间隔预设时长的视频帧。基于第一视频帧和第二视频帧中车辆检测信息指示的车辆i的检测框信息,确定车辆i的检测框的第一交并比(Intersection over Union,IOU)。可以根据公式(2)确定第一交并比:
Figure PCTCN2022086272-appb-000005
其中,
Figure PCTCN2022086272-appb-000006
为车辆i对应的在t时刻的第一交并比,
Figure PCTCN2022086272-appb-000007
为车辆i在t-1时刻时对应的检测框的面积,
Figure PCTCN2022086272-appb-000008
为车辆i在t时刻时对应的检测框的面积。其中,t时刻与t-1时刻之间间隔了预设时长,此处预设时长为1秒。在一些实施例中,可以根据车辆i在t-1时刻采集到的视频帧中的检测框信息,确定
Figure PCTCN2022086272-appb-000009
以及根据车辆i在t时刻采集到的视频帧中的检测框信息,确定
Figure PCTCN2022086272-appb-000010
图4示出了视频帧的示意图;图4中包括第一视频帧中车辆对应的第一检测框41、和第二视频帧中车辆对应的第二检测框42,根据公式(2)可以确定第一检测框41和第二检测框42的面积交集和面积并集的比值。
在步骤B4中,在过线时刻差大于第一阈值,且第一交并比大于第二阈值时,确定当前车辆属于关键车辆;在过线时刻差小于或等于第一阈值,或者第一交并比小于或等于第二阈值时,确定当前车辆不属于关键车辆。其中,第一阈值的设置与红灯信号时长相关,比如,该第一阈值可以为小于红灯信号时长的任一值。在一些实施例中,第一阈值和第二阈值可以根据实际需要进行设置,比如,第一阈值可以为30秒,第二阈值可 以为0.5。
在现实场景中,在过线时刻差较大时存在两种情况:第一种情况,在第一车辆经过停车基准线之后,第二车辆遇到了红灯,无法短时间段通过停车基准线,造成的第一车辆和第二车辆之间的过线时刻差较大;第二种情况,第一车辆与第二车辆之间的行车距离较远,使得第一车辆与第二车辆之间的过线时刻差较大;故为了筛掉第二种情况、较准确的确定关键车辆,可以判断车辆对应的第一交并比。在过线时刻差大于第一阈值时,若第一交并比较大,则确定车辆的移动较为缓慢,该车辆可能对应于第一种情况,即该车辆为关键车辆;在第一交并比较小时,则确定车辆的移动较为快速,则该车辆可能对应于第二种情况,此时该车辆不是关键车辆。
在车辆i为关键车辆时,可以将t-1时刻确定为车辆i的停车时刻t_stop i;以及当检测到关键车辆i对应的第一交并比由大于第二阈值,变为小于或等于第二阈值时,即当
Figure PCTCN2022086272-appb-000011
时,说明关键车辆从停车基准线处启动,可以将t′时刻确定为关键车辆i的启动时刻t_start i;进而可以得到各个关键车辆对应的停车时刻和启动时刻。其中,交通信号信息中还可以包括绿灯启亮时刻,可以将多个关键车辆中的任一关键车辆对应的启动时刻,确定为绿灯启亮时刻T green_begin
本公开实施方式中,关键车辆为绿灯开启时,第一个经过停车基准线的车辆,可知该关键车辆存在以下特征:关键车辆与前一车辆经过停车基准线的时刻相差会较大,以及关键车辆在间隔预设时长的两个视频帧中的第一交并比会较大。因此,在过线时刻差大于第一阈值、且第一交并比大于第二阈值时,可以较准确的确定关键车辆。采集的交通路口的视频帧序列中可能不包括交通信号灯的图像,但通过执行步骤B1至B4可以确定出关键车辆,并根据关键车辆的启动时刻进一步推断出绿灯启亮时刻。
在步骤A2中,可以基于多个关键车辆分别经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长。比如,可以将同一车道上的多个关键车辆按照经过停车基准线的时间从早到晚进行排序,针对同一车道上的关键车辆,在关键车辆的数量为两个时,可以计算第一关键车辆与第二关键车辆分别经过停车基准线的时间之间的第一时刻差,将各个车道分别对应的第一时刻差的平均值,确定为交通路口的交通信号灯对应的周期时长C。
在另一实施例中,针对同一车道上的关键车辆,在关键车辆的数量大于两个时,可以计算第一关键车辆与第二关键车辆分别经过停车基准线的时间之间的第一时刻差,以及计算第二关键车辆与第三关键车辆分别经过停车基准线的时间之间的第一时刻差,以此类推,将得到的多个第一时刻差求平均,即得到了该车道对应的第一时刻差平均值;并将各个车道分别对应的第一时刻差平均值再求平均得到的平均值确定为交通路口的交通信号灯对应的周期时长。比如,在第一车道上的关键车辆的数量为n时,则可以得到n-1个第一时刻差,将n-1个第一时刻差求平均,得到第一车道对应的第一时刻差平均值,类似地,第二车道上的关键车辆的数量为m时,则可以得到m-1个第一时刻差,将m-1个第一时刻差求平均,得到第二车道对应的第一时刻差平均值,将第一车道的第一时刻差平均值和第二车道的第一时刻差平均值求平均得到交通路口的交通信号灯对应的周期时长。在存在直行车道与左转车道的情况下,也可以分别计算各个车道分别对应的交通信号灯的周期时长。
一种可选实施方式中,在步骤A2中,基于多个关键车辆分别经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长,包括步骤C1至步骤C3。
步骤C1,在所述交通路口的交通信号灯每次开启绿灯时,确定相邻次绿灯的两个关键车辆经过停车基准线的第一时刻差,以获得多个第一时刻差。
步骤C2,对所述多个第一时刻差进行聚类,得到聚类后的至少一个第一集合。
步骤C3,基于聚类后的所述至少一个第一集合中的第一时刻差,确定交通路口的交通信号灯对应的周期时长。
上述方法中,由于多个相邻次绿灯的每两个关键车辆经过停车基准线的第一时刻差可能存在误差,为了提高确定周期时长的准确率,可以对确定的多个第一时刻差进行聚类,得到聚类后的至少一个第一集合,基于聚类后的所述至少一个第一集合中的第一时刻差,确定交通路口的交通信号灯对应的周期时长。在本实施方式中,以包含的第一时刻差的数量最多的第一集合中的各第一时刻差,确定交通路口的交通信号灯对应的周期时长。
在步骤C1中,针对同一车道,可以基于多个关键车辆分别经过停车基准线的时间,将多个关键车辆从早到晚排序。比如,第一关键车辆经过停车基准线的时间为10:10:10,第二关键车辆经过停车基准线的时间为10:10:30,第三关键车辆经过停车基准线的时间为10:10:52,则关键车辆的排序为第一关键车辆、第二关键车辆、第三关键车辆,并将第一关键车辆和第二关键车辆确定为相邻次绿灯开启时对应的两个关键车辆;将第二关键车辆和第三关键车辆确定为相邻次绿灯开启时对应的两个关键车辆。可以计算第一关键车辆和第二关键车辆之间的第一时刻差,和第二关键车辆与第三关键车辆之间的第一时刻差。
在步骤C2中,可以对步骤C1中得到的多个第一时刻差进行聚类,得到聚类后的至少一个第一集合,每个第一集合中包括至少一个第一时刻差。其中,对第一时刻进行聚类的聚类算法可以为任一密度聚类算法,比如,可以使用密度聚类法DBSCAN,对多个第一时刻差进行聚类。
在步骤C3中,可以从至少一个第一集合中,确定包含的第一时刻差的数量最大的第一集合;并基于包含的第一时刻差的数量最大的第一集合中的各个第一时刻差,确定交通路口的交通信号灯对应的周期时长。比如,可以将包含的第一时刻差的数量最大的第一集合中的各个第一时刻差求平均,将得到的平均值确定为交通路口的交通信号灯对应的周期时长。
一种可选实施方式中,在步骤C3中,基于聚类后的至少一个第一集合中的第一时刻差,确定交通路口的交通信号灯对应的周期时长,包括步骤D1-D3。
步骤D1,获取所述聚类的第一轮廓系数;其中,第一轮廓系数用于表征聚类结果的可信程度。
步骤D2,响应于第一轮廓系数大于第一系数阈值,在所述至少一个第一集合中确定包含第一时刻差的数量最多的最大第一集合;基于最大第一集合中的各第一时刻差,确定交通路口的交通信号灯对应的周期时长。
步骤D3,响应于第一轮廓系数小于或等于第一系数阈值,按照多个关键车辆经过停车基准线的时间顺序,删除第一数量的关键车辆;确定第二数量的关键车辆经过停车基准线的时间;基于多个关键车辆中删除第一数量的剩余关键车辆经过停车基准线的时间,以及在剩余关键车辆之后、第二数量的关键车辆经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长。
这里,可以获取所述聚类的第一轮廓系数,在第一轮廓系数大于第一系数阈值时,执行步骤D2;在第一轮廓系数小于或等于第一系数阈值时,执行步骤D3。其中,第一轮廓系数可以为聚类算法输出的判断聚类效果好坏的指标,在第一轮廓系数较大时,则所述聚类的聚类效果较好,即本次聚类结果的可信程度较高;反之,在第一轮廓系数较小时,则本次聚类的聚类效果较差,即本次聚类结果的可信程度较低。
在步骤D2中,在第一轮廓系数大于第一系数阈值时,可以在所述至少一个第一集合中确定包含第一时刻差的数量最多的最大第一集合,将最大第一集合中的各第一时刻差求平均、并将平均值取整,将取整后的平均值,确定为交通路口的交通信号灯对应的周期时长。
在步骤D3中,第一数量小于多个关键车辆的数量,第一数量和第二数量的值可以相同也可以不同。其中,第一数量和第二数量的值可以根据需要进行设置;或者,也可 以基于多个关键车辆的数量和设置的比值,确定第一数量和第二数量,比如,第一数量可以为多个关键车辆的数量的三分之一;第二数量可以为多个关键车辆的数量的二分之一。
示例性的,若多个关键车辆的数量为20个,第一数量为10个,第二数量为15个,在第一轮廓系数小于或等于第一系数阈值时,可以按照多个关键车辆经过停车基准线的从早到晚的时间顺序,从20个关键车辆中删除10个关键车辆;再确定第二数量的关键车辆经过停车基准线的时间;并基于多个关键车辆中删除第一数量的剩余关键车辆经过停车基准线的时间,以及在所述剩余关键车辆之后、15个新的关键车辆经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长。即基于25个关键车辆经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长。
在一些实施例中,基于25个关键车辆经过停车基准线的时间,确定交通路口的交通信号灯对应的周期时长的过程,可以参考步骤C1至步骤C3,此处不再进行详细说明。
考虑到第一轮廓系数可以用于表征聚类结果的可信程度,在第一轮廓系数大于第一系数阈值时,表征本次聚类结果的可信程度较高,故可以基于包含的第一时刻差的数量最多的最大第一集合中的各第一时刻差,较准确地确定交通路口的交通信号灯对应的周期时长。
而在第一轮廓系数小于或等于第一系数阈值时,表征本次聚类结果的可信程度较低,故需要再确定第二数量的关键车辆经过停车基准线的时间。基于多个关键车辆中删除第一数量的剩余关键车辆经过停车基准线的时间,以及在所述剩余关键车辆之后、第二数量的关键车辆经过停车基准线的时间,能够较准确的确定交通路口的交通信号灯对应的周期时长。
以下对基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的红灯信号时长的过程进行说明。
一种可选实施方式中,在S202中,基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定交通路口的红灯信号时长,包括步骤E1至步骤E4。
步骤E1,基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定关键车辆的停车时刻和启动时刻;关键车辆为在交通路口的绿灯开启时,第一个经过停车基准线的车辆,停车时刻为关键车辆停止在停车基准线位置处的时刻,启动时刻为关键车辆在停车基准线位置处启动的时刻。
步骤E2,针对所述多个关键车辆中的每个,基于该关键车辆的停车时刻和启动时刻,确定该关键车辆对应的第二时刻差,以获得针对所述多个关键车辆的多个第二时刻差。
步骤E3,对所述多个第二时刻差进行聚类,得到聚类后的至少一个第二集合。
步骤E4,基于聚类后的第二集合中的第二时刻差,确定交通路口的红灯信号时长。
为了较准确的确定交通路口的红灯信号时长,可以对确定的多个第二时刻差进行聚类,得到聚类后的至少一个第二集合;基于聚类后的第二集合中的各第二时刻差,确定交通路口的红灯信号时长。
可以基于停车基准线、车辆检测信息、以及每个视频帧对应的采集时间,确定视频帧序列中包括的关键车辆、以及每个关键车辆对应的停车时刻t_stop i和启动时刻t_start i。停车时刻为关键车辆停止在停车基准线位置处的时刻,启动时刻为关键车辆在停车基准线位置处启动的时刻。其中,关键车辆、以及关键车辆对应的停车时刻t_stop i和启动时刻t_start i的确定过程可以参考针对步骤B1至步骤B4的描述。
在关键车辆为一个时,可以将计算得到的该关键车辆的启动时刻t_start i与停车时刻t_stop i之间的第二时刻差,确定为交通路口的红灯信号时长。
在关键车辆为多个时,可以计算每个关键车辆的启动时刻t_start i与停车时刻t_stop i之间的第二时刻差,将各个关键车辆对应的启动时刻t_start i与停车时刻t_stop i之间的第 二时刻差求平均,将得到的第二时刻差平均值确定为交通路口的红灯信号时长。
还可以计算多个关键车辆中每个关键车辆的启动时刻与停车时刻之间的第二时刻差。使用聚类算法对多个第二时刻差进行聚类,得到聚类后的至少一个第二集合,每个第二集合中包括至少一个第二时刻差。其中,对第二时刻进行聚类的聚类算法可以为任一密度聚类算法,比如,可以为密度聚类法DBSCAN。
可以从聚类后得到的多个第二集合中,随机选择一个第二集合,确定选择的第二集合中的各个第二时刻差的平均值,将该平均值确定为交通路口的红灯信号时长。
在一些实施例中,可以从至少一个第二集合中,确定包含的第二时刻差的数量最大的第二集合;并基于包含的第二时刻差的数量最大的第二集合中的各个第二时刻差,确定交通路口的红灯信号时长。比如,可以将包含的第二时刻差的数量最大的第二集合中的各个第二时刻差求平均,将得到的各个第二时刻差对应的平均值确定为交通路口的红灯信号时长。
示例性的,还可以包括步骤Ea1至步骤Ea3。步骤Ea1:获取针对第二时刻差的、所述聚类的第二轮廓系数;其中,第二轮廓系数用于表征聚类结果的可信程度;步骤Ea2,响应于第二轮廓系数大于第二系数阈值,基于包含的第二时刻差的数量最多的第二集合中的各第二时刻差,确定交通路口的红灯信号时长。
步骤Ea3,响应于第二轮廓系数小于或等于第二系数阈值,按照多个关键车辆经过停车基准线的从早到晚的时间顺序,从多个关键车辆中删除第四数量的关键车辆,并确定第五数量的关键车辆对应的停车时刻和启动时刻;基于多个关键车辆中删除第四数量的剩余关键车辆、以及在所述剩余关键车辆之后、第五数量的关键车辆中,每个关键车辆对应的停车时刻和启动时刻,确定交通路口的交通信号灯对应的红灯信号时长。
上述步骤Ea1、步骤Ea2、步骤Ea3的实施过程,可以参考步骤D1-D3的过程,此处不再进行具体说明。
针对S104:交通路口的拥堵状态可以包括畅通、轻度拥堵、中度拥堵、严重拥堵等;或者,交通路口的拥堵状态可以包括畅通、第一级拥堵、第二级拥堵、第三级拥堵等。拥堵状态可以根据需要进行设置。
一种可选实施方式中,在S104中,基于交通路口的交通信号信息和车辆检测信息,确定交通路口的拥堵状态,可以包括S1041至S1042。
S1041,基于交通路口的交通信号信息和车辆检测信息,确定交通路口对应的拥堵参数信息;其中,所述交通信号信息包括绿灯信号和红灯信号,拥堵参数信息包括以下中的至少一种:从绿灯信号开启时刻至红灯信号开启时刻之间的绿灯利用率、从绿灯信号结束时刻起的预设时长内的预设区域的空间占有率、从绿灯信号结束时刻至红灯信号结束时刻之间的预设区域填充时长、或者从绿灯信号开启时刻至红灯信号开启时刻之间经过停车基准线的目标车辆数量。
S1042,基于交通路口对应的拥堵参数信息,确定交通路口的拥堵状态。
通过设置至少一种拥堵参数信息,可以较灵活、较准确的确定交通路口的拥堵状态。
一种可选实施方式中,在拥堵参数信息包括绿灯利用率的情况下,在S1041中,基于交通路口的交通信号信息和车辆检测信息,确定交通路口对应的拥堵参数信息,可以包括步骤F1和步骤F2。
步骤F1,基于交通路口的交通信号信息和车辆检测信息,确定从绿灯信号开启时刻至红灯信号开启时刻之间,经过停车基准线的车辆的第三数量。
步骤F2、基于所述第三数量、饱和车头时距、以及从绿灯信号开启时刻至红灯信号开启时刻之间的时长,确定绿灯利用率,其中,饱和车头时距用于表征相邻车辆经过停车基准线的最短时间差。
示例性的,可以基于交通路口的交通信号信息和车辆检测信息,确定从绿灯信号 开启时刻(即绿灯启亮时刻)至红灯信号开启时刻之间,经过停车基准线的车辆的第三数量。例如,可以确定[T green_begin,T green_begin+T green+T yellow]之间,经过停车基准线的车辆的第三数量。其中,T green_begin为绿灯信号开启时刻,T green_begin+T green+T yellow为红灯信号开启时刻。比如,若绿灯信号开启时刻T green_begin为12:00:00,周期时长C为53秒,红灯信号时长T red为20秒,绿灯信号时长T green为30秒,黄灯信号时长T yellow为3秒,则红灯信号开启时刻12:00:33,则可以确定12:00:00至12:00:33之间,经过停车基准线的车辆的第三数量。
可以根据下述公式(3),确定绿灯利用率Green use
Figure PCTCN2022086272-appb-000012
其中,Num green为从绿灯信号开启时刻至红灯信号开启时刻之间经过停车基准线的车辆的第三数量;headway saturation为饱和车头时距,其中,饱和车头时距的值可以根据多个车辆经过停车基准线的时间差确定得到。比如,在一次连续的绿灯信号时间内,稳定行驶的连续车流的饱和车头时距可以为2秒;T green_end-T green_begin的值为绿灯信号时长加黄灯信号时长的和。
进而,可以基于绿灯利用率,确定交通路口的拥堵状态。比如,可以设置利用率阈值,响应于绿灯利用率大于利用率阈值,确定交通路口拥堵;响应于绿灯利用率小于或等于利用率阈值,确定交通路口畅通。
这里,可以利用从绿灯信号开启时刻至红灯信号开启时刻之间经过停车基准线的车辆的第三数量,确定绿灯利用率。比如,绿灯利用率可以为绿灯开启后通过交通路口的车辆数量与能够通过的最大车辆数量之间的比值,这为后续确定交通路口的拥堵状态提供数据支持。
一种可选实施方式中,响应于拥堵参数信息包括预设区域的空间占有率,在S1041中,基于交通路口的交通信号信息和车辆检测信息,确定交通路口对应的拥堵参数信息,可以包括步骤G1至步骤G3。
步骤G1、从视频帧序列中,提取位于绿灯信号结束时刻起的预设时长内的部分视频帧序列。
步骤G2、针对部分视频帧序列中的各视频帧,确定该视频帧中位于预设区域内的车辆的数量以确定所述部分视频帧序列中所述预设区域中包含的车辆的平均数量。
步骤G3、基于平均数量和预设区域对应的最大可容纳车辆数量,确定预设区域的空间占有率。
预设时长可以根据需要进行设置。比如,预设时长可以为3秒,则可以从视频帧序列中,提取位于绿灯信号结束时刻起的预设时长内的部分视频帧序列;例如确定[T green_begin+T green,T green_begin+T green+3]之间的部分视频帧序列。比如,若绿灯信号结束时刻为12:00:30,预设时长可以为3秒,则可以从视频帧序列中,提取采集时间位于12:00:30-12:00:33之间的部分视频帧序列。
确定部分视频帧序列中各视频帧中位于预设区域内的车辆的数量。将部分视频帧序列中各个视频帧中,位于预设区域内的车辆的数量求平均,得到了各视频帧的预设区域中包含的车辆的平均数量。其中,预设区域可以为停车基准线之前的一段距离内(例如30米)的道路区域。
其中,预设区域可以为设置的任一感兴趣区域(region of interest,ROI)。比如,响应于区域确定操作,在视频帧中可以确定预设区域基于预设区域的位置信息,可以确定部分视频帧序列中各视频帧中位于预设区域内的车辆的数量。
可以根据下述公式(4)确定预设区域的空间占有率Space use
Figure PCTCN2022086272-appb-000013
其中,
Figure PCTCN2022086272-appb-000014
为确定的部分视频帧序列的预设区域中包含的车辆的平均数量;ROI max为 预设区域对应的最大可容纳车辆数量;ROI max可以根据确定的预设区域进行确定。例如,绿灯信号结束时刻为12:00:30,预设时长为3秒,则可以从视频帧序列中,提取采集时间位于12:00:30-12:00:33之间的部分视频帧序列,预设区域为停车基准线之前的30米内的道路区域,在3秒内的部分视频帧序列中包括3帧视频帧,第一视频帧的预设区域中包含1辆车辆,第二视频帧的预设区域中包含3辆车辆,第三视频帧的预设区域中包含5辆车辆,则部分视频帧序列中预设区域中包含的车辆的平均数量
Figure PCTCN2022086272-appb-000015
为3,该预设区域中对应的最大可容纳车辆数量ROI max为8,则预设区域的空间占有率Space use为37.5%。
进而,可以基于预设区域的空间占有率,确定交通路口的拥堵状态。比如,可以设置占有率阈值,响应于预设区域的空间占有率大于占有率阈值,确定交通路口拥堵;响应于预设区域的空间占有率小于或等于占有率阈值,确定交通路口畅通。
通过确定的预设区域的空间占有率,为后续确定交通路口的拥堵状态提供数据支持。
一种可选实施方式中,响应于拥堵参数信息包括预设区域填充时长,基于交通路口的交通信号信息和车辆检测信息,确定交通路口对应的拥堵参数信息,包括步骤H1至步骤H2。
步骤H1、基于视频帧序列,确定从绿灯信号结束时刻至红灯信号结束时刻之间,交通路口对应的预设区域内包含的车辆数量达到目标数量的最短时长。
步骤H2、将所述最短时长,确定为预设区域填充时长。
这里,绿灯信号结束时刻(T green_begin+T green)至红灯信号结束时刻(T green_begin+T green+T yellow+T red),可以为[T green_begin+T green,T green_begin+T green+T yellow+T red]。即可以基于视频帧序列,确定绿灯信号结束时刻至红灯信号结束时刻之间,交通路口的预设区域内包含的车辆数量达到目标数量的最短时长。其中,目标数量可以根据需要进行设置,比如,目标数量可以为预设区域对应的最大可停放车辆数量。
示例性的,在绿灯信号结束时刻之后红灯信号结束时刻之前,可以确定交通路口的预设区域内包含的车辆数量达到目标数量的填充时刻,将该填充时刻与绿灯信号结束时刻相减,得到最短时长,换言之,预设区域填充时长t roi_fill
若在绿灯信号结束时刻至红灯信号结束时刻之间,交通路口的预设区域内包含的车辆数量一直未达到目标数量,则可以将红灯信号时长T red,确定为预设区域填充时长。
进而,可以基于预设区域填充时长,确定交通路口的拥堵状态。比如,可以设置填充时长阈值,响应于预设区域填充时长小于填充时长阈值,确定交通路口拥堵;响应于预设区域填充时长大于或等于填充时长阈值,确定交通路口畅通。
通过确定的预设区域填充时长,为后续确定交通路口的拥堵状态提供数据支持。
一种可选实施方式中,响应于拥堵参数信息包括目标车辆数量,基于交通路口的交通信号信息和车辆检测信息,确定交通路口对应的拥堵参数信息,包括步骤J1至步骤J2。
步骤J1,针对交通路口对应的预设区域内包含的每个车辆,确定该车辆经过停车基准线的时刻;
步骤J2,确定该车辆经过停车基准线的时刻与该车辆的前一车辆经过停车基准线的时刻之间的第三时刻差,基于确定的多个第三时刻差,确定多个第三时刻差连续小于时刻阈值的目标车辆数量。
针对交通路口对应的预设区域内包含的每个车辆,确定该车辆经过停车基准线的时刻;并确定该车辆经过停车基准线的时刻与该车辆的前一车辆经过停车基准线的时刻之间的第三时刻差,该第三时刻差为当前车辆与前一车辆之间的车头时距,进而基于各个第三时刻差,确定第三时刻差连续小于时刻阈值的目标车辆数量Num queue。其中,时刻阈值与饱和车头时距相关,比如,可以将饱和车头时距的1.2倍,确定为时刻阈值。
比如,若连续M个车辆分别与前一车辆之间的第三时刻差均小于时刻阈值,则确定目标车辆数量为M。其中,该目标车辆数量可以表征从绿灯信号开启时刻至红灯信号开启时刻之间,属于同一车队的目标车辆数,同一车队内的车辆为车辆i与前一车辆i-1之间的车头时距小于时刻阈值的车辆。在另一实施例中,可以确定M个车辆分别与前一车辆之间的第三时刻差,其中第一个车辆至连续的第N个车辆的第三时刻差均小于时刻阈值,第N+1个车辆的第三时刻差大于或等于时刻阈值,则确定目标车辆数量为N,其中,N小于M。
进而,可以基于目标车辆数量,确定交通路口的拥堵状态。比如,可以设置数量阈值,在确定的目标车辆数量小于数量阈值、且目标车辆数量不为零时,确定交通路口拥堵;在确定的目标车辆数量大于或等于设置的数量阈值,确定交通路口畅通。在目标车辆数量为0时,表征任意相邻两车辆的第三时刻差大于或等于时刻阈值,则相邻两车辆之间的距离较远,该路段上车辆较少,交通路口较为通畅。
通过确定目标车辆数量,为后续确定交通路口的拥堵状态提供数据支持。
一种可选实施方式中,响应于拥堵参数信息包括绿灯利用率、预设区域的空间占有率、预设区域填充时长和目标车辆数量,可以在满足:绿灯利用率大于第一参数阈值、预设区域的空间占有率大于第二参数阈值、预设区域填充时长小于第三参数阈值中的至少一个条件时,基于目标车辆数量和交通路口的交通信号信息指示的周期时长,确定最大排队时间;基于最大排队时间,确定交通路口的拥堵状态。
在一些实施例中,可以在绿灯利用率大于第一参数阈值、预设区域的空间占有率大于第二参数阈值、以及预设区域填充时长小于第三参数阈值时,基于目标车辆数量和交通路口的交通信号信息指示的周期时长,确定最大排队时间;基于最大排队时间,确定交通路口的拥堵状态。
在一些实施例中,在拥堵参数信息包括预设区域填充时长t roi_fill、预设区域的空间占有率Space use、和绿灯利用率Green use时,可以设置绿灯利用率对应的第一参数阈值K 1,预设区域的空间占有率对应的第二参数阈值K 2,以及预设区域填充时长对应的第三参数阈值K 3,在Green use>K 1、Space use>K 2、且t roi_fill<K 3时,确定最大排队时间,并基于最大排队时间,确定交通路口的拥堵状态。
在Green use<K 1、Space use<K 2、t roi_fill>K 3时,无需确定最大排队时间,或者可以确定交通路口畅通。
其中,第三参数阈值与目标数量N m相关,目标数量可以为预设区域对应的最大可停放车辆数量。比如,可以根据下述公式(5)确定第三参数阈值K 3
K 3=a 1×N m×headway saturation+T s;    (5)
其中,a 1为设置的第一放大系数,比如a 1可以为1.2,headway saturation为饱和车头时距;T s为安全阈值,比如,该T s可以为3秒。
可以根据公式(6)确定最大排队时间T queue
T queue=C+a 2×headway saturation×Num queue;    (6)
其中,headway saturation为饱和车头时距;Num queue为第三时刻差连续小于时刻阈值的目标车辆数量;其中,a 2为设置的第二放大系数,比如a 2可以为1.2,C为交通信号灯对应的周期时长。
进而可以基于最大排队时间、以及拥堵状态中包括的每个拥堵等级对应的排队时间范围,确定交通路口的拥堵状态。比如,若交通路口的拥堵状态包括畅通、轻度拥堵、中度拥堵、严重拥堵,畅通对应的排队时间范围为[0,40秒);轻度拥堵对应的排队时间范围为[40秒,75秒);中度拥堵对应的排队时间范围为[75秒,105秒),严重拥堵对应的排队时间范围为105秒以上,包括105秒;则在确定的最大排队时间为50秒时,确定交通路口的拥堵状态为轻度拥堵;若在确定的最大排队时间为120秒时,则确定交通路口的拥堵状态为严重拥堵。
通过确定最大排队时间,能够较准确地确定交通路口的拥堵状态。比如最大排队时间较大时,交通路口较为拥堵。
一种可选实施方式中,基于最大排队时间,确定交通路口的拥堵状态,可以包括:基于最大排队时间,以及交通信号信息指示的周期时长,确定表征拥堵状态的最大排队指数;基于最大排队指数,确定交通路口的交通拥堵等级。
可以根据下述公式(7)确定最大排队指数QTI max
Figure PCTCN2022086272-appb-000016
其中,C为交通信号灯对应的周期时长,T queue为最大排队时间。
可以基于最大排队指数以及拥堵状态中包括的每个交通拥堵等级对应的排队指数范围,确定交通路口的交通拥堵等级。比如,若交通路口的交通拥堵等级包括拥堵等级Ⅳ(畅通)、拥堵等级Ⅲ(轻度拥堵)、拥堵等级Ⅱ(中度拥堵)、拥堵等级Ⅰ(严重拥堵),拥堵等级Ⅳ对应的排队指数范围为[0,0.8);拥堵等级Ⅲ对应的排队指数范围为[0.8,1.5);拥堵等级Ⅱ对应的排队指数范围为[1.5,2.1),拥堵等级Ⅰ对应的排队指数范围为2.1以上,包括2.1。比如,若确定的最大排队指数为2,确定交通路口的拥堵状态为中度拥堵,交通拥堵等级为拥堵等级Ⅱ。
这里,可以确定最大排队指数,不同的最大排队指数对应不同的交通拥堵等级,通过该最大排队指数,能够较准确的确定交通路口的交通拥堵等级。
一种可选实施方式中,该方法还包括:基于交通路口的拥堵状态,生成与拥堵状态匹配的预警信息,和/或生成与拥堵状态匹配的疏导策略。
其中,预警信息可以为文字信息、语音信息、图像信息、颜色信息等,不同的拥堵状态可以对应不同的预警信息。比如,若交通路口的拥堵状态为严重拥堵时,生成的预警信息可以“注意,xx路段发生严重拥堵”。
疏导策略可以根据拥堵状态进行灵活设置。比如,在拥堵状态为严重拥堵时,生成的拥堵策略可以包括控制疏导人员在现场对车辆进行疏导,或者,控制其他车辆避免行驶拥堵路段等。在拥堵状态为轻度拥堵时,可以为在拥堵路段上的车辆发送拥堵提示。
上述方法中,可以基于交通路口的所述拥堵状态,生成与拥堵状态匹配的预警信息,和/或,生成与拥堵状态匹配的疏导策略,以便使用预警信息对其他车辆进行预警,或者,以便使用生成的疏导策略,对拥堵路段进行疏导,保障交通道路的通行效率。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
基于相同的构思,本公开实施例还提供了一种交通路口检测装置,参见图5所示,为本公开实施例提供的交通路口检测装置的架构示意图,包括获取模块501、检测模块502、第一确定模块503、第二确定模块504。
获取模块501,用于获取交通路口的视频帧序列。
检测模块502,用于对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息。
第一确定模块503,用于基于所述车辆检测信息,确定所述交通路口的交通信号信息。
第二确定模块504,用于基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
一种可能的实施方式中,所述检测模块502,还用于:针对所述视频帧序列中的各个视频帧,对该视频帧进行检测,得到该视频帧中的检测对象的检测框信息以及检测对象的类别信息;基于所述检测对象的类别信息,从所述检测对象的检测框信息中,筛选出车辆的检测框信息;其中,所述检测框信息包括用于区分不同车辆的标识信息,同一车辆在所述视频帧序列的不同视频帧中的标识信息相同。
一种可能的实施方式中,所述第一确定模块503,还用于:在所述视频帧序列中视频帧中确定停车基准线;基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定所述交通路口的交通信号灯对应的周期时长和红灯信号时长;基于所述交通路口的交通信号灯的周期时长和所述红灯信号时长,确定绿灯信号时长。
一种可能的实施方式中,所述第一确定模块503,还用于:基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定多个关键车辆分别经过所述停车基准线的时间;所述多个关键车辆中的任一个为在所述交通路口的绿灯每次开启时,目标车道上第一个经过所述停车基准线的车辆;基于所述多个关键车辆分别经过所述停车基准线的时间,确定所述交通路口的交通信号灯对应的周期时长。
一种可能的实施方式中,所述第一确定模块503,还用于:在所述交通路口的交通信号灯每次开启绿灯时,确定相邻次绿灯的两个关键车辆经过停车基准线的第一时刻差,以获得多个第一时刻差;对所述多个所述第一时刻差进行聚类,得到聚类后的至少一个第一集合;基于聚类后的所述至少一个第一集合中的第一时刻差,确定所述交通路口的交通信号灯对应的周期时长。
一种可能的实施方式中,所述第一确定模块503,还用于:获取所述聚类的第一轮廓系数;其中,所述第一轮廓系数用于表征聚类结果的可信程度;响应于所述第一轮廓系数大于第一系数阈值,在所述至少一个第一集合中确定包含所述第一时刻差的数量最多的最大第一集合;基于所述最大第一集合中的各第一时刻差,确定所述交通路口的交通信号灯对应的周期时长。
一种可能的实施方式中,所述第一确定模块503,还包括:响应于所述第一轮廓系数小于或等于所述第一系数阈值,按照所述多个关键车辆经过所述停车基准线的时间顺序,删除第一数量的关键车辆;确定第二数量的关键车辆经过所述停车基准线的时间;基于所述多个关键车辆中删除第一数量的剩余关键车辆经过所述停车基准线的时间,以及在所述剩余关键车辆之后、所述第二数量的关键车辆经过所述停车基准线的时间,确定所述交通路口的交通信号灯对应的周期时长。
一种可能的实施方式中,所述第一确定模块503,还用于:基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定多个关键车辆中每个关键车辆的停车时刻和启动时刻;所述多个关键车辆中任一为在所述交通路口的绿灯每次开启时,目标车道上第一个经过所述停车基准线的车辆,所述停车时刻为该关键车辆停止在所述停车基准线位置处的时刻,所述启动时刻为该关键车辆在所述停车基准线位置处启动的时刻;针对所述多个关键车辆中的每个,基于该关键车辆的停车时刻和启动时刻,确定该关键车辆对应的第二时刻差,以获得针对所述多个关键车辆的多个第二时刻差;对所述多个第二时刻差进行聚类,得到聚类后的至少一个第二集合;基于聚类后的至少一个第二集合中的第二时刻差,确定所述交通路口的红灯信号时长。
一种可能的实施方式中,所述装置还包括第三确定模块505,用于根据以下步骤确定所述关键车辆:针对所述车辆检测信息中的每个车辆,基于所述停车基准线、所述车辆检测信息、以及所述视频帧序列中每个视频帧的采集时间,确定该车辆经过所述停车基准线的目标时刻;基于该车辆对应的所述目标时刻、和该车辆之前的前一车辆经过所述停车基准线的目标时刻,确定该车辆与该前一车辆的过线时刻差;以及确定该车辆在所述目标时刻视频帧和前一视频帧中的检测框的第一交并比,其中,前一视频帧为与所述目标时刻间隔预设时长的视频帧;响应于所述过线时刻差大于第一阈值、且所述第一交并比大于第二阈值,确定该车辆为关键车辆。
一种可能的实施方式中,所述第二确定模块504,还用于:基于所述交通路口的所述交通信号信息和所述车辆检测信息,确定所述交通路口对应的拥堵参数信息;其中,所述交通信号信息包括绿灯信号和红灯信号,所述拥堵参数信息包括以下中的至少一种:从绿灯信号开启时刻至红灯信号开启时刻之间的绿灯利用率、从绿灯信号结束时刻起的 预设时长内的预设区域的空间占有率、从绿灯信号结束时刻至红灯信号结束时刻之间的预设区域填充时长、或从绿灯信号开启时刻至红灯信号开启时刻之间经过设置的停车基准线的目标车辆数量;基于所述交通路口对应的所述拥堵参数信息,确定所述交通路口的拥堵状态。
一种可能的实施方式中,在所述拥堵参数信息包括所述绿灯利用率的情况下,所述第二确定模块504,还用于:基于所述交通路口的所述交通信号信息和所述车辆检测信息,确定从绿灯信号开启时刻至红灯信号开启时刻之间,经过停车基准线的车辆的第三数量;基于所述第三数量、饱和车头时距、以及从绿灯信号开启时刻至红灯信号开启时刻之间的时长,确定所述绿灯利用率,其中,所述饱和车头时距用于表征相邻车辆经过所述停车基准线的最短时间差。
一种可能的实施方式中,在所述拥堵参数信息包括所述预设区域的空间占有率的情况下,所述第二确定模块504,还用于:从所述视频帧序列中,提取位于绿灯信号结束时刻起的预设时长内的部分视频帧序列;针对所述部分视频帧序列中的各视频帧,确定该视频帧中位于预设区域内的车辆的数量以确定所述部分视频帧序列中所述预设区域中包含的所述车辆的平均数量;基于所述平均数量、和所述预设区域对应的最大可容纳车辆数量,确定所述预设区域的空间占有率。
一种可能的实施方式中,在所述拥堵参数信息包括所述预设区域填充时长的情况下,所述第二确定模块504,还用于:基于所述视频帧序列,确定从绿灯信号结束时刻至红灯信号结束时刻之间,所述交通路口对应的预设区域内包含的车辆数量达到目标数量的最短时长;将所述最短时长,确定为所述预设区域填充时长。
一种可能的实施方式中,在所述拥堵参数信息包括目标车辆数量的情况下,所述第二确定模块504,还用于:针对所述交通路口对应的预设区域内包含的每个车辆,确定该车辆经过停车基准线的时刻;确定该车辆经过停车基准线的时刻与该车辆的前一车辆经过所述停车基准线的时刻之间的第三时刻差,基于确定的多个第三时刻差,确定所述多个第三时刻差连续小于设置的时刻阈值的目标车辆数量。
一种可能的实施方式中,在所述拥堵参数信息包括所述绿灯利用率、所述预设区域的空间占有率、所述预设区域填充时长和所述目标车辆数量的情况下,所述第二确定模块504,还用于:在满足以下至少一条件的情况下:所述绿灯利用率大于第一参数阈值、所述预设区域的空间占有率大于第二参数阈值、以及所述预设区域填充时长小于第三参数阈值,基于所述第四数量和所述交通路口的所述交通信号信息指示的周期时长,确定最大排队时间;基于所述最大排队时间,确定所述交通路口的拥堵状态。
一种可能的实施方式中,所述第二确定模块504,还用于:基于所述最大排队时间以及所述交通信号信息指示的周期时长,确定表征所述拥堵状态的最大排队指数;基于所述最大排队指数,确定所述交通路口的交通拥堵等级。
一种可能的实施方式中,所述装置还包括:生成模块506,用于:基于所述交通路口的所述拥堵状态,生成与所述拥堵状态匹配的预警信息,和/或,生成与所述拥堵状态匹配的疏导策略。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模板可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
基于同一技术构思,本公开实施例还提供了一种电子设备。参照图6所示,为本公开实施例提供的电子设备的结构示意图,包括处理器601、存储器602、和总线603。其中,存储器602用于存储执行指令,包括内存6021和外部存储器6022;这里的内存6021也称内存储器,用于暂时存放处理器601中的运算数据,以及与硬盘等外部存储器6022交换的数据,处理器601通过内存6021与外部存储器6022进行数据交换,当电子设备600运行时,处理器601与存储器602之间通过总线603通信,使得处理器601在 执行以下指令:获取交通路口的视频帧序列;对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;基于所述车辆检测信息,确定所述交通路口的交通信号信息;基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
此外,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的交通路口检测方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的交通路口检测方法的步骤,具体可参见上述方法实施例,在此不再赘述。
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。

Claims (21)

  1. 一种交通路口检测方法,包括:
    获取交通路口的视频帧序列;
    对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;
    基于所述车辆检测信息,确定所述交通路口的交通信号信息;
    基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
  2. 根据权利要求1所述的方法,其中,对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息,包括:
    针对所述视频帧序列中的各个视频帧,
    对该视频帧进行检测,得到该视频帧中的检测对象的检测框信息以及所述检测对象的类别信息;
    基于所述检测对象的类别信息,从所述检测对象的检测框信息中,筛选出车辆的检测框信息;其中,所述检测框信息包括用于区分不同车辆的标识信息,同一车辆在所述视频帧序列的不同视频帧中的标识信息相同。
  3. 根据权利要求1或2所述的方法,其中,基于所述车辆检测信息,确定所述交通路口的交通信号信息,包括:
    在所述视频帧序列的视频帧中确定停车基准线;
    基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定所述交通路口的交通信号灯对应的周期时长和红灯信号时长;
    基于所述交通路口的交通信号灯的周期时长和所述红灯信号时长,确定绿灯信号时长。
  4. 根据权利要求3所述的方法,其中,确定所述交通路口的交通信号灯对应的周期时长,包括:
    基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定多个关键车辆分别经过所述停车基准线的时间;其中,所述多个关键车辆中的任一为在所述交通路口的绿灯每次开启时,目标车道上第一个经过所述停车基准线的车辆;
    基于所述多个关键车辆分别经过所述停车基准线的时间,确定所述交通路口的交通信号灯对应的周期时长。
  5. 根据权利要求4所述的方法,其中,确定所述交通路口的交通信号灯对应的周期时长,包括:
    在所述交通路口的交通信号灯每次开启绿灯时,确定相邻次绿灯的两个关键车辆经过所述停车基准线的第一时刻差,以获得多个第一时刻差;
    对所述多个第一时刻差进行聚类,得到聚类后的至少一个第一集合;
    基于聚类后的所述至少一个第一集合中的第一时刻差,确定所述交通路口的交通信号灯对应的周期时长。
  6. 根据权利要求5所述的方法,其中,基于聚类后的所述至少一个第一集合中的第一时刻差,确定所述交通路口的交通信号灯对应的周期时长,包括:
    获取所述聚类的第一轮廓系数;其中,所述第一轮廓系数用于表征聚类结果的可信程度;
    响应于所述第一轮廓系数大于第一系数阈值,在所述至少一个第一集合中确定包含所述第一时刻差的数量最多的最大第一集合;
    基于所述最大第一集合中的各第一时刻差,确定所述交通路口的交通信号灯对应的周期时长。
  7. 根据权利要求6所述的方法,还包括:
    响应于所述第一轮廓系数小于或等于所述第一系数阈值,按照所述多个关键车辆经 过所述停车基准线的时间顺序,删除第一数量的关键车辆,得到剩余关键测量;
    确定第二数量的关键车辆经过所述停车基准线的时间;
    基于所述剩余关键车辆经过所述停车基准线的时间,以及在所述剩余关键车辆之后、所述第二数量的关键车辆经过所述停车基准线的时间,确定所述交通路口的交通信号灯对应的周期时长。
  8. 根据权利要求3~7中任一项所述的方法,其中,确定所述交通路口的红灯信号时长,包括:
    基于所述停车基准线、所述车辆检测信息、以及每个所述视频帧对应的采集时间,确定多个关键车辆中每个关键车辆的停车时刻和启动时刻;所述多个关键车辆中任一为在所述交通路口的绿灯每次开启时,目标车道上第一个经过所述停车基准线的车辆,所述停车时刻为该关键车辆停止在所述停车基准线位置处的时刻,所述启动时刻为该关键车辆在所述停车基准线位置处启动的时刻;
    针对所述多个关键车辆中的每个,基于该关键车辆的所述停车时刻和所述启动时刻,确定该关键车辆对应的第二时刻差,以获得针对所述多个关键车辆的多个第二时刻差;
    对所述多个第二时刻差进行聚类,得到聚类后的至少一个第二集合;
    基于聚类后的至少一个第二集合中的第二时刻差,确定所述交通路口的红灯信号时长。
  9. 根据权利要求4~8中任一项所述的方法,其中,根据以下步骤确定所述多个关键车辆:
    针对所述车辆检测信息中的每个车辆,基于所述停车基准线、所述车辆检测信息、以及所述视频帧序列中每个视频帧的采集时间,确定该车辆经过所述停车基准线的目标时刻;
    基于该车辆对应的所述目标时刻、和该车辆之前的前一车辆经过所述停车基准线的目标时刻,确定该车辆与该前一车辆的过线时刻差;以及
    确定该车辆在所述目标时刻视频帧和前一视频帧中的检测框的第一交并比,其中,所述前一视频帧为与所述目标时刻间隔预设时长的视频帧;
    响应于所述过线时刻差大于第一阈值、且所述第一交并比大于第二阈值,确定该车辆为关键车辆。
  10. 根据权利要求1~9中任一项所述的方法,其中,确定所述交通路口的拥堵状态,包括:
    基于所述交通路口的所述交通信号信息和所述车辆检测信息,确定所述交通路口对应的拥堵参数信息;其中,所述交通信号信息包括绿灯信号和红灯信号,所述拥堵参数信息包括以下中的至少一种:
    从所述绿灯信号开启时刻至所述红灯信号开启时刻之间的绿灯利用率、
    从所述绿灯信号结束时刻起的预设时长内的预设区域的空间占有率、
    从所述绿灯信号结束时刻至所述红灯信号结束时刻之间的预设区域填充时长、或
    从所述绿灯信号开启时刻至所述红灯信号开启时刻之间经过所述停车基准线的目标车辆数量;
    基于所述交通路口对应的所述拥堵参数信息,确定所述交通路口的拥堵状态。
  11. 根据权利要求10所述的方法,其中,响应于所述拥堵参数信息包括所述绿灯利用率,确定所述交通路口对应的拥堵参数信息,包括:
    基于所述交通路口的所述交通信号信息和所述车辆检测信息,确定从所述绿灯信号开启时刻至所述红灯信号开启时刻之间,经过所述停车基准线的车辆的第三数量;
    基于所述第三数量、饱和车头时距、以及从所述绿灯信号开启时刻至所述红灯信号开启时刻之间的时长,确定所述绿灯利用率,其中,所述饱和车头时距用于表征相邻车 辆经过所述停车基准线的最短时间差。
  12. 根据权利要求10所述的方法,其中,响应于所述拥堵参数信息包括所述预设区域的空间占有率,确定所述交通路口对应的拥堵参数信息,包括:
    从所述视频帧序列中,提取位于所述绿灯信号结束时刻起的预设时长内的部分视频帧序列;
    针对所述部分视频帧序列中的各视频帧,确定该视频帧中位于预设区域内的车辆的数量以确定所述部分视频帧序列中所述预设区域中包含的所述车辆的平均数量;
    基于所述平均数量和所述预设区域对应的最大可容纳车辆数量,确定所述预设区域的空间占有率。
  13. 根据权利要求10所述的方法,其中,响应于所述拥堵参数信息包括所述预设区域填充时长,确定所述交通路口对应的拥堵参数信息,包括:
    基于所述视频帧序列,确定从所述绿灯信号结束时刻至所述红灯信号结束时刻之间,所述交通路口对应的预设区域内包含的车辆数量达到目标数量的最短时长;
    将所述最短时长,确定为所述预设区域填充时长。
  14. 根据权利要求10所述的方法,其中,响应于所述拥堵参数信息包括所述目标车辆数量,确定所述交通路口对应的拥堵参数信息,包括:
    针对所述交通路口对应的预设区域内包含的每个车辆,确定该车辆经过所述停车基准线的时刻;
    确定该车辆经过所述停车基准线的时刻与该车辆的前一车辆经过所述停车基准线的时刻之间的第三时刻差,基于确定的多个第三时刻差,确定所述多个第三时刻差连续小于时刻阈值的目标车辆数量。
  15. 根据权利要求10所述的方法,其中,响应于所述拥堵参数信息包括所述绿灯利用率、所述预设区域的空间占有率、所述预设区域填充时长和所述目标车辆数量,基于所述交通路口对应的所述拥堵参数信息,确定所述交通路口的拥堵状态,包括:
    在满足以下至少一个条件的情况下:
    所述绿灯利用率大于第一参数阈值,
    所述预设区域的空间占有率大于第二参数阈值,或
    所述预设区域填充时长小于第三参数阈值,
    基于所述目标车辆数量和所述交通路口的所述交通信号信息指示的周期时长,确定最大排队时间;
    基于所述最大排队时间,确定所述交通路口的拥堵状态。
  16. 根据权利要求15所述的方法,其中,基于所述最大排队时间,确定所述交通路口的拥堵状态,包括:
    基于所述最大排队时间以及所述交通信号信息指示的周期时长,确定表征所述拥堵状态的最大排队指数;
    基于所述最大排队指数,确定所述交通路口的交通拥堵等级。
  17. 根据权利要求1~16中任一项所述的方法,还包括以下至少一项:
    基于所述交通路口的所述拥堵状态,生成与所述拥堵状态匹配的预警信息,或
    生成与所述拥堵状态匹配的疏导策略。
  18. 一种交通路口检测装置,包括:
    获取模块,用于获取交通路口的视频帧序列;
    检测模块,用于对所述视频帧序列中的视频帧进行车辆检测,得到车辆检测信息;
    第一确定模块,用于基于所述车辆检测信息,确定所述交通路口的交通信号信息;
    第二确定模块,用于基于所述交通路口的交通信号信息和所述车辆检测信息,确定所述交通路口的拥堵状态。
  19. 一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器 可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如权利要求1至17任一所述的交通路口检测方法。
  20. 一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至17任一所述的交通路口检测方法。
  21. 一种计算机程序产品,包括存储于存储器中的计算机程序,所述计算机程序指令被处理器执行时实现如权利要求1-17中任意一项所述的交通路口检测方法。
PCT/CN2022/086272 2021-07-26 2022-04-12 交通路口检测方法、装置、电子设备及存储介质 Ceased WO2023005258A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110844382.6 2021-07-26
CN202110844382.6A CN113538916B (zh) 2021-07-26 2021-07-26 交通路口检测方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023005258A1 true WO2023005258A1 (zh) 2023-02-02

Family

ID=78089062

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/086272 Ceased WO2023005258A1 (zh) 2021-07-26 2022-04-12 交通路口检测方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN113538916B (zh)
WO (1) WO2023005258A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117475389A (zh) * 2023-12-27 2024-01-30 山东海润数聚科技有限公司 一种人行横道信号灯的控制方法、系统、设备和存储介质
CN117523874A (zh) * 2024-01-05 2024-02-06 每日互动股份有限公司 一种车辆通行状态的获取方法、装置、介质及电子设备
CN117542200A (zh) * 2023-11-16 2024-02-09 北京卓视智通科技有限责任公司 交通态势拥堵预测的方法、系统、计算机设备和存储介质
CN118571040A (zh) * 2024-08-02 2024-08-30 山东高速信息集团有限公司 一种匝道路口管理方法、系统及设备
CN118898906A (zh) * 2024-10-09 2024-11-05 浙江云通数达科技有限公司 一种获取车辆排队长度的方法、装置、设备及介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113538916B (zh) * 2021-07-26 2023-02-17 上海商汤科技开发有限公司 交通路口检测方法、装置、电子设备及存储介质
CN114419889A (zh) * 2022-01-24 2022-04-29 上海商汤智能科技有限公司 时段划分方法、装置、电子设备及存储介质
CN114999143B (zh) * 2022-03-17 2023-08-29 高德软件有限公司 红灯时长挖掘方法、电子设备及计算机程序产品
CN118155425A (zh) * 2024-05-11 2024-06-07 四川智能交通系统管理有限责任公司 一种基于聚类的实时交通拥堵预测方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714299A (zh) * 2009-11-05 2010-05-26 姜廷顺 利用视频事件检测对信号灯路口拥堵快速报警系统及方法
CN105513354A (zh) * 2015-12-22 2016-04-20 电子科技大学 基于视频的城市道路交通拥堵检测系统
CN105809993A (zh) * 2016-06-06 2016-07-27 北方工业大学 一种基于车辆停止线通过时间推算路口信号灯配时的方法
CN111243301A (zh) * 2020-01-15 2020-06-05 长沙理工大学 一种交通信号灯绿灯时长确定装置、方法及系统
CN113538916A (zh) * 2021-07-26 2021-10-22 上海商汤科技开发有限公司 交通路口检测方法、装置、电子设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707005B (zh) * 2009-11-05 2012-09-05 姜廷顺 利用视频检测对信号灯路口拥堵快速报警系统及运行方法
CN203366537U (zh) * 2013-05-18 2013-12-25 朱思益 减少拥堵车辆能耗的信号系统
US20210027619A1 (en) * 2018-03-29 2021-01-28 Nec Corporation Traffic monitoring apparatus, traffic monitoring system, traffic monitoring method, and non-transitory computer readable medium storing program
CN110598511A (zh) * 2018-06-13 2019-12-20 杭州海康威视数字技术股份有限公司 一种对闯绿灯事件检测方法、装置、电子设备及系统
CN111724588B (zh) * 2020-06-01 2022-08-02 青岛海信网络科技股份有限公司 交通信号控制方法和通信终端
CN112767681B (zh) * 2020-12-16 2022-08-19 济南博观智能科技有限公司 一种交通状态检测方法、装置及相关设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714299A (zh) * 2009-11-05 2010-05-26 姜廷顺 利用视频事件检测对信号灯路口拥堵快速报警系统及方法
CN105513354A (zh) * 2015-12-22 2016-04-20 电子科技大学 基于视频的城市道路交通拥堵检测系统
CN105809993A (zh) * 2016-06-06 2016-07-27 北方工业大学 一种基于车辆停止线通过时间推算路口信号灯配时的方法
CN111243301A (zh) * 2020-01-15 2020-06-05 长沙理工大学 一种交通信号灯绿灯时长确定装置、方法及系统
CN113538916A (zh) * 2021-07-26 2021-10-22 上海商汤科技开发有限公司 交通路口检测方法、装置、电子设备及存储介质

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117542200A (zh) * 2023-11-16 2024-02-09 北京卓视智通科技有限责任公司 交通态势拥堵预测的方法、系统、计算机设备和存储介质
CN117475389A (zh) * 2023-12-27 2024-01-30 山东海润数聚科技有限公司 一种人行横道信号灯的控制方法、系统、设备和存储介质
CN117475389B (zh) * 2023-12-27 2024-03-15 山东海润数聚科技有限公司 一种人行横道信号灯的控制方法、系统、设备和存储介质
CN117523874A (zh) * 2024-01-05 2024-02-06 每日互动股份有限公司 一种车辆通行状态的获取方法、装置、介质及电子设备
CN117523874B (zh) * 2024-01-05 2024-04-12 每日互动股份有限公司 一种车辆通行状态的获取方法、装置、介质及电子设备
CN118571040A (zh) * 2024-08-02 2024-08-30 山东高速信息集团有限公司 一种匝道路口管理方法、系统及设备
CN118898906A (zh) * 2024-10-09 2024-11-05 浙江云通数达科技有限公司 一种获取车辆排队长度的方法、装置、设备及介质

Also Published As

Publication number Publication date
CN113538916B (zh) 2023-02-17
CN113538916A (zh) 2021-10-22

Similar Documents

Publication Publication Date Title
CN113538916B (zh) 交通路口检测方法、装置、电子设备及存储介质
CN109191830B (zh) 一种基于视频图像处理的道路拥堵检测方法
CN101807345B (zh) 一种基于视频检测技术的交通拥堵判别方法
CN112289037B (zh) 基于复杂环境下高视角的机动车辆违规停车检测方法及系统
CN112861773B (zh) 一种基于多层次的泊位状态检测方法及系统
CN111930791A (zh) 一种车辆轨迹的相似度计算方法、系统及存储介质
CN111898491B (zh) 一种车辆逆向行驶的识别方法、装置及电子设备
CN107590999B (zh) 一种基于卡口数据的交通状态判别方法
CN111223289B (zh) 共享车辆违规停放事件抓拍方法及系统、存储介质
CN115601983B (zh) 交通信号灯的周期时长确定方法、装置、设备和存储介质
CN109661692B (zh) 交通事件预测方法、装置及终端设备
CN114898161A (zh) 摄像头脏污的检测方法、装置和电子设备
CN110070733B (zh) 一种车头时距建模方法及一种最小绿灯时间计算方法
KR102771505B1 (ko) 하이패스 차로의 적재 불량 단속 방법, 장치 및 시스템
CN104915644A (zh) 一种基于差别数据重建的车牌智能判别方法
CN107113400A (zh) 显示装置和具备该显示装置的交通违章管理系统
CN109493606B (zh) 一种高速公路上违停车辆的识别方法及系统
CN111368617A (zh) 车辆出入数据处理方法及装置
CN115294774A (zh) 基于深度学习的非机动车道路违停检测方法及装置
CN113160565B (zh) 一种套牌车辆的识别方法、装置、存储介质及终端
CN113111818A (zh) 一种车辆占道检测方法、装置、设备及存储介质
CN114743146A (zh) 车辆违停检测方法、系统及计算机存储介质
CN112562340B (zh) 交通状况确定方法、装置、电子设备及存储介质
KR102737788B1 (ko) 도로 내 방범 cctv의 영상 데이터 송수신 방법, 장치 및 시스템
CN118629231B (zh) 一种城市干线交叉口交通状态的判别方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22847877

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22847877

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/06/2024)

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/06/2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22847877

Country of ref document: EP

Kind code of ref document: A1