A cross-domain vehicle re-identification and continuous trajectory construction method
By constructing a camera coordinate calibration model and DeepSort algorithm, combined with a vehicle re-identification model based on lane information, the problem of low accuracy in cross-domain vehicle tracking is solved, and stable cross-domain continuous vehicle trajectory tracking is achieved, which is suitable for existing traffic facilities.
Patent Information
- Application Number
- CN202210763102.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In cross-domain vehicle tracking, existing technologies have low vehicle re-identification accuracy, are unable to stably and reliably perform cross-domain continuous vehicle trajectory tracking, and fail to effectively utilize vehicle location features.
By building a road camera sensor coordinate calibration model, the vehicle trajectory in the video is converted into a world coordinate trajectory. The DeepSort algorithm is used to extract vehicle trajectory information. A vehicle re-identification model that integrates lane information is used to screen out the target vehicle trajectory from multiple camera trajectories and perform spatiotemporal stitching.
It improves the accuracy and stability of vehicle re-identification, ensures the reliability and integrity of vehicle cross-domain continuous trajectory tracking, and is applicable to existing road traffic facilities without the need for additional equipment installation.
Smart Images

Figure CN115205559B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle tracking technology, and in particular to a cross-domain vehicle re-identification and continuous trajectory construction method. Background Art
[0002] In recent years, transportation development has gradually shifted from a period of rapid growth to a period of high-quality development. The development of intelligent transportation systems can effectively improve transportation efficiency and management, and is a key direction for future urban transportation development. Accurately assessing the operating status of all vehicles in the transportation system and obtaining continuous vehicle status information from cross-domain traffic sensors will facilitate urban transportation operation management and anomaly detection.
[0003] Currently, vehicle re-identification (VRI) is the most widely used method for cross-domain vehicle tracking. Given an image of a vehicle, VRI can identify it in other photos or captured by a camera. The task is to search a database for images containing the same vehicle captured by multiple cameras. VRI has widespread applications in video surveillance, intelligent transportation, and urban computing, enabling rapid discovery, location, and tracking of target vehicles within large surveillance videos.
[0004] In traditional vehicle re-identification technology, only vehicle appearance features are extracted from different data sources without considering the characteristics of the vehicle's location. It is impossible to effectively re-identify vehicles with similar appearance features. The re-identification accuracy is low, and the reliability and stability of cross-domain continuous trajectory tracking of vehicles cannot be guaranteed. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a cross-domain vehicle re-identification and continuous trajectory construction method, which can improve the accuracy of vehicle re-identification and stably and reliably perform cross-domain continuous trajectory tracking of vehicles.
[0006] The object of the present invention can be achieved by the following technical solution: A cross-domain vehicle re-identification and continuous trajectory construction method comprises the following steps:
[0007] S1. Build a road camera sensor coordinate calibration model to convert the vehicle trajectory in the camera-captured video into the vehicle's world coordinate trajectory in the geodesic longitude and latitude;
[0008] S2. Based on the video data collected by each camera sensor and the road camera sensor coordinate calibration model, the DeepSort algorithm is used to extract the vehicle trajectory information corresponding to each camera;
[0009] Using a vehicle re-identification model that integrates target vehicle information, the target vehicle trajectory that matches the target vehicle is selected from the vehicle trajectories corresponding to multiple cameras.
[0010] S3. Splice the screened target vehicle trajectories in time and space to obtain a complete cross-domain tracking trajectory of the target vehicle.
[0011] Furthermore, the specific process of step S1 is: for the vehicle trajectory data obtained by the camera, a spatial coordinate conversion model based on the camera calibration method is constructed, wherein the trajectory pixel coordinates under the camera are (u, v, 1) T , the initial world coordinates are (U,V,1) T , Z is the scale factor, H is the homology matrix, and the conversion relationship is:
[0012]
[0013] After obtaining the initial world coordinates, add the GPS latitude and longitude coordinates of the camera to obtain the world coordinates of the vehicle trajectory.
[0014] Furthermore, the step S2 specifically includes the following steps:
[0015] S21. Obtain a historical vehicle dataset, train the YOLOv5 model, and obtain a YOLOv5 vehicle detection model.
[0016] S22. Based on the YOLOv5 vehicle detection model, implement the prediction tracking, matching, and updating of the DeepSort algorithm to build a DeepSort model;
[0017] S23, using the DeepSort model to process each frame of the video captured by each camera to obtain vehicle trajectory data corresponding to each camera, and then using the road camera sensor coordinate calibration model to output the vehicle trajectory of each vehicle in the video captured by each camera in the same world coordinate system;
[0018] S24. Using a vehicle re-identification model that incorporates lane information, a target vehicle trajectory that matches the target vehicle is selected from vehicle trajectories corresponding to multiple cameras.
[0019] Furthermore, the prediction tracking in step S22 specifically uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the video frame at the current moment, and then uses the Kalman filter to predict the vehicle position at the next moment. The vehicle position coordinates (x', y') are:
[0020] x′=x+w / 2,y′=y
[0021] Among them, (x, y, w, h) is the vehicle frame information identified by the YOLOv5 vehicle detection model, (x, y) is the coordinate of the lower left corner of the vehicle frame, and (w, h) are the width and height of the vehicle frame, respectively.
[0022] Furthermore, the matching in step S22 specifically uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the video frame at the next moment, and then performs data association with the vehicle information obtained by the DeepSort prediction and tracking part. The data association part uses the Hungarian algorithm to construct a cost matrix based on the Mahalanobis distance of the vehicle appearance information distance and the vehicle position, and calculates the optimal vehicle matching solution. The Mahalanobis distance of the vehicle position is:
[0023] d (1) (i,j)=(d j -y i ) T S -1 (d j -y i )
[0024] Where i is the number of the predicted tracking vehicle frame, j is the number of the detected vehicle frame, d and y are the distribution of detected vehicles and predicted tracking vehicles, respectively, and S is the covariance matrix between the two distributions.
[0025] The vehicle appearance information distance is calculated using a ReID network trained offline on a vehicle re-identification dataset. A 128-dimensional unit appearance feature description vector is extracted from the vehicle image. Then, for each predicted and tracked vehicle, the last 100 appearance feature descriptors R that are successfully associated with the detection box are retained and the minimum cosine distance between them and the detected vehicle box is calculated:
[0026]
[0027] Where, is the appearance feature of the jth detected vehicle, is the kth appearance feature of the i-th predicted tracking vehicle, is the appearance feature set of the i-th predicted tracking vehicle;
[0028] The cost matrix c i,j is the Mahalanobis distance d of the vehicle position (1) (i, j) and the distance d between the vehicle appearance information (2) The weighted result of (i,j):
[0029] c i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)
[0030] Where λ is the weighted ratio.
[0031] Furthermore, the updating in step S22 is specifically based on the optimal matching solution of the vehicle obtained by matching, and the vehicle ID information at this moment is transferred to the corresponding vehicle at the next moment.
[0032] Furthermore, the step S24 specifically includes the following steps:
[0033] S241: Construct a vehicle re-identification model integrating lane information;
[0034] S242, calibrating the area of all lanes in the video captured by the camera;
[0035] S243. While processing each frame of the video image using the DeepSort model, determine the lane where the vehicle is located by using the boundary based on the vehicle position information identified by the DeepSort model;
[0036] S244. Using a vehicle re-identification model that integrates lane information, the vehicle in the video image is matched with the target vehicle information, and a vehicle trajectory corresponding to the vehicle matching the target vehicle in the camera video is obtained as the target vehicle trajectory.
[0037] Furthermore, the vehicle re-identification model includes a vehicle feature extraction module and a vehicle feature matching module. The vehicle feature extraction module is divided into two parts: one part extracts the feature vector of the vehicle appearance, and the other part extracts the feature vector of the lane where the vehicle is located. Finally, the final vehicle feature vector is obtained by vector splicing.
[0038] The vehicle feature matching module uses cosine distance to calculate the similarity between the target vehicle and the vehicle features in the video frame, eliminates vehicles with similarity below a first set threshold, and selects vehicles with similarity to the target vehicle features above a second set threshold.
[0039] Furthermore, the lengths of the vehicle appearance feature vector and the lane feature vector are both 512, and the length of the final vehicle feature vector is 1024.
[0040] Furthermore, the specific process of step S244 is as follows:
[0041] First, determine the appearance information of the target vehicle and the lane it is initially in;
[0042] Then, considering that the size, clarity, and degree of occlusion of vehicles in a camera video vary to a certain extent, during the vehicle matching process of each frame, vehicle images with a size smaller than a size threshold are not matched, and only vehicle images with a size greater than or equal to the size threshold are matched. That is, the vehicle re-identification model that integrates lane information is used to match the target vehicle information, and the matching results are recorded, that is, the vehicle matching results for each frame corresponding to each vehicle trajectory extracted by the DeepSort model;
[0043] Assuming that there is a target vehicle v1, each track in the camera video has a matching vector: (None,v1,v1,v1......v1,None), where each element represents the matching result of the corresponding vehicle in each frame of the track, and None means that there is no target vehicle matching it;
[0044] Finally, the matching result with the largest number of occurrences in the trajectory matching vector is selected as the matching result of the entire trajectory, that is, the trajectory corresponds to the trajectory of the target vehicle.
[0045] Compared with the existing technology, the present invention links the coordinates in the video captured by the camera with the world coordinates of the earth to convert the vehicle trajectory in the video into the world coordinate trajectory of the vehicle in longitude and latitude; then uses the DeepSort algorithm to track and extract the vehicle trajectory in each camera video, and uses the vehicle re-identification model that integrates lane information to find the motion trajectory that matches the target vehicle; finally, the motion trajectory that matches the target vehicle is spliced to obtain continuous vehicle trajectory tracking in the entire area. Therefore, based on the DeepSort algorithm extracting vehicle trajectory information from the video, the vehicle appearance features and lane information features in the video data are further extracted to complete the vehicle re-identification work. Compared with traditional vehicle re-identification models, the present invention can effectively improve the accuracy of vehicle re-identification and ensure that the spliced cross-domain continuous vehicle trajectory results are more reliable and stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 Schematic diagram of the method flow of the present invention;
[0047] Figure 2 Schematic diagram of the application process of the embodiment;
[0048] Figure 3 Schematic diagram of coordinate transformation for the road camera sensor coordinate calibration model;
[0049] Figure 4 This is a schematic diagram of the vehicle re-identification effect;
[0050] Figure 5 Schematic diagram of the network structure of the vehicle re-identification model in the embodiment. DETAILED DESCRIPTION
[0051] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] Example
[0053] like Figure 1 As shown, a cross-domain vehicle re-identification and continuous trajectory construction method includes the following steps:
[0054] A cross-domain vehicle re-identification and continuous trajectory construction method includes the following steps:
[0055] S1. Build a road camera sensor coordinate calibration model to convert the vehicle trajectory in the camera-captured video into the vehicle's world coordinate trajectory in the geodesic longitude and latitude;
[0056] S2. Based on the video data collected by each camera sensor and the road camera sensor coordinate calibration model, the DeepSort algorithm is used to extract the vehicle trajectory information corresponding to each camera;
[0057] Using a vehicle re-identification model that integrates target vehicle information, the target vehicle trajectory that matches the target vehicle is selected from the vehicle trajectories corresponding to multiple cameras.
[0058] S3. Splice the screened target vehicle trajectories in time and space to obtain a complete cross-domain tracking trajectory of the target vehicle.
[0059] This embodiment applies the above method and combines the multi-camera sensor video data of the Donghai Bridge to track the cross-domain trajectory of the vehicle. The process is as follows: Figure 2 As shown, it mainly includes:
[0060] First, we'll explain the multi-camera video data. This data consists of three consecutive daytime video captures separated by 400 meters, over a half-hour period. The GPS latitude and longitude locations of each camera are known. Next, we'll determine the target vehicle's information, including its appearance and lane information.
[0061] Step 1: Build a road camera sensor coordinate calibration model (coordinate conversion diagram as shown below) Figure 3 As shown), by analyzing the video images taken by each camera, the scale factor Z and the homology matrix H in the coordinate transformation formula are calculated:
[0062]
[0063] Among them, (u,v,1) T is the pixel coordinate of the trajectory under the camera, (U, V, 1) Tis the initial world coordinate, Z is the scale factor, and H is the homology matrix. After obtaining the initial world coordinate, add the longitude and latitude coordinates of each camera to obtain the position information of the vehicle trajectory in each captured video in the world coordinate system.
[0064] Step 2: For vehicle tracking in a single road camera sensor video, the DeepSort algorithm is used to extract the vehicle trajectory information;
[0065] While using the DeepSort algorithm to extract vehicle trajectories, a vehicle re-identification model that integrates lane information is used to determine whether the extracted vehicle trajectory belongs to the target vehicle.
[0066] Among them, the DeepSort algorithm can clearly identify and track vehicle targets in a single road camera video. Since the YOLOv5 target detection algorithm is the basis for the operation of the DeepSort model and subsequent models, it is necessary to use the existing public vehicle datasets on the Internet or the self-made vehicle datasets on the corresponding road sections to train the YOLOv5 model to obtain a high-precision YOLOv5 vehicle detection model. This embodiment uses a self-made vehicle detection database on the Donghai Bridge section to train the YOLOv5 model to obtain a high-precision YOLOv5 vehicle detection model for the Donghai Bridge camera video data. The vehicle dataset of this embodiment is produced by using the ImageLabel tool to calibrate the vehicles in the camera video frames on the Donghai Bridge to obtain the Donghai Bridge vehicle detection database.
[0067] The DeepSort model is mainly divided into three parts: prediction and tracking, matching, and updating. The prediction and tracking part uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the current video frame, and then uses the Kalman filter to predict the vehicle's position at the next moment. The vehicle frame information identified by YOLOv5 is (x, y, w, h), where (x, y) are the coordinates of the lower left corner of the vehicle frame, and (w, h) are the width and height of the vehicle frame. The vehicle's position coordinates (x', y') can be defined as:
[0068] x′=x+w / 2,y′=y
[0069] The matching part uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the next video frame. The detected vehicle information is then associated with the vehicle information obtained by the DeepSort prediction and tracking part. The data association part uses the Hungarian algorithm, which constructs a cost matrix based on the distance between vehicle appearance information and the Mahalanobis distance of vehicle position to calculate the optimal vehicle matching solution. The Mahalanobis distance of vehicle position is:
[0070] d (1) (i,j)=(dj -y i ) T S -1 (d j -y i )
[0071] In the formula, i represents the number of the predicted tracked vehicle frame, and j represents the number of the detected vehicle frame. d and y represent the distribution of detected and predicted tracked vehicles, respectively, and S is the covariance matrix between the two distributions.
[0072] The vehicle appearance information distance is to use a ReID network trained offline on a vehicle re-identification dataset to extract a 128-dimensional unit appearance feature description vector from the vehicle image. Then, for each predicted and tracked vehicle, the last 100 appearance feature descriptors R that are successfully associated with the detection box are retained and the minimum cosine distance between them and the detected vehicle box is calculated:
[0073]
[0074] in is the appearance feature of the jth detected vehicle, is the kth appearance feature of the i-th predicted tracking vehicle, is the appearance feature set of the i-th predicted tracked vehicle.
[0075] The total cost matrix c i,j is the Mahalanobis distance d of the vehicle position (1) 9i,j) and the distance d between the vehicle appearance information (2) The weighted result of (i,j):
[0076] c i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)
[0077] In the formula, λ is the weighted ratio.
[0078] The update part transfers the vehicle ID information at one moment to the corresponding vehicle at the next moment based on the optimal vehicle matching solution in the matching part, and then repeats the DeepSort prediction, matching, and update process.
[0079] After the YOLOv5 and DeepSort models are prepared, the DeepSort model is used to process each frame of the video to obtain vehicle trajectory data. The model is then calibrated using the road camera sensor coordinates to output the motion trajectory of each vehicle in each video.
[0080] After obtaining a high-precision YOLOv5 vehicle detection model, this example applies it to a DeepSort model. The DeepSort model is then applied to three Donghai Bridge road camera sensor videos to obtain the ID and location information of each track.
[0081] While processing each video frame using the DeepSort model, the vehicle's lane is determined through boundary detection based on the vehicle's position information identified by DeepSort (pre-calibration of all lanes in the camera video is required). After determining the vehicle's lane in the video frame, a vehicle re-identification model incorporating lane information is used to match the vehicle in the video image with the target vehicle information, and the matching results are recorded. During the matching process, considering the variability in size, resolution, and occlusion of vehicles in the Donghai Bridge camera video, images of vehicles that are too small are not matched during the vehicle matching process. Only images of vehicles that meet the set size are matched with the target vehicle information using the lane information incorporating vehicle re-identification model. After matching, a trajectory matching vector corresponding to each track is obtained. The matching result with the most occurrences in the trajectory matching vector is selected as the matching result for the entire track, indicating whether it corresponds to the target vehicle or another vehicle.
[0082] In this embodiment, Figure 4 and Figure 5 As shown in the figure, the vehicle re-identification model that incorporates lane information consists of a vehicle feature extraction module and a vehicle feature matching module. The vehicle feature extraction module is divided into two parts: one extracting a feature vector for the vehicle's appearance and the other extracting a feature vector for its lane. Finally, the final vehicle feature vector is obtained by concatenating these vectors. The vehicle appearance feature vector extraction module is based on Z. Zheng's 2020 IEEE paper "Going Beyond Real Data: A Robust Visual Representation for Vehicle Re-identification." It includes a series of convolutional, fully connected, and pooling layers. Using the network model in this paper, the vehicle's appearance features are extracted as a 512-length appearance feature vector. The lane feature vector extraction module, on the other hand, utilizes a fully connected layer with a length of 512 × the number of lanes. This generates a 512-length vehicle lane feature vector. Finally, concatenation results in a 1024-length vehicle feature vector.
[0083] The vehicle feature matching module uses the cosine distance to calculate the similarity between the target vehicle and the vehicle features in the video frame, screens out some vehicles with similarities below a certain value, and selects the vehicle with the highest similarity to the target vehicle among the remaining vehicles. This vehicle and the target vehicle belong to the same target vehicle.
[0084] Step 3: Using a vehicle re-identification model that incorporates lane information, the target vehicle's information is matched against vehicles in the other camera videos. Once matched, the trajectory data belonging to the same target vehicle in all camera videos is spatiotemporally spliced to obtain a complete cross-domain tracking trajectory for the target vehicle on the Donghai Bridge.
[0085] In summary, this technical solution further extracts the vehicle appearance features and lane information features in the video data on the basis of the DeepSort algorithm to extract vehicle trajectory information, so as to complete the vehicle re-identification work. Compared with the traditional vehicle re-identification model, the introduction of lane information features in the present invention can improve the accuracy of vehicle re-identification. The present invention is applicable to existing highway traffic camera equipment, and does not require the installation of additional traffic information collection sensor equipment, which can save money in the construction and maintenance of highway infrastructure. The accurate and stable lane-level vehicle cross-domain continuous trajectory results obtained by the present invention can support the traffic management and control of the traffic management department and the monitoring and management of abnormal traffic conditions, thereby improving the level of refined management of urban traffic. This result can also provide vehicles with beyond-line-of-sight environmental information in the vehicle-road collaborative scenario, which is conducive to improving the safety of vehicle operation.
Claims
1. A cross-domain vehicle re-identification and continuous trajectory construction method, characterized by: The following steps are involved: S1. Build a road camera sensor coordinate calibration model to convert the vehicle trajectory in the camera-captured video into the vehicle's world coordinate trajectory in the geodesic longitude and latitude. S2. Based on the video data collected by each camera sensor and the road camera sensor coordinate calibration model, the DeepSort algorithm is used to extract the vehicle trajectory information corresponding to each camera; Using a vehicle re-identification model that integrates target vehicle information, the target vehicle trajectory that matches the target vehicle is selected from the vehicle trajectories corresponding to multiple cameras. S3. Splice the screened target vehicle trajectories in time and space to obtain a complete cross-domain tracking trajectory of the target vehicle; Step S2 specifically includes the following steps: S21. Obtain a historical vehicle dataset, train the YOLOv5 model, and obtain a YOLOv5 vehicle detection model. S22. Based on the YOLOv5 vehicle detection model, implement the prediction tracking, matching, and updating of the DeepSort algorithm to build a DeepSort model; S23, using the DeepSort model to process each frame of the video captured by each camera to obtain vehicle trajectory data corresponding to each camera, and then using the road camera sensor coordinate calibration model to output the vehicle trajectory of each vehicle in the video captured by each camera in the same world coordinate system; S24, using a vehicle re-identification model that incorporates lane information, screening out a target vehicle trajectory that matches the target vehicle from vehicle trajectories corresponding to multiple cameras; The vehicle re-identification model includes a vehicle feature extraction module and a vehicle feature matching module. The vehicle feature extraction module is divided into two parts: one part extracts the feature vector of the vehicle appearance, and the other part extracts the feature vector of the lane in which it is located. Finally, the final vehicle feature vector is obtained by vector splicing.
2. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 1 is characterized in that: The specific process of step S1 is: for the vehicle trajectory data obtained by the camera, a spatial coordinate conversion model based on the camera calibration method is constructed, wherein the trajectory pixel coordinates under the camera are , the initial world coordinates are , Z is the scale factor, H is the homology matrix, and the conversion relationship is: , After obtaining the initial world coordinates, add the GPS latitude and longitude coordinates of the camera to obtain the world coordinates of the vehicle trajectory.
3. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 1 is characterized in that: The prediction tracking in step S22 specifically uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the current video frame, and then uses the Kalman filter to predict the vehicle position at the next moment. The vehicle position coordinates ( x' , y' )for: , in,( x , y , w , h ) is the vehicle frame information identified by the YOLOv5 vehicle detection model, ( x , y ) is the coordinate of the lower left corner of the vehicle frame, ( w , h ) are the width and height of the vehicle frame respectively.
4. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 3 is characterized in that: The matching in step S22 specifically uses the YOLOv5 vehicle detection model to obtain the position of each vehicle in the next video frame, and then performs data association with the vehicle information obtained by the DeepSort prediction and tracking part. The data association part uses the Hungarian algorithm to construct a cost matrix based on the Mahalanobis distance between the vehicle appearance information distance and the vehicle position, and calculates the optimal vehicle matching solution. The Mahalanobis distance of the vehicle position is: , Where, i To predict the serial number of the tracking vehicle frame, j To detect the serial number of the vehicle frame, d and y They are the distribution of detected vehicles and the distribution of predicted and tracked vehicles, S is the covariance matrix between the two distributions; The vehicle appearance information distance is achieved by using a ReID network trained offline on a vehicle re-identification dataset to extract a 128-dimensional unit appearance feature description vector from the vehicle image. Then, for each predicted and tracked vehicle, the last 100 appearance feature descriptors R that are successfully associated with the detection box are retained and the minimum cosine distance between them and the detected vehicle box is calculated: , Where, For the j Detect the appearance characteristics of the vehicle, For the i Predicting the tracking of vehicles k appearance features, For the i A set of appearance features for predicting and tracking vehicles; The cost matrix is the Mahalanobis distance of the vehicle position Distance from vehicle appearance information The weighted result is: , Where, λ is the weighted ratio.
5. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 4 is characterized in that: The updating in step S22 is specifically to transmit the vehicle ID information at this moment to the corresponding vehicle at the next moment according to the optimal matching solution of the vehicle obtained by matching.
6. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 1 is characterized in that: The step S24 specifically includes the following steps: S241: Construct a vehicle re-identification model integrating lane information; S242, calibrating the area of all lanes in the video captured by the camera; S243. While processing each frame of the video image using the DeepSort model, determine the lane where the vehicle is located by using the boundary based on the vehicle position information identified by the DeepSort model; S244. Using a vehicle re-identification model that integrates lane information, the vehicle in the video image is matched with the target vehicle information, and a vehicle trajectory corresponding to the vehicle matching the target vehicle in the camera video is obtained as the target vehicle trajectory.
7. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 6 is characterized in that: The vehicle feature matching module uses cosine distance to calculate the similarity between the target vehicle and the vehicle features in the video frame, eliminates vehicles with similarity below a first set threshold, and selects vehicles with similarity to the target vehicle features above a second set threshold.
8. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 7 is characterized in that: The lengths of the vehicle appearance feature vector and the lane feature vector are both 512, and the length of the final vehicle feature vector is 1024.
9. The cross-domain vehicle re-identification and continuous trajectory construction method according to claim 6 is characterized in that: The specific process of step S244 is as follows: First, determine the appearance information of the target vehicle and the lane it is initially in; Then, considering that the size, clarity, and degree of occlusion of vehicles in a camera video vary to a certain extent, during the vehicle matching process of each frame, vehicle images with a size smaller than a size threshold are not matched, and only vehicle images with a size greater than or equal to the size threshold are matched. That is, the vehicle re-identification model that integrates lane information is used to match the target vehicle information, and the matching results are recorded, that is, the vehicle matching results for each frame corresponding to each vehicle trajectory extracted by the DeepSort model; Assuming there is a target vehicle v1, each track in the camera video has a matching vector: (None, v1, v1, v1... v1, None), where each element represents the matching result of the corresponding vehicle in each frame of the track. None means that there is no target vehicle matching it. Finally, the matching result with the largest number of occurrences in the trajectory matching vector is selected as the matching result of the entire trajectory, that is, the trajectory corresponds to the trajectory of the target vehicle.