A vehicle tracking method and system

By recording the memory sequence of the vehicle tracking target and using attention mechanisms and classification models, the problem of tracking failure caused by occlusion in vehicle tracking is solved, and accurate re-tracking of lost targets is achieved, improving robustness and application scope.

CN115797410BActive Publication Date: 2025-11-28HENGTONG OPTIC ELECTRIC CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211627746.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-11-28
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

Existing vehicle tracking technologies are prone to tracking failures under occlusion conditions and cannot effectively re-track lost targets, resulting in insufficient tracking accuracy and robustness.

Method used

By recording the memory sequence of the vehicle tracking target, an attention mechanism and classification model are used to re-track the vehicle after it is lost. By combining the memory sequence and real-time target detection to calculate a weighted key value, the lost target can be re-tracked.

Benefits of technology

It improves the accuracy and robustness of vehicle tracking, enabling the recapture of lost targets after tracking failures, thus expanding the application scope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797410B_ABST
    Figure CN115797410B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of target recognition, and discloses a vehicle tracking method and system, the method comprising the following steps: extracting initial information of a target vehicle in an initial frame image, tracking the remaining frame images according to the initial information to obtain position information of the target vehicle in the remaining frame images; extracting feature information of the target vehicle and assigning an ID, storing the ID, the position information and the feature information of the target vehicle as a memory sequence; performing re-tracking to obtain a real-time detection vehicle target, combining the memory sequence and the real-time detection vehicle target, using an attention mechanism to calculate a weighted key value; classifying the weighted key value, judging a vehicle that has appeared in the real-time detection vehicle target according to a classification result, and associating the vehicle with the target vehicle ID in the memory sequence; and the system comprises modules for realizing each step of the method. The application can realize re-tracking of a lost target vehicle, improve the accuracy of re-tracking and the robustness of the overall tracking process, and has a wide application range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target recognition technology, and in particular to a vehicle tracking method and system. Background Technology

[0002] Vehicle tracking refers to detecting vehicles in a video, assigning them IDs, and then tracking their trajectories. Different identified vehicles have different IDs for use in subsequent subtasks. During vehicle tracking, the tracked target may be occluded or temporarily disappear during its movement, leading to tracking failure or target loss. This can occur because the tracking bounding box may drift from the vehicle target to an occluder or background object, or the vehicle target may be completely occluded, causing the tracking model to completely lose track of the target, thus resulting in tracking failure.

[0003] In existing technologies, researchers have studied a road vehicle tracking method based on multi-feature spatial fusion (patent publication number: CN110517291A). This method constructs an integral image to calculate horizontal edge features, vertical edge features, and diagonal edge features to obtain Haar-like shape features. The drawback of this method is that using Haar-like shape features to describe the vehicle's shape is prone to misidentifying interfering objects as tracking targets when vehicles and targets occlude each other, leading to tracking failures such as target drift. Furthermore, in real-world vehicle tracking applications, such as traffic intersections, vehicles are easily obstructed while waiting at red lights. Therefore, the robustness of this method fails to meet the requirements of practical vehicle tracking applications. To address the shortcomings of the aforementioned methods, researchers have investigated a vehicle tracking method based on target feature sensitivity and deep learning (patent publication number: CN111062973A). This method constructs and trains a discriminative connected network, extracts features through a pre-trained common network model, and selects filters that are more sensitive to vehicle targets. The discriminative connected network and the selected sensitive filters are then used to track vehicle targets. This method, due to the introduction of highly sensitive filters, achieves better recall in vehicle tracking and can effectively track partially occluded vehicle targets. However, the highly sensitive filters also bring the drawback of low accuracy, making it prone to recalling false positive targets.

[0004] Existing research aims to develop a more robust tracking model. This paradigm can only ensure greater stability in the tracking process, but no tracking system can guarantee 100% accuracy. Furthermore, in current technologies, once the tracking process is interrupted, even if the failed vehicle target is detected again in subsequent frames, it cannot be re-linked to the corresponding tracked target from the previous tracking process. It is impossible to determine whether the newly detected vehicle target is entering the video context for the first time or being detected again due to tracking loss, thus failing to achieve the re-tracking of lost targets. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a vehicle tracking method and system that can realize the re-tracking of lost target vehicles, improve the accuracy of re-tracking and the robustness of the overall tracking process, and has a wide range of applications.

