A traffic congestion monitoring method and system for an urban traffic intersection
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN URBAN TRANSPORT PLANNING CENT CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176650A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of traffic congestion detection technology, specifically relating to a method for monitoring traffic congestion at urban intersections. Background Technology
[0002] Urban traffic congestion detection is a crucial component of intelligent transportation systems. Accurate urban traffic congestion detection not only helps in the macro-control of urban traffic flow but also assists travelers in choosing and optimizing their routes. Therefore, urban traffic congestion detection is essential for ensuring the normal operation and efficiency of urban roads. Urban roads can be categorized into expressways, arterial roads, secondary arterial roads, and local roads. For congestion detection on these road sections, both domestically and internationally, mature monitoring methods are readily available. Currently, the most commonly used computer vision methods include the LK optical flow method to generate vehicle optical flow data, processing this data to generate vehicle foreground images, and then detecting the proportion of vehicles on the road to determine congestion levels. There are also congestion assessment systems based on deep learning algorithms that combine detection and tracking algorithms. For example, the YOLO-based detection algorithm can detect and identify vehicles, while the DeepSORT-based tracking algorithm can track vehicles on the road and extract structured information such as vehicle speed, direction, and headway to determine whether a congestion condition exists.
[0003] However, given the angles and conditions of roadside cameras at real intersections, the above methods are far from sufficient for detecting traffic congestion. The reasons are as follows: (1) The angle of the roadside camera has a limited range of capture for the road and the angles vary, while the above algorithms are mostly for the ideal situation of looking down directly above; (2) Current multi-target tracking algorithms such as DeepSORT rely on existing detectors such as YOLO and R-CNNs for target detection, and the detection error will further accumulate in the descriptor extraction and matching stage of the tracking model, ultimately leading to a large tracking error; (3) Traffic intersections are usually accompanied by changing traffic light cycles. Randomly occurring congestion signals and non-fixed-cycle traffic light signals are coupled together to form complex non-stationary random time-series signals. Conventional methods are difficult to distinguish between congestion and waiting states.
[0004] Therefore, it is necessary to propose a traffic congestion monitoring method for urban intersections with wide coverage and small monitoring errors. Summary of the Invention
[0005] In summary, this invention provides a traffic congestion monitoring method for urban intersections to address the problems of traditional video monitoring, such as the high dependence of camera shooting angle on tracking accuracy, large tracking errors in multi-target monitoring, and high false alarm and false negative rates in camera-based traffic congestion detection. This method aims to reduce the impact of algorithms on improving monitoring and tracking accuracy and to accurately determine congestion status.
[0006] The technical solution of this invention is as follows: A method for monitoring traffic congestion at urban intersections includes at least a video vehicle identification stage and a congestion state determination stage. The video vehicle identification stage includes at least detection area confirmation, video processing within the detection area, and target detection and tracking within the detection area. The congestion state determination stage includes at least time-frequency analysis of traffic condition characteristics and congestion determination model analysis. The specific steps of the method are as follows: S1, Detection area confirmation: Select a visual area from the video image obtained from the roadside camera as the detection area for detecting traffic congestion. S2, Video processing within the detection area: Convert the video of the detection area into a top-down view through perspective transformation and project it onto a new viewing plane; S3, Target detection and tracking within the detection area: Target detection and tracking are performed on the processed video to obtain vehicle information within the detection area and calculate the traffic condition features of the video. The traffic condition features include a vehicle count discrete time series and a vehicle speed discrete time series. The vehicle count discrete time series refers to the vehicle count in each frame of the video, and the vehicle speed discrete time series refers to the average speed of all passing vehicles in each frame of the video. S4, Time-frequency analysis of traffic condition characteristics: Perform discrete short-time Fourier transform on the traffic condition characteristics calculated in S3 to obtain the time-frequency diagram; S5, Congestion Judgment Model Analysis: Based on the time-frequency graph, perform logical judgment on the congestion status and output the congestion status.
[0007] Furthermore, the specific steps of S1 are as follows: Configure a detection area for the roadside camera, denoted as Its area is denoted as This serves as a detection area for detecting traffic congestion.
[0008] Furthermore, the section of road before the end of the road is designated as the detection area.
[0009] Furthermore, in S2, the specific steps of perspective transformation are as follows: The two-dimensional image plane coordinates of the video Convert to two-dimensional homogeneous coordinates The coordinate transformation formula is: =Ms Two-dimensional homogeneous coordinates in space Converted to two-dimensional homogeneous coordinates from a top-down perspective The coordinate transformation formula is as follows: =P / Z in , is the transformation matrix, and has 4 degrees of freedom; , is the coordinate point in the two-dimensional image plane coordinate system; The transformed two-dimensional homogeneous coordinates are, and In The coordinates are two-dimensional coordinates from a top-down perspective.
[0010] Furthermore, the specific steps of S3 are as follows: S301, training data is collected based on roadside cameras, the training data including at least vehicle categories, and the training data in the video is labeled, specifically including: For each video frame, label all vehicle categories, bounding boxes, and vehicle IDs; Calculate motion parameters based on the coordinates of the calibration boxes for the same vehicle ID in different video frames. ; Calculate the object category for each video frame based on the vehicle category. ; Calculate visibility based on whether the same vehicle ID is labeled in different video frames. ; Where R is the set of real numbers, , , and and represent the number of vehicle IDs, the number of bounding box movement parameters, the number of video frames, and the number of object categories, respectively; S302, Establish a joint detection-tracking model, specifically including: Input a video frame sequence, the video frame sequence being from time point... arrive common A video frame; FeatureNet, the feature extraction network, uses a feature processor with three-dimensional convolutional groups to extract features from video frame sequences. S303, Input the training data into the detection-tracking joint model, train the detection-tracking joint model, and complete the target optimization in the detection-tracking joint model; The objective is to minimize the following three losses, calculated using the following formulas: ; ; ; in, The moving loss is defined as the true value trajectory. and predicted trajectory The smoothing loss L1 is used, where Pos and Neg represent the positive and negative sample sets, respectively. The position information of the calibration box is obtained by capturing the position information of the moving trajectory, which is the x-coordinate of the center point of the calibration box. , center point ordinate y ,high ,width Where positive samples are samples from the target category, and negative samples are samples from non-target categories; N F It refers to the number of video frames; For classification loss, where As an indicator, used to match the first The first frame The anchor sequence (predicted value) and the first anchor sequence (predicted value) and the second anchor sequence (predicted value) Anchor sequence (truth value) Category (0 for background), For classification loss confidence; For visibility loss, where As an indicator, used to match the first The first frame The anchor sequence (predicted value) and the first anchor sequence (predicted value) and the second anchor sequence (predicted value) Anchor sequence (truth value) Visibility value, For visibility loss confidence; S304, Calculate the discrete time series of vehicle counts; S305, calculate the discrete time series of vehicle speed.
[0011] Furthermore, the method for calculating the discrete-time series of vehicle counts is as follows: For each video frame Count the total number of vehicles located within the detection area. Thus, the discrete time series of vehicle counts is obtained. ; The method for calculating the discrete-time series of vehicle speeds is as follows: For each video frame, calculate the instantaneous speed of each vehicle in that frame, using the following formula:
[0012] in, The actual displacement of the pixel calculated from the perspective transformation matrix. To track the coordinates of the midpoint of the bottom edge of the vehicle detection box in the algorithm, For video frame rate, For vehicle tracking ID, The time interval for calculating speed; The average speed of all vehicles within the detection area in this frame is calculated using the following formula: ; in, For the first The total number of vehicles located within the detection area in a given frame; Obtain vehicle speed discrete time series .
[0013] Furthermore, the formula for calculating the discrete short-time Fourier transform of S4 is as follows: ; in Represents the short-time Fourier transform function. It is a continuous window function; It is a discrete-time signal, including a discrete-time sequence of vehicle counts. Vehicle speed discrete time series , For discrete moments; Frequency domain coordinates; The imaginary unit; By summing the complex results obtained after performing short-time Fourier transforms on each time window of a discrete-time signal, the amplitude and phase of the frequency change for each time window can be obtained, ultimately yielding a time-frequency plot. Its horizontal axis represents time. The vertical axis represents frequency. , and These are the dimensions of the time vector and the frequency vector, respectively, and the magnitude of the values within the time-frequency plot represents the amplitude. The vehicle count discrete-time series and the vehicle speed discrete-time series are subjected to short-time Fourier transforms respectively to obtain the vehicle count time-frequency graph. Vehicle speed time-frequency graph .
[0014] Furthermore, the specific steps of S5 are as follows: S501, Calculate the variable traffic light cycle: Based on the time-frequency diagram, using time windows of 15 minutes as intervals, take the maximum amplitude within each time window. The cycle calculated from the corresponding frequency in the time-frequency diagram is the traffic light cycle within that time window, according to the video frames. The corresponding time window can then form a traffic light cycle sequence. ; S502, Calculate the traffic flow density anomaly threshold: Obtain the area of the detection region. Furthermore, based on the discrete time series of vehicle counts Calculate the road surface space occupancy rate The anomaly threshold is set to the upper quartile Q13, where Q13 equals the value of the sample. The 75th percentile number after all values in the array are arranged in ascending order; S503, Calculate the traffic flow speed anomaly threshold: Set the anomaly threshold as a discrete time series of vehicle speeds. The upper quartile Q23, Q23 equals the sample The 75th percentile number after all values in the list are arranged in descending order; S504, taking into account the traffic light cycle and the two abnormal thresholds mentioned above, makes a congestion status judgment based on the real-time traffic density and real-time traffic speed detected by the real-time video.
[0015] Furthermore, the congestion status determination includes two layers of judgment logic, as follows: Determine whether the real-time traffic density exceeds the abnormal traffic density threshold. If so, it means that the real-time traffic density has continuously exceeded the abnormal traffic density threshold for a traffic light cycle. Then, it is determined that the traffic flow may be slow and proceeds to the next step. Determine if the real-time average traffic speed is lower than the abnormal traffic speed threshold. If the average traffic speed in a single cycle is also lower than the abnormal traffic speed threshold, then the intersection is considered congested; otherwise, the traffic is considered to be slow.
[0016] The present invention also discloses a traffic congestion monitoring system for urban traffic intersections, wherein the system adopts the above-mentioned traffic congestion monitoring method.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention establishes a vehicle information extraction framework for video, accurately extracting traffic flow density and speed information at traffic intersections. For different traffic light cycles, vehicle count discrete time series, and vehicle speed discrete time series, a congestion state discrimination model based on short-time Fourier transform time-frequency graphs is established to accurately discriminate congestion states. Therefore, the technical solution of this invention has the technical effect of providing more real-time and accurate congestion judgment at traffic light intersections. Attached Figure Description
[0018] Figure 1 This is a flowchart of the traffic congestion monitoring method of the present invention; Figure 2 This is a network structure diagram of the detection-tracking joint model of the present invention; Figure 3 This is a flowchart illustrating the logic for determining congestion status in this invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] This invention discloses a traffic congestion monitoring method for urban intersections, which includes at least a video vehicle identification stage and a congestion state discrimination stage; wherein the video vehicle identification stage includes at least detection area confirmation, perspective transformation and target detection and tracking, and the congestion state discrimination stage includes at least discrete short-time Fourier transform and congestion discrimination model analysis.
[0021] The specific steps of the traffic congestion monitoring method at urban intersections according to the present invention are as follows: S1, Detection Area Confirmation: An image region selected from the video images acquired by the roadside camera is used as the detection area to detect traffic congestion status. Details are as follows: First, configure the detection area for the road test camera. This area is typically defined by a polygon in an image coordinate system. The detection area is then denoted as... Its area is denoted as The area used to detect traffic congestion is also the image range detected by the algorithm. The detection area is usually set as a section of road before the end of the road. S2, Video processing within the detection area: Using perspective transformation, the detection area is projected onto a new view plane, that is, the video's two-dimensional coordinate system is converted to a homogeneous two-dimensional spatial coordinate system, and then this coordinate system is projected onto the new two-dimensional coordinate system. Specifically, the two-dimensional image plane coordinates of the video are... Convert to two-dimensional homogeneous coordinates The coordinate transformation formula is: =Ms Two-dimensional homogeneous coordinates in space Converted to two-dimensional homogeneous coordinates from a top-down perspective The coordinate transformation formula is as follows: =P / Z; in , is the transformation matrix, and has 4 degrees of freedom; , is the coordinate point in the two-dimensional image plane coordinate system; The transformed two-dimensional homogeneous coordinates are, and In The coordinates are two-dimensional coordinates from a top-down perspective.
[0022] Given the coordinates of the original image and the coordinates of the transformed image, corresponding to at least four pairs of pixel coordinates, the perspective transformation matrix can be obtained. This allows for the conversion of various perspectives into a top-down perspective.
[0023] S3, Target Detection and Tracking within the Detection Area: The "Multi-Object Detection and Tracking (MODT)" algorithm is used to detect and track vehicles within the detection area, thereby obtaining vehicle position tracking results within the detection area, referred to as vehicle position results. Then, traffic condition features of a time slice of video are calculated and extracted, including: a discrete time series of vehicle counts (vehicle count for each video frame) and a discrete time series of vehicle speeds (average speed of all passing vehicles for each video frame), which are ultimately stored as a discrete time series of vehicle speeds. The specific steps are as follows: S301 collects training data from roadside cameras, including vehicle types such as cars, buses, and special vehicles, and labels the video data.
[0024] In practice, it is necessary to annotate each video frame with all vehicle categories, bounding boxes, and vehicle IDs, where the bounding boxes refer to the vehicle positions. Based on the above annotations, implementers can easily calculate the following parameters: annotate each video frame with all vehicle categories, bounding boxes, and vehicle IDs; and calculate motion parameters based on the coordinates of the bounding boxes for the same ID in different video frames. The object category for each video frame is calculated based on the vehicle category. Visibility is calculated based on whether the same vehicle ID is labeled in different frames. ;in , , and and represent the number of vehicle IDs, the number of bounding box movement parameters, the number of video frames, and the number of object categories, respectively, and R is a set of real numbers.
[0025] S302, Establish MODT, the MODT architecture is described in detail below: Input from time point arrive common Video frame; The FeatureNet (feature extraction network) part uses a feature processor with three-dimensional convolutional groups to extract features from the video frame sequence. In this implementation, a three-dimensional convolutional group similar to ResNet is used. like Figure 2 The feature extraction results are output to MotNet (mobility module), ClsNet (classification module), and VisNet (visibility module), respectively; each module uses 3D convolution to learn connection features to calculate the motion parameters of the anchor sequence. Object category and visibility ,in , , and and represent the number of targets (i.e., vehicle IDs), the number of bounding box movement parameters, the number of video frames, and the number of object categories, respectively.
[0026] The specific parameters such as the number of network layers and the size of the convolution kernel in the three-dimensional convolutional group are not the key content of this invention, and implementers can adjust them according to the actual data.
[0027] S303, input the training data into the MODT, train the MODT, and complete the objective optimization in the MODT. In this embodiment, Adam is used as the optimizer. The objective optimization is to minimize the following three losses: ; ; ; in The moving loss is defined as the true value trajectory. and predicted trajectory The smoothing loss L1 is used, where Pos and Neg represent the positive and negative sample sets, respectively, and the movement trajectory is determined by... , y , , The values represent the x-coordinate, y-coordinate, height, and width of the center point of the bounding box, respectively; where positive samples are samples of the target category and negative samples are samples of non-target categories. For classification loss, where As an indicator, used to match the first The first frame The anchor sequence (predicted value) and the first anchor sequence (predicted value) and the second anchor sequence (predicted value) Anchor sequence (truth value) Category (0 for background), For classification loss confidence; For visibility loss, where As an indicator, used to match the first The first frame The anchor sequence (predicted value) and the first anchor sequence (predicted value) and the second anchor sequence (predicted value) Anchor sequence (truth value) Visibility value, Confidence level for visibility loss.
[0028] In practice, the selection of training parameters such as training rounds and learning rate is not the key content of this patent, and implementers can adjust them according to the actual data.
[0029] S304, Calculate the discrete time series of vehicle counts: for each video frame Count the total number of vehicles located within the detection area. Thus, the discrete time series of vehicle counts is obtained. ; S305, Calculate the discrete-time series of vehicle speeds: For each video frame, calculate the instantaneous speed of each vehicle in that frame. The specific calculation formula is as follows:
[0030] in The actual displacement of the pixel calculated from the perspective transformation matrix. To track the coordinates of the midpoint of the bottom edge of the vehicle detection box in the algorithm, For video frame rate, For vehicle tracking ID, The time interval for calculating speed; Calculate the average speed of all vehicles within the detection area in this frame: ; in For the first The total number of vehicles located within the detection area in a given frame; Obtain vehicle speed discrete time series .
[0031] S4, Time-Frequency Analysis of Traffic Condition Characteristics: Discrete Short-Time Fourier Transform is performed on the discrete time series of vehicle counts and vehicle speeds, resulting in joint analysis in the time and frequency domains. The specific calculation formula is as follows:
[0032] Where STFT represents the short-time Fourier transform function. It is a continuous window function; It is a discrete-time signal, including a discrete-time sequence of vehicle counts. Vehicle speed discrete time series , For discrete moments, For frequency domain coordinates, It is the imaginary unit.
[0033] By summing the complex results obtained after performing short-time Fourier transforms on each time window of a discrete-time signal, the amplitude and phase of the frequency change for each time window can be obtained, ultimately yielding a time-frequency plot. Its horizontal axis represents time. The vertical axis represents frequency. , and The dimensions of the time vector and frequency vector are respectively, and the magnitude of the values in the time-frequency graph is the amplitude. Short-time Fourier transforms are performed on the vehicle count discrete-time series and the vehicle speed discrete-time series respectively to obtain the final vehicle count time-frequency graph. Vehicle speed time-frequency graph .
[0034] In this embodiment, the time window size is selected as 15 minutes, which includes a total of One time-frequency frame, The video frame rate is set, and the overlap ratio between windows is set to 0.5.
[0035] S5: Congestion Judgment Model Analysis: Based on the discrete time series of vehicle counts and vehicle speeds in the detection area, the congestion status is logically judged, as follows: S501, Calculate the variable traffic light cycle: based on the vehicle count frequency diagram. Vehicle speed time-frequency graph Using each time window as an interval, the maximum amplitude within that time window is taken, and the period calculated based on the corresponding frequency is the signal light cycle within that time window. This is done according to video frames. The corresponding time window can then form a traffic light cycle sequence. ; S502, Calculate the traffic flow density anomaly threshold: Calculate the detection area The area, and then based on the discrete time series of vehicle counts. Calculate the road surface space occupancy rate Set the outlier threshold to the upper quartile Q13, where Q13 = the sample size. The 75th percentile number after all values in the array are arranged in ascending order; S503, Calculate the traffic flow speed anomaly threshold: Set the anomaly threshold as a discrete time series of vehicle speeds. The upper quartile Q23, Q23 = the sample The 75th percentile number after all values in the list are arranged in descending order; S504, taking into account the traffic light cycle and the two abnormal thresholds mentioned above, performs congestion status analysis on the real-time traffic density and speed detected by the real-time video. The congestion status analysis includes the following two layers of judgment logic, such as... Figure 3 : 1) Determine whether the real-time traffic density exceeds the abnormal traffic density threshold. If so, if the real-time traffic density has continuously exceeded the abnormal traffic density threshold for a traffic light cycle, then it is determined that the traffic flow may be slow and proceed to the next step of judgment. 2) Determine whether the real-time average speed of traffic flow is lower than the abnormal speed threshold. If the average speed of traffic flow in a single cycle is also lower than the abnormal speed threshold, then the intersection is congested. Otherwise, the traffic flow is slow. S505 outputs the congestion status based on logical judgment.
[0036] This invention establishes a vehicle information extraction framework for video, accurately extracting traffic density and speed information at traffic intersections. It then utilizes a congestion state discrimination model based on Fourier time-frequency graphs to accurately determine congestion status for different traffic light cycles, vehicle count discrete time series, and vehicle speed discrete time series. Therefore, the technical solution of this invention offers greater real-time performance and accuracy in determining congestion at traffic light intersections.
[0037] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for monitoring traffic congestion at urban intersections, characterized in that, The method includes at least a video vehicle recognition stage and a congestion state determination stage; wherein, the video vehicle recognition stage includes at least detection area confirmation, perspective transformation, and target detection and tracking steps, and the congestion state determination stage includes at least discrete short-time Fourier transform analysis and congestion determination model analysis steps. The specific steps of the method are as follows: S1, Detection area confirmation: Select a visual area from the video image obtained from the roadside camera as the detection area for detecting traffic congestion. S2, Video processing within the detection area: Convert the video of the detection area into a top-down view through perspective transformation and project it onto a new viewing plane; S3, Target detection and tracking within the detection area: Target detection and tracking are performed on the processed video to obtain vehicle information within the detection area and calculate the traffic condition features of the video. The traffic condition features include a vehicle count discrete time series and a vehicle speed discrete time series. The vehicle count discrete time series refers to the vehicle count in each frame of the video, and the vehicle speed discrete time series refers to the average speed of all passing vehicles in each frame of the video. S4, perform time-frequency analysis on traffic condition characteristics: perform discrete short-time Fourier transform on the traffic condition characteristics calculated in S3 to obtain the time-frequency map; S5, Congestion Judgment Model Analysis: Based on the time-frequency graph, perform logical judgment on the congestion status and output the congestion status.
2. The method for monitoring traffic congestion at urban intersections according to claim 1, characterized in that, The specific steps of S1 are as follows: Configure a detection area for the roadside camera, denoted as Its area is denoted as This serves as a detection area for detecting traffic congestion.
3. The method for monitoring traffic congestion at urban intersections according to claim 2, characterized in that, The section of road before the end of the road is designated as the detection area.
4. The method for monitoring traffic congestion at urban intersections according to claim 1, characterized in that, In S2, the specific steps of perspective transformation are as follows: Two-dimensional image plane coordinates Convert to two-dimensional homogeneous coordinates The coordinate transformation formula is: Two-dimensional homogeneous coordinates in space Convert to two-dimensional homogeneous coordinates The coordinate transformation formula is as follows: in , is the transformation matrix, and has 4 degrees of freedom; The transformed two-dimensional homogeneous coordinates are, and In The coordinates are two-dimensional coordinates from a top-down perspective.
5. The method for monitoring traffic congestion at urban intersections according to claim 1, characterized in that, The specific steps of S3 are as follows: S301, training data is collected based on roadside cameras, the training data including at least vehicle categories, and the training data in the video is labeled, specifically including: For each video frame, label all vehicle categories, bounding boxes, and vehicle IDs; Calculate motion parameters based on the coordinates of the calibration boxes for the same vehicle ID in different video frames. ; Calculate the object category for each video frame based on the vehicle category. ; Calculate visibility based on whether the same vehicle ID is labeled in different video frames. ; Where R is the set of real numbers, , , and and represent the number of vehicle IDs, the number of bounding box movement parameters, the number of video frames, and the number of object categories, respectively; S302, Establish a joint detection-tracking model, specifically including: Input a video frame sequence, the video frame sequence being from time point... arrive common A video frame; FeatureNet, the feature extraction network, uses a feature processor with three-dimensional convolutional groups to extract features from video frame sequences. S303, Input the training data into the detection-tracking joint model, train the detection-tracking joint model, and complete the target optimization in the detection-tracking joint model; The objective is to minimize the following three losses, calculated using the following formulas: ; ; ; in, The moving loss is defined as the true value trajectory. and predicted trajectory The smoothing loss L1 is used, where Pos and Neg represent the positive and negative sample sets, respectively. The position information of the calibration box is obtained by capturing the position information of the moving trajectory, which is the x-coordinate of the center point of the calibration box. , center point ordinate y ,high ,width Where positive samples are samples from the target category, and negative samples are samples from non-target categories; N F It refers to the number of video frames; For classification loss, where As an indicator, used to match the first The first frame The anchor sequence and the first Anchor point sequence, As a category, For classification loss confidence; For visibility loss, where As an indicator, used to match the first The first frame The anchor sequence and the first Anchor point sequence, Visibility value, For visibility loss confidence; S304, Calculate the discrete time series of vehicle counts; S305, calculate the discrete time series of vehicle speed.
6. The method for monitoring traffic congestion at urban intersections according to claim 5, characterized in that, The method for calculating the discrete-time series of vehicle counts is as follows: For each video frame Count the total number of vehicles located within the detection area. Thus, the discrete time series of vehicle counts is obtained. ; The method for calculating the discrete-time series of vehicle speeds is as follows: For each video frame, calculate the instantaneous speed of each vehicle in that frame, using the following formula: in, The actual displacement of the pixel calculated from the perspective transformation matrix. To track the coordinates of the midpoint of the bottom edge of the vehicle detection box in the algorithm, For video frame rate, For vehicle tracking ID, The time interval for calculating speed; The average speed of all vehicles within the detection area in this frame is calculated using the following formula: ; in, For the first The total number of vehicles located within the detection area in a given frame; Obtain vehicle speed discrete time series .
7. The method for monitoring traffic congestion at urban intersections according to claim 1, characterized in that, The formula for calculating the discrete short-time Fourier transform of S4 is as follows: ; in Represents the short-time Fourier transform function. It is a continuous window function; It is a discrete-time signal, including a discrete-time sequence of vehicle counts. Vehicle speed discrete time series , For discrete moments; Frequency domain coordinates; The imaginary unit; By summing the complex results obtained after performing short-time Fourier transforms on each time window of a discrete-time signal, the amplitude and phase of the frequency change for each time window can be obtained, ultimately yielding a time-frequency plot. Its horizontal axis represents time. The vertical axis represents frequency. , and These are the dimensions of the time vector and the frequency vector, respectively, and the magnitude of the values within the time-frequency plot represents the amplitude. The vehicle count discrete-time series and the vehicle speed discrete-time series are subjected to short-time Fourier transforms respectively to obtain the vehicle count time-frequency graph. Vehicle speed time-frequency graph .
8. The method for monitoring traffic congestion at urban intersections according to claim 1, characterized in that, The specific steps of S5 are as follows: S501, Calculate the variable traffic light cycle: Based on the time-frequency diagram obtained in step S4, take the maximum amplitude within each 15-minute time window. The cycle calculated from the corresponding frequency in the time-frequency diagram is the traffic light cycle within that time window. (This is done according to the video frames.) The corresponding time window can then form a traffic light cycle sequence. ; S502, Calculate the traffic flow density anomaly threshold: Obtain the area of the detection region. Furthermore, based on the discrete time series of vehicle counts Calculate the road surface space occupancy rate The anomaly threshold is set to the upper quartile Q13, where Q13 equals the value of the sample. The 75th percentile number after all values in the array are arranged in ascending order; S503, Calculate the traffic flow speed anomaly threshold: Set the anomaly threshold as a discrete time series of vehicle speeds. The upper quartile Q23, Q23 equals the sample The 75th percentile number after all values in the list are arranged in descending order; S504 takes into account the traffic light cycle and the two abnormal thresholds mentioned above, and makes two-layer judgment logic for the real-time traffic density and real-time traffic speed detected by the real-time video.
9. A method for monitoring traffic congestion at urban intersections according to claim 8, characterized in that, The two-layer judgment logic is as follows: Determine whether the real-time traffic density exceeds the abnormal traffic density threshold. If so, it means that the real-time traffic density has continuously exceeded the abnormal traffic density threshold for a traffic light cycle. Then, it is determined that the traffic flow may be slow and proceeds to the next step. Determine if the real-time average traffic speed is lower than the abnormal traffic speed threshold. If the average traffic speed in a single cycle is also lower than the abnormal traffic speed threshold, then the intersection is considered congested; otherwise, the traffic is considered to be slow.
10. A traffic congestion monitoring system for urban intersections, wherein the system employs the traffic congestion monitoring method as described in any one of claims 1-9.