Road target monitoring method, system and device and storage medium
By preprocessing and target detection and tracking of road monitoring video streams, identifying and analyzing abnormal trajectories, the problem of road target monitoring in complex environments is solved, and efficient and accurate road target monitoring is achieved.
Patent Information
- Application Number
- CN202411716964.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing road target monitoring technology is difficult to effectively identify and monitor road targets in complex environments, especially in situations such as blurred road lane markings, poor quality of night photos, and object occlusion caused by traffic congestion.
By acquiring the road monitoring video stream, preprocessing is performed to improve image clarity, identifying road targets using object detection algorithms (such as YOLOv10), and generating the target's moving trajectory in combination with multi-objective tracking algorithms (such as ByteTrack). Then, the trajectory is analyzed based on the preset rules, the abnormal trajectory is identified, and the characteristic information of the abnormal target is extracted.
It has achieved the improvement of the speed and accuracy of road target recognition in complex environments, can accurately identify abnormal trajectories and feature information, improve the quality of road target monitoring, and provides a data foundation for traffic management.
Smart Images

Figure CN119625659A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a road target monitoring method, system, equipment and storage medium. Background Art
[0002] Road target monitoring plays an important role in intelligent transportation systems. By real-time monitoring and analyzing road traffic dynamics, traffic accidents can be effectively prevented, traffic congestion can be alleviated, and decision support can be provided for traffic management. However, the target objects in traffic scenes are often in a bad state, such as blurred road lane markings, low-quality photos taken at night, and object occlusion caused by traffic congestion, which increases the difficulty of detection and monitoring.
[0003] In the current research on road target monitoring, the difficulties mainly include the diversity of road target shapes, the complexity of weather conditions, and the need for real-time processing of dynamic traffic flow. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a road target monitoring method, system, device and storage medium to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a road target monitoring method, comprising: Acquire a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and pre-process the image frames; Using a target detection algorithm to identify road targets in each image frame, and using a multi-target tracking algorithm to generate movement trajectories of the road targets in the image frame sequence; Performing an abnormal analysis on the trajectory based on preset rules to identify abnormal trajectories; The confidence score of the abnormal road target to which the abnormal trajectory belongs is obtained, the target detection frame with the highest score is screened out, and the feature information of the road target is extracted from the target detection frame.
[0006] In an optional implementation, obtaining a road monitoring video stream, converting the road monitoring video stream into an image frame sequence, and preprocessing the image frames includes: Acquire a road monitoring video stream, and extract image frames from the road monitoring video stream at a set time interval, and integrate the extracted image frames into an image frame sequence; Acquire a dark channel of the image frame, estimate a global atmospheric light value and a projection rate map based on the dark channel, and perform defogging based on the global atmospheric light value and the projection rate map; L0 gradient minimization method is used to remove rain pixels and histogram adjustment technique is used to enhance the intensity of the image after rain removal.
[0007] In an optional embodiment, an L0 gradient minimization method is used to remove rain pixels, and a histogram adjustment technique is used to enhance the intensity of the image after rain removal, including: Separating color components from the image frame, the color components comprising a red component, a green component, and a blue component; Perform logarithmic transformation and two-dimensional Fourier transform on color components; Create a Gaussian filter function and perform a two-dimensional Fourier transform on the Gaussian filter function; Perform frequency domain convolution operation on the color components after two-dimensional Fourier transformation and the Gaussian filter function, and perform inverse Fourier transformation on the convolution result to obtain an intermediate image; In the logarithmic domain, the intermediate image is subtracted from the original image to obtain a high-frequency enhanced image of the color component; Take the antilogarithm to obtain the enhanced image component, perform contrast stretching enhancement on the image component to obtain a clear image component; The clear image components of the color components are merged into a rain-free image frame.
[0008] In an optional implementation, using a target detection algorithm to identify a road target in each image frame, and using a multi-target tracking algorithm to generate a trajectory of the road target in the image frame sequence, includes: Use YOLOv10 as the target detection algorithm to identify road targets in image frames and generate detection boxes, target categories, and confidence scores for road targets; ByteTrack is used as a multi-target tracking algorithm to match movement trajectories for road targets based on detection boxes, target categories, and confidence scores.
[0009] In an optional embodiment, a multi-target tracking algorithm is used to match a moving trajectory for a road target based on a detection box, a target category, and a confidence score, including: Assign unique IDs to road targets; Create a corresponding circular queue for the ID, specify the size of the circular queue, and save the latest detection information of the ID to the circular queue, the detection information including the detection timestamp, the road target type, and the road target location coordinates; Create a dictionary, where the key variable in the dictionary is the ID of the road target, and the value variable is the historical trajectory data synchronized and backed up from the circular queue of the road target; Create a statistical list to count the road target categories, the number of road targets of each category, and the fluctuation trend of the number of road targets of each category on the monitored roads; According to the confidence score, the detection frame is divided into high-score frame and low-score frame; Prioritize matching high-score frames with all current circular queues; Then match the low-scoring frame with the circular queue that has not matched the high-scoring frame; For the high-score frames that are not matched in the circular queue, a new tracking track is created for them; For the circular queue that does not match the detection frame, 30 frames are retained. If the detection frame is still not matched after more than 30 frames, the ID of the corresponding road target is recorded as a lost ID and the circular queue is deleted.
[0010] In an optional implementation, performing an abnormal analysis on the trajectory based on a preset rule to identify an abnormal trajectory includes: Set the standard trajectory of the lane; The moving trajectory of the road target is compared with the standard trajectory, and the trajectory that is inconsistent with the standard trajectory is determined as an abnormal trajectory.
[0011] In an optional implementation, the confidence score of the abnormal road target to which the abnormal trajectory belongs is obtained, the target detection frame with the highest score is screened out, and the feature information of the road target is extracted from the target detection frame, including: If the abnormal road target is a vehicle, identifying the license plate number from the target detection frame; If the abnormal road target is a pedestrian, the target detection frame is output to a display device.
[0012] In a second aspect, the present invention provides a road target monitoring system, comprising: A preprocessing module, used to obtain a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and preprocess the image frames; A trajectory generation module, used to identify the road target in each image frame using a target detection algorithm, and generate a moving trajectory of the road target in the image frame sequence using a multi-target tracking algorithm; An abnormality analysis module, used to perform abnormality analysis on the trajectory based on preset rules and identify abnormal trajectories; The feature extraction module is used to obtain the confidence score of the abnormal road target to which the abnormal trajectory belongs, filter out the target detection frame with the highest score, and extract the feature information of the road target from the target detection frame.
[0013] In a third aspect, a device is provided, including: A memory for storing a road target monitoring program; A processor is used to implement the steps of the road target monitoring method provided in the first aspect when executing the road target monitoring program.
[0014] In a fourth aspect, a computer-readable storage medium is provided, on which a road target monitoring program is stored. When the road target monitoring program is executed by a processor, the steps of the road target monitoring method provided in the first aspect are implemented.
[0015] The beneficial effects of the present invention are that the road target monitoring method, system, device and storage medium provided by the present invention improve the image clarity by preprocessing the monitoring video, and generate the moving trajectory of the road target using the target detection algorithm and the road target tracking algorithm, further analyze the trajectory for abnormalities based on preset rules, and then extract features from the abnormal trajectory to achieve accurate identification of abnormal targets. The present invention improves the speed and accuracy of road target identification in complex environments, and provides abnormal analysis and subsequent processing methods for moving trajectories, thereby improving the quality of road target monitoring and providing a data basis for road management.
[0016] In addition, the invention has a reliable design principle, a refined structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0019] Figure 2 It is a schematic flow chart of trajectory tracking of a method according to an embodiment of the present invention.
[0020] Figure 3 It is a rendering of a method according to an embodiment of the present invention.
[0021] Figure 4 is a schematic block diagram of a system according to an embodiment of the present invention.
[0022] Figure 5 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0025] The key terms appearing in the present invention are explained below.
[0026] As the latest progress in target detection algorithms, YOLOv10 abandons the traditional non-maximum suppression step and achieves efficient training and detection reasoning through a consistent dual allocation strategy. This strategy enables YOLOv10 to maintain high-precision road target detection in road target monitoring tasks while significantly reducing computational overhead, providing a solid foundation for the next step of real-time traffic monitoring. The YOLOv10 network model is mainly composed of the following three parts: Backbone is the cornerstone of the entire YOLOv10 model and is responsible for extracting features from input road video frames. For road scenes, the Backbone network can effectively identify potential target areas such as vehicles and pedestrians, while filtering out irrelevant backgrounds, thereby providing visual clues for subsequent steps.
[0027] Neck, also known as Path Aggregation Network (PANet), is used to further process and fuse the features extracted by Backbone. In road traffic monitoring applications, such a design helps to accurately capture road targets at different distances, ensuring good performance even in complex urban street environments; Head (detection head) is the network part of YOLOv10 used for final detection. It is responsible for converting the target features extracted from Backbone and Neck into specific detection results. In the road target monitoring task, the Head network accurately identifies various targets on the road, such as motor vehicles, non-motor vehicles, pedestrians, etc., by predicting the position (bounding box), category, and confidence of each road target.
[0028] ByteTrack is a multi-object tracking (MOT) algorithm. Unlike traditional algorithms that only focus on high-score detection boxes, ByteTrack tracks by associating each detection box. This tracking strategy makes it easy for the ByteTrack algorithm to overcome problems such as mutual occlusion between vehicles, complex weather conditions, and diverse lighting conditions when facing road target tracking problems.
[0029] The road target monitoring method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the road target monitoring system runs in the computer device.
[0030] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a road target monitoring system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0031] like Figure 1 As shown, the method includes: S1. Obtain a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and pre-process the image frames.
[0032] The video stream of the road scene is captured in real time by a high-definition camera. These video frames are preprocessed, including resizing, normalization, and possible color correction, to ensure that the input image meets the preset requirements of the YOLOv10 model.
[0033] S2. Using a target detection algorithm to identify road targets in each image frame, and using a multi-target tracking algorithm to generate trajectories of the road targets in the image frame sequence.
[0034] The trained YOLOv10 network model is used as a single-stage road target detector to identify and locate multiple road targets in each frame. In the present invention, all road targets are divided into three categories: motor vehicles, non-motor vehicles, and pedestrians. Next, the position bounding box, category label, and confidence score of each road target are output. In order to further improve the detection accuracy, the present invention simultaneously inputs the multi-scale feature map into the YOLOv10 model for prediction, so as to better capture road targets of different distances, sizes, and shapes.
[0035] The ByteTrack algorithm is used for cross-frame tracking. The present invention combines the appearance similarity and motion consistency of road targets to maintain the target trajectory, and can maintain good tracking effect even when the target is blocked or temporarily out of view. For road targets that have not been detected for a long time, the present invention will max_time_outDecide whether to terminate tracking to avoid the accumulation of invalid trajectories.
[0036] S3. Perform an abnormal analysis on the trajectory based on preset rules to identify abnormal trajectories.
[0037] Continuously collect and analyze the movement trajectory of road targets, and count traffic flow information in each time period, such as the number of vehicles, average speed and other key indicators. Through in-depth analysis of the target behavior pattern, the system can also detect abnormal behavior, such as driving against the flow, speeding, etc., and issue an alarm in time.
[0038] S4. Obtain the confidence score of the abnormal road target to which the abnormal trajectory belongs, filter out the target detection frame with the highest score, and extract feature information of the road target from the target detection frame.
[0039] The characteristic information may include license plate number, clothing of personnel, etc.
[0040] In an embodiment of the present invention, based on step S1, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0041] Defogging and deraining are performed on surveillance videos. The specific steps are as follows: S101. Obtain a road monitoring video stream, extract image frames from the road monitoring video stream at a set time interval, and integrate the extracted image frames into an image frame sequence.
[0042] Use video surveillance equipment or existing video files as input sources. Make sure the format of the video files is compatible with subsequent processing software or algorithms.
[0043] The time interval for extracting image frames is set according to actual needs, such as extracting one frame per second, one frame every two seconds, etc. The selection of the time interval should take into account the continuity of the video content and the efficiency of subsequent processing.
[0044] Use video processing software or programming libraries (such as OpenCV) to read the video file and extract image frames according to the set time interval. Ensure that the extracted image frames are clear and have no obvious blur or distortion. Combine the extracted image frames into an image frame sequence in chronological order. The image frame sequence can be saved on disk for subsequent processing and analysis.
[0045] S102. Acquire a dark channel of the image frame, estimate a global atmospheric light value and a projection rate map based on the dark channel, and perform defogging based on the global atmospheric light value and the projection rate map.
[0046] For each image frame, calculate its dark channel. The dark channel refers to the minimum value of each pixel in the image in the three RGB color channels, and take a local minimum value based on this minimum value (usually within a small window). The dark channel can reflect the concentration of fog in the image, because fog will make the image dim and reduce the pixel value.
[0047] Based on the dark channel, the brightest pixel value in the dark channel (or the average of the first few brightest pixel values) is selected as the global atmospheric light value. The global atmospheric light value represents the brightness of the sky or bright objects when there is no fog. Accurate estimation of the global atmospheric light value is crucial for subsequent dehazing processing.
[0048] The dark channel and the global atmospheric light value are used to estimate the image's projection rate map according to the atmospheric scattering model. The projection rate map reflects the fog concentration of each pixel in the image, and the larger the value, the less fog. The projection rate map can be calculated by normalizing and inverting the dark channel.
[0049] Based on the global atmospheric light value and the projection rate map, a defogging algorithm (such as a defogging algorithm based on dark channel prior) is used to defog the image frame. The goal of defogging is to restore the clarity and contrast of the image, making the objects and scenes in the image more clearly visible. During the processing, the global atmospheric light value and the projection rate map need to be fine-tuned to obtain the best defogging effect.
[0050] S103. Use the L0 gradient minimization method to remove rain pixels, and use the histogram adjustment technique to enhance the intensity of the image after rain removal.
[0051] (1) Separate color components from image frames Read image frames: Use image processing software or programming libraries (such as OpenCV, MATLAB, etc.) to read image frames.
[0052] Separate color components: Decompose the image frame from the RGB color space into red component (R), green component (G), and blue component (B).
[0053] Access each pixel of the image and extract its R, G, and B values respectively.
[0054] (2) Perform logarithmic transformation and two-dimensional Fourier transform on color components Logarithmic transformation: Perform a logarithmic transformation on each color component to compress the brightness range in the image and enhance the contrast of the image. The formula for logarithmic transformation is usually log(1+I), where I is the pixel value of the color component.
[0055] 2D Fourier Transform: Perform a 2D Fourier transform on the logarithmic transformed color components to convert them from the spatial domain to the frequency domain. The Fourier transform can reveal the frequency components in the image, facilitating subsequent high-frequency enhancement and filtering. Create a Gaussian filter function and perform a 2D Fourier transform on the Gaussian filter function Create a Gaussian filter function: Create a two-dimensional Gaussian filter function based on the image size and the desired filtering effect. Gaussian filter functions are often used to smooth images and reduce noise and details.
[0056] Perform a two-dimensional Fourier transform on the Gaussian filter function: Convert the Gaussian filter function from the spatial domain to the frequency domain so that it can be convolved with the frequency domain representation of the color component.
[0057] (3) Perform frequency domain convolution operation on the color components after two-dimensional Fourier transform and Gaussian filter function Frequency domain convolution operation: Perform a convolution operation on the color components after the two-dimensional Fourier transform and the frequency domain representation of the Gaussian filter function. The result of the convolution operation is a new frequency domain representation that combines the frequency components of the color components and the smoothing effect of the Gaussian filter. Perform an inverse Fourier transform on the convolution result to obtain the intermediate image.
[0058] Inverse Fourier Transform: Perform an inverse Fourier transform on the convolution result to convert it from the frequency domain back to the spatial domain.
[0059] The result of the inverse Fourier transform is an intermediate image that contains the low-frequency components of the color components and the high-frequency components smoothed by the Gaussian filter.
[0060] (4) In the logarithmic domain, the intermediate image is subtracted from the original image to obtain a high-frequency enhanced image of the color component. Subtraction in the logarithmic domain: In the logarithmic domain, the intermediate image is subtracted from the original image (i.e., the image that has not been logarithmically transformed). This step is actually a high-frequency enhancement in the logarithmic domain, because the intermediate image contains low-frequency components and smoothed high-frequency components, and the original image minus the intermediate image retains the high-frequency details in the original image.
[0061] (5) Take the antilogarithm to obtain the enhanced image component Antilog transform: An antilog transform is performed on the high-frequency enhanced image, converting it from the logarithmic domain back to the original pixel value range. The result of the antilog transform is an enhanced image component that contains clearer high-frequency details.
[0062] (6) Contrast stretching and enhancement of image components Contrast stretching: Perform contrast stretching enhancement on the enhanced image components to further improve the image clarity and contrast. Contrast stretching can be achieved by adjusting the image histogram to make the image brightness distribution more uniform.
[0063] (7) Obtain clear image component After contrast stretching and enhancement, clear image components are obtained, which contain richer details and higher contrast.
[0064] Merge clear image components: Merge the clear image components of red, green, and blue components into a complete image frame. This is done by accessing each pixel of the image and recombining the R, G, and B components into an RGB image.
[0065] Through the above steps, the color components can be separated from the image frame, and logarithmic transformation, two-dimensional Fourier transform, Gaussian filtering, frequency domain convolution operation, inverse Fourier transform, logarithmic domain subtraction, antilogarithmic transformation, contrast stretching and enhancement operations can be performed to finally obtain a rain-free image frame. However, please note that the "rain removal" effect here is not directly achieved through these steps, but indirectly improves the clarity and contrast of the image through high-frequency enhancement and contrast stretching, which may make the rain marks less obvious.
[0066] In an embodiment of the present invention, based on step S2, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner. Figure 2 .
[0067] After using the YOLOv10 network model to identify road targets, the ByteTrack algorithm is used for cross-frame tracking. The present invention combines the appearance similarity and motion consistency of road targets to maintain the target trajectory, and can maintain good tracking effects even when the target is blocked or temporarily out of view. For road targets that have not been detected for a long time, the present invention will max_time_out Decide whether to terminate tracking to avoid the accumulation of invalid trajectories.
[0068] The core idea of ByteTrack is to decompose the road multi-target tracking problem into two stages: road target detection and target trajectory estimation. First, the YOLOv10 model mentioned above is used to identify road targets in road video frames to obtain the position detection box, category information, and confidence score of each target. Then, the Byte Track multi-target tracking algorithm is used to associate these detection results to form a continuous trajectory. Among them, the Kalman filter is designed to predict and update the position and speed of the target. The following are the basic calculation steps of the Kalman filter: a) Initialization Initialize state estimate X 0: initial position state estimation of the road target; Initial error covariance matrix P0: Indicates the uncertainty of the initial position estimate of the road target.
[0069] b) Prediction Status prediction X k|k-1 : Use the system's dynamic model to predict the state of the road target at the next moment; Error Covariance Forecast P k|k-1 : Predict the position error covariance of the road target at the next moment.
[0070] c) Update Calculate Kalman gain K k : This is a weight used to update the road target prediction state; Update state estimate X k : Combine the predicted state and new measurements to update the road target state estimate; Update error covariance P k : Update the estimated uncertainty.
[0071] d) Repeat The prediction and update steps are repeated until the road target tracking task is completed.
[0072] The calculation formula of the Kalman filter prediction step is as follows:
[0073]
[0074] in, F k , B k Respectively represent the state transfer matrix and the control input matrix, U k represents the control vector, Q k represents the process noise covariance matrix.
[0075] The calculation formula for the Kalman filter update step is as follows:
[0076]
[0077] in, H k , R k Represent the observation matrix and the measurement noise covariance matrix respectively. Z k Representsk The actual position measurement of the road target at the moment.
[0078] Based on the Kalman filter, ByteTrack also introduced the Hungarian Algorithm to solve the data association problem. For those road target detection results that do not match the existing track, ByteTrack regards them as new targets and creates new tracks for them. The following are the basic calculation steps of the Hungarian algorithm: a) Constructing the cost matrix An association cost is calculated for each detected object (such as a vehicle, pedestrian, etc.) in each road video frame and all known trajectories in the previous frame. The association cost is usually based on a certain metric, such as Euclidean distance, Mahalanobis distance, or similarity metric of appearance features, to determine whether the road targets in different frames are the same object. Considering that the calculation of Euclidean distance is relatively simple and fast, the present invention uses Euclidean distance to measure the cross-frame spatial distance association cost of road targets, which is necessary for a road multi-target tracking system that processes a large amount of data in real time. The Euclidean distance calculation formula is as follows:
[0079] in, X 1. X 2 represents the horizontal coordinate of the road target in the previous and next frames of the road video. Y 1. Y 2 represents the vertical axis.
[0080] These costs form a cost matrix C . The rows represent detections in the current frame and the columns represent trajectories in the previous frame. i The first test and j The associated cost of a trajectory is c ij ,So C[i][j] = c ij .
[0081] b) Initialization mark.
[0082] Create two boolean arrays: assigned_row and assigned_col , respectively indicating whether the road target in the current frame and the trajectory in the previous frame have been matched, and all elements of the two arrays are initialized to False .
[0083] c) Find independent zero elements For each element in the cost matrix, if it is the only zero value in its row and column (i.e., independent zero), it can be used as a matching point and the corresponding row and column are marked. If there is no independent zero, proceed to the next step.
[0084] d) Adjust the cost matrix If it is not possible to directly find enough independent zeros to match the complete road target with the corresponding trajectory, the cost matrix needs to be adjusted to create more independent zeros. Find the uncovered minimum value, then subtract this value from all uncovered rows and add this value from all uncovered columns. The purpose of this is to not change the position of existing zeros while creating new zeros. Then continue looking for independent zeros.
[0085] e) Marking Path If enough independent zeros are still not found after the adjustment, an augmenting path needs to be marked. Start at an unmarked row, find a zero in an unmarked column, then go up that column to find a zero in another unmarked row, and so on, until you reach a marked row or no more zeros are found. Alternately unmark and add marks along this path to update the matching status of the road target and the trajectory.
[0086] f) Repeat steps (c)-(e) The steps of finding independent zeros, adjusting the matrix, and marking the path are repeated until all rows or columns are marked, which means that a perfect match of the road target and the trajectory has been found.
[0087] g) Output matching results Finally, through inspection assigned_row and assigned_col An array can be used to determine which road targets are matched with which tracks. Unmatched detections may be new road targets, while unmatched tracks may mean that the corresponding road target has left the road monitoring.
[0088] h) Update trajectory The status information of each track is updated according to the matching results. Newly detected road targets can start new tracks. For old tracks that have lost matching, the present invention updates the status information of each track according to the preset maximum time threshold. max_time_out Decide whether to maintain tracking or end tracking.
[0089] i) Repeat the above steps As the road video sequence is played, the above process is repeated continuously to achieve continuous road target tracking.
[0090] In addition, the ByteTrack algorithm also uses a delay mechanism in data association, allowing low-confidence detection targets to be re-evaluated in the next few frames. This means that the algorithm can recapture a road target after it disappears briefly, greatly improving the tracking ability of occluded targets between vehicles in road scenes.
[0091] The present invention makes innovative improvements to the ByteTrack algorithm, enabling it to store the historical location information of each target in the road video.
[0092] First, after obtaining the YOLOv10 road target detection results, create a track_history List to save its historical position, which contains the detection information set of each road target ( t , x, y ).in, t Represents the detection timestamp, x, y It represents the central horizontal and vertical coordinates of the road target detection frame.
[0093] Secondly, the present invention will bind a dedicated target to each detected road target ID , and create a vehicle_ids Dictionary. key Variable is road target ID , value The variable is a list of historical trajectories for the target, which makes it easy to quickly find the historical location information of a specific road target.
[0094] Next, create a vehicle_nums List, which is used to store the real-time and cumulative number of various road objects. The real-time number of objects is obtained by traversing and classifying the road target detection results of the current frame, and the cumulative number is obtained by accumulating the real-time number of road targets, which will not be described here.
[0095] In addition, in order to limit memory usage and keep only the most recent historical location information of road targets, a fixed size of max_time_out Instead of a circular queue track_history When the storage history length exceeds the preset threshold, the earliest historical information will be discarded and the latest acquired position will be stored.
[0096] Finally, the historical location information of the tracked target is read, and the moving trajectory of the road target is visualized in the form of a trail, such as Figure 3 This visualization can help users quickly understand complex traffic flow patterns, especially at busy intersections or on highways.
[0097] In a specific example, the specific steps of the multi-target tracking method are as follows: In the detection phase, once YOLOv10 identifies a road target in an image frame and generates a detection box, target category, and confidence score for it, it is necessary to assign a unique ID .this ID It will be used as the unique identifier of the target during the entire tracking process to distinguish different road targets. IDThe assignment can be a consecutive integer or other form of unique identifier, as long as it is guaranteed not to be repeated during the entire tracking process.
[0098] For each road target ID Create a circular queue to store the latest detection information of the target. This circular queue has a maximum timeout max_time_out Parameters are used to control the update frequency and retention time of information in the queue. The size of the circular queue (i.e. the number of detection information that can be stored in the queue) needs to be set according to the actual application scenario and performance requirements. Each element in the queue contains the detection timestamp, road target type, and road target location coordinates, which are crucial for subsequent tracking and trajectory analysis.
[0099] Whenever new detection information arrives, add it to the corresponding road target ID If the queue is full, max_time_out Parameters, the oldest information will be replaced by the new information. In this way, the circular queue always keeps the latest detection information, and it will not take up too much memory due to too much information.
[0100] Create a file called vehicle_ids A dictionary for storing road targets ID and its corresponding historical trajectory data. The dictionary key is the road target ID , the value is the historical trajectory data synchronized and backed up from the corresponding circular queue. These data may include position coordinates, speed, acceleration, etc., which are used for subsequent trajectory analysis and behavior prediction.
[0101] Create a file called vehicle_nums A statistical list is used to count the number of road targets of each category on the monitored road and the number fluctuation trend. This list can be a two-dimensional array or a list of dictionaries, each element of which contains information such as the road target category, current number, and number change trend (such as increase, decrease, or stability). This information is of great significance for monitoring road traffic conditions and predicting traffic congestion.
[0102] In the matching stage, the detection frames are divided into high-scoring frames and low-scoring frames according to the confidence score. High-scoring frames usually indicate high confidence in target detection, so they are given priority for matching; low-scoring frames may contain noise or false detections, so more caution is required during the matching process.
[0103] For high-resolution frames, they are matched with all current circular queues first. The matching process can be achieved by comparing the position, speed, size, and appearance features between the detection frames. If the high-resolution frame matches the information in a circular queue successfully, the information in the queue is updated; if the match fails, it tries to match with other queues.
[0104] For low-scoring frames, they are matched with the circular queues that have not been matched with high-scoring frames. Since low-scoring frames may contain noise or false detection, a higher threshold needs to be set or a more complex matching algorithm needs to be used during the matching process to reduce the occurrence of false matches.
[0105] If a high-score box does not find a matching target in all the circular queues, it means that this is a new road target. At this time, a new tracking track needs to be created for it and a new ID and the corresponding circular queue.
[0106] For the circular queue that does not match the detection frame, retain 30 frames. If more than 30 frames have not matched the detection frame, the road target ID Record as lost ID , and delete the circular queue For those circular queues that do not match the detection frame, keep them for a period of time (such as 30 frames). If no detection frame is matched during this period, it means that the road target may have left the monitoring area or been lost due to other reasons. ID Record as lost ID , and from vehicle_ids The relevant information is deleted from the dictionary and the circular queue. This ensures that the tracking system always keeps tracking and managing valid road targets.
[0107] On the basis of the above embodiment, in order to further improve the reliability of the data classification results provided by the above embodiment, an implementable method is to train the target detection algorithm and the multi-target tracking algorithm, and the specific training method includes: We extracted 57,774 images containing motor vehicles, non-motor vehicles, people, and other target instances from the original COCO dataset. Next, we sampled 20,824 images from the UA-DETRAC dataset, and on this basis, we additionally improved the annotations of road targets such as non-motor vehicles and pedestrians. In summary, this experiment used a total of 78,598 image datasets, and divided the total dataset into training set, validation set, and test set in a ratio of 8:1:1, that is, 62,878 training sets, and 7,860 validation sets and test sets.
[0108] In order to prevent the model from overfitting, the present invention performs a carefully designed data enhancement process on the training set, which is an effective technique to expand the size and diversity of the training set by applying multiple input transformations without changing the output labels. In the field of computer vision, image enhancement technology has become an important implicit regularization method in deep convolutional neural networks, which improves performance by enhancing the generalization ability of the model. In this experiment, the present invention mainly uses data enhancement methods such as horizontal flipping, vertical flipping, rotation and random scaling to enrich the image representation.
[0109] In this experiment, in order to make full use of the GPU's video memory resources and optimize training efficiency, the present invention uniformly sets the input size of the image to 640×640 pixels. Through a series of experimental observations, it is found that the size of the batch size has a significant impact on the utilization of the GPU memory. Therefore, after repeated training and adjustment, the most reasonable batch size in terms of performance, 16, was selected to ensure efficient use of the GPU memory. At the same time, in order to ensure that the model can fully learn the data features, the present invention sets the number of training epochs to 300. This setting aims to improve the generalization ability and accuracy of the model through sufficient training cycles.
[0110] In order to evaluate the accuracy and stability of the road target monitoring model, precision, recall and mean average precision (mAP) are selected as evaluation indicators. The calculation formulas for each evaluation indicator are as follows:
[0111]
[0112]
[0113]
[0114] in, True Positive , False Positive They represent the number of positive samples and negative samples predicted by the model as positive. False Negative Represents the number of positive samples predicted by the model as negative. n It represents the category of all samples. In this experiment, the road target instances to be detected are divided into three categories, namely motor vehicles, non-motor vehicles, and pedestrians.
[0115] Table 1 Comparison of road target monitoring experiments
[0116] Table 1 shows the experimental comparison results of the YOLOv10_ByteTrack network model with other series of representative models in the road target monitoring task. Specifically, in the experimental comparison of road target detection with R-CNN (Region-based Convolutional Neural Network) and SSD (Single Shot MultiBox Detector), the YOLOv10_ByteTrack network model has improved its accuracy by 8.0% and 6.3%, its recall rate by 13.2% and 4.8%, and its average precision by 10.4% and 6.9%. The experimental results show that the YOLOv10_ByteTrack network model has significant advantages in the road target monitoring task, and its performance exceeds the existing mainstream detection models.
[0117] In an embodiment of the present invention, based on step S3, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0118] Before setting the standard trajectory of the lanes, a deep analysis and understanding of the road is required. This includes the width of the road, the number of lanes, the direction of the lanes, the layout of traffic lights, possible pedestrian crossing areas, etc. Based on this information, an expected standard trajectory can be defined for each lane.
[0119] Road information collection: Collect detailed information about roads through field surveys or reference to relevant materials, including road types (such as expressways, urban main roads, branch roads, etc.), number of lanes, lane width, road signs and markings, etc.
[0120] Standard trajectory design: Based on the road information, an expected standard trajectory is designed for each lane. These trajectories can be straight, curved, or a combination of the two, depending on the shape of the road and the requirements of traffic flow. When designing, parameters such as the normal driving speed, acceleration, and deceleration of the vehicle should be taken into account.
[0121] Trajectory parameterization: parameterize the designed standard trajectory for use in the subsequent comparison process. These parameters may include the coordinates of the start and end points of the trajectory, the curvature of the trajectory, speed limit, etc.
[0122] After obtaining the trajectories of road targets, these trajectories need to be compared with standard trajectories to identify abnormal trajectories that are inconsistent with the standard trajectories.
[0123] Trajectory data alignment: First, the trajectory data of the road target needs to be aligned with the standard trajectory data. This usually involves time synchronization and spatial coordinate conversion to ensure that the two are compared in the same time and space coordinate system.
[0124] Trajectory feature extraction: Extract key features from the trajectory of the road target, which may include the shape, speed, acceleration, direction change, etc. At the same time, corresponding features are also extracted from the standard trajectory for comparison.
[0125] Comparison algorithm application: Use appropriate comparison algorithms (such as dynamic time warping, Euclidean distance calculation, etc.) to calculate the difference between the road target trajectory and the standard trajectory. These algorithms can quantify the similarity or difference between the trajectories.
[0126] Abnormal track determination: Based on the comparison results, a threshold is set to determine which tracks are inconsistent with the standard track. When the difference between the track of the road target and the standard track exceeds this threshold, it is determined as an abnormal track.
[0127] Abnormal trajectory processing: For road targets determined to have abnormal trajectories, the system can further analyze the causes of the abnormalities, such as traffic violations, vehicle failures, pedestrian intrusions, etc. At the same time, the system can send information about abnormal trajectories to traffic management departments or relevant security agencies so that they can take appropriate measures.
[0128] In an embodiment of the present invention, based on step S4, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0129] S401. If the abnormal road target is a vehicle, identify the license plate number from the target detection frame After identifying the abnormal road target as a vehicle, it is necessary to further extract the license plate number information from the target detection frame. This usually involves the following steps: License plate location: First, locate the license plate within the target detection frame. This can be achieved through image processing techniques (such as edge detection, morphological processing, etc.) to identify the position and size of the license plate in the image.
[0130] License plate character segmentation: After the license plate is located, the license plate area is segmented from the image and the license plate characters are segmented. This usually involves steps such as image binarization, denoising, and character segmentation in order to extract each character in the license plate separately.
[0131] License plate character recognition: Finally, optical character recognition (OCR) technology is used to recognize each character to obtain the complete information of the license plate number. This step may require the use of a specialized OCR algorithm or model to ensure the accuracy and efficiency of recognition.
[0132] By identifying the license plate number, abnormal vehicles can be associated with the owner's information, providing important clues and evidence for subsequent traffic management, accident investigation or violation handling.
[0133] S402. If the abnormal road target is a person, output the target detection frame to a display device After identifying that the abnormal road target is a person, the target detection frame and related information need to be output to the display device so that traffic management personnel or relevant personnel can intuitively see the specific situation of the abnormal person. This usually involves the following steps: Target detection frame extraction: First, the target detection frame of the current frame is extracted from the trajectory of the abnormal target. This includes information such as the position, size, and image area of the detection frame.
[0134] Information display: The target detection box and its related information (such as target type, confidence score, speed, direction, etc.) are then superimposed on the original image or video frame and output to the display device. This can be achieved through image processing technology or video processing software to ensure the clarity and readability of the information.
[0135] Real-time monitoring: Finally, traffic management personnel or relevant personnel can monitor the situation of abnormal personnel in real time through display devices and make further processing or response as needed. This helps to timely detect and deal with potential traffic violations or safety incidents.
[0136] By adding these two new links, the information in road surveillance videos can be more comprehensively utilized to provide more accurate and efficient decision support for traffic management departments. At the same time, this also provides new technical means and solutions for traffic management and safety monitoring.
[0137] In some embodiments, the road target monitoring system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the road target monitoring system may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function of road object monitoring.
[0138] In this embodiment, the road target monitoring system can be divided into multiple functional modules according to the functions it performs, such as Figure 4 As shown. The functional modules of the system 400 may include: a preprocessing module 410, a trajectory generation module 420, an anomaly analysis module 430 and a feature extraction module 440. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0139] A preprocessing module, used to obtain a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and preprocess the image frames; A trajectory generation module, used to identify the road target in each image frame using a target detection algorithm, and generate a moving trajectory of the road target in the image frame sequence using a multi-target tracking algorithm; An abnormality analysis module, used to perform abnormality analysis on the trajectory based on preset rules and identify abnormal trajectories; The feature extraction module is used to obtain the confidence score of the abnormal road target to which the abnormal trajectory belongs, filter out the target detection frame with the highest score, and extract the feature information of the road target from the target detection frame.
[0140] Optionally, as an embodiment of the present invention, obtaining a road monitoring video stream, converting the road monitoring video stream into an image frame sequence, and preprocessing the image frames includes: Acquire a road monitoring video stream, and extract image frames from the road monitoring video stream at a set time interval, and integrate the extracted image frames into an image frame sequence; Acquire a dark channel of the image frame, estimate a global atmospheric light value and a projection rate map based on the dark channel, and perform defogging based on the global atmospheric light value and the projection rate map; L0 gradient minimization method is used to remove rain pixels and histogram adjustment technique is used to enhance the intensity of the image after rain removal.
[0141] Optionally, as an embodiment of the present invention, an L0 gradient minimization method is used to remove rain pixels, and a histogram adjustment technique is used to enhance the intensity of the image after the rain is removed, including: Separating color components from the image frame, the color components comprising a red component, a green component, and a blue component; Perform logarithmic transformation and two-dimensional Fourier transform on color components; Create a Gaussian filter function and perform a two-dimensional Fourier transform on the Gaussian filter function; Perform frequency domain convolution operation on the color components after two-dimensional Fourier transformation and the Gaussian filter function, and perform inverse Fourier transformation on the convolution result to obtain an intermediate image; In the logarithmic domain, the intermediate image is subtracted from the original image to obtain a high-frequency enhanced image of the color component; Take the antilogarithm to obtain the enhanced image component, perform contrast stretching enhancement on the image component to obtain a clear image component; The clear image components of the color components are merged into a rain-free image frame.
[0142] Optionally, as an embodiment of the present invention, a target detection algorithm is used to identify a road target in each image frame, and a multi-target tracking algorithm is used to generate a moving trajectory of the road target in the image frame sequence, including: Use YOLOv10 as the target detection algorithm to identify road targets in image frames and generate detection boxes, target categories, and confidence scores for road targets; ByteTrack is used as a multi-target tracking algorithm to match movement trajectories for road targets based on detection boxes, target categories, and confidence scores.
[0143] Optionally, as an embodiment of the present invention, a multi-target tracking algorithm is used to match a moving trajectory for a road target based on a detection frame, a target category, and a confidence score, including: Assign a unique ID ; For the ID Create a corresponding circular queue and specify the size of the circular queue. ID The latest detection information is saved to the circular queue, and the detection information includes the detection timestamp, the road target type, and the road target location coordinates; Create a dictionary whose key variables are the road targets ID , the value variable is the historical trajectory data that is synchronously backed up from the circular queue of the road target; Create a statistical list to count the road target categories, the number of road targets of each category, and the fluctuation trend of the number of road targets of each category on the monitored roads; According to the confidence score, the detection frame is divided into high-score frame and low-score frame; Prioritize matching high-score frames with all current circular queues; Then match the low-scoring frame with the circular queue that has not matched the high-scoring frame; For the high-score frames that are not matched in the circular queue, a new tracking track is created for them; For the circular queue that does not match the detection frame, 30 frames are retained. If the detection frame is still not matched after more than 30 frames, the ID of the corresponding road target is recorded as a lost ID and the circular queue is deleted.
[0144] Optionally, as an embodiment of the present invention, performing an abnormality analysis on the trajectory based on a preset rule to identify an abnormal trajectory includes: Set the standard trajectory of the lane; The trajectory of the road target is compared with the standard trajectory, and the trajectory that is inconsistent with the standard trajectory is determined as an abnormal trajectory.
[0145] Optionally, as an embodiment of the present invention, obtaining the confidence score of the abnormal road target to which the abnormal trajectory belongs, screening out the target detection frame with the highest score, and extracting feature information of the road target from the target detection frame includes: If the abnormal road target is a vehicle, identifying the license plate number from the target detection frame; If the abnormal road target is a pedestrian, the target detection frame is output to a display device.
[0146] Figure 5 The road target monitoring method provided for the embodiment of the present application can be applied to equipment. It will be appreciated by those skilled in the art that the equipment structure involved in the embodiment of the present invention does not constitute a limitation on the equipment, and the equipment may include more or less components than shown, or combine certain components, or different component arrangements. In an embodiment of the present invention, the equipment includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The equipment may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described herein and / or required.
[0147] The device 500 may include: a processor 510, a memory 520 and a communication unit 530. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0148] The memory 520 may be used to store the execution instructions of the processor 510, and the memory 520 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 520 are executed by the processor 510, the device 500 is enabled to perform some or all of the steps in the following method embodiments.
[0149] The processor 510 is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 520, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 510 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0150] The communication unit 530 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0151] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0152] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0153] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0154] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0155] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0157] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A road target monitoring method, characterized in that: include: Acquire a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and pre-process the image frames; Using a target detection algorithm to identify road targets in each image frame, and using a multi-target tracking algorithm to generate trajectories of the road targets in the image frame sequence; Performing an abnormal analysis on the trajectory based on preset rules to identify abnormal trajectories; The confidence score of the abnormal road target to which the abnormal trajectory belongs is obtained, the target detection frame with the highest score is screened out, and the feature information of the road target is extracted from the target detection frame.
2. The method according to claim 1, characterized in that Acquiring a road monitoring video stream, converting the road monitoring video stream into an image frame sequence, and preprocessing the image frames, including: Acquire a road monitoring video stream, and extract image frames from the road monitoring video stream at a set time interval, and integrate the extracted image frames into an image frame sequence; Acquire a dark channel of the image frame, estimate a global atmospheric light value and a projection rate map based on the dark channel, and perform defogging based on the global atmospheric light value and the projection rate map; L0 gradient minimization method is used to remove rain pixels and histogram adjustment technique is used to enhance the intensity of the image after rain removal.
3. The method according to claim 2, characterized in that The L0 gradient minimization method is used to remove rain pixels, and the histogram adjustment technique is used to enhance the intensity of the image after rain removal, including: Separating color components from the image frame, the color components comprising a red component, a green component, and a blue component; Perform logarithmic transformation and two-dimensional Fourier transform on color components; Create a Gaussian filter function and perform a two-dimensional Fourier transform on the Gaussian filter function; Perform frequency domain convolution operation on the color components after two-dimensional Fourier transformation and the Gaussian filter function, and perform inverse Fourier transformation on the convolution result to obtain an intermediate image; In the logarithmic domain, the intermediate image is subtracted from the original image to obtain a high-frequency enhanced image of the color component; Take the antilogarithm to obtain the enhanced image component, perform contrast stretching enhancement on the image component to obtain a clear image component; The clear image components of the color components are merged into a rain-free image frame.
4. The method according to claim 1, characterized in that: Using a target detection algorithm to identify a road target in each image frame, and using a multi-target tracking algorithm to generate a trajectory of the road target in the image frame sequence, including: Use YOLOv10 as the target detection algorithm to identify road targets in image frames and generate detection boxes, target categories, and confidence scores for road targets; ByteTrack is used as a multi-target tracking algorithm to match movement trajectories for road targets based on detection boxes, target categories, and confidence scores.
5. The method according to claim 4, characterized in that Use multi-target tracking algorithms to match movement trajectories for road targets based on detection boxes, target categories, and confidence scores, including: Assign unique IDs to road targets; Create a corresponding circular queue for the ID, specify the size of the circular queue, and save the latest detection information of the ID to the circular queue, the detection information including the detection timestamp, the road target type, and the road target location coordinates; Create a dictionary, where the key variable in the dictionary is the ID of the road target, and the value variable is the historical trajectory data synchronized and backed up from the circular queue of the road target; Create a statistical list to count the road target categories, the number of road targets of each category, and the fluctuation trend of the number of road targets of each category on the monitored roads; According to the confidence score, the detection frame is divided into high-score frame and low-score frame; Prioritize matching high-score frames with all current circular queues; Then match the low-scoring frame with the circular queue that has not matched the high-scoring frame; For the high-score frames that are not matched in the circular queue, a new tracking track is created for them; For the circular queue that does not match the detection frame, 30 frames are retained. If the detection frame is still not matched after more than 30 frames, the ID of the corresponding road target is recorded as a lost ID and the circular queue is deleted.
6. The method according to claim 5, characterized in that Performing an abnormal analysis on the trajectory based on preset rules to identify abnormal trajectories includes: Set the standard trajectory of the lane; The moving trajectory of the road target is compared with the standard trajectory, and the trajectory that is inconsistent with the standard trajectory is determined as an abnormal trajectory.
7. The method according to claim 6, characterized in that Obtain the confidence score of the abnormal road target to which the abnormal trajectory belongs, filter out the target detection frame with the highest score, and extract the feature information of the road target from the target detection frame, including: If the abnormal road target is a vehicle, identifying the license plate number from the target detection frame; If the abnormal road target is a pedestrian, the target detection frame is output to a display device.
8. A road target monitoring system, characterized in that: include: A preprocessing module, used to obtain a road monitoring video stream, convert the road monitoring video stream into an image frame sequence, and preprocess the image frames; A trajectory generation module, used to identify the road target in each image frame using a target detection algorithm, and generate a moving trajectory of the road target in the image frame sequence using a multi-target tracking algorithm; An abnormality analysis module, used to perform abnormality analysis on the trajectory based on preset rules and identify abnormal trajectories; The feature extraction module is used to obtain the confidence score of the abnormal road target to which the abnormal trajectory belongs, filter out the target detection frame with the highest score, and extract the feature information of the road target from the target detection frame.
9. A device, characterized in that: include: A memory for storing a road target monitoring program; A processor, used to implement the steps of the road target monitoring method as described in any one of claims 1-7 when executing the road target monitoring program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a road target monitoring program, which, when executed by a processor, implements the steps of the road target monitoring method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Road abnormal behavior act detection device
CN107644206A
Urban elevated road vehicle speed measurement method based on multi-target tracking algorithm
CN113092807A
Park abnormal behavior detection monitoring method and system
CN118570874A
Multi-target detection tracking statistical method and device based on edge calculation
CN118968044A
Method, driver assistance system and vehicle for learning a trajectory of a road section
DE102015211150A1
Cited By
Street quality evaluation method based on behavior recognition, tracking and analysis
CN120544075A
Unmanned aerial vehicle highway vehicle speed measurement method and device based on frequency domain enhanced target detection
CN122715031A