[0006] To solve the above-mentioned technical problems, the present invention provides a vehicle tracking method, comprising:

[0007] Read the tracking video of the target vehicle, extract the tracking video frame by frame to obtain a frame sequence, and extract the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence;

[0008] Based on the initial tracking coordinate information of the target vehicle, the remaining frame images in the frame sequence are tracked to obtain the position information of the target vehicle in the remaining frames; the feature information of the target vehicle in the remaining frames is extracted, a unique ID is assigned to the target vehicle, and the ID, position information and feature information of the target vehicle are stored as a memory sequence.

[0009] Vehicle re-tracking and detection is performed to obtain real-time detected vehicle targets. The weighted key value is calculated by combining the memory sequence and the real-time detected vehicle targets using an attention mechanism.

[0010] The weighted key values ​​are classified using a classification model. Based on the classification results, vehicles that have appeared in the real-time detection vehicle target are identified and associated with the target vehicle ID in the memory sequence, thereby enabling the re-tracking of lost target vehicles.

[0011] In one embodiment of the present invention, when extracting the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence, the YOLO5 target detection model is used.

[0012] In one embodiment of the present invention, when extracting features of the target vehicle in the remaining frames, a convolutional neural network, a residual network, or a self-attention mechanism is used.

[0013] In one embodiment of the present invention, the memory sequence stores the location information and feature information of the target vehicle in the remaining frames in the form of key-value pairs. The key name of the memory sequence is the ID of the target vehicle, and the key value of the memory sequence is a queue. The queue elements are the location information and feature information of the target vehicle at each time step stored in chronological order.

[0014] In one embodiment of the present invention, the step of calculating the weighted key value using an attention mechanism by combining the memory sequence and real-time detection of vehicle targets specifically involves:

[0015] Extract the feature information of real-time detected vehicle targets, and use the feature information of real-time detected vehicle targets as the query Q of the attention mechanism;

[0016] The positional and feature information in the memory sequence are averaged separately, and the key-value pairs after average pooling are used as the key-value information (K,V) of the attention mechanism.

[0017] The weighted key value A is calculated using the attention mechanism as follows:

[0018]

[0019] Among them, (K) i V i α(Q,K) represents the key-value pairs after average pooling, i = 1, 2, ..., N, where N represents the number of positional and feature information in the memory sequence; i ) represents the attention probability distribution for each key-value pair.

[0020] In one embodiment of the present invention, the attention probability distribution α(Q,K) of each key-value pair i The calculation method for ) is as follows:

[0021]

[0022] Where, score(Q,K) i ) represents a scalar score, and exp() represents an exponential function.

[0023] In one embodiment of the present invention, the scalar score(Q,K) i The calculation method for ) is as follows:

[0024]

[0025] Where d is the dimension of Q.

[0026] In one embodiment of the present invention, the classification model is a feedforward neural network, logistic regression classification, or support vector machine.

[0027] In one embodiment of the present invention, the step of determining, based on the classification result, vehicles that have appeared in the real-time detected vehicle targets and associating them with the target vehicle IDs in the memory sequence specifically includes:

[0028] When the classification model outputs a result of 1, the features of the real-time detected vehicle target corresponding to the weighted key value at this time are obtained, the similarity between the features of the real-time detected vehicle target and the features of each target vehicle in the memory sequence is calculated, and the ID of the target vehicle in the memory sequence with the highest similarity is taken as the ID of the real-time detected vehicle target.

[0029] The present invention also provides a vehicle tracking system, including a vehicle target detection module, a vehicle target tracking module, a feature extraction module, a memory cache module, and a re-tracking module.

[0030] The vehicle target detection module reads the tracking video of the target vehicle, extracts the tracking video frame by frame to obtain a frame sequence, extracts the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence and transmits it to the vehicle target tracking module.

[0031] The vehicle target tracking module tracks the remaining frames in the frame sequence based on the initial tracking coordinate information of the target vehicle, obtains the position information of the target vehicle in the remaining frames, and transmits it to the memory cache module.

[0032] The feature extraction module extracts the feature information of the target vehicle in the remaining frames and transmits it to the memory cache module;

[0033] The memory cache module assigns a unique ID to the target vehicle and stores the target vehicle's ID, location information, and feature information as a memory sequence.

