A vehicle target motion state estimation method based on video analysis
By using an improved Yolov5 network model and Bytetrack tracking algorithm, combined with multi-scale adaptive technology and ReID technology, the motion state of vehicles is accurately estimated, solving the problem of inaccurate calculation of vehicle stationary time and speed, and improving the reliability and real-time performance of the traffic video event detection system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO TURING TECH CO LTD
- Filing Date
- 2023-05-30
- Publication Date
- 2026-06-09
Smart Images

Figure CN116797994B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent image analysis technology, and in particular to a method for estimating the motion state of a vehicle target based on video analysis. Background Technology
[0002] In recent years, with the rapid development of the transportation industry and the increasingly sophisticated construction of urban roads and highways, traffic volume has increased dramatically. To ensure the efficient and safe operation of urban roads and highways, relevant departments have built numerous road monitoring systems, such as roadside monitoring and panoramic surveillance systems. To maximize the utilization of these monitoring systems, traffic video event detection systems have emerged.
[0003] The traffic video event detection system is a system that uses target detection and tracking technology, motion state estimation technology, and image processing technology to realize the real-time identification, detection, transmission, communication, and statistics of road traffic events. It enables real-time detection and automatic alarm of road traffic emergencies, allowing users to easily grasp the traffic conditions of road sections and promptly detect abnormal events. It can adapt to all-weather road monitoring under various complex road conditions.
[0004] Target motion state estimation technology plays a crucial role in many traffic video events. For example, abnormal parking requires real-time monitoring of the duration of vehicle stillness; when the stillness duration exceeds a threshold, an abnormal parking event is reported. Similarly, traffic congestion requires real-time monitoring of vehicle speeds within lanes; if the number of vehicles reaches a certain threshold and the speed, calculated in pixels, is less than a certain threshold, a traffic congestion event is reported. If the calculation of vehicle stillness duration or speed is inaccurate during this process, it will lead to false alarms or missed alarms, thus reducing the reliability of the traffic video event detection system.
[0005] Therefore, it is necessary to accurately predict the motion state of vehicle targets based on video analysis, so as to more accurately identify traffic video events, improve the reliability of the system and the real-time performance of early warnings, and provide data support for traffic planning and command and dispatch. Summary of the Invention
[0006] This invention provides a vehicle target motion state estimation method based on video analysis. It detects vehicle targets using an improved YOLOv5 network model and tracks them in real time using the Bytetrack tracking algorithm. Then, it estimates the vehicle target's motion state based on multi-scale adaptive technology and ReID technology. When a vehicle target is determined to be in motion, its speed is calculated; when it is determined to be stationary, its stationary duration is calculated. The results of this motion state estimation are used for traffic event identification, enabling more accurate judgment of traffic events and improving the efficiency of handling traffic events on urban roads and highways, thus ensuring traffic safety and smooth traffic flow.
[0007] This invention provides a method for estimating the motion state of a vehicle target based on video analysis, comprising:
[0008] Access surveillance video source: Access the real-time video stream from road surveillance, and then output the bitstream to the decoding module;
[0009] GPU hardware decoding: The received bitstream is input frame by frame into the GPU hardware decoding module, which uses a dedicated decoding chip to decode and outputs the decoded monitoring image data.
[0010] Vehicle target detection: The improved Yolov5 network model is used to perform target detection on each frame of the decoded monitoring image data, and the vehicle target detection information is output.
[0011] Vehicle target tracking: The Bytetrack tracking algorithm is used to track vehicle targets and obtain tracking information for each vehicle target;
[0012] Vehicle target motion state estimation: For each vehicle target, multi-scale adaptive technology is used to estimate the motion state of the vehicle target, and ReID technology is used to reduce the break in the vehicle target tracking chain to determine the motion state, speed or duration of stillness of the vehicle target.
[0013] In an optional embodiment, the improved Yolov5 network model adds a 160*160 detection feature map for small targets to the existing Yolov5 network model.
[0014] In an optional embodiment, the improved Yolov5 network model replaces the cspdarknet backbone network in Yolov5 with a shufflenet lightweight network.
[0015] In an optional embodiment, the step of estimating the motion state of the vehicle target using multi-scale adaptive technology includes:
[0016] For each vehicle target, a preset number of consecutive video frame images are selected. The size and position of the vehicle target bounding box in the video frame image are used to determine whether the vehicle target is a distant or near target. The video frame sampling interval T is adjusted according to the distance of the vehicle target to obtain the video frame sequence of the vehicle target.
[0017] The vehicle target is determined to be in motion or stationary state based on the detection information of the vehicle target in three consecutive video frames.
[0018] If the cumulative number of frames of vehicle target movement exceeds the first preset number of frames and the number of consecutive frames of movement exceeds the second preset number of frames, then the vehicle target is determined to be in a stable motion state. The vehicle speed is obtained by dividing the distance the vehicle target moves within the most recent sampling interval by the sampling interval T. Otherwise, the total number of frames of movement continues to be accumulated and the number of consecutive frames of movement is re-accumulated from 0.
[0019] If the cumulative number of frames in which the vehicle target is stationary exceeds the first preset number of frames and the number of consecutive stationary frames exceeds the second preset number of frames, then the vehicle target is determined to be in a stable stationary state. The stationary duration is obtained by subtracting the timestamp of the first stationary frame from the timestamp of the current frame. Otherwise, the total number of stationary frames continues to accumulate and the number of consecutive stationary frames is re-accumulated from 0.
[0020] In an optional embodiment, the step of determining whether the vehicle target is a distant or near target based on the size and position of the vehicle target bounding box in the video frame image, and adjusting the video frame sampling interval T according to the distance of the vehicle target, according to the obtained video frame sequence of the vehicle target, includes:
[0021] The first ratio parameter f1 is obtained by calculating the ratio of the average area of the vehicle target box in the most recent few video frames to the area of the video frame image.
[0022] Calculate the ratio of the ordinate of the center point of the vehicle target box in the video frame image at the current moment to the height of the video frame image to obtain the second ratio parameter f2;
[0023] Based on the obtained first ratio parameter f1, second ratio parameter f2 and preset coefficient W = [w1 w2], calculate the vehicle distance judgment parameter f = f1*w1 + f2*w2;
[0024] The distance to the vehicle target is determined based on the magnitude of the vehicle distance judgment parameter f, and the video frame sampling interval T is adjusted. The video frame sequence of the vehicle target is obtained by sampling according to the video frame sampling interval T.
[0025] In an optional embodiment, determining whether the vehicle target is in motion or stationary state based on the detection information of the vehicle target in three consecutive video frames includes:
[0026] Obtain the center coordinates of the target box for each vehicle in three consecutive video frames;
[0027] For each vehicle target, vectors vAB, vBC, and vAC are obtained based on the center coordinates A of the vehicle target bounding box in the first video frame, B of the second video frame, and C of the third video frame.
[0028] Calculate the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC.
[0029] Determine whether the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC satisfy the preset motion discrimination conditions. The discrimination conditions are as follows:
[0030] |vAB|+|vBC|>=|vAC| and |vAC|>|vAB| and |vAC|>|vBC| (1)
[0031] 0 <= Angle(vAB, vAC) <= 1 (2)
[0032] 0 <= Angle(vBC, vAC) <= 1 (3)
[0033] |vAC|>D1 and |vAB|>D2 and |vBC|>D3 (4)
[0034] Where |vAB| represents the magnitude of vector vAB, |vBC| represents the magnitude of vector vBC, |vAC| represents the magnitude of vector vAC, Angle(vAB,vAC) represents the angle between vAB and vBC, Angle(vBC,vAC) represents the angle between vBC and vAC, and D1, D2, and D3 represent the distance thresholds for the vehicle to move from A to C, from A to B, and from B to C, respectively.
[0035] If the above criteria are met, the vehicle target is determined to be in motion; otherwise, the vehicle target is determined to be stationary.
[0036] In an optional embodiment, the use of ReID technology to reduce vehicle target tracking chain breaks includes:
[0037] If the original stationary vehicle state is detected to change from stationary to moving, then the motion of the stationary vehicle is determined based on the tracking information of the current frame and the previous frame. Specifically, the smaller of the width and height of the target box of the stationary vehicle in the current frame is selected as the reference value, and the product of the reference value and the first threshold coefficient and the second threshold coefficient is calculated to obtain the first threshold and the second threshold. If the displacement of the stationary vehicle between the current frame and the previous frame is less than the first threshold, or the current speed of the stationary vehicle is less than the second threshold, then it is determined that the stationary vehicle has not moved.
[0038] If a new stationary vehicle's ID is detected to have changed, then the tracking information of the new stationary vehicle and the tracking information of previously cached stationary vehicles are used to determine whether the new stationary vehicle is a previously cached stationary vehicle. Specifically, the crossover ratio (CRR) between the newly detected stationary vehicle and the previously cached stationary vehicles is calculated. If the CRR is greater than a preset CRR threshold, then the newly detected stationary vehicle and the previously cached stationary vehicle are determined to be the same target, and the stationary duration of the previously cached stationary vehicles is continued to be accumulated.
[0039] In an optional embodiment, the method further includes:
[0040] Traffic incident identification: Based on vehicle target motion status information and vehicle detection and tracking information, determine whether a traffic incident has occurred in the current monitoring video footage;
[0041] Reporting traffic incident information: Identified traffic incidents are reported to the traffic command center so that traffic regulatory departments can handle them in a timely manner.
[0042] This invention provides a vehicle target motion state estimation method based on video analysis, targeting traffic video event determination in urban road and highway scenarios. It achieves vehicle target motion state estimation, providing accurate data support for traffic event determination. The method uses an improved Yolov5 network model to detect vehicle targets and employs the Bytetrack tracking algorithm to track them in real time. Then, it estimates the vehicle target motion state based on multi-scale adaptive technology and ReID technology. When a vehicle target is determined to be moving, its speed is calculated; when it is determined to be stationary, its stationary duration is calculated. Finally, the calculated vehicle target motion state information is used to identify traffic video events. If a corresponding event occurs, it is reported to the command center for timely handling. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 A flowchart illustrating a vehicle target motion state estimation method based on video analysis provided in this embodiment of the disclosure;
[0045] Figure 2 This is a diagram illustrating a small distant target and a large nearby target within the same surveillance footage.
[0046] Figure 3This is a schematic diagram of vectors vAB, vBC, and vAC. Detailed Implementation
[0047] 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.
[0048] Figure 1 This is a flowchart illustrating a vehicle target motion state estimation method based on video analysis, provided as an embodiment of this disclosure. Figure 1 As shown in the embodiments of this disclosure, a method for estimating the motion state of a vehicle target based on video analysis is provided, including:
[0049] Access surveillance video source: Access the real-time video stream from road surveillance, and then output the bitstream to the decoding module;
[0050] GPU hardware decoding: The received bitstream is input frame by frame into the GPU hardware decoding module, which uses a dedicated decoding chip to decode and outputs the decoded monitoring image data.
[0051] Vehicle target detection: The improved Yolov5 network model is used to perform target detection on each frame of the decoded monitoring image data, and the vehicle target detection information is output.
[0052] When a surveillance device has a wide field of view, distant vehicles will appear smaller in the monitor image, especially noticeable on highways. Figure 2 As shown, distant vehicle targets are much smaller than those nearby, and the YOLOv5 network model has low accuracy in detecting small targets, easily missing them. Therefore, this model needs improvement. To this end, a 160*160 detection feature map for small targets is added to the original YOLOv5 model network to detect small targets in the image.
[0053] Vehicle target tracking: The Bytetrack tracking algorithm is used to track vehicle targets and obtain tracking information for each vehicle target;
[0054] Vehicle target motion state estimation: For each vehicle target, multi-scale adaptive technology is used to estimate the motion state of the vehicle target, and ReID technology is used to reduce the break in the vehicle target tracking chain to determine the motion state, speed or duration of stillness of the vehicle target.
[0055] The motion state of vehicle targets can be mainly divided into two types: one is that the vehicle target is in motion, and the other is that the vehicle target is stationary. For a target in motion, its speed needs to be calculated; for a target in a stationary state, its stationary duration needs to be calculated. Because vehicle targets appear larger when closer and smaller when farther away in the captured video frame image, a vehicle target located at a distance may be mistakenly considered to be stationary if its motion speed is slow.
[0056] For example, under the same video frame sampling interval and the same speed conditions, the moving distance of a nearby target is Ln, and the moving distance of a distant target is Lf. According to perspective, Ln must be greater than Lf. If the sampling interval is set to 1 second, the average moving speed of the vehicle target is 3 pixels per second, then Lf is 3. However, if the distance threshold is set to 5, Lf is less than the distance threshold, and the target is considered to be stationary. But in real time, the target is not stationary; it is just moving at a slower speed. If the sampling interval is increased to 5 seconds, then Lf is 15, and the vehicle target will be judged to be in motion.
[0057] To address the problem of misjudging the motion state of small, distant targets due to their slow movement, a multi-scale adaptive technique is employed. This technique automatically adjusts the sampling interval based on the distance of the target, ensuring that small, distant targets with slow movement are not misjudged as stationary.
[0058] This embodiment determines whether a target is a small, distant target based on the proportion of the vehicle target box in the video frame image and its distance from the bottom of the screen. The smaller the proportion of the vehicle target box in the video frame image and the farther the distance from the bottom of the screen, the more likely the vehicle target is a small, distant target. For small, distant targets, the sampling interval needs to be increased.
[0059] The specific method is as follows: For each vehicle target, a preset number of consecutive video frames are selected. The ratio of the average area of the vehicle target bounding box in the most recent 10 video frames to the area of the video frame image is calculated to obtain the first ratio parameter f1. The ratio of the ordinate of the center point of the vehicle target bounding box in the current video frame image to the height of the video frame image is calculated to obtain the second ratio parameter f2. Based on the obtained first ratio parameter f1, second ratio parameter f2, and preset coefficient W = [w1 w2], the vehicle distance determination parameter f = f1*w1 + f2*w2 is calculated. The distance of the vehicle target is determined according to the magnitude of the vehicle distance determination parameter f, and the video frame sampling interval T is adjusted. The video frame sequence of the vehicle target is obtained by sampling according to the video frame sampling interval T. Here, the average area of the target bounding box is the average area of the target bounding box in the most recent 10 frames to eliminate the influence caused by target bounding box drift.
[0060] For example, the sampling interval T defaults to 1 second. When the calculated exponent f is less than 0.35 but greater than 0.2, the sampling interval T is adjusted to 3 seconds; when the calculated exponent f is less than 0.2, the sampling interval T is adjusted to 5 seconds. This lengthens the sampling interval for small, distant targets, thus more accurately determining their motion state. This is how different sampling intervals are used for targets of different scales to ensure the accuracy of target motion state determination. The adjustment of the sampling interval T here only applies to targets that were previously moving. If the vehicle was a stationary target, the default 1-second sampling interval is used, because stationary targets have no speed and therefore do not require adjustment.
[0061] After determining the sampling interval T and obtaining the video frame sequence, the detection information of the vehicle target in three consecutive video frames is used to determine whether the vehicle target is in motion or stationary state. The specific method is as follows:
[0062] Obtain the center coordinates of the target box for each vehicle in three consecutive video frames;
[0063] For each vehicle target, based on the center coordinates A of the vehicle target bounding box in the first video frame, B of the second video frame, and C of the third video frame, vectors vAB, vBC, and vAC are obtained, as follows: Figure 3 As shown;
[0064] Calculate the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC.
[0065] Determine whether the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC satisfy the preset motion discrimination conditions. The discrimination conditions are as follows:
[0066] |vAB|+|vBC|>=|vAC| and |vAC|>|vAB| and |vAC|>|vBC| (1)
[0067] 0 <= Angle(vAB, vAC) <= 1 (2)
[0068] 0 <= Angle(vBC, vAC) <= 1 (3)
[0069] |vAC|>D1 and |vAB|>D2 and |vBC|>D3 (4)
[0070] Where |vAB| represents the magnitude of vector vAB, |vBC| represents the magnitude of vector vBC, |vAC| represents the magnitude of vector vAC, Angle(vAB,vAC) represents the angle between vAB and vBC, Angle(vBC,vAC) represents the angle between vBC and vAC, and D1, D2, and D3 represent the distance thresholds for the vehicle to move from A to C, from A to B, and from B to C, respectively.
[0071] If the above criteria are met, the vehicle target is determined to be in motion; otherwise, the vehicle target is determined to be stationary.
[0072] Due to the drift characteristics of the target bounding box, switching motion states is a challenge, specifically the transitions between motion-to-stationary and stationary-to-motion. The switching of motion states cannot be determined solely by the result of a single frame; otherwise, a large number of false positives and false negatives would occur. Therefore, a statistical method is used here. When switching from one state to another, the results of multiple frames are sampled and statistically analyzed. If the proportion of a certain state is relatively large, then a switch can proceed. This is divided into two cases:
[0073] If the cumulative number of frames of vehicle target movement exceeds the first preset number of frames and the number of consecutive frames of movement exceeds the second preset number of frames, then the vehicle target is determined to be in a stable motion state. The vehicle speed is obtained by dividing the distance the vehicle target moves within the most recent sampling interval by the sampling interval T. Otherwise, the total number of frames of movement continues to be accumulated and the number of consecutive frames of movement is re-accumulated from 0.
[0074] For example, if the cumulative number of frames of vehicle target movement exceeds 20 and the number of consecutive frames of movement exceeds 10, then the vehicle target is determined to be in a stable motion state. The vehicle speed is obtained by dividing the distance the vehicle target moves within the most recent sampling interval by the sampling interval T. If, during the process of accumulating 20 frames of movement, a frame of the target being stationary appears, then the count of 10 consecutive frames needs to be restarted from zero.
[0075] If the cumulative number of frames in which the vehicle target is stationary exceeds the first preset number of frames and the number of consecutive stationary frames exceeds the second preset number of frames, then the vehicle target is determined to be in a stable stationary state. The stationary duration is obtained by subtracting the timestamp of the first stationary state from the timestamp of the current frame. Otherwise, the total number of stationary frames continues to be accumulated and the number of consecutive stationary frames is re-accumulated from 0.
[0076] For example, if the cumulative number of frames in which the vehicle target is stationary exceeds 20 and the number of consecutive stationary frames exceeds 10, then the vehicle target is determined to be in a stable stationary state. The stationary duration is obtained by subtracting the timestamp of the first stationary frame from the timestamp of the current frame. If, during the process of accumulating 20 stationary frames, frames in which the target moves appear, then the count of 10 consecutive frames needs to be restarted from zero.
[0077] Due to object occlusion or other reasons, the target tracking chain may break, resulting in the loss of the target. Upon re-detection, the timing will restart, leading to inaccurate calculation of stationary duration. To overcome the tracking chain breakage problem, a geometric approach is used to address the inaccurate calculation of stationary duration. This is primarily achieved through two strategies, mainly targeting vehicles that were previously stationary but have suddenly become moving targets.
[0078] 1) Determine whether the motion state of a stationary vehicle has actually changed.
[0079] This mainly considers the situation where the tracking result changes from a static state to a moving state due to occlusion or other reasons. Although the tracking result shows a moving state, the target has not actually moved. The inaccurate target detection is caused by partial occlusion. To solve this problem, the following formula is used to determine whether the target has actually moved.
[0080] Ref_len=min(box.width,box.height)
[0081] If Mov_len <Ref_len*f1 or Speed<Ref_len*f2:
[0082] Static_state
[0083] Else:
[0084] Move_state
[0085] Where box is the target detection bounding box in the current frame, Move_len is the displacement of the target between the current frame and the previous frame, Speed is the target's current velocity, and f1 and f2 are the first threshold coefficient and the second threshold coefficient, respectively. If a target was previously stationary, and the tracking result in the current frame shows a moving state, then after being determined by the above formula, if it is found to be stationary, then it is still considered to be stationary.
[0086] 2) Determine if the target is re-ID
[0087] When a target remains stationary for an extended period, other targets inevitably pass in front of it, obscuring it. When the stationary target is detected and tracked again, its ID has changed. To address this, an Interchange of Union (IOU) operation is performed between the newly detected stationary target NS and the previously cached stationary target PS. If the IOU value is greater than a threshold, the newly detected stationary target NS and the previously cached stationary target PS are considered the same target. Therefore, when NS is detected again, it is considered PS, and the stationary duration of PS is continuously increased. This avoids the inaccurate stationary target duration issue caused by Re-ID.
[0088] Traffic incident identification: Based on vehicle target motion status information and vehicle detection and tracking information, determine whether a traffic incident has occurred in the current monitoring video footage;
[0089] Reporting traffic incident information: Identified traffic incidents are reported to the traffic command center so that traffic regulatory departments can handle them in a timely manner.
[0090] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A method for estimating the motion state of a vehicle target based on video analysis, characterized in that, include: Access surveillance video source: Access the real-time video stream from road surveillance, and then output the bitstream to the decoding module; GPU hardware decoding: The received bitstream is input frame by frame into the GPU hardware decoding module, which uses a dedicated decoding chip to decode and outputs the decoded monitoring image data. Vehicle target detection: The improved Yolov5 network model is used to perform target detection on each frame of the decoded monitoring image data, and the vehicle target detection information is output. Vehicle target tracking: The Bytetrack tracking algorithm is used to track vehicle targets and obtain tracking information for each vehicle target; Vehicle target motion state estimation: For each vehicle target, multi-scale adaptive technology is used to estimate the motion state of the vehicle target, and ReID technology is used to reduce the break in the vehicle target tracking chain to determine the motion state, speed or duration of stillness of the vehicle target. The method of estimating the motion state of the vehicle target using multi-scale adaptive technology includes: For each vehicle target, a preset number of consecutive video frame images are selected. The size and position of the vehicle target bounding box in the video frame image are used to determine whether the vehicle target is a distant or near target. The video frame sampling interval T is adjusted according to the distance of the vehicle target to obtain the video frame sequence of the vehicle target. The vehicle target is determined to be in motion or stationary state based on the detection information of the vehicle target in three consecutive video frames. If the cumulative number of frames of vehicle target movement exceeds the first preset number of frames and the number of consecutive frames of movement exceeds the second preset number of frames, then the vehicle target is determined to be in a stable motion state. The vehicle speed is obtained by dividing the distance the vehicle target moves within the most recent sampling interval by the sampling interval T. Otherwise, the total number of frames of movement continues to be accumulated and the number of consecutive frames of movement is re-accumulated from 0. If the cumulative number of frames in which the vehicle target is stationary exceeds the first preset number of frames and the number of consecutive stationary frames exceeds the second preset number of frames, then the vehicle target is determined to be in a stable stationary state. The stationary duration is obtained by subtracting the timestamp of the first stationary state from the timestamp of the current frame. Otherwise, the total number of stationary frames continues to be accumulated and the number of consecutive stationary frames is re-accumulated from 0. The step of determining whether a vehicle target is a distant or near target based on the size and position of the vehicle target bounding box in the video frame image, and adjusting the video frame sampling interval T according to the distance of the vehicle target, according to the obtained video frame sequence of the vehicle target, includes: The first ratio parameter f1 is obtained by calculating the ratio of the average area of the vehicle target box in the most recent few video frames to the area of the video frame image. Calculate the ratio of the ordinate of the center point of the vehicle target box in the video frame image at the current moment to the height of the video frame image to obtain the second ratio parameter f2; Based on the obtained first ratio parameter f1, second ratio parameter f2, and preset coefficient W = [w1 w2], calculate the vehicle distance determination parameter f = f1*w1 + f2*w2; The distance to the vehicle target is determined based on the magnitude of the vehicle distance judgment parameter f, and the video frame sampling interval T is adjusted. The video frame sequence of the vehicle target is obtained by sampling according to the video frame sampling interval T. The step of determining whether a vehicle target is in motion or stationary state based on detection information of the vehicle target in three consecutive video frames includes: Obtain the center coordinates of the target box for each vehicle in three consecutive video frames; For each vehicle target, vectors vAB, vBC, and vAC are obtained based on the center coordinates A of the vehicle target bounding box in the first video frame, B of the second video frame, and C of the third video frame. Calculate the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC. Determine whether the magnitudes of vectors vAB, vBC, and vAC, the angle between vAB and vBC, and the angle between vBC and vAC satisfy the preset motion discrimination conditions. The discrimination conditions are as follows: |vAB|+|vBC|>=|vAC| and |vAC|>|vAB| and |vAC|>|vBC| (1) 0 <= Angle(vAB, vAC) <= 1 (2) 0 <= Angle(vBC, vAC) <= 1 (3) |vAC|>D1 and |vAB|>D2 and |vBC|>D3 (4) Where |vAB| represents the magnitude of vector vAB, |vBC| represents the magnitude of vector vBC, |vAC| represents the magnitude of vector vAC, Angle(vAB,vAC) represents the angle between vAB and vBC, Angle(vBC,vAC) represents the angle between vBC and vAC, and D1, D2, and D3 represent the distance thresholds for the vehicle to move from A to C, from A to B, and from B to C, respectively. If the above criteria are met, the vehicle target is determined to be in motion; otherwise, the vehicle target is determined to be stationary.
2. The vehicle target motion state estimation method based on video analysis according to claim 1, characterized in that, The improved Yolov5 network model adds a 160*160 detection feature map for small targets to the existing Yolov5 network model.
3. The method for estimating the motion state of a vehicle target based on video analysis according to claim 1, characterized in that, The adoption of ReID technology to reduce vehicle target tracking chain breaks includes: If the original stationary vehicle state is detected to change from stationary to moving, then the motion of the stationary vehicle is determined based on the tracking information of the current frame and the previous frame. Specifically, the smaller of the width and height of the target box of the stationary vehicle in the current frame is selected as the reference value, and the product of the reference value and the first threshold coefficient and the second threshold coefficient is calculated to obtain the first threshold and the second threshold. If the displacement of the stationary vehicle between the current frame and the previous frame is less than the first threshold, or the current speed of the stationary vehicle is less than the second threshold, then it is determined that the stationary vehicle has not moved. If a new stationary vehicle's ID is detected to have changed, then the tracking information of the new stationary vehicle and the tracking information of previously cached stationary vehicles are used to determine whether the new stationary vehicle is a previously cached stationary vehicle. Specifically, the crossover ratio (CRR) between the newly detected stationary vehicle and the previously cached stationary vehicles is calculated. If the CRR is greater than a preset CRR threshold, then the newly detected stationary vehicle and the previously cached stationary vehicle are determined to be the same target, and the stationary duration of the previously cached stationary vehicles is continued to be accumulated.
4. The method for estimating the motion state of a vehicle target based on video analysis according to claim 1, characterized in that, The method further includes: Traffic incident identification: Based on vehicle target motion status information and vehicle detection and tracking information, determine whether a traffic incident has occurred in the current monitoring video footage; Reporting traffic incident information: Identified traffic incidents are reported to the traffic command center so that traffic regulatory departments can handle them in a timely manner.