[0034] The re-tracking module re-tracks and detects vehicles to obtain real-time detected vehicle targets. It combines the memory sequence and real-time detected vehicle targets and uses an attention mechanism to calculate a weighted key value. It then uses a classification model to classify the weighted key value and, based on the classification result, determines the vehicles that have appeared in the real-time detected vehicle targets and associates them with the target vehicles in the memory sequence, thereby realizing the re-tracking of lost target vehicles.

[0035] The technical solution of the present invention has the following advantages compared with the prior art:

[0036] This invention achieves re-tracking of lost target vehicles by recording a memory sequence of the target vehicle and associating the re-emerging detected target with the tracked target based on the memory sequence after the target is lost. It uses an attention mechanism and classification model to associate the detected target with the tracked target, effectively utilizing the connection between them and achieving high matching accuracy, thus improving the accuracy of re-tracking. The memory sequence structure is simple, reducing storage requirements while achieving re-tracking. Even assuming the vehicle tracking model has tracking failures, it can recapture the lost target after a tracking failure, improving the robustness of the entire tracking process. This allows the invention to accept imperfect vehicle tracking models, expanding its application scope. Attached Figure Description

[0037] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0038] Figure 1 This is a flowchart of the present invention.

[0039] Figure 2 This is a schematic diagram of the vehicle inspection stage in this invention.

[0040] Figure 3 This is a schematic diagram of the vehicle tracking phase in this invention. Detailed Implementation

[0041] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0042] Accepting the possibility that tracked targets may be lost due to occlusion, this invention focuses on solving the problem of how to re-identify tracked targets after they are lost. Specifically, this invention proposes a highly robust vehicle tracking method to address tracking failures caused by occlusion or temporary disappearance of the target during vehicle tracking. Even after a tracked vehicle target is lost for a certain time step and then re-detected, the method can still link the targets whose tracking was interrupted in the video context and assign them the same ID.

[0043] Example 1

[0044] Reference Figure 1 As shown, this invention discloses a vehicle tracking method, comprising the following steps:

[0045] S1: Read the tracking video of the target vehicle, extract the tracking video frame by frame to obtain a frame sequence, and extract the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence; in this embodiment, the initial frame is the first frame image in the frame sequence, and the YOLO5 target detection model is used when extracting the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence.

[0046] S2: Based on the initial tracking coordinate information of the target vehicle, track the remaining frames in the frame sequence to obtain the position information of the target vehicle in the initial frame in the remaining frames; use methods such as Convolutional Neural Networks (CNN), residual networks, or self-attention mechanisms to extract the feature information of the target vehicle in the remaining frames. Assign a unique ID to the target vehicle, and store the target vehicle ID, the target vehicle's position information in the remaining frames (i.e., at different time steps), and feature information as a memory sequence.

[0047] The memory sequence stores the target vehicle's position and feature information in other frames in the form of key-value pairs. The key of the memory sequence is the target vehicle's ID, and the key is a queue. The queue elements are the target vehicle's position and feature information stored in chronological order for each time step. The queue elements of the memory sequence adopt a "first-in, first-out" structure. When the number of stored time steps reaches the maximum value, the information that entered the memory sequence first is discarded to ensure the real-time performance of the memory sequence. The memory sequence is implemented using a dictionary data structure, where each entry in the dictionary maps the target vehicle's ID to a queue, and the queue stores the current target vehicle's tracking position and feature information for each time step.

[0048] When tracking a vehicle target, the input consists of the target's tracking position information from the previous frame and the image of the current frame. Tracking is performed, and the tracking result of the target from the previous frame in the current frame is output. On one hand, the tracking result serves as the final output of the tracking task; on the other hand, after feature extraction to extract the target features from the pixel information within the tracking box, these features, along with the target's tracking position information in the current frame, are stored in a memory sequence for use in the re-tracking task during the real-time tracking and detection phase.

[0049] S3: Perform vehicle re-tracking and detection to obtain real-time detected vehicle targets, and use an attention mechanism to calculate weighted key values ​​by combining the memory sequence and real-time detected vehicle targets.

[0050] S3-1: Use a road vehicle tracking method based on multi-feature space fusion, a vehicle tracking method based on target feature sensitivity and deep learning, or other vehicle target tracking methods to re-track and detect vehicles and obtain real-time detected vehicle targets.

[0051] S3-2: Extract the feature information of real-time detected vehicle targets and use the feature information of real-time detected vehicle targets as the query Q of the attention mechanism.

[0052] S3-3: Perform average pooling on the positional and feature information in the memory sequence, and use the pooled key-value pairs as the key-value information (K,V) of the attention mechanism. At the current time, if the memory cache module stores the spatiotemporal state information of N tracked targets, perform average pooling on the state information of each target at different time steps in the memory cache module, and output N target memory features that aggregate the states of multiple time steps. These N target memory features serve as the key-value information (K,V) of the attention mechanism. i V i ), i = 1, 2, ..., N.

[0053] S3-4: Use an attention mechanism to model the relationship between query Q and key-value pairs (K, V), and output the weighted key-value pair A that is most relevant to query Q. The specific implementation of the attention mechanism adopts the transformer model.

[0054] The weighted key value A is calculated using the attention mechanism as follows:

[0055]

[0056] Among them, (K) i V i ) represents the key-value pairs after average pooling, K i This represents the location information of the target vehicle after average pooling, V i The α(Q,K) represents the feature information of the target vehicle after average pooling, i = 1, 2, ..., N, where N represents the number of positional and feature information in the memory sequence; i α(Q,K) represents the attention probability distribution for each key-value pair. The α function uses the softmax function. i The calculation method for ) is as follows:

[0057]

[0058] Where softmax() represents the softmax function, and exp() represents the exponential function; score(Q,K) i The scalar score is represented by the vector Q and K. The score function maps two vectors Q and K to scalar scores. i The calculation method for ) is as follows:

[0059]

[0060] Where d is the dimension of Q.

[0061] S4: Use a classification model to classify the weighted key values, and based on the classification results, determine the vehicles that have appeared in the real-time detection vehicle targets and associate them with the target vehicle IDs in the memory sequence to realize the re-tracking of lost target vehicles.

[0062] The weighted key value A is classified using a feedforward neural network (FNN), logistic regression, or support vector machine. The classification model outputs class = FNN(A), where FNN() represents the feedforward neural network operation. The classification results are of two types:

[0063] When the classification model outputs class=0, it indicates that the features of the real-time detected vehicle target corresponding to A have low correlation with the feature information of each target stored in the memory sequence, and the real-time detected vehicle target corresponding to A appears in the video context for the first time. At this time, a new ID is assigned to the real-time detected vehicle target.

[0064] When the classification model outputs class=1, it indicates that the features of the real-time detected vehicle target corresponding to A are highly correlated with the feature information of a target stored in the memory sequence, and the real-time detected vehicle target corresponding to A appears in the video context for the second time. At this point, the ID of the memory target with the highest correlation is further output to restore its identity, specifically:

[0065] Obtain the feature Q of the real-time detected vehicle target corresponding to the weighted key value A at this time, and calculate the similarity between the feature Q of the real-time detected vehicle target and the average pooling output K of the target features stored in the memory sequence: The target vehicle ID in the memory sequence with the highest similarity is used as the ID of the vehicle target to be detected in real time.

[0066] Example 2

[0067] Reference Figure 2 , Figure 3 As shown, the present invention also discloses a vehicle tracking system, including a vehicle target detection module, a vehicle target tracking module, a feature extraction module, a memory cache module, and a re-tracking module.

[0068] The vehicle target detection module reads the tracking video of the target vehicle, extracts the tracking video frame by frame to obtain a frame sequence, extracts the initial tracking coordinate information of the target vehicle in the initial frame image of the frame sequence, and transmits it to the vehicle target tracking module.

[0069] The vehicle target tracking module tracks the remaining frames in the frame sequence based on the initial tracking coordinates of the target vehicle, obtains the target vehicle's position information in the remaining frames, and transmits it to the memory cache module. The vehicle target tracking module also inputs the target's tracking position information from the previous frame and the image of the current frame for tracking, and outputs the tracking result of the target from the previous frame in the current frame. On one hand, the tracking result serves as the final output of the tracking task; on the other hand, after the pixel information within the tracking box is processed by the feature extraction module to extract the target features of the current frame, it is stored in the memory cache module along with the target's tracking position information in the current frame for use by the re-tracking module in the detection phase.

[0070] The feature extraction module extracts the feature information of the target vehicle in the remaining frames and transmits it to the memory cache module.

[0071] The memory cache module assigns a unique ID to the target vehicle and stores the target vehicle's ID, location information, and feature information as a memory sequence. Specifically, the relevant information is stored in key-value pairs, where the key is the tracking target's ID information, and the key is a queue. The queue elements store the target's location information and feature information at each time step in chronological order, where the feature information is generated by the feature extraction module. Furthermore, the memory cache module stores only a fixed number of time step information, implemented using a "first-in, first-out" (FIFO) structure based on the queue. When the number of stored time steps reaches its maximum value, the information that entered the memory cache module first is discarded.

[0072] The re-tracking module re-detects and re-tracks vehicles to obtain real-time detected vehicle targets. It then uses an attention mechanism to calculate a weighted key value by combining the memory sequence and the real-time detected vehicle targets. A classification model is used to classify the weighted key value, and based on the classification results, it identifies vehicles that have appeared in the real-time detected vehicle targets and associates them with target vehicles in the memory sequence, thus enabling the re-tracking of lost target vehicles. If a target is re-detected after being lost, the correspondence between the previous and subsequent targets is linked within the video context, ensuring that the same target retains a unique ID. That is, during the real-time detection phase, for each detected target, it can be determined whether the detected target is appearing in the video context for the first time or reappearing after tracking interruption. For the former, a new ID is assigned to the detected target; for the latter, the detected target is restored to the ID of the previously tracked target.

[0073] The technical solution of the present invention has the following advantages compared with the prior art:

[0074] 1. This invention achieves the re-tracking of lost target vehicles by recording a memory sequence of the target vehicle and associating the re-emerging detected target with the target vehicle based on the memory sequence after the target vehicle is lost. Even if the target vehicle is lost due to occlusion or scale changes, as long as it reappears and is detected, the targets whose tracking was interrupted within the video context can be linked together, thereby restoring the target vehicle's identity ID. Correspondingly, the first-time appearance of a target can also be identified, preventing it from being mixed with previously appeared targets, thus improving the robustness of the overall tracking process.

[0075] 2. When associating the re-emerging detected target with the tracked target based on the memory sequence, using attention mechanisms and classification models to associate the detected target with the tracked target can effectively utilize the connection between the two, resulting in high matching accuracy and thus improving the accuracy of re-tracking.

[0076] 3. The memory sequence stores the tracking results at each time step. The memory sequence has a simple structure and low storage requirements, which can reduce storage requirements while realizing re-tracking.

[0077] 4. During vehicle tracking, by combining memory sequences and re-tracking, the lost target can be recaptured after a tracking failure, even if the default vehicle tracking model has tracking failures. This improves the robustness of the entire tracking process, making the invention acceptable for imperfect vehicle tracking models and expanding its application areas.

[0078] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0079] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0080] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0081] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0082] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A vehicle tracking method characterized by, The method comprises the following steps: reading a tracking video of a target vehicle, extracting the tracking video frame by frame to obtain a frame sequence, and extracting initial tracking coordinate information of the target vehicle in an initial frame image in the frame sequence; tracking the remaining frame images in the frame sequence according to the initial tracking coordinate information of the target vehicle to obtain position information of the target vehicle in the remaining frames; extracting feature information of the target vehicle in the remaining frames, assigning a unique ID to the target vehicle, and storing the ID, position information and feature information of the target vehicle as a memory sequence; performing re-tracking detection of the vehicle to obtain a real-time detection vehicle target, using an attention mechanism to calculate a weighted key value in combination with the memory sequence and the real-time detection vehicle target; classifying the weighted key value using a classification model, and judging a vehicle that has appeared in the real-time detection vehicle target according to a classification result and associating the vehicle with a target vehicle ID in the memory sequence to realize re-tracking of a lost target vehicle; the memory sequence stores the position information and feature information of the target vehicle in the remaining frames in the form of a key-value pair, and the attention mechanism is used to calculate the weighted key value in combination with the memory sequence and the real-time detection vehicle target, specifically as follows: extracting feature information of the real-time detection vehicle target, and taking the feature information of the real-time detection vehicle target as query Q of the attention mechanism; averaging and pooling the position information and feature information in the memory sequence respectively, and taking the averaged and pooled key-value pair as key information (K) and value information (V) of the attention mechanism; the weighted key value A calculated using the attention mechanism is: wherein (K i , V i ) represents the key-value pair after average pooling, i = 1, 2, …, N, N represents the number of position information and feature information in the memory sequence; a(Q, K i ) represents the attention probability distribution of each key-value pair.

2. The vehicle tracking method of claim 1, wherein: when extracting the initial tracking coordinate information of the target vehicle in the initial frame image in the frame sequence, a yolo5 target detection model is used.

3. The vehicle tracking method of claim 1, wherein: when extracting the feature of the target vehicle in the remaining frames, a convolutional neural network, a residual network or a self-attention mechanism is used.

4. The vehicle tracking method of claim 1, wherein: The key name of the memory sequence is the ID of the target vehicle, and the key value of the memory sequence is a queue, and the queue elements are the position information and feature information of the target vehicle at each time step stored in time sequence.

5. The vehicle tracking method of claim 1, wherein: The attention probability distribution a(Q, K i of each key-value pair is calculated as follows: where score(Q, K i ) denotes a scalar score and exp() denotes the exponential function.

6. The vehicle tracking method of claim 5, wherein: The scalar score score(Q, K i ) is computed as follows: Wherein, d is the dimension of Q.

7. The vehicle tracking method of claim 1, wherein: The classification model is a feedforward neural network, a logistic regression classification or a support vector machine.

8. The vehicle tracking method according to any one of claims 1 to 7, characterized in that: judging a vehicle that has appeared in the real-time detection vehicle target according to a classification result and associating the vehicle with a target vehicle ID in the memory sequence, specifically as follows: when the result output by the classification model is 1, the feature of the real-time detection vehicle target corresponding to the weighted key value at this time is obtained, the similarity between the feature of the real-time detection vehicle target and the features of each target vehicle in the memory sequence is calculated, and the target vehicle ID in the memory sequence with the largest similarity is taken as the ID of the real-time detection vehicle target.

9. A vehicle tracking system characterized by: The method comprises a vehicle target detection module, a vehicle target tracking module, a feature extraction module, a memory caching module and a re-tracking module, the vehicle target detection module reads a tracking video of a target vehicle, extracts the tracking video frame by frame to obtain a frame sequence, extracts initial tracking coordinate information of the target vehicle in an initial frame image in the frame sequence, and transmits the initial tracking coordinate information to the vehicle target tracking module; the vehicle target tracking module tracks the remaining frame images in the frame sequence according to the initial tracking coordinate information of the target vehicle to obtain position information of the target vehicle in the remaining frames, and transmits the position information to the memory caching module; The feature extraction module extracts feature information of the target vehicle in the remaining frames and transmits the feature information to the memory cache module; The memory cache module assigns a unique ID to the target vehicle, stores the ID, position information and feature information of the target vehicle as a memory sequence; The re-tracking module performs re-tracking detection of the vehicle to obtain a real-time detection vehicle target, combines the memory sequence and the real-time detection vehicle target, and uses an attention mechanism to calculate a weighted key value; A classification model is used to classify the weighted key value, a vehicle that has appeared in the real-time detection vehicle target is determined according to a classification result, and the vehicle is associated with the target vehicle in the memory sequence, so as to realize re-tracking of a lost target vehicle; The memory sequence stores the position information and feature information of the target vehicle in the remaining frames in the form of a key-value pair, and the attention mechanism is used to calculate the weighted key value in combination with the memory sequence and the real-time detection vehicle target, specifically as follows: Feature information of the real-time detection vehicle target is extracted, and the feature information of the real-time detection vehicle target is used as query Q of the attention mechanism; The position information and feature information in the memory sequence are respectively subjected to average pooling, and the key-value pair after the average pooling is used as key information (K) and value information (V) of the attention mechanism; The weighted key value A is calculated using the attention mechanism as follows: wherein (K i , V i ) represents the key-value pair after average pooling, i = 1, 2, …, N, and N represents the number of position information and feature information in the memory sequence; and a(Q, K i ) represents the attention probability distribution of each key-value pair.

Citation Information

Patent Citations

  • Road vehicle tracking method based on multi-feature space fusion

    CN110517291A

  • Vehicle tracking method based on target feature sensitivity and deep learning

    CN111062973A

  • Improved high-precision end-to-end vehicle multi-target tracking method

    CN113963168A

  • FairMOT multi-class tracking method based on improved attention mechanism

    CN114241